OSDN Git Service

Misc website updates.
[android-x86/external-toybox.git] / www / about.html
1 <!--#include file="header.html" -->
2
3 <h2><a name="what" />What is ToyBox?</h2>
4
5 <p>Toybox combines the most common Linux command line utilities together into
6 a single <a href=license.html>BSD-licensed</a> executable. It's simple, small, fast, and reasonably
7 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>
8
9 <p>Toybox's 1.0 release goal is to turn generic Android into a
10 development environment capable of compiling <a href=http://www.linuxfromscratch.org>Linux From Scratch</a>.
11 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
12 gcc 4.2.1+binutils 2.17) should be
13 able to rebuild itself from source code without needing any other packages.</p>
14
15 <b><h2><a name="status" />What commands are implemented in Toybox?</h2></b>
16
17 <p>The current list of commands implemented by toybox is on the
18 <a href=status.html>status page</a>, which is updated each release.
19 There is also <a href=roadmap.html>roadmap</a> listing all planned commands for the
20 1.0 release.</p>
21
22 <p>In general, configuring toybox for "defconfig" enables all the commands
23 compete enough to be useful.  Configuring "allyesconfig" enables partially
24 implemented commands as well, along with debugging features.</p>
25
26 <p>Several toybox commands can do things other vesions can't.  For example
27 the toybox "df" isn't confused by initramfs the way other df implementations
28 are. (If initramfs is visible, df shows it like any other mount point.)</p>
29
30 <b><h3>Command Shell</h3></b>
31 <p>The Toybox Shell (toysh) aims to be a reasonable bash replacement.  It
32 implements the "sh" and "toysh" commands, plus the built-in commands "cd" and
33 "exit".  This is the largest single sub-project in toybox.</p>
34
35 <p>The following additional commands may be built into the shell (but not as
36 separate executables): cd, exit, if, while, for, function, fg, bg, jobs, source,
37 <a href="http://opengroup.org/onlinepubs/9699919799/utilities/alias.html">alias</a>,
38 export, set, unset, read, trap, and exec.  (Note: not done yet.)</p>
39
40 </ul>
41
42 <h2><a name="commands" />Which commands are planned?</h2>
43
44 <p>The toybox <a href=todo.txt>todo list</a> mentions many potential commands
45 which may be added to this project.  (Whether that file is readable by anybody
46 but the project's maintainer is open to debate.)  The roadmap wiki in the
47 nav bar has a more human readable version.</p>
48
49 <p>The criteria for a toybox 1.0 release is that a system built from just the
50 Linux kernel, toybox, C library (such as uClibc), and a compiler (such as
51 tinycc) can rebuild itself from source code.</p>
52
53 <b><h3>Relevant Standards</h3></b>
54
55 <p>Most commands are implemented according to
56 <a href=http://opengroup.org/onlinepubs/9699919799/idx/utilities.html>The
57 Single Unix Specification version 4</a> where applicable. This does not mean
58 that Toybox is implementing every SUSv4 utility: some such as SCCS and ed are
59 obsolete, while others such as c99 are outside the scope of the project.
60 Toybox also isn't implementing full internationalization support: it should be
61 8-bit clean and handle UTF-8, but otherwise we leave this to X11 and higher
62 layers. And some things (like $CDPATH support in "cd") await a good
63 explanation of why to bother with them. (The standard provides an important
64 frame of reference, but is not infallable set of commandments to be blindly
65 obeyed.)</p>
66
67 <p>The other major sources of commands are the Linux man pages, and testing
68 the behavior of existing commands (although not generally looking at their
69 source code), including the commands in Android's toolbox. SUSv4 does not
70 include many basic commands such as "mount", "init", and "mke2fs", which are
71 kind of nice to have.</p>
72
73 <b><h2><a name="downloads" />Download</h2></b>
74
75 <p>This project is maintained as a mercurial archive.  To get a copy of the
76 current development version, either use mercurial (hg clone
77 http://landley.net/hg/toybox) or click on one of the zip/gz/bz2 links
78 at the top of the <a href=/hg/toybox>mercurial archive browser</a> page to get
79 an archive of the appropriate version.  Click
80 <a href="/hg/toybox?cmd=tags">tags</a> to see all the tagged release
81 versions ("tip" is the current development version).</p>
82
83 <p>The maintainer's <a href=/notes.html>development log</a> and the project's
84 <a href=http://lists.landley.net/listinfo.cgi/toybox-landley.net>mailing
85 list</a> are also good ways to track what's going on with the project.</p>
86
87 <!--
88 <b><h2><a name="why">Why do toybox?</h2></b>
89
90 <p>Because smart phones are replacing the PC, and Android must become
91 self-hosting to beat the iPhone in establishing the new standard.</p>
92
93 <p>This is the third such major transition in computer history:
94 (mainframe-&gt;minicomputer-&gt;microcomputer-&gt;smartphone).
95 The mainframe was replaced by the minicomputer, which was replaced by
96 the microcomputer (renamed the "personal" computer to make clear you could
97 access porn through it), which is being replaced by the smartphone. Nobody
98 needed to wait for printouts from a big computer in another building when they
99 could use a little one down the hall.  Then nobody needed the big computer
100 down the hall when they had a little one on their desk.  Now nobody needs the
101 big computer on their desk when they have a little one in their pocket.</p>
102
103 <p>The new platform displaces the old when it becomes natively self hosting.
104 Often they leverage existing technology: just as early microcmputers used
105 teletypes and televisions for output, phones can use
106 <a href=http://us.toshiba.com/accessory/PA3575U-1PRP>USB docking stations</a>
107 to access a bigger screen, mouse, keyboard, speakers, etc. Plugging a phone into
108 USB even charges the battery. But to use the phone as a development
109 workstation, it needs more software, such as a Posix command line, a native
110 compiler, and drivers for the USB peripherals.</p>
111
112 <p>The new platform also eventually weans itself off of its dominant language.
113 Dalvik is to Android what ROM Basic was to the PC: something it must
114 eventually outgrow. Thus toybox is native C code, not Java.</p>
115
116 <b><h3>So why aren't self-hosting smartphones attracting more attention?</h3></b>
117
118 <p>Because most people are focusing on the legacy platforms, not on the new
119 stuff. Existing multi-billion dollar industries are getting evicted from their
120 decades-old established niche, and are trying to spin the transition as an
121 opportunity instead of a forced march onto reservations. When elephants run
122 from mice, it's easier to notice the elephants.</p>
123
124 <p>History's our guide here: the previous technology always gets kicked up into
125 the "server space", moving from "the thing you stood in front of waiting for
126 your printout" to "that thing you sometimes accessed remotely via the new
127 computer". This time around they're calling it "the cloud" and pretending it's
128 a big deal; it's really just a beowulf cluster with a layer of
129 virtualization/containerization software implementing hotplug hardware and
130 live migration to provide cheap
131 commodity processing power that dominant players (like amazon) literally
132 give away for free. These old machines become secondary, only
133 accessed through the new machines users now directly interact with.</p>
134
135 <p>Since there's only one server space, the mainframe ate the minicomputer in
136 the 1980's (when DEC went under), and this time around "the cloud" seems to be
137 eating the mainframe (IBM ain't happy). The inevitable consolidation leads
138 to drama, but doesn't mean much in the long run.</p>
139
140 <p><a href=http://landley.net/notes-2012.html#12-07-2012>For more
141 on this topic...</a></p>
142
143 <b><h3><a name="why_android">Why is Android important?</h2></b>
144
145 <p>Major hardware transitions introduce
146 <a href=http://landley.net/notes-2011.html#26-06-2011>new software
147 standards</a> which are extremely sticky once
148 established, due to network effects.</p>
149
150 <p>Last time around, the PC was stuck with
151 a proprietary operating system (DOS/Windows) which is still dominant on that
152 hardware platform's descendants 30 years later. This time around, the choice
153 is between Android (a Linux derivative) and iPhone (a closed BSD fork ala
154 SunOS, put out by a company already engaged in multiple aggressive IP lawsuits).
155 The main difference between Apple and Microsoft is that Apple is competent.</p>
156
157 <p>And yes, it has to be Android, it won't be vanilla Linux any time soon,
158 for three reasons. 1) <a href=http://landley.net/notes-2010.html#13-08-2010>Open
159 Source can't do user interfaces</a> for about the same reason wikipedia can't
160 write a novel, 2) it's too late to the
161 party (a 5 year headstart is forever in computers), 3) preinstalls matter
162 (GPLv3 spooked all the hardware vendors, Android has a "no GPL in
163 userspace" policy which is rigidly enforced).</p>
164
165 <p>And "any time soon" is important: attempting to displace an existing
166 entrenched de-facto standard is what linux has spent the last 20
167 years trying (and failing) to do on the desktop. Spending another 20
168 years fighting for less than 1% of the phone market would just be sad.</p>
169
170 <b><h3><a name="how_google">How is Google less evil than Apple?</h3></b>
171
172 <p>Because Android isn't Google's core business, attaching advertising to large
173 scale data searches is. Android and Chrome and such are Google's way of
174 "commoditizing their co-factors" to drive down the price of ingredients
175 to their core business.</p>
176
177 <p>Thus Google is pursuing a commodity market and encouring as many vendors as
178 possible to participate, not to control the new space but to hold it open,
179 so that its search products are widely available without requiring the
180 permission of some other monopoly gatekeeper. Apple is attemping to corner the
181 smartphone market and extract monopoly rents, excluding all
182 vendors except itself.</p>
183
184 <p>So if Google wins we get a commodity market in smartphone/tablet software,
185 and may be able to open it further in future. If Apple wins we get a proprietary
186 smartphone/tablet OS with a single monopoly vendor, which is likely to close it
187 further.</p>
188
189 <b><h3>Why not just use BusyBox?</h3></b>
190
191 <p>Android can't. Busybox predates android
192 by many years; if they were ever going to ship it they'd have done so by
193 now. Android has had a "No GPL in Userspace" policy ever since GPLv3
194 came out (before the first Android phone shipped), and they mean it.</p>
195
196 <p>Toybox also has a better design and simpler code. I did both
197 and this is the one I enjoy banging on; I tried to contribute a few things
198 to busybox and it was like crawling through a thornbush of #ifdefs. Busybox
199 development is just no fun anymore.</p>
200
201 -->
202
203 <b><h2><a name="toycans" />What's the toybox logo image?</h2></b>
204
205 <p>It's <a href=toycans-big.jpg>carefully stacked soda cans</a>.  Specifically,
206 it's a bunch of the original "Coke Zero" and "Pepsi One" cans, circa 2006,
207 stacked to spell out the binary values of the ascii string "Toybox", with
208 null terminator at the bottom.  (The big picture's on it's side because
209 the camera was held sideways to get a better shot.)</p>
210
211 <p>No, it's not photoshopped, I actually had these cans until a coworker
212 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,
213 thinking they were recycling.  (I still have two of each kind, but
214 Pepsi One seems discontinued and Coke Zero switched its can color
215 from black to grey, presumably in celebration.  It was fun while it lasted...)</p>
216
217 <!--#include file="footer.html" -->