[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
BeastieBox, a (Net)BSD BusyBox-like
a couple of days ago, I started a for-fun project named BeastieBox. Its
goal is to provide a small BSD environment for embedded platforms like
home / wireless routers, ADSL / Cable boxes and many other recent small
devices having a very limited amount of disk space and memory.
I am aware of the crunchgen(1) utility, but my goal here is not to
"repackage" only baseline tools, instead I have in mind to reduce as much
as possible programs size using #ifdef's and such, which will eventually
lead to a top-level "make config" where you will choose whether or not
you want IPSEC, IPV6, vlan-support and so on. Also, for some tools having
too much dependencies, I used older NetBSD versions, for example, to avoid
sh(1) recent redendencies, provided sh(1) is the one from NetBSD 0.9.
As an example, and almost without any tuning, I am able to boot a minimal
system with the following commands :
ifconfig, route, sh, ls, init, ln, mount, mount_ffs, df, cat, rm, fsck,
fsck_ffs, ps, kill, dmesg, hostname, cp, mv, test, [, sed, ping, less,
sysctl, pfctl, wiconfig, traceroute
statically linked in a 784K binary. Adding libc, libm, ld.elf_so and the
NetBSD kernel leads to a 3MB disk.
Another aspect that may be interesting is the "dynamic" mode. Building
BeastieBbox dynamically will provide a beastielib/ directory where you'll
find every command available as a shared library, i.e. :
These two modes (static and dynamic) use DLFCN(3). In static mode, symbol
lookup is done using dlsym(3) with the RTLD_SELF define, dynamic mode
uses the classic dlopen(path, RTLD_LAZY) / dlsym() / dlclose way.
In both mode, entry point is named "command_<tool>" instead of main(),
so using argv, BeastieBox dynamically builds (using snprintf(3))
and calls the corresponding function.
BeastieBox is still under heavy development, don't expect it to compile
flawlessly, but the best chance you have is to try it with a NetBSD 4.0
codebase (/usr/src is needed for now). I'm working on porting it to NetBSD
5.0, very few modifications are needed.
If you want to give it a try, the project is hosted at sourceforge:
As of now, the sources are only available via CVS.
Hope you'll like it :)
Emile "iMil" Heitor <imil%home.imil.net@localhost>
http://gcu-squad.org ASCII ribbon campaign ( )
- against HTML email X
& vCards / \
Main Index |
Thread Index |