[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: busybox replacement idea
On Fri, 24 Aug 2012, Jeremy C. Reed wrote:
Depending on the configuration, there may be up to 310 commands
all contained in one binary [with busybox].
NetBSD already has a similar feature: /rescue/foo. This
crunchgen solution has around 150 commands.
I believe that crunchgen has no fixed limits to the number of
We should be able to just copy the existing simple and short
src/rescue/ infrastructure to create the more complete
Yes, of course. However, this often requires adding a few
conditional lines to the Makefile for the program to be built, and
if you want to omit some features from the crunched version of the
program then you have to add conditional code to the source of the
For example, the build infrastructure for /rescue instructs
crunchgen to set SMALLPROG in the environment; sbin/init/Makefile
uses that to change the CPPFLAGS and libraries; and
sbin/init/init.c uses the preprocessor definitions to
conditionally exclude some features.
Then we should allow building this for a non-NetBSD target
system. Any suggestions or examples on how to build rescue for a
non-NetBSD target system?
This is the only non-trivial part.
We may not be as small, but three benefits may be 1) user
friendly commands; 2) nice license for proprietary use (There
have been license violations reported for busybox); and 3) nice
promotion of NetBSD.
Any thoughts on this?
It's not difficult to have more than two levels of "the
full-featured command" and "a smaller version omitting some
features". Different invocations of crunchgen can set different
environment variables (akin to the existing SMALLPROG variable)
which can be fed through the Makefils and CPPFLAGS to achieve
finer control over what features to include or exclude. (For
example, I use crunchgen to build images in which init is
full-featured, whereas the standard NetBSD /rescue contains an
init with reduced functionality.)
--apb (Alan Barrett)
Main Index |
Thread Index |