Noob question on adding programs to Busybox

Cathey, Jim jcathey at ciena.com
Wed Feb 10 18:25:59 UTC 2010


Choosing which httpd to use on your installation
is somewhat outside of the scope here.

You have the choice of making a new BB, including
its own httpd if you like.  Factors: 1) you have to
make BB for your HW, getting it configured to match
what you already have could take a bit of doing.  Then
you add httpd to the configuration.  2) does BB's
httpd have all the functionality you want?

Or you could make an external (not part of BB) httpd
from more mainstream sources, and put it on your HW.

The choice will come down to a three-way balancing
of ease of development, functionality, and memory
footprint (both RAM and flash/ROM/disk).

Hours of fun!

As a vaguely related example, we are running BB on
one of our embedded systems.  I found it marginally
useful to develop a non-BB "sleep" utility, one that didn't
use _any_ libc, just because the box was so low on RAM.
Even though an extra sleep application took up flash
space, the run-time RAM requirements for the stripper
sleep were sufficiently smaller that it was worth doing.
More than one 'sleep' was run routinely all the time by
the various scripts that were running, there was usually
at least one in execution at any given time.  (I left
BB's own sleep configured in, removing its negligible
code wasn't worth the trouble.)

Stats: Much more development effort, including assembly-level
traps to replace libc (since glibc is absolutely non-granular
now, even in static form).  A tiny bit more flash space
consumed.  But, significantly less RAM consumed at run-time.

A few tens of K is significant even these days, once you've
run out of what RAM you do have!  It was an interesting exercise,
too, trying to stave off the OOM killer.  (The sick part is
that there was still plenty of RAM, but try to convince the
kernel of that fact.)  Not one I'd really care to repeat,
though.

-- Jim






More information about the busybox mailing list