From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,120c4b1a4046901a,start X-Google-Attributes: gid10d4db,public X-Google-ArrivalTime: 2002-06-25 06:40:38 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news.alt.net!cola.stump.algebra.com!robomod!not-for-mail From: robotti@godmail.com Newsgroups: comp.os.linux.announce Subject: Announce: CRUNCHbox - create multi-call binary Date: 25 Jun 2002 13:40:38 GMT Organization: Altopia Corp. - Usenet Access - http://www.altopia.com Message-ID: Reply-To: robotti@godmail.com Return-Path: X-COLA-Policy: http://stump.algebra.com/~cola X-COLA-Info-1: Send submissions to cola@stump.algebra.com X-COLA-Info-2: Send complaints to cola-admin@stump.algebra.com X-Comment: moderators do not necessarily agree or disagree with this article. X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov) X-RA: 216.194.1.2 X-OriginalArrivalTime: 24 Jun 2002 08:34:28.0968 (UTC) FILETIME=[F49BB680:01C21B59] X-Auth: PGPMoose V1.1 PGP comp.os.linux.announce iQBVAwUAPRhyTyFvAtx2nXvNAQHKVwH/dLKvOczXTvHuQdJ64hupvA9JMIKriP66 /1yUrVsOikjA3fxuYNPIyBN41WG0xwfPa85y+RSydQWK7jDKDW4COQ== =KBn7 Xref: archiver1.google.com comp.os.linux.announce:2255 ########################################################################### CRUNCHbox v1.1.7 Kent Robotti 6-24-2002 http://www.tux.org/pub/people/kent-robotti/looplinux/rip/index.html ########################################################################### A crunched binary is a program made up of many other programs linked together into a single executable. The crunched binary main() function determines which component program to run by the contents of argv[0]. The main reason to crunch programs together is for fitting as many pro- grams as possible onto an installation or system recovery disk. mkcrunch reads in the specifications in a config-file for a crunched binary, and creates the crunched executable file from the component pro- grams. crunchbox uses the program crunchide to eliminate link-time conflicts between the component programs by hiding all unnecessary symbols. This program is similar to the BSD program called `crunchgen' from the `crunch' package. You should have the programs you want to crunch already compiled in a directory. For example, in the source directory I have the util-linux and e2fsprogs packages. crunchbox/source/util-linux# ./configure ; make Copy crunch-files/crunch.util-linux to the util-linux directory. crunchbox/source/util-linux/crunch.util-linux crunchbox/source/e2fsprogs# ./configure ; make Copy crunch-files/crunch.e2fsprogs to the e2fsprogs directory. crunchbox/source/e2fsprogs/crunch.e2fsprogs If you want a shell and some small programs, you can conpile the sources in source/ash and source/busybox. crunchbox/source/ash# make crunchbox/source/busybox# make To compile them against uclibc, do this. crunchbox/source/ash# make uclibc crunchbox/source/busybox# make uclibc=true Compile and install crunchide. crunchbox/crunchide# make ; make install Create crunchbox binary. It will ask you what programs from the util-linux, e2fsprogs, ash, and bb packages you want to crunch. crunchbox# ./mkcrunch -static -d source You can put more than one directory after `-d'. Example: mkcrunch -static -d directory1 directory2 directory3 It will create a `crunch-programs' file based on your choices. You can use it next time instead of choosing the programs again. crunchbox# ./mkcrunch -static -f crunch-programs Put `-static' as the first option if you want the crunchbox binary to link statically with libc. Put `-uclibc' as the first or second option if using \`-static', if you want the crunchbox binary to link with uclibc. You must have uclibc installed in `/usr/i386-linux-uclibc'! uclibc# make ; make install Example: crunchbox# ./mkcrunch -static -uclibc etc. There are crunch config files in the crunch-files directory for a number of programs. You may need to make minor changes to a crunch file, if there are changes in the source package that the crunch file is for. Read the crunch-files/* files to see how it works, and for any compile instructions. You can create crunch files for other programs. Read specifically crunch-files/crunch.util-linux. NOTE: There is another option `-rf'. If you have a incomplete crunch-programs file, but it at least has PROGRAMS_BEGIN and PROGRAMS_END, you can reread it and not have to choose the programs again. crunchbox# ./mkcrunch -static -rf crunch-programs If there is no SOURCE_DIRECTORIES listed in the crunch-programs file, or you want to add a directory to the source directories listed there. crunchbox# ./mkcrunch -static -rf crunch-programs -d source_directory The `rf' option can also be used with a complete crunch-programs file, if you made any changes to it and want it to be reread. NOTE: The directory containing the source for any program should be named without it's version number, for example `util-linux' not `util-linux-2.11r' etc. That way when there's a new version of the program, you won't need to make any changes to the way it's listed in the `crunch-programs' file. The mkcrunch script requires the `dialog' program to run! ########################################################################### ########################################################################## # Send submissions for comp.os.linux.announce to: cola@stump.algebra.com # # PLEASE remember a short description of the software and the LOCATION. # # This group is archived at http://stump.algebra.com/~cola/ # ##########################################################################