1fc7e83faSFrançois Tigeot 2fc7e83faSFrançois TigeotCRUNCH 0.2 README 6/14/94 3fc7e83faSFrançois Tigeot 4fc7e83faSFrançois TigeotCrunch is available via anonymous ftp to ftp.cs.umd.edu in 5fc7e83faSFrançois Tigeot pub/bsd/crunch-0.2.tar.gz 6fc7e83faSFrançois Tigeot 7fc7e83faSFrançois Tigeot 8fc7e83faSFrançois TigeotWHAT'S NEW IN 0.2 9fc7e83faSFrançois Tigeot 10fc7e83faSFrançois Tigeot* The prototype awk script has been replaced by a more capable and 11fc7e83faSFrançois Tigeot hopefully more robust C program. 12fc7e83faSFrançois Tigeot* No fragile template makefiles or dependencies on the details of the 13fc7e83faSFrançois Tigeot bsd build environment. 14fc7e83faSFrançois Tigeot* You can build crunched binaries even with no sources on-line, you 15fc7e83faSFrançois Tigeot just need the .o files. Crunchgen still will try to figure out as 16fc7e83faSFrançois Tigeot much as possible on its own, but you can override its guessing by 17fc7e83faSFrançois Tigeot specifying the list of .o files explicitly. 18fc7e83faSFrançois Tigeot* Crunch itself has been bmake'd and some man pages written, so it 19fc7e83faSFrançois Tigeot should be ready to install. 20fc7e83faSFrançois Tigeot 21fc7e83faSFrançois Tigeot 22fc7e83faSFrançois TigeotINTRODUCTION 23fc7e83faSFrançois Tigeot 24fc7e83faSFrançois TigeotCrunch is a little package that helps create "crunched" binaries for use 25fc7e83faSFrançois Tigeoton boot, install, and fixit floppies. A crunched binary in this case is 26fc7e83faSFrançois Tigeotone where many programs have been linked together into one a.out file. 27fc7e83faSFrançois TigeotThe different programs are run depending on the value of argv[0], so 28fc7e83faSFrançois Tigeothard links to the crunched binary suffice to simulate a perfectly normal 29fc7e83faSFrançois Tigeotsystem. 30fc7e83faSFrançois Tigeot 31fc7e83faSFrançois TigeotAs an example, I have created an 980K crunched "fixit" binary containing 32fc7e83faSFrançois Tigeotthe following programs in their entirety: 33fc7e83faSFrançois Tigeot 34fc7e83faSFrançois Tigeot cat chmod cp date dd df echo ed expr hostname kill ln ls mkdir 35*2458c6f4SSascha Wildner mt mv pwd rm rmdir sh sleep stty sync test [ badsect chown 36fc7e83faSFrançois Tigeot clri disklabel dump rdump dmesg fdisk fsck halt ifconfig init 37fc7e83faSFrançois Tigeot mknod mount newfs ping reboot restore rrestore swapon umount 38*2458c6f4SSascha Wildner ftp sed telnet vi cpio gzip gunzip gzcat 39fc7e83faSFrançois Tigeot 40fc7e83faSFrançois TigeotNote carefully: vi, cpio, gzip, ed, sed, dump/restore, some networking 41fc7e83faSFrançois Tigeotutilities, and the disk management utilities, all in a binary small 42fc7e83faSFrançois Tigeotenough to fit on a 1.2 MB root filesystem floppy (albeit with the kernel 43fc7e83faSFrançois Tigeoton its own boot floppy). A more reasonable subset can be made to fit 44fc7e83faSFrançois Tigeoteasily with a kernel for a decent one-disk fixit filesystem. 45fc7e83faSFrançois Tigeot 46fc7e83faSFrançois TigeotThe linking together of different programs by hand is an old 47fc7e83faSFrançois Tigeotspace-saving technique. Crunch automates the process by building the 48fc7e83faSFrançois Tigeotnecessary stub files and makefile for you (via the crunchgen program), 49fc7e83faSFrançois Tigeotand by doctoring the symbol tables of the component .o files to allow 50fc7e83faSFrançois Tigeotthem to link without "symbol multiply defined" conflicts (via the 51fc7e83faSFrançois Tigeotcrunchide program). 52fc7e83faSFrançois Tigeot 53fc7e83faSFrançois Tigeot 54fc7e83faSFrançois TigeotBUILDING CRUNCH 55fc7e83faSFrançois Tigeot 56fc7e83faSFrançois TigeotJust type make, then make install. 57fc7e83faSFrançois Tigeot 58fc7e83faSFrançois TigeotCrunch was written and tested under NetBSD/i386, but should work under 59fc7e83faSFrançois Tigeotother PC BSD systems that use GNU ld. 60fc7e83faSFrançois Tigeot 61fc7e83faSFrançois TigeotThe crunchgen(1) and crunchide(1) man pages have more details on using 62fc7e83faSFrançois Tigeotcrunch, and the examples subdirectory contains some working .conf files 63fc7e83faSFrançois Tigeotand a sample Makefile. 64fc7e83faSFrançois Tigeot 65fc7e83faSFrançois TigeotCREDITS 66fc7e83faSFrançois Tigeot 67fc7e83faSFrançois TigeotThanks to the NetBSD team for a consistently high quality effort in 68fc7e83faSFrançois Tigeotbringing together a solid, state of the art development environment. 69fc7e83faSFrançois Tigeot 70fc7e83faSFrançois TigeotThanks to the FreeBSD guys; Rod Grimes, Nate Williams and Jordan 71fc7e83faSFrançois TigeotHubbard; and to Bruce Evans, for immediate and detailed feedback on 72fc7e83faSFrançois Tigeotcrunch 0.1, and for pressing me to make the prototype more useable. 73fc7e83faSFrançois Tigeot 74fc7e83faSFrançois TigeotCrunch was written for the Maruti Hard Real-Time Operating System 75fc7e83faSFrançois Tigeotproject at the University of Maryland, to help make for better install 76fc7e83faSFrançois Tigeotand recovery procedures for our NetBSD-based development environment. It 77fc7e83faSFrançois Tigeotis copyright (c) 1994 by the University of Maryland under a UCB-style 78fc7e83faSFrançois Tigeotfreely- redistributable notice. See the file COPYRIGHT for details. 79fc7e83faSFrançois Tigeot 80fc7e83faSFrançois TigeotPlease let me know of any problems or of enhancements you make to this 81fc7e83faSFrançois Tigeotpackage. I'm particularly interested in the details of what you found 82fc7e83faSFrançois Tigeotwas good to put on your fixit or install disks. Thanks! 83fc7e83faSFrançois Tigeot 84fc7e83faSFrançois TigeotShare and Enjoy, 85fc7e83faSFrançois TigeotJaime 86fc7e83faSFrançois Tigeot............................................................................ 87fc7e83faSFrançois Tigeot: Stand on my shoulders, : jds@cs.umd.edu : James da Silva 88fc7e83faSFrançois Tigeot: not on my toes. : uunet!mimsy!jds : http://www.cs.umd.edu/users/jds 89