Rob Landley | 349ff52 | 2014-01-04 13:09:42 -0600 | [diff] [blame] | 1 | <html><head><title>toybox roadmap</title> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 2 | <!--#include file="header.html" --> |
| 3 | <title>Toybox Roadmap</title> |
| 4 | |
| 5 | <h2>Goals and use cases</h2> |
| 6 | |
| 7 | <p>We have several potential use cases for a new set of command line |
| 8 | utilities, and are using those to determine which commands to implement |
| 9 | for Toybox's 1.0 release.</p> |
| 10 | |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 11 | <p>The most interesting standards are POSIX-2008 (also known as the Single |
| 12 | Unix Specification version 4) and the Linux Standard Base (version 4.1). |
| 13 | The main test harness including toybox in Aboriginal Linux and if that can |
| 14 | build itself using the result to build Linux From Scratch (version 6.8). |
| 15 | We also aim to replace Android's Toolbox.</p> |
| 16 | |
| 17 | <p>At a secondary level we'd like to meet other use cases. We've analyzed |
| 18 | the commands provided by similar projects (klibc, sash, sbase, s6, embutils, |
| 19 | nash, and beastiebox), along with various vendor configurations of busybox, |
| 20 | and some end user requests.</p> |
| 21 | |
| 22 | <p>Finally, we'd like to provide a good replacement for the Bash shell, |
| 23 | which was the first program Linux ever ran and remains the standard shell |
| 24 | of Linux no matter what Ubuntu says. This doesn't mean including the full |
| 25 | set of Bash 4.x functionality, but does involve {various,features} beyond |
| 26 | posix.</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 27 | |
| 28 | <p>See the <a href=status.html>status page</a> for the combined list |
| 29 | and progress towards implementing it.</p> |
| 30 | |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 31 | <ul> |
| 32 | <li><a href=#susv4>POSIX-2008/SUSv4</a></li> |
| 33 | <li><a href=#sigh>Linux "Standard" Base</a></li> |
| 34 | <li><a href=#dev_env>Development Environment</a></li> |
| 35 | <li><a href=#android>Android Toolbox</a></li> |
Rob Landley | a136fa5 | 2014-12-20 14:58:03 -0600 | [diff] [blame^] | 36 | <li><a href=#tizen>Tizen Core</a></li> |
Rob Landley | 348a800 | 2014-04-09 07:57:08 -0500 | [diff] [blame] | 37 | <li>Miscelaneous: <a href=#klibc>klibc</a>, <a href=#glibc>glibc</a>, |
| 38 | <a href=#sash>sash</a>, <a href=#sbase>sbase</a>, <a href=#s6>s6</a>...</li> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 39 | </ul> |
| 40 | |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 41 | <hr /> |
| 42 | <a name="standards"> |
| 43 | <h2>Use case: standards compliance.</h2> |
| 44 | |
Rob Landley | 571b070 | 2012-11-13 16:13:45 -0600 | [diff] [blame] | 45 | <h3><a name=susv4 /><a href="#susv4">POSIX-2008/SUSv4</a></h3> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 46 | <p>The best standards are the kind that describe reality, rather than |
| 47 | attempting to impose a new one. (I.E. a good standard should document, not |
| 48 | legislate.)</p> |
| 49 | |
| 50 | <p>The kind of standards which describe existing reality tend to be approved by |
| 51 | more than one standards body, such ANSI and ISO both approving C. That's why |
| 52 | the IEEE POSIX committee's 2008 standard, the Single Unix Specification version |
| 53 | 4, and the Open Group Base Specification edition 7 are all the same standard |
| 54 | from three sources.</p> |
| 55 | |
Rob Landley | 62f0021 | 2012-12-06 15:15:30 -0600 | [diff] [blame] | 56 | <p>The <a href="http://pubs.opengroup.org/onlinepubs/9699919799/idx/utilities.html">"utilities" |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 57 | section</a> |
| 58 | of these standards is devoted to the unix command line, and are the best such |
| 59 | standard for our purposes. (My earlier work on BusyBox was implemented with |
| 60 | regard to SUSv3, an earlier version of this standard.)</p> |
| 61 | |
| 62 | <h3>Problems with the standard</h3> |
| 63 | |
| 64 | <p>Unfortunately, these standards describe a subset of reality, lacking any |
| 65 | mention of commands such as init, login, or mount required to actually boot a |
| 66 | system. It provides ipcrm and ipcs, but not ipcmk, so you can use System V IPC |
| 67 | resources but not create them.</p> |
| 68 | |
| 69 | <p>These standards also contain a large number of commands that are |
| 70 | inappropriate for toybox to implement in its 1.0 release. (Perhaps some of |
| 71 | these could be reintroduced in later releases, but not now.)</p> |
| 72 | |
| 73 | <p>Starting with the full "utilities" list, we first remove generally obsolete |
| 74 | commands (compess ed ex pr uncompress uccp uustat uux), commands for the |
| 75 | pre-CVS "SCCS" source control system (admin delta get prs rmdel sact sccs unget |
| 76 | val what), fortran support (asa fort77), and batch processing support (batch |
| 77 | qalter qdel qhold qmove qmsg qrerun qrls qselect qsig qstat qsub).</p> |
| 78 | |
| 79 | <p>Some commands are for a compiler toolchain (ar c99 cflow ctags cxref gencat |
| 80 | iconv lex m4 make nm strings strip tsort yacc), which is outside of toybox's |
| 81 | mandate and should be supplied externally. (Again, some of these may be |
| 82 | revisited later, but not for toybox 1.0.)</p> |
| 83 | |
| 84 | <p>Some commands are part of a command shell, and cannot be implemented as |
| 85 | separate executables (alias bg cd command fc fg getopts hash jobs kill read |
| 86 | type ulimit umask unalias wait). These may be revisited as part of a built-in |
| 87 | toybox shell, but are not exported into $PATH via symlinks. (If you fork a |
| 88 | child process and have it "cd" then exit, you've accomplished nothing.)</p> |
| 89 | |
| 90 | <p>A few other commands are judgement calls, providing command-line |
| 91 | internationalization support (iconv locale localedef), System V inter-process |
| 92 | communication (ipcrm ipcs), and cross-tty communication from the minicomputer |
| 93 | days (talk mesg write). The "pax" utility was supplanted by tar, "mailx" is |
| 94 | a command line email client, and "lp" submits files for printing to... what |
| 95 | exactly? (cups?) The standard defines crontab but not crond.</p> |
| 96 | |
| 97 | <p>Removing all of that leaves the following commands, which toybox should |
| 98 | implement:</p> |
| 99 | |
| 100 | <blockquote><b> |
| 101 | <span id=posix> |
| 102 | at awk basename bc cal cat chgrp chmod chown cksum cmp comm cp |
| 103 | csplit cut date dd df diff dirname du echo env expand expr false file find |
| 104 | fold fuser getconf grep head id join kill link ln logger logname ls man |
| 105 | mkdir mkfifo more mv newgrp nice nl nohup od paste patch pathchk printf ps |
| 106 | pwd renice rm rmdir sed sh sleep sort split stty tabs tail tee test time |
| 107 | touch tput tr true tty uname unexpand uniq unlink uudecode uuencode vi wc |
| 108 | who xargs zcat |
| 109 | </span> |
| 110 | </b></blockquote> |
| 111 | |
Rob Landley | 571b070 | 2012-11-13 16:13:45 -0600 | [diff] [blame] | 112 | <h3><a name=sigh /><a href="#sigh">Linux Standard Base</a></h3> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 113 | |
| 114 | <p>One attempt to supplement POSIX towards an actual usable system was the |
| 115 | Linux Standard Base. Unfortunately, the quality of this "standard" is |
| 116 | fairly low.</p> |
| 117 | |
| 118 | <p>POSIX allowed its standards process to be compromised |
| 119 | by leaving things out, thus allowing IBM mainframes and Windows NT to drive |
| 120 | a truck through the holes and declare themselves compilant. But it means what |
| 121 | they DID standardize tends to be respected.</p> |
| 122 | |
| 123 | <p>The Linux Standard Base's failure mode is different, they respond to |
| 124 | pressure by including special-case crap, such as allowing Red Hat to shoehorn |
Rob Landley | 62f0021 | 2012-12-06 15:15:30 -0600 | [diff] [blame] | 125 | RPM on the standard even though all sorts of distros (Debian, Slackware, Arch, |
| 126 | Gentoo) don't use it and probably never will. This means anything in the LSB is |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 127 | at best a suggestion: arbitrary portions of this standard are widely |
| 128 | ignored.</p> |
| 129 | |
| 130 | <p>The LSB does specify a <a href=http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/cmdbehav.html>list of command line |
| 131 | utilities</a>:</p> |
| 132 | |
| 133 | <blockquote><b> |
| 134 | ar at awk batch bc chfn chsh col cpio crontab df dmesg du echo egrep |
| 135 | fgrep file fuser gettext grep groupadd groupdel groupmod groups |
| 136 | gunzip gzip hostname install install_initd ipcrm ipcs killall lpr ls |
| 137 | lsb_release m4 md5sum mknod mktemp more mount msgfmt newgrp od passwd |
| 138 | patch pidof remove_initd renice sed sendmail seq sh shutdown su sync |
| 139 | tar umount useradd userdel usermod xargs zcat |
| 140 | </b></blockquote> |
| 141 | |
| 142 | <p>Where posix specifies one of those commands, LSB's deltas tend to be |
| 143 | accomodations for broken tool versions which aren't up to date with the |
| 144 | standard yet. (See <a href=http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/more.html>more</a> and <a href=http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/xargs.html>xargs</a> |
| 145 | for examples.)</p> |
| 146 | |
| 147 | <p>Since we've already committed to using our own judgement to skip bits of |
| 148 | POSIX, and LSB's "judgement" in this regard is purely bug workarounds to declare |
| 149 | various legacy tool implementations "compliant", this means we're mostly |
| 150 | interested in the set of tools that aren't specified in posix at all.</p> |
| 151 | |
| 152 | <p>Of these, gettext and msgfmt are internationalization, install_initd and |
| 153 | remove_initd aren't present on ubuntu 10.04, lpr is out of scope, and |
| 154 | lsb_release is a distro issue (it's a nice command, but the output of |
| 155 | lsb_release -a is the name and version number of the linux distro you're |
| 156 | running, which toybox doesn't know).</p> |
| 157 | |
| 158 | <p>This leaves:</p> |
| 159 | |
| 160 | <blockquote><b> |
| 161 | <span id=lsb> |
| 162 | chfn chsh dmesg egrep fgrep groupadd groupdel groupmod groups |
| 163 | gunzip gzip hostname install killall md5sum |
| 164 | mknod mktemp mount passwd pidof sendmail seq shutdown |
| 165 | su sync tar umount useradd userdel usermod zcat |
| 166 | </span> |
| 167 | </b></blockquote> |
| 168 | |
| 169 | <hr /> |
| 170 | <a name="dev_env"> |
Rob Landley | 571b070 | 2012-11-13 16:13:45 -0600 | [diff] [blame] | 171 | <h2><a href="#dev_env">Use case: provide a self-hosting development environment</a></h2> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 172 | |
| 173 | <p>The following commands are enough to build the Aboriginal Linux development |
| 174 | environment, boot it to a shell prompt, and build Linux From Scratch 6.8 under |
| 175 | it. (Aboriginal Linux currently uses BusyBox for this, thus provides a |
| 176 | drop-in test environment for toybox. We install both implementations side |
| 177 | by side, redirecting the symlinks a command at a time until the older |
| 178 | package is no longer used, and can be removed.)</p> |
| 179 | |
| 180 | <p>This use case includes running init scripts and other shell scripts, running |
| 181 | configure, make, and install in each package, and providing basic command line |
| 182 | facilities such as a text editor. (It does not include a compiler toolchain or |
| 183 | C library, those are outside the scope of this project.)</p> |
| 184 | |
| 185 | <blockquote><b> |
| 186 | <span id=development> |
| 187 | bzcat cat cp dirname echo env patch rmdir sha1sum sleep sort sync |
| 188 | true uname wc which yes zcat |
| 189 | awk basename bzip2 chmod chown cmp cut date dd diff |
| 190 | egrep expr find grep gzip head hostname id install ln ls |
| 191 | mkdir mktemp mv od readlink rm sed sh tail tar touch tr uniq |
| 192 | wget whoami xargs chgrp comm gunzip less logname man split |
| 193 | tee test time bunzip2 chgrp chroot comm cpio dmesg |
| 194 | dnsdomainname ftpd ftpget ftpput gunzip ifconfig init less |
| 195 | logname losetup man mdev mount mountpoint nc pgrep pkill |
| 196 | pwd route split stat switch_root tac umount vi |
| 197 | </span> |
| 198 | </b></blockquote> |
| 199 | |
| 200 | <p>Note: Aboriginal Linux installs bash 2.05b as #!/bin/sh and its scripts |
| 201 | require bash extensions not present in shells such as busybox ash. |
| 202 | This means that toysh needs to supply several bash extensions _and_ work |
| 203 | when called under the name "bash".</p> |
| 204 | |
Rob Landley | 8fe1814 | 2014-10-07 14:11:54 -0500 | [diff] [blame] | 205 | <p>The <a href=http://landley.net/aboriginal>Aboriginal Linux</a> |
| 206 | self-bootstrapping build still uses the following busybox commands, |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 207 | not yet supplied by toybox:</p> |
Rob Landley | 8fe1814 | 2014-10-07 14:11:54 -0500 | [diff] [blame] | 208 | |
| 209 | <blockquote><p> |
| 210 | ash awk bunzip2 bzip2 dd diff expr fdisk ftpd ftpget ftpput gunzip |
| 211 | gzip less man pgrep ping pkill ps route sed sh sha512sum tar test tr unxz vi |
| 212 | wget xzcat zcat</p></blockquote> |
| 213 | |
| 214 | <p>Many of those are in "pending". Most of the archive commands are needed |
| 215 | because busybox tar doesn't call external versions. The remaining "difficult" |
| 216 | commands are vi, awk, and ash.</p> |
| 217 | |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 218 | <hr /> |
Rob Landley | 571b070 | 2012-11-13 16:13:45 -0600 | [diff] [blame] | 219 | <h2><a name=android /><a href="#android">Use case: Replacing Android Toolbox</a></h2> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 220 | |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 221 | <p>Android has a policy against GPL in userspace, so even though BusyBox |
| 222 | predates Android by many years, they couldn't use it. Instead they grabbed |
| 223 | an old version of ash and implemented their own command line utility set |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 224 | called "toolbox". ash was later replaced by |
| 225 | <a href="https://www.mirbsd.org/mksh.htm">mksh</a>; toolbox is being |
| 226 | replaced by toybox.</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 227 | |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 228 | <p>Toolbox doesn't have its own repository, instead it's part of Android's |
| 229 | <a href=https://android.googlesource.com/platform/system/core>system/core |
| 230 | git repository</a> (this analysis looked at commit 51ccef27cab58).</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 231 | |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 232 | <h3>Toolbox commands:</h3> |
| 233 | |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 234 | <p>According to system/core/toolbox/Android.mk the toolbox directory builds |
| 235 | the following commands:</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 236 | |
| 237 | <blockquote><b> |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 238 | ls mount cat ps kill ln insmod rmmod lsmod ifconfig setconsole |
| 239 | rm mkdir rmdir reboot getevent sendevent date wipe sync umount |
| 240 | start stop notify cmp dmesg route hd dd df getprop setprop watchprops |
| 241 | log sleep renice printenv smd chmod chown newfs_msdos netstat ioctl |
| 242 | mv schedtop top iftop id uptime vmstat nandread ionice touch lsof md5 r |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 243 | cp du grep watchdogd |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 244 | </b></blockquote> |
| 245 | |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 246 | <p>If selinux is enabled, you also get:</p> |
| 247 | <blockquote><b> |
| 248 | getenforce setenforce chcon restorecon runcon getsebool setsebool load_policy |
| 249 | </b></blockquote> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 250 | |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 251 | <h3>Other Android core commands</h3> |
| 252 | |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 253 | <p>Other than the toolbox directory, the currently interesting |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 254 | subdirectories in the core repository are fs_mgr, gpttool, init, |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 255 | logcat, logwrapper, mkbootimg, netcfg, reboot, and run-as.</p> |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 256 | |
| 257 | <ul> |
| 258 | <li><b>fs_mgr</b> - subset of mount</li> |
| 259 | <li><b>gpttool</b> - subset of fdisk</li> |
| 260 | <li><b>init</b> - Android's PID 1</li> |
| 261 | <li><b>logcat</b> - read android log format</li> |
| 262 | <li><b>logwrapper</b> - redirect stdio to android log</li> |
| 263 | <li><b>mkbootimg</b> - create signed boot image</li> |
| 264 | <li><b>netcfg</b> - network configuration (sucks in libnetutils)</li> |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 265 | <li><b>reboot</b> - Android's reboot(1)</li> |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 266 | <li><b>run-as</b> - subset of sudo</li> |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 267 | </ul> |
| 268 | |
| 269 | <p>Almost all of these reinvent an existing wheel with less functionality and a |
| 270 | different user interface. We may want to provide that interface, but |
| 271 | implementing the full commands (mount, fdisk, init, ifconfig with dhcp, |
| 272 | and sudo) come first.</p> |
| 273 | |
| 274 | <p>Although logcat/logwrapper also reinvent a wheel, Android did so in the |
| 275 | kernel and these provide an interface to that.</p> |
| 276 | |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 277 | <p>Also, gpttool and mkbootimg are install tools. |
| 278 | These aren't a priority if android wants to use its own |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 279 | bespoke code to install itself.</p> |
| 280 | |
| 281 | <h3>Analysis</h3> |
| 282 | |
| 283 | <p>For reference, combining everything listed above, we get:</p> |
| 284 | |
| 285 | <blockquote><b> |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 286 | cat chcon chmod chown cmp cp date dd df dmesg du fs_mgr |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 287 | getenforce |
| 288 | getevent getprop getsebool gpttool grep hd id ifconfig iftop init insmod ioctl |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 289 | ionice kill ln load_policy log logcat logwrapper ls lsmod lsof md5 |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 290 | mkbootimg mkdir mount mv nandread netcfg netstat newfs_msdos notify printenv |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 291 | ps r reboot renice restorecon rm rmdir rmmod route run-as |
| 292 | runcon schedtop sendevent setconsole setenforce setprop setsebool |
| 293 | sleep smd start stop sync top touch umount uptime vmstat watchdogd |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 294 | watchprops wipe |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 295 | </b></blockquote> |
| 296 | |
| 297 | <p>We may eventually implement all of that, but for toybox 1.0 we need to |
enh | 1fb2080 | 2014-11-24 17:26:09 -0600 | [diff] [blame] | 298 | focus a bit. For our first pass, let's ignore selinux, |
| 299 | and grab just logcat and logwrapper from the "core" |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 300 | commands (since the rest have some full/standard version providing that |
| 301 | functionality, which we can implement a shim interface for later).</p> |
| 302 | |
| 303 | <p>This means toybox should implement:</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 304 | <blockquote><b> |
| 305 | <span id=toolbox> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 306 | cat chmod chown cmp cp date dd df dmesg du getevent getprop grep hd id ifconfig |
| 307 | iftop insmod ioctl ionice kill ln log logcat logwrapper ls lsmod lsof lsusb md5 |
| 308 | mkdir mount mv nandread |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 309 | netstat newfs_msdos notify printenv ps r reboot renice rm rmdir rmmod route |
| 310 | schedtop sendevent setconsole setprop sleep smd start stop sync top touch |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 311 | umount uptime vmstat watchprops watchdogd wipe |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 312 | </span> |
Rob Landley | c26ca6e | 2013-01-31 04:05:56 -0600 | [diff] [blame] | 313 | </b></blockquote> |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 314 | |
| 315 | <p>The following Toolbox commands are already covered in previous |
| 316 | sections of this analysis:</p> |
| 317 | |
| 318 | <blockquote><b> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 319 | cat chmod chown cmp cp date dd df dmesg du grep id ifconfig insmod kill ln ls |
| 320 | lsmod mkdir mount mv ps renice rm rmdir rmmod route sleep sync top touch umount |
Rob Landley | fdc10c9 | 2012-10-16 17:09:30 -0500 | [diff] [blame] | 321 | </b></blockquote> |
| 322 | |
| 323 | <p>Which leaves the following commands as new from Toolbox:</p> |
| 324 | |
| 325 | <blockquote><b> |
| 326 | getevent getprop hd iftop ioctl ionice log lsof nandread netstat |
| 327 | newfs_msdos notify printenv r reboot schedtop sendevent setconsole |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 328 | setprop smd start stop top uptime vmstat watchprops watchdogd wipe |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 329 | </b></blockquote> |
| 330 | |
Rob Landley | a136fa5 | 2014-12-20 14:58:03 -0600 | [diff] [blame^] | 331 | <hr /> |
| 332 | <h2><a name=tizen /><a href="#tizen">Use case: Tizen Core</a></h2> |
| 333 | |
| 334 | <p>The Tizen project has expressed a desire to eliminate GPLv3 software |
| 335 | from its core system, and is installing toybox as |
| 336 | <a href=https://wiki.tizen.org/wiki/Toybox>part of this process</a>.</p> |
| 337 | |
| 338 | <p>They have a fairly long list of new commands they'd like to see in toybox:</p> |
| 339 | |
| 340 | <blockquote><b> |
| 341 | <span id=tizen> |
| 342 | arch base64 users dir vdir unexpand shred join csplit |
| 343 | hostid nproc runcon sha224 sha256 sha384 sha512 sha3 mkfs.vfat fsck.vfat |
| 344 | dosfslabel uname stdbuf pinky diff3 sdiff zcmp zdiff zegrep zfgrep zless zmore |
| 345 | </span> |
| 346 | </blockquote> |
| 347 | |
| 348 | <p>In addition, they'd like to use several commands currently in pending:</p> |
| 349 | |
| 350 | <blockquote><b> |
| 351 | <span id=tizen> |
| 352 | tar diff printf wget rsync fdisk vi less tr test stty fold expr dd |
| 353 | </span> |
| 354 | </b></blockquote> |
| 355 | |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 356 | <hr /><a name=klibc /> |
Rob Landley | 934b2d3 | 2013-05-10 18:54:14 -0500 | [diff] [blame] | 357 | <h2>klibc:</h2> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 358 | |
| 359 | <p>Long ago some kernel developers came up with a project called |
| 360 | <a href=http://en.wikipedia.org/wiki/Klibc>klibc</a>. |
| 361 | After a decade of development it still has no web page or HOWTO, |
| 362 | and nobody's quite sure if the license is BSD or GPL. It inexplicably |
| 363 | <a href=http://www.infoworld.com/d/data-center/perl-isnt-going-anywhere-better-or-worse-211580>requires perl to build</a>, and seems like an ideal candidate for |
| 364 | replacement.</p> |
| 365 | |
| 366 | <p>In addition to a C library even less capable than bionic (obsoleted by |
| 367 | musl), klibc builds a random assortment of executables to run init scripts |
| 368 | with. There's no multiplexer command, these are individual executables:</p> |
| 369 | |
| 370 | <blockquote><p> |
| 371 | cat chroot cpio dd dmesg false fixdep fstype gunzip gzip halt ipconfig kill |
| 372 | kinit ln losetup ls minips mkdir mkfifo mknodes |
| 373 | mksyntax mount mv nfsmount nuke pivot_root poweroff readlink reboot resume |
| 374 | run-init sh sha1hash sleep sync true umount uname zcat |
| 375 | </p></blockquote> |
| 376 | |
| 377 | <p>To get that list, build klibc according to the instructions (I |
| 378 | <a href=http://landley.net/notes-2013.html#23-01-2013>looked at</a> version |
| 379 | 2.0.2 and did cd klibc-*; ln -s /output/of/kernel/make/headers_install |
| 380 | linux; make) then <b>echo $(for i in $(find . -type f); do file $i | grep -q |
| 381 | executable && basename $i; done | grep -v '[.]g$' | sort -u)</b> to find |
| 382 | executables, then eliminated the *.so files and *.shared duplicates.</p> |
| 383 | |
| 384 | <p>Some of those binaries are build-time tools that don't get installed, |
| 385 | which removes mknodes, mksyntax, sha1hash, and fixdep from the list. |
| 386 | (And sha1hash is just an unpolished sha1sum anyway.)</p> |
| 387 | |
| 388 | <p>The run-init command is more commonly called switch_root, nuke is just |
| 389 | "rm -rf -- $@", and minips is more commonly called "ps". I'm not doing aliases |
| 390 | for the oddball names.</p> |
| 391 | |
| 392 | <p>Yet more stale forks of dash and gzip sucked in here (see "dubious |
| 393 | license terms" above), adding nothing to the other projects we've looked at. |
| 394 | But we still need sh, gunzip, gzip, and zcat to replace this package.</p> |
| 395 | |
| 396 | <p>By the time I did the analysis toybox already had cat, chroot, dmesg, false, |
| 397 | kill, ln, losetup, ls, mkdir, mkfifo, readlink, rm, switch_root, sleep, sync, |
| 398 | true, and uname.</p> |
| 399 | |
| 400 | <p>The low hanging fruit is cpio, dd, ps, mv, and pivot_root.</p> |
| 401 | |
| 402 | <p>The "kinit" command is another gratuitous rename, it's init running as PID 1. |
| 403 | The halt, poweroff, and reboot commands work with it.</p> |
| 404 | |
| 405 | <p>I've got mount and umount queued up already, fstype and nfsmount go with |
| 406 | those. (And probably smbmount and p9mount, but this hasn't got one. Those |
| 407 | are all about querying for login credentials, probably workable into the |
| 408 | base mount command.)</p> |
| 409 | |
| 410 | <p>The ipconfig command here has a built in dhcp client, so it's ifconfig |
| 411 | and dhcpcd and maybe some other stuff.</p> |
| 412 | |
| 413 | <p>The resume command is... weird. It finds a swap partition and reads data |
| 414 | from it into a /proc file, something the kernel is capable of doing itself. |
| 415 | (Even though the klibc author |
| 416 | <a href=http://www.zytor.com/pipermail/klibc/2006-June/001748.html>attempted |
| 417 | to remove</a> that capability from the kernel, current kernel/power/hibernate.c |
| 418 | still parses "resume=" on the command line). And yet various distros seem to |
| 419 | make use of klibc for this> |
| 420 | Given the history of swsusp/hibernate (and |
| 421 | <a href=http://lwn.net/Articles/333007>TuxOnIce</a> |
| 422 | and <a href=http://lwn.net/Articles/242107>kexec jump</a>) I've lost track |
| 423 | of the current state of the art here. Ah, Documentation/power/userland-swsusp.txt |
| 424 | has the API docs, and <a href=http://suspend.sf.net>here's a better |
| 425 | tool</a>...</p> |
| 426 | |
| 427 | <p>So the list of things actually in klibc are:</p> |
| 428 | |
| 429 | <blockquote><b> |
Rob Landley | c166faf | 2013-09-01 07:25:37 -0500 | [diff] [blame] | 430 | <span id=klibc_cmd> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 431 | cat chroot dmesg false kill ln losetup ls mkdir mkfifo readlink rm switch_root |
| 432 | sleep sync true uname |
| 433 | |
| 434 | cpio dd ps mv pivot_root |
| 435 | mount nfsmount fstype umount |
| 436 | sh gunzip gzip zcat |
| 437 | kinit halt poweroff reboot |
| 438 | ipconfig |
| 439 | resume |
| 440 | </span> |
| 441 | </b></blockquote> |
| 442 | |
| 443 | <hr /> |
Rob Landley | 348a800 | 2014-04-09 07:57:08 -0500 | [diff] [blame] | 444 | <a name=glibc /> |
| 445 | <h2>glibc</h2> |
| 446 | |
| 447 | <p>Rather a lot of command line utilities come bundled with glibc:</p> |
| 448 | |
| 449 | <blockquote><b> |
| 450 | catchsegv getconf getent iconv iconvconfig ldconfig ldd locale localedef |
| 451 | mtrace nscd rpcent rpcinfo tzselect zdump zic |
| 452 | </b></blockquote> |
| 453 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 454 | <p>Of those, musl libc only implements ldd.</p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 455 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 456 | <p>catchsegv is a rudimentary debugger, probably out of scope for toybox.</p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 457 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 458 | <p>iconv has been <a href="#susv4">previously discussed</a>.</p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 459 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 460 | <p>iconvconfig is only relevant if iconv is user-configurable; musl uses a |
| 461 | non-configurable iconv.</p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 462 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 463 | <p>getconf is a posix utility which displays several variables from |
| 464 | unistd.h; it probably belongs in the development toolchain.</p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 465 | |
| 466 | <p>getent handles retrieving entries from passwd-style databases |
| 467 | (in a rather lame way) and is trivially replacable by grep.</p> |
| 468 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 469 | <p>locale was discussed under <a href=#susv4>posix</a>. |
| 470 | localedef compiles locale definitions, which musl currently does not use.</p> |
| 471 | |
| 472 | <p>mtrace is a perl script to use the malloc debugging that glibc has built-in; |
| 473 | this is not relevant for musl, and would necessarily vary with libc. </p> |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 474 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 475 | <p>nscd is a name service caching daemon, which is not yet relevant for musl. |
| 476 | rpcinfo and rpcent are related to rpc, which musl does not include.</p> |
| 477 | |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 478 | <p>The remaining commands involve glibc's bundled timezone database, |
| 479 | which seems to be derived from the <a href=http://www.iana.org/time-zones>IANA |
| 480 | timezone database</a>. Unless we want to maintain our own fork of the |
| 481 | standards body's database like glibc does, these are of no interest, |
| 482 | but for completeness:</p> |
| 483 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 484 | <p>tzselect outputs a TZ variable correponding to user input. |
| 485 | The documentation does not indicate how to use it in a script, but it seems |
| 486 | that Debian may have done so. |
| 487 | zdump prints current time in each of several timezones, optionally |
| 488 | outputting a great deal of extra information about each timezone. |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 489 | zic converts a description of a timezone to a file in tz format.</p> |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 490 | |
Rob Landley | cbd7752 | 2014-04-12 20:39:33 -0500 | [diff] [blame] | 491 | <p>None of glibc's bundled commands are currently of interest to toybox.</p> |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 492 | |
Isaac Dunham | 931425c | 2014-04-12 17:26:44 -0500 | [diff] [blame] | 493 | </b></blockquote> |
Rob Landley | 348a800 | 2014-04-09 07:57:08 -0500 | [diff] [blame] | 494 | |
| 495 | <hr /> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 496 | <a name=sash /> |
| 497 | <h2>Stand-Alone Shell</h2> |
| 498 | |
| 499 | <p>Wikipedia has <a href=http://en.wikipedia.org/wiki/Stand-alone_shell>a good |
| 500 | summary of sash</a>, with links. The original Stand-Alone Shell project reached |
| 501 | a stopping point, and then <a href=http://www.baiti.net/sash>"sash plus |
| 502 | patches"</a> extended it a bit further. The result is a megabyte executable |
| 503 | that provides 40 commands.</p> |
| 504 | |
| 505 | <p>Sash is a shell with built-in commands. It doesn't have a multiplexer |
| 506 | command, meaning "sash ls -l" doesn't work (you have to go "sash -c 'ls -l'"). |
| 507 | </p> |
| 508 | |
| 509 | <p>The list of commands can be obtained via building it and doing |
| 510 | "echo help | ./sash | awk '{print $1}' | sed 's/^-//' | xargs echo", which |
| 511 | gives us:</p> |
| 512 | |
| 513 | <blockquote><b> |
| 514 | alias aliasall ar cd chattr chgrp chmod chown cmp cp chroot dd echo ed exec |
| 515 | exit file find grep gunzip gzip help kill losetup losetup ln ls lsattr mkdir |
| 516 | mknod more mount mv pivot_root printenv prompt pwd quit rm rmdir setenv source |
| 517 | sum sync tar touch umask umount unalias where |
| 518 | </b></blockquote> |
| 519 | |
| 520 | <p>Plus sh because it's a shell. A dozen or so commands can only sanely be |
| 521 | implemented as shell builtins (alias aliasall cd exec exit prompt quit setenv |
| 522 | source umask unalias), where is an alias for which, and at triage time toybox |
| 523 | already has chgrp, chmod, chown, cmp, cp, chroot, echo, help, kill, losetup, |
| 524 | ln, ls, mkdir, mknod, printenv, pwd, rm, rmdir, sync, and touch.</p> |
| 525 | |
| 526 | <p>This leaves:</p> |
| 527 | |
| 528 | <blockquote><b> |
| 529 | <span id=sash_cmd> |
| 530 | ar chattr dd ed file find grep gunzip gzip lsattr more mount mv pivot_root |
| 531 | sh sum tar umount |
| 532 | </span> |
| 533 | </b></blockquote> |
| 534 | |
| 535 | <p>(For once, this project doesn't include a fork of gzip, instead |
| 536 | it sucks in -lz from the host.)</p> |
| 537 | |
| 538 | <hr /> |
| 539 | <a name=sbase /> |
| 540 | <h2>sbase:</h2> |
| 541 | |
| 542 | <p>It's <a href=http://git.suckless.org/sbase>on suckless</a>. So far it's |
| 543 | implemented:</p> |
| 544 | |
| 545 | <blockquote><p> |
Rob Landley | c166faf | 2013-09-01 07:25:37 -0500 | [diff] [blame] | 546 | <span id=sbase_cmd> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 547 | basename cat chmod chown cksum cmp cp date dirname echo false fold grep head |
| 548 | kill ln ls mc mkdir mkfifo mv nl nohup pwd rm seq sleep sort tail tee test |
| 549 | touch true tty uname uniq wc yes |
| 550 | </span> |
| 551 | </p></blockquote> |
| 552 | |
| 553 | <p>And has a TODO list:</p> |
| 554 | |
| 555 | <blockquote><p> |
Rob Landley | c166faf | 2013-09-01 07:25:37 -0500 | [diff] [blame] | 556 | <span id=sbase_cmd> |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 557 | cal chgrp chvt comm cut df diff du env expand expr id md5sum nice paste |
| 558 | printenv printf readlink rmdir seq sha1sum split sync test tr unexpand unlink |
| 559 | who |
| 560 | </span> |
| 561 | </p></blockquote> |
| 562 | |
| 563 | <p>At triage time, of the first list I still need to do: fold grep mc mv nl. Of |
| 564 | the second list: diff expr paste printf split test tr unexpand who.</p> |
| 565 | |
| 566 | <hr /> |
| 567 | <a name=s6 /> |
| 568 | <h2>s6</h2> |
| 569 | |
| 570 | <p>The website <a href=http://skarnet.org/software/>skarnet</a> has a bunch |
| 571 | of small utilities as part of something called "s6". This includes the |
| 572 | <a href=http://skarnet.org/software/s6-portable-utils>s6-portabile-utils</a> |
| 573 | and the <a href=http://skarnet.org/software/s6-linux-utils>s6-linux-utils</a>. |
| 574 | </p> |
| 575 | |
| 576 | <p>Both packages rely on multiple bespoke external libraries without which |
| 577 | they can't compile. The source is completely uncommented and doesn't wrap at |
| 578 | 80 characters. Doing a find for *.c files brings up the following commands:</p> |
| 579 | |
| 580 | <blockquote><b> |
| 581 | <span id=s6> |
| 582 | basename cat chmod chown chroot clock cut devd dirname echo env expr false |
| 583 | format-filter freeramdisk grep halt head hiercopy hostname linkname ln |
| 584 | logwatch ls maximumtime memoryhog mkdir mkfifo mount nice nuke pause |
| 585 | pivotchroot poweroff printenv quote quote-filter reboot rename rmrf sleep |
| 586 | sort swapoff swapon sync tail test touch true umount uniquename unquote |
| 587 | unquote-filter update-symlinks |
| 588 | </span> |
| 589 | </b></blockquote> |
| 590 | |
| 591 | <p>Triage: memoryhog isn't even listed on the website nor does it have |
| 592 | a documentation file, clock seems like a subset |
| 593 | of date, devd is some sort of netlink wrapper that spawns its command line |
| 594 | every time it gets a message (maybe this is meant to implement part of |
| 595 | udev/mdev?), format-filter is sort of awk's '{print $2}' function split out |
| 596 | into its own command, hiercopy a subset of "cp -r", maximumtime is something |
| 597 | I implemented as a shell script (more/timeout.sh in Aboriginal Linux), |
| 598 | nuke isn't the same as klibc (this one's "kill SIG -1" only with hardwared |
| 599 | SIG options), pause is a program that literally waits to be killed (I |
| 600 | generally sleep 999999999 which is a little over 30 years), |
| 601 | pivotchroot is a subset of switch_root, rmrf is rm -rf...</p> |
| 602 | |
| 603 | <p>I see "nuke" resurface, and if "rmrf" wasn't also here I might think |
| 604 | klibc had a point.</b> |
| 605 | |
| 606 | <blockquote> |
| 607 | basename cat chmod chown chroot cut dirname echo env expr false |
| 608 | freeramdisk grep halt head hostname linkname ln |
| 609 | logwatch ls mkdir mkfifo mount nice |
| 610 | pivotchroot poweroff printenv quote quote-filter reboot rename sleep |
| 611 | sort swapoff swapon sync tail test touch true umount uniquename unquote |
| 612 | unquote-filter update-symlinks |
| 613 | </blockquote> |
| 614 | |
| 615 | |
| 616 | <hr /> |
| 617 | <a name=nash /> |
| 618 | <h2>nash:</h2> |
| 619 | |
| 620 | <p>Red Hat's nash was part of its "mkinitrd" package, replacement for a shell |
| 621 | and utilities on the boot floppy back in the 1990's (the same general idea |
| 622 | as BusyBox, developed independently). Red Hat discontinued nash development |
| 623 | in 2010, replacing it with dracut (which collects together existing packages, |
| 624 | including busybox).</p> |
| 625 | |
| 626 | <p>I couldn't figure out how to beat source code out of |
| 627 | <a href=http://pkgs.fedoraproject.org/git/mkinitrd>Fedora's current git</a> |
| 628 | repository. The last release version that used it was Fedora Core 12 |
| 629 | which has <a href=http://archive.fedoraproject.org/pub/archive/fedora/linux/releases/12/Fedora/source/SRPMS/mkinitrd-6.0.93-1.fc12.src.rpm>a source rpm</a> |
| 630 | that can be unwound with "rpm2cpio mkinitrd.src.rpm | cpio -i -d -H newc |
| 631 | --no-absolute-filenames" and in there is a mkinitrd-6.0.93.tar.bz2 which |
| 632 | has the source.</p> |
| 633 | |
| 634 | <p>In addition to being a bit like a command shell, the nash man page lists the |
| 635 | following commands:</p> |
| 636 | |
| 637 | <blockquote><p> |
| 638 | access echo find losetup mkdevices mkdir mknod mkdmnod mkrootdev mount |
| 639 | pivot_root readlink raidautorun setquiet showlabels sleep switchroot umount |
| 640 | </p></blockquote> |
| 641 | |
| 642 | <p>Oddly, the only occurrence of the string pivot_root in the nash source code |
| 643 | is in the man page, the command isn't there. (It seems to have been removed |
| 644 | when the underscoreless switchroot went in.)</p> |
| 645 | |
| 646 | <p>A more complete list seems to be the handlers[] array in nash.c:</p> |
| 647 | |
| 648 | <blockquote><p> |
| 649 | access buildEnv cat cond cp daemonize dm echo exec exit find kernelopt |
| 650 | loadDrivers loadpolicy mkchardevs mkblktab mkblkdevs mkdir mkdmnod mknod |
| 651 | mkrootdev mount netname network null plymouth hotplug killplug losetup |
| 652 | ln ls raidautorun readlink resume resolveDevice rmparts setDeviceEnv |
| 653 | setquiet setuproot showelfinterp showlabels sleep stabilized status switchroot |
| 654 | umount waitdev |
| 655 | </p></blockquote> |
| 656 | |
| 657 | <p>This list is nuts: "plymouth" is an alias for "null" which is basically |
| 658 | "true" (which thie above list doesn't have). Things like buildEnv and |
| 659 | loadDrivers are bespoke Red Hat behavior that might as well be hardwired in |
| 660 | to nash's main() without being called.</p> |
| 661 | |
| 662 | <p>Instead of eliminating items |
| 663 | from the list with an explanation for each, I'm just going to cherry pick |
| 664 | a few: the device mapper (dm, raidautorun) is probably interesting, |
| 665 | hotplug (may be obsolete due to kernel changes that now load firmware |
| 666 | directly), and another "resume" ala klibc.</p> |
| 667 | |
| 668 | <p>But mostly: I don't care about this one. And neither does Red Hat anymore.</p> |
| 669 | |
Rob Landley | ca04c7f | 2013-03-27 22:34:28 -0500 | [diff] [blame] | 670 | <p>Verdict: ignore</p> |
| 671 | |
Rob Landley | 9a69a92 | 2013-02-23 18:32:08 -0600 | [diff] [blame] | 672 | <hr /> |
| 673 | <a name=beastiebox /> |
| 674 | <h2>Beastiebox</h2> |
| 675 | |
| 676 | <p>Back in 2008, the BSD guys vented some busybox-envy |
| 677 | <a href=http://beastiebox.sourceforge.net>on sourceforge</a>. Then stopped. |
| 678 | Their repository is still in CVS, hasn't been touched in years, it's a giant |
| 679 | hairball of existing code sucked together. (The web page says the author |
| 680 | is aware of crunchgen, but decided to do this by hand anyway. This is not |
| 681 | a collection of new code, it's a katamari of existing code rolled up in a |
| 682 | ball.)</p> |
| 683 | |
| 684 | <p>Combining the set of commands listed on the web page with the set of |
| 685 | man pages in the source gives us:</P> |
| 686 | |
| 687 | <blockquote><p> |
| 688 | [ cat chmod cp csh date df disklabel dmesg echo ex fdisk fsck fsck_ffs getty |
| 689 | halt hostname ifconfig init kill less lesskey ln login ls lv mksh more mount |
| 690 | mount_ffs mv pfctl ping poweroff ps reboot rm route sed sh stty sysctl tar test |
| 691 | traceroute umount vi wiconfig |
| 692 | </p></blockquote> |
| 693 | |
| 694 | <p>Apparently lv is the missing link ed and vi, copyright 1982-1997 (do not |
| 695 | want), ex is another obsolete vi mode, lesskey is "used to |
| 696 | specify a set of key bindings to be used with less", and csh is a shell they |
| 697 | sucked in, [ is an alias for test. Several more bsd-isms that don't have Linux |
| 698 | equivalents (even in the ubuntu "install this package" search) are |
| 699 | disklabel, fsck_ffs, mount_ffs, and pfctl. And wiconfig is a wavelan interface |
| 700 | network card driver utility. Subtracting all that and the commands toybox |
| 701 | already implements at triage time, we get:</p> |
| 702 | |
| 703 | <blockquote><p> |
| 704 | <span id=beastiebox_cmd> |
| 705 | fdisk fsck getty halt ifconfig init kill less mksh more mount mv ping poweroff |
| 706 | ps reboot route sed sh stty sysctl tar test traceroute umount vi |
| 707 | </span> |
| 708 | </p></blockquote> |
| 709 | |
| 710 | <p>Not a hugely interesting list, but eh.</p> |
| 711 | |
Rob Landley | ca04c7f | 2013-03-27 22:34:28 -0500 | [diff] [blame] | 712 | <p>Verdict: ignore</p> |
| 713 | |
| 714 | <hr /> |
| 715 | <a name=BsdBox /> |
| 716 | <h2>BsdBox</h2> |
| 717 | |
| 718 | <p>Somebody decided to do a <a href=https://wiki.freebsd.org/AdrianChadd/BsdBox>multicall binary for freebsd</a>.</p> |
| 719 | |
| 720 | <p>They based it on crunchgen, a tool that glues existing programs together |
| 721 | into an archive and uses the name to execute the right one. It has no |
| 722 | simplification or code sharing benefits whatsoever, it's basically an |
| 723 | archiver that produces executables.</p> |
| 724 | |
| 725 | <p>That's about where I stopped reading.</p> |
| 726 | |
| 727 | <p>Verdict: ignore.</p> |
| 728 | |
| 729 | <hr /> |
| 730 | <a name=slowaris /> |
| 731 | <h2>OpenSolaris Busybox</h2> |
| 732 | |
| 733 | <p>Somebody <a href=http://hub.opensolaris.org/bin/view/Project+busybox/>wrote |
| 734 | a wiki page</a> saying that Busybox for OpenSolaris would be a good idea.</p> |
| 735 | |
| 736 | <p>The corresponding "files" tab is an auto-generated stub. The project never |
| 737 | even got as far as suggesting commands to include before Oracle discontinued |
| 738 | OpenSolaris.</p> |
| 739 | |
| 740 | <p>Verdict: ignore.</p> |
| 741 | |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 742 | <hr /> |
| 743 | <h2>Requests:</h2> |
| 744 | |
Rob Landley | 8fe1814 | 2014-10-07 14:11:54 -0500 | [diff] [blame] | 745 | <p>The following additional commands have been requested (and often submitted) |
| 746 | by various users:</p> |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 747 | <blockquote><b> |
| 748 | <span id=request> |
Rob Landley | 64b6319 | 2013-12-31 09:01:32 -0600 | [diff] [blame] | 749 | dig freeramdisk getty halt hexdump hwclock klogd modprobe ping ping6 pivot_root |
Rob Landley | ca04c7f | 2013-03-27 22:34:28 -0500 | [diff] [blame] | 750 | poweroff readahead rev sfdisk sudo syslogd taskset telnet telnetd tracepath |
| 751 | traceroute unzip usleep vconfig zip free login modinfo unshare netcat help w |
Rob Landley | 64b6319 | 2013-12-31 09:01:32 -0600 | [diff] [blame] | 752 | ntpd iwconfig iwlist rdate |
Rob Landley | 7dbb982 | 2014-02-21 22:24:02 -0600 | [diff] [blame] | 753 | dos2unix unix2dos catv clear |
| 754 | pmap realpath setsid timeout truncate |
| 755 | mkswap swapon swapoff |
| 756 | count oneit fstype |
| 757 | acpi blkid eject pwdx |
Rob Landley | 8fe1814 | 2014-10-07 14:11:54 -0500 | [diff] [blame] | 758 | sulogin rfkill bootchartd |
| 759 | arp makedevs sysctl killall5 crond crontab deluser last mkpasswd watch |
| 760 | ipaddr iplink iproute blockdev rpm2cpio arping brctl dumpleases fsck |
| 761 | tcpsvd tftpd |
| 762 | factor fallocate fsfreeze inotifyd lspci nbd-client partprobe strings |
| 763 | |
Rob Landley | 8f90d3a | 2012-07-21 23:58:40 -0500 | [diff] [blame] | 764 | </span> |
| 765 | </b></blockquote> |
| 766 | |
| 767 | <!-- #include "footer.html" --> |
| 768 | |