[Aboriginal] Busybox applets not yet implemented
idunham at lavabit.com
idunham at lavabit.com
Thu Apr 18 23:36:23 PDT 2013
> I've thought of installing busybox in one directory and toybox in
> another and having the $PATH fall back between them, but busybox is
> going away. Toybox is replacing busybox. So the extra plumbing would
> just be transitional.
> build/host/busybox currently says:
> Currently defined functions:
> [, [[, ash, awk, bunzip2, bzcat, bzip2, cpio, dd, diff, egrep,
> fgrep, find, ftpd, ftpget, ftpput, grep, gunzip, gzip,
> ifconfig, init,
> install, less, lspci, man, mount, mv, pgrep, ping, pkill, ps,
> sed, sh, split, stat, tar, test, tr, umount, unxz, vi, wget,
> vi and less need the same line editing code as the shell command
> history, otherwise reasonably straightforward.
> grep/egrep/fgrep are mostly just regex code wrappers, I should do that.
> mount/umount I started and got interrupted, need to get back to it.
My own experiments with booting a Debian system with a custom shell init
indicate that only a few things are needed to boot up a system properly:
-a sh: pd/mksh is enough for now.
-mount: the next most important part.
-mdev: fixing /dev does demand some subdirs, and hotplug will require
handling env variables (which busybox has support for);
not highest priority, though.
-grep, modprobe, cut: I autoload modules by
grep -h MODALIAS /sys/bus/*/devices/*/uevent 2>/dev/null |cut -d = -f 2
|xargs modprobe -abq
modprobe needs the following for this use case:
Support aliases. May require depmod.
-a: insert all modules in a list at once
-b: blacklist needs to work!
-q: Hot/coldplug shouldn't spit out a mile of errors.
> cpio and tar are fairly straightforward, on my todo list.
Of the two, tar may be more important for building, but cpio is what
matters for replacing klibc-utils.
> man is a design issue: not sure what it _should_ do. A trivial zcat of
> preformatted text is trivial, it should integrate with the "help"
> command somehow. (help documents shell builtins, man documents stuff
> installed in $PATH, for toybox both are builtin but man should also
> check $PATH for external commands. But _not_ the horrible troff crap.)
Standard man often caches formatted troff as text, which would be a good
place to start.
> ash and sh are a biggish deal, I've got a lot of research for that but
> need a couple months to do it right. expr is basically the $((blah))
> shell builtin. [, [[, and test are all the same command, which I've
> started a local implementation of.
There's plenty of shells around, so I'm not too concerned about it.
Of course, this is all my own opinion, looking at it from the boot
More information about the Aboriginal