blob: 61c57a656a600ed31c8131043477704b77daaf13 [file] [log] [blame]
Rob Landley349ff522014-01-04 13:09:42 -06001<html><head><title>What is toybox?</title>
Rob Landley589f5cd2010-01-05 10:41:52 -06002<!--#include file="header.html" -->
3
Rob Landley58896912014-09-20 14:12:55 -05004<h2><a name="what" />What is toybox?</h2>
Rob Landleye258af32008-01-05 18:09:49 -06005
Rob Landleye566f3a2013-06-16 20:02:38 -05006<p>Toybox combines the most common Linux command line utilities together into
7a single <a href=license.html>BSD-licensed</a> executable. It's simple, small, fast, and reasonably
8standards-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>
Rob Landleye258af32008-01-05 18:09:49 -06009
Rob Landleye566f3a2013-06-16 20:02:38 -050010<p>Toybox's 1.0 release goal is to turn generic Android into a
11development environment capable of compiling <a href=http://www.linuxfromscratch.org>Linux From Scratch</a>.
12A 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
13gcc 4.2.1+binutils 2.17) should be
14able to rebuild itself from source code without needing any other packages.</p>
Rob Landleye258af32008-01-05 18:09:49 -060015
Rob Landley58896912014-09-20 14:12:55 -050016<b><h2><a name="status" />What commands are implemented in toybox?</h2></b>
Rob Landleye258af32008-01-05 18:09:49 -060017
Rob Landley689f0952012-08-25 14:24:24 -050018<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.
Rob Landleye566f3a2013-06-16 20:02:38 -050020There is also <a href=roadmap.html>roadmap</a> listing all planned commands for the
Rob Landley689f0952012-08-25 14:24:24 -0500211.0 release.</p>
Rob Landleye258af32008-01-05 18:09:49 -060022
23<p>In general, configuring toybox for "defconfig" enables all the commands
24compete enough to be useful. Configuring "allyesconfig" enables partially
Rob Landley689f0952012-08-25 14:24:24 -050025implemented commands as well, along with debugging features.</p>
Rob Landleye258af32008-01-05 18:09:49 -060026
Rob Landley4c2484f2012-01-22 19:41:42 -060027<p>Several toybox commands can do things other vesions can't. For example
28the toybox "df" isn't confused by initramfs the way other df implementations
Rob Landley689f0952012-08-25 14:24:24 -050029are. (If initramfs is visible, df shows it like any other mount point.)</p>
Rob Landleybd915512008-01-07 20:28:26 -060030
Rob Landleye258af32008-01-05 18:09:49 -060031<b><h3>Command Shell</h3></b>
Rob Landley58896912014-09-20 14:12:55 -050032<p>The toybox shell (toysh) aims to be a reasonable bash replacement. It
Rob Landleye258af32008-01-05 18:09:49 -060033implements 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
37separate executables): cd, exit, if, while, for, function, fg, bg, jobs, source,
Rob Landley4c2484f2012-01-22 19:41:42 -060038<a href="http://opengroup.org/onlinepubs/9699919799/utilities/alias.html">alias</a>,
Rob Landleye258af32008-01-05 18:09:49 -060039export, 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
46which may be added to this project. (Whether that file is readable by anybody
Rob Landley4c2484f2012-01-22 19:41:42 -060047but the project's maintainer is open to debate.) The roadmap wiki in the
48nav bar has a more human readable version.</p>
Rob Landleye258af32008-01-05 18:09:49 -060049
50<p>The criteria for a toybox 1.0 release is that a system built from just the
Rob Landley4c2484f2012-01-22 19:41:42 -060051Linux kernel, toybox, C library (such as uClibc), and a compiler (such as
52tinycc) can rebuild itself from source code.</p>
Rob Landleye258af32008-01-05 18:09:49 -060053
54<b><h3>Relevant Standards</h3></b>
55
56<p>Most commands are implemented according to
Rob Landley4c2484f2012-01-22 19:41:42 -060057<a href=http://opengroup.org/onlinepubs/9699919799/idx/utilities.html>The
Rob Landley9a69a922013-02-23 18:32:08 -060058Single Unix Specification version 4</a> where applicable. This does not mean
Rob Landley58896912014-09-20 14:12:55 -050059that toybox is implementing every SUSv4 utility: some such as SCCS and ed are
Rob Landleye258af32008-01-05 18:09:49 -060060obsolete, while others such as c99 are outside the scope of the project.
61Toybox also isn't implementing full internationalization support: it should be
628-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher
Rob Landley9a69a922013-02-23 18:32:08 -060063layers. And some things (like $CDPATH support in "cd") await a good
64explanation of why to bother with them. (The standard provides an important
Rob Landleye258af32008-01-05 18:09:49 -060065frame of reference, but is not infallable set of commandments to be blindly
66obeyed.)</p>
67
68<p>The other major sources of commands are the Linux man pages, and testing
69the behavior of existing commands (although not generally looking at their
Rob Landley9a69a922013-02-23 18:32:08 -060070source code), including the commands in Android's toolbox. SUSv4 does not
Rob Landley4c2484f2012-01-22 19:41:42 -060071include many basic commands such as "mount", "init", and "mke2fs", which are
72kind of nice to have.</p>
Rob Landleye258af32008-01-05 18:09:49 -060073
74<b><h2><a name="downloads" />Download</h2></b>
75
Rob Landleye0269f12015-04-05 20:00:33 -050076<p>This project is maintained as a <a href=https://github.com/landley/toybox>git
77archive</a>, and also offers <a href=http://landley.net/toybox/downloads>source
78tarballs</a> and <a href=http://landley.net/toybox/bin>static binaries</a>
79of the release versions.</p>
Rob Landleye258af32008-01-05 18:09:49 -060080
81<p>The maintainer's <a href=/notes.html>development log</a> and the project's
Rob Landley4c2484f2012-01-22 19:41:42 -060082<a href=http://lists.landley.net/listinfo.cgi/toybox-landley.net>mailing
Rob Landleye258af32008-01-05 18:09:49 -060083list</a> are also good ways to track what's going on with the project.</p>
84
Rob Landleye0269f12015-04-05 20:00:33 -050085<b><h2><a name="why" />Why is toybox?</h2></b>
Rob Landley689f0952012-08-25 14:24:24 -050086
Rob Landleye0269f12015-04-05 20:00:33 -050087<p>The <a href=http://landley.net/talks/celf-2015.txt>2015 toybox talk</a>
88starts with links to three previous talks on the history and motivation of
89the project: "Why Toybox", "Why Public Domain", and "Why did I do
Elliott Hughes51746972015-04-17 02:52:11 -050090Aboriginal Linux (which led me here)?".</p>
Rob Landley689f0952012-08-25 14:24:24 -050091
Rob Landley08671ef2009-09-30 23:30:26 -050092<b><h2><a name="toycans" />What's the toybox logo image?</h2></b>
Rob Landleyb9d0cf12008-01-05 18:13:19 -060093
94<p>It's <a href=toycans-big.jpg>carefully stacked soda cans</a>. Specifically,
95it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006,
Rob Landley797a4c32008-01-05 18:23:30 -060096stacked to spell out the binary values of the ascii string "Toybox", with
97null terminator at the bottom. (The big picture's on it's side because
98the 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
101who 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,
102thinking they were recycling. (I still have two of each kind, but
103Pepsi One seems discontinued and Coke Zero switched its can color
104from black to grey, presumably in celebration. It was fun while it lasted...)</p>
Rob Landley589f5cd2010-01-05 10:41:52 -0600105
106<!--#include file="footer.html" -->