busybox as dynamic lib

Rob Landley rob at landley.net
Mon Feb 20 16:24:24 UTC 2006


On Monday 20 February 2006 4:59 am, Rogelio Serrano wrote:
> What are the advantages and disadvantages of sing busybox as a dynamic
> library? With the different commands as utilities linked to this library
> instead of being symlinks?

There currently aren't any advantages.  At the moment the dynamic library is 
more or less there for testing purposes, with nothing taking advantage of it.

Originally when I was thinking about a busybox shared library I was thinking 
that we could replace things like zlib for other apps, by exporting the 
built-in busybox code with the right interface.  We're not doing that yet.

Eventually we'll have the option to build each applet as an individual binary 
rather than all of them together as one big binary.  The advantage of doing 
that is the ability to trim out functionality without recompiling.  Right 
now, people who want to select just the half-dozen apps that interest them 
have to come up with a busybox .config file (which isn't easily automated, 
they have to use menuconfig) and recompile from source.  If they're 
cross-compiling for some strange target board this can be highly 
inconvenient.

Once standalone goes in, they can build defconfig plus standalone, and then 
add or remove apps individually without recompiling.  (This isn't as 
efficient as doing a custom build, but for some people it's a better choice.)

Also, for some reason there are people who want some of the individual apps 
that busybox provides (like mdev), but are uncomfortable building a busybox 
with just one app and renaming it.  Dunno why.

Anyway, once standalone is in, the dynamic library allows some of the lost 
space from the different packaging choice to be reclaimed, by letting the 
individual apps share some common code.  It's still not as efficient as the 
one-big-binary approach, but it's another packaging choice (like building a 
static binary) that gives people more options.

> --
> www.smsglobal.net SMS Global Ltd Short Message Service For Seafarers

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list