blob: a58d3d38f42b1d01e952b91d27c08f6cd2eb99a8 [file] [log] [blame]
Rob Landleye258af32008-01-05 18:09:49 -06001<h2><a name="what" />What is ToyBox?</h2>
2
3<p>The goal of the Toybox project is to create simple implementations of all
4the important Linux command line utilities. These implementations should
5be small (the entire project should total less than a megabyte, uncompressed),
6fast, simple, and correctly implemented (which is related to standards
7compliance, but isn't quite the same thing). Click for
8<a href="design.html">more about the design goals</a></p>
9
10<p>Toybox has configurable levels of functionality, and should scale from tiny
11embedded systems up to full general purpose desktop and development
12environments. The author plans to run it on his laptop, and the
13<a href=/code/firmware>Firmware Linux</a> project is trying to get a complete
14Linux system to rebuild itself from source code using toybox.</p>
15
16<p>Toybox is <a href=license.html>Licensed under GPL version 2</a>.</p>
17
18<p>Toybox can be built as a single "swiss army knife" executable (ala BusyBox
19or Red Hat's Nash), or each command can be built as a traditional independent
20executable.</p>
21
22<b><h2><a name="status" />What commands are implemented?</h2></b>
23
24<p>The current list of commands implemented by toybox is at the top of the
25<a href=news.html>news page</a></p>. That list is updated when new commands
26go in.</p>
27
28<p>In general, configuring toybox for "defconfig" enables all the commands
29compete enough to be useful. Configuring "allyesconfig" enables partially
30implemented commands as well.</p>
31
32<p>The following commands are incomplete, but demonstrate some basic
33functionality: bzcat/bunzip2, help, mke2fs, sh/toysh, mdev.</p>
34
35<p>The following are partially implemented commands that don't actually do
36anything yet: mke2fs.</p>
37
Rob Landleybd915512008-01-07 20:28:26 -060038<p>Several toybox commands can do things other vesions can't. For example:</p>
39
40<p>The toybox "df" isn't confused by initramfs the way other df implementations
41are. If initramfs is visible, df shows it like any other mount point.</p>
42
43<p>The toybox "touch" command has a -l option to set the length of a file.
44This can truncate a file, or create completely sparse files.</p>
Rob Landleye258af32008-01-05 18:09:49 -060045
46<b><h3>Command Shell</h3></b>
47<p>The Toybox Shell (toysh) aims to be a reasonable bash replacement. It
48implements the "sh" and "toysh" commands, plus the built-in commands "cd" and
49"exit". This is the largest single sub-project in toybox.</p>
50
51<p>The following additional commands may be built into the shell (but not as
52separate executables): cd, exit, if, while, for, function, fg, bg, jobs, source,
53<a href="http://www.opengroup.org/onlinepubs/009695399/utilities/alias.html">alias</a>,
54export, set, unset, read, trap, and exec. (Note: not done yet.)</p>
55
56</ul>
57
58<h2><a name="commands" />Which commands are planned?</h2>
59
60<p>The toybox <a href=todo.txt>todo list</a> mentions many potential commands
61which may be added to this project. (Whether that file is readable by anybody
62but the project's maintainer is open to debate.)</p>
63
64<p>The criteria for a toybox 1.0 release is that a system built from just the
65Linux kernel, toybox, uClibc, and a compiler (such as tinycc) can rebuild
66itself from source code.</p>
67
68<b><h3>Relevant Standards</h3></b>
69
70<p>Most commands are implemented according to
71<a href=http://www.opengroup.org/onlinepubs/009695399/idx/utilities.html>The
72Single Unix Specification version 3</a> where applicable. This does not mean
73that Toybox is implementing every SUSv3 utility: some such as SCCS and ed are
74obsolete, while others such as c99 are outside the scope of the project.
75Toybox also isn't implementing full internationalization support: it should be
768-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher
77layers. And some things (like $CDPATH support in "cd") await a good
78explanation of why to bother with them. (The standard provides an important
79frame of reference, but is not infallable set of commandments to be blindly
80obeyed.)</p>
81
82<p>The other major sources of commands are the Linux man pages, and testing
83the behavior of existing commands (although not generally looking at their
84source code). SUSv3 does not include many basic commands such as "mount",
85"init", and "mke2fs", which are kind of nice to have.</p>
86
87<b><h2><a name="downloads" />Download</h2></b>
88
89<p>This project is maintained as a mercurial archive. To get a copy of the
90current development version, either use mercurial (hg clone
91http://landley.net/toybox) or click on one of the zip/gz/bz2 links
92at the top of the <a href=/hg/toybox>mercurial archive browser</a> page to get
93an archive of the appropriate version. Click
94<a href="/hg/toybox?cmd=tags">tags</a> to see all the tagged release
95versions ("tip" is the current development version).</p>
96
97<p>The maintainer's <a href=/notes.html>development log</a> and the project's
98<a href=http://www2.them.com:8080/cgi-bin/mailman/listinfo/toybox>mailing
99list</a> are also good ways to track what's going on with the project.</p>
100
Rob Landley08671ef2009-09-30 23:30:26 -0500101<b><h2><a name="toycans" />What's the toybox logo image?</h2></b>
Rob Landleyb9d0cf12008-01-05 18:13:19 -0600102
103<p>It's <a href=toycans-big.jpg>carefully stacked soda cans</a>. Specifically,
104it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006,
Rob Landley797a4c32008-01-05 18:23:30 -0600105stacked to spell out the binary values of the ascii string "Toybox", with
106null terminator at the bottom. (The big picture's on it's side because
107the camera was held sideways to get a better shot.)</p>
108
109<p>No, it's not photoshopped, I actually had these cans until a coworker
110who 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,
111thinking they were recycling. (I still have two of each kind, but
112Pepsi One seems discontinued and Coke Zero switched its can color
113from black to grey, presumably in celebration. It was fun while it lasted...)</p>