Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
From: robotti@godmail.com
Subject: Announce: CRUNCHbox - create multi-call binary
Date: 25 Jun 2002 13:40:38 GMT	[thread overview]
Message-ID: <GENERALDf02B1XrNvvc00000de8@general.comsoltech.com> (raw)


###########################################################################
CRUNCHbox v1.1.7 Kent Robotti <robotti@godmail.com> 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/              #
##########################################################################



                 reply	other threads:[~2002-06-25 13:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox