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