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