Check in most recent release notes.
[platform/upstream/toybox.git] / www / about.html
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 mercurial archive.  To get a copy of the
77 current development version, either use mercurial (hg clone
78 http://landley.net/hg/toybox) or click on one of the zip/gz/bz2 links
79 at the top of the <a href=/hg/toybox>mercurial archive browser</a> page to get
80 an archive of the appropriate version.  Click
81 <a href="/hg/toybox?cmd=tags">tags</a> to see all the tagged release
82 versions ("tip" is the current development version).</p>
83
84 <p>The maintainer's <a href=/notes.html>development log</a> and the project's
85 <a href=http://lists.landley.net/listinfo.cgi/toybox-landley.net>mailing
86 list</a> are also good ways to track what's going on with the project.</p>
87
88 <!--
89 <b><h2><a name="why">Why do toybox?</h2></b>
90
91 <p>Because smart phones are replacing the PC, and Android must become
92 self-hosting to beat the iPhone in establishing the new standard.</p>
93
94 <p>This is the third such major transition in computer history:
95 (mainframe-&gt;minicomputer-&gt;microcomputer-&gt;smartphone).
96 The mainframe was replaced by the minicomputer, which was replaced by
97 the microcomputer (renamed the "personal" computer to make clear you could
98 access porn through it), which is being replaced by the smartphone. Nobody
99 needed to wait for printouts from a big computer in another building when they
100 could use a little one down the hall.  Then nobody needed the big computer
101 down the hall when they had a little one on their desk.  Now nobody needs the
102 big computer on their desk when they have a little one in their pocket.</p>
103
104 <p>The new platform displaces the old when it becomes natively self hosting.
105 Often they leverage existing technology: just as early microcmputers used
106 teletypes and televisions for output, phones can use
107 <a href=http://us.toshiba.com/accessory/PA3575U-1PRP>USB docking stations</a>
108 to access a bigger screen, mouse, keyboard, speakers, etc. Plugging a phone into
109 USB even charges the battery. But to use the phone as a development
110 workstation, it needs more software, such as a Posix command line, a native
111 compiler, and drivers for the USB peripherals.</p>
112
113 <p>The new platform also eventually weans itself off of its dominant language.
114 Dalvik is to Android what ROM Basic was to the PC: something it must
115 eventually outgrow. Thus toybox is native C code, not Java.</p>
116
117 <b><h3>So why aren't self-hosting smartphones attracting more attention?</h3></b>
118
119 <p>Because most people are focusing on the legacy platforms, not on the new
120 stuff. Existing multi-billion dollar industries are getting evicted from their
121 decades-old established niche, and are trying to spin the transition as an
122 opportunity instead of a forced march onto reservations. When elephants run
123 from mice, it's easier to notice the elephants.</p>
124
125 <p>History's our guide here: the previous technology always gets kicked up into
126 the "server space", moving from "the thing you stood in front of waiting for
127 your printout" to "that thing you sometimes accessed remotely via the new
128 computer". This time around they're calling it "the cloud" and pretending it's
129 a big deal; it's really just a beowulf cluster with a layer of
130 virtualization/containerization software implementing hotplug hardware and
131 live migration to provide cheap
132 commodity processing power that dominant players (like amazon) literally
133 give away for free. These old machines become secondary, only
134 accessed through the new machines users now directly interact with.</p>
135
136 <p>Since there's only one server space, the mainframe ate the minicomputer in
137 the 1980's (when DEC went under), and this time around "the cloud" seems to be
138 eating the mainframe (IBM ain't happy). The inevitable consolidation leads
139 to drama, but doesn't mean much in the long run.</p>
140
141 <p><a href=http://landley.net/notes-2012.html#12-07-2012>For more
142 on this topic...</a></p>
143
144 <b><h3><a name="why_android">Why is Android important?</h2></b>
145
146 <p>Major hardware transitions introduce
147 <a href=http://landley.net/notes-2011.html#26-06-2011>new software
148 standards</a> which are extremely sticky once
149 established, due to network effects.</p>
150
151 <p>Last time around, the PC was stuck with
152 a proprietary operating system (DOS/Windows) which is still dominant on that
153 hardware platform's descendants 30 years later. This time around, the choice
154 is between Android (a Linux derivative) and iPhone (a closed BSD fork ala
155 SunOS, put out by a company already engaged in multiple aggressive IP lawsuits).
156 The main difference between Apple and Microsoft is that Apple is competent.</p>
157
158 <p>And yes, it has to be Android, it won't be vanilla Linux any time soon,
159 for three reasons. 1) <a href=http://landley.net/notes-2010.html#13-08-2010>Open
160 Source can't do user interfaces</a> for about the same reason wikipedia can't
161 write a novel, 2) it's too late to the
162 party (a 5 year headstart is forever in computers), 3) preinstalls matter
163 (GPLv3 spooked all the hardware vendors, Android has a "no GPL in
164 userspace" policy which is rigidly enforced).</p>
165
166 <p>And "any time soon" is important: attempting to displace an existing
167 entrenched de-facto standard is what linux has spent the last 20
168 years trying (and failing) to do on the desktop. Spending another 20
169 years fighting for less than 1% of the phone market would just be sad.</p>
170
171 <b><h3><a name="how_google">How is Google less evil than Apple?</h3></b>
172
173 <p>Because Android isn't Google's core business, attaching advertising to large
174 scale data searches is. Android and Chrome and such are Google's way of
175 "commoditizing their co-factors" to drive down the price of ingredients
176 to their core business.</p>
177
178 <p>Thus Google is pursuing a commodity market and encouring as many vendors as
179 possible to participate, not to control the new space but to hold it open,
180 so that its search products are widely available without requiring the
181 permission of some other monopoly gatekeeper. Apple is attemping to corner the
182 smartphone market and extract monopoly rents, excluding all
183 vendors except itself.</p>
184
185 <p>So if Google wins we get a commodity market in smartphone/tablet software,
186 and may be able to open it further in future. If Apple wins we get a proprietary
187 smartphone/tablet OS with a single monopoly vendor, which is likely to close it
188 further.</p>
189
190 <b><h3>Why not just use BusyBox?</h3></b>
191
192 <p>Android can't. Busybox predates android
193 by many years; if they were ever going to ship it they'd have done so by
194 now. Android has had a "No GPL in Userspace" policy ever since GPLv3
195 came out (before the first Android phone shipped), and they mean it.</p>
196
197 <p>Toybox also has a better design and simpler code. I did both
198 and this is the one I enjoy banging on; I tried to contribute a few things
199 to busybox and it was like crawling through a thornbush of #ifdefs. Busybox
200 development is just no fun anymore.</p>
201
202 -->
203
204 <b><h2><a name="toycans" />What's the toybox logo image?</h2></b>
205
206 <p>It's <a href=toycans-big.jpg>carefully stacked soda cans</a>.  Specifically,
207 it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006,
208 stacked to spell out the binary values of the ascii string "Toybox", with
209 null terminator at the bottom.  (The big picture's on it's side because
210 the camera was held sideways to get a better shot.)</p>
211
212 <p>No, it's not photoshopped, I actually had these cans until a coworker
213 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,
214 thinking they were recycling.  (I still have two of each kind, but
215 Pepsi One seems discontinued and Coke Zero switched its can color
216 from black to grey, presumably in celebration.  It was fun while it lasted...)</p>
217
218 <!--#include file="footer.html" -->