Project

General

Profile

So reduce

Q: Why BSDs use crunchgen, linux use busybox?
A:
  • busybox - everything in single and small binary
  • crunchgen -
    1. it is small
    2. it is integrated (no external dependency)

bsdbox (by Adrian Chadd) http://wiki.freebsd.org/AdrianChadd/BsdBox
toybox http://landley.net/code/toybox/

crunchgen very nice because it make resulting binary on top of set of existing sources
but it have biiiig problem, all libs inside it, so no external software
otherwise ext soft must be compiled statically
why sizeof(crunchgen bsdbox) < sizeof(same tools + libs)?
because libs compiled in w/o unused symbols
so, if we want:

  1. to have ability to add new soft
  2. still keep it small
  3. still keep tools as generic (unmodified)

we need a way to

  1. collect symbols over (basic tools set + installable packages)
  2. reduce symbol set of system libraries

to collect symbols we have nm/ldd/etc
to copy (libc.so) to (libc.so w/o some symbols) maybe possible with objcopy