commandlet framework

Bernhard Fischer rep.nop at aon.at
Tue May 30 16:35:53 UTC 2006


On Tue, May 30, 2006 at 01:11:15PM +0200, Enrico Weigelt wrote:
>
>Hi folks,
>
>while working on my mii-tool single distribution
>(http://www.metux.de/articles/oss/mii-tool-1_9_1_1),
>I've been thinking about an little framework for commands,
>which makes it easier using the same codebase for both standalone
>binaries and builtin commands.
>
>Has there already some work been done ?

Yes. Nowadays, you can configure busybox to build a shared library and
use this .so (see helptext of that option for the big fat warning that
this is an internal API which is exported for convenience and that it is
not and never will be a stable API).

>How do you handle this in busybox ?

See standalone in the archives.
There were already at least two ways proposed how that will be handled.
Landley made a bash-script which used libbb.h and linked against the
.so.
I bolted it into the Makesystem, so you could say
make coreutils/ls
and that produced a "standalone" ls which linked against libbusybox.so.
(unfortunately in that patch i also exported this facility into the
menuconfig system, which was not well received and really should have
been a separate patch).

HTH



More information about the busybox mailing list