Home | History | Annotate | Download | only in www
      1 <html><head><title>What is toybox?</title>
      2 <!--#include file="header.html" -->
      3 
      4 <h2><a name="what" />What is toybox?</h2>
      5 
      6 <p>Toybox combines the most common Linux command line utilities together into
      7 a single <a href=license.html>BSD-licensed</a> executable. It's simple, small, fast, and reasonably
      8 standards-compliant (<a href=http://opengroup.org/onlinepubs/9699919799>POSIX-2008</a> and <a href=http://refspecs.linuxfoundation.org/LSB_4.1.0>LSB 4.1</a>).</p>
      9 
     10 <p>Toybox's 1.0 release goal is to turn generic Android into a
     11 development environment capable of compiling <a href=http://www.linuxfromscratch.org>Linux From Scratch</a>.
     12 A tiny system <a href=/aboriginal>built from</a> just toybox, linux, <a href=http://musl-libc.org>a C library</a>, and a C compiler (such as LLVM or
     13 gcc 4.2.1+binutils 2.17) should be
     14 able to rebuild itself from source code without needing any other packages.</p>
     15 
     16 <b><h2><a name="status" />What commands are implemented in toybox?</h2></b>
     17 
     18 <p>The current list of commands implemented by toybox is on the
     19 <a href=status.html>status page</a>, which is updated each release.
     20 There is also <a href=roadmap.html>roadmap</a> listing all planned commands for the
     21 1.0 release.</p>
     22 
     23 <p>In general, configuring toybox for "defconfig" enables all the commands
     24 compete enough to be useful.  Configuring "allyesconfig" enables partially
     25 implemented commands as well, along with debugging features.</p>
     26 
     27 <p>Several toybox commands can do things other vesions can't.  For example
     28 the toybox "df" isn't confused by initramfs the way other df implementations
     29 are. (If initramfs is visible, df shows it like any other mount point.)</p>
     30 
     31 <b><h3>Command Shell</h3></b>
     32 <p>The toybox shell (toysh) aims to be a reasonable bash replacement.  It
     33 implements the "sh" and "toysh" commands, plus the built-in commands "cd" and
     34 "exit".  This is the largest single sub-project in toybox.</p>
     35 
     36 <p>The following additional commands may be built into the shell (but not as
     37 separate executables): cd, exit, if, while, for, function, fg, bg, jobs, source,
     38 <a href="http://opengroup.org/onlinepubs/9699919799/utilities/alias.html">alias</a>,
     39 export, set, unset, read, trap, and exec.  (Note: not done yet.)</p>
     40 
     41 </ul>
     42 
     43 <h2><a name="commands" />Which commands are planned?</h2>
     44 
     45 <p>The toybox <a href=todo.txt>todo list</a> mentions many potential commands
     46 which may be added to this project.  (Whether that file is readable by anybody
     47 but the project's maintainer is open to debate.)  The roadmap wiki in the
     48 nav bar has a more human readable version.</p>
     49 
     50 <p>The criteria for a toybox 1.0 release is that a system built from just the
     51 Linux kernel, toybox, C library (such as uClibc), and a compiler (such as
     52 tinycc) can rebuild itself from source code.</p>
     53 
     54 <b><h3>Relevant Standards</h3></b>
     55 
     56 <p>Most commands are implemented according to
     57 <a href=http://opengroup.org/onlinepubs/9699919799/idx/utilities.html>The
     58 Single Unix Specification version 4</a> where applicable. This does not mean
     59 that toybox is implementing every SUSv4 utility: some such as SCCS and ed are
     60 obsolete, while others such as c99 are outside the scope of the project.
     61 Toybox also isn't implementing full internationalization support: it should be
     62 8-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher
     63 layers. And some things (like $CDPATH support in "cd") await a good
     64 explanation of why to bother with them. (The standard provides an important
     65 frame of reference, but is not infallable set of commandments to be blindly
     66 obeyed.)</p>
     67 
     68 <p>The other major sources of commands are the Linux man pages, and testing
     69 the behavior of existing commands (although not generally looking at their
     70 source code), including the commands in Android's toolbox. SUSv4 does not
     71 include many basic commands such as "mount", "init", and "mke2fs", which are
     72 kind of nice to have.</p>
     73 
     74 <b><h2><a name="downloads" />Download</h2></b>
     75 
     76 <p>This project is maintained as a <a href=https://github.com/landley/toybox>git
     77 archive</a>, and also offers <a href=http://landley.net/toybox/downloads>source
     78 tarballs</a> and <a href=http://landley.net/toybox/bin>static binaries</a>
     79 of the release versions.</p>
     80 
     81 <p>The maintainer's <a href=/notes.html>development log</a> and the project's
     82 <a href=http://lists.landley.net/listinfo.cgi/toybox-landley.net>mailing
     83 list</a> are also good ways to track what's going on with the project.</p>
     84 
     85 <b><h2><a name="why" />Why is toybox?</h2></b>
     86 
     87 <p>The <a href=http://landley.net/talks/celf-2015.txt>2015 toybox talk</a>
     88 starts with links to three previous talks on the history and motivation of
     89 the project: "Why Toybox", "Why Public Domain", and "Why did I do
     90 Aboriginal Linux (which led me here)?".</p>
     91 
     92 <b><h2><a name="toycans" />What's the toybox logo image?</h2></b>
     93 
     94 <p>It's <a href=toycans-big.jpg>carefully stacked soda cans</a>.  Specifically,
     95 it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006,
     96 stacked to spell out the binary values of the ascii string "Toybox", with
     97 null terminator at the bottom.  (The big picture's on it's side because
     98 the camera was held sideways to get a better shot.)</p>
     99 
    100 <p>No, it's not photoshopped, I actually had these cans until a coworker
    101 who Totally Did Not Get It <sup><font size=-3><a href=http://www.timesys.com>tm</a></font></sup> threw them out one day after I'd gone home,
    102 thinking they were recycling.  (I still have two of each kind, but
    103 Pepsi One seems discontinued and Coke Zero switched its can color
    104 from black to grey, presumably in celebration.  It was fun while it lasted...)</p>
    105 
    106 <!--#include file="footer.html" -->
    107