blob: 4814372b845958ffb8e342f1a86e2fb7b8823bb4 [file] [log] [blame]
Eric Andersencb81e642003-07-14 21:21:08 +00001Please see the LICENSE file for details on copying and usage.
Rob Landleyff9f2f62005-10-09 20:18:32 +00002Please refer to the INSTALL file for instructions on how to build.
Eric Andersenc7bda1c2004-03-15 08:29:22 +00003
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +02004----------------
5Note about this Android Variant :
6
7WARNING : THIS IS A BIONIC VERSION OF BUSYBOX, DO NOT USE "make" IN THIS TREE
8
maxwen27116ba2015-08-14 21:41:28 +02009This tree has multiple configurations (busybox and recovery lib),
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020010
maxwen27116ba2015-08-14 21:41:28 +020011- lunch your device to prepare the environment
12- edit the wanted config profile (ie busybox-full.config)
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020013
maxwen27116ba2015-08-14 21:41:28 +020014- type "mma" in external/busybox to build with the dependencies
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020015
maxwen27116ba2015-08-14 21:41:28 +020016 Finally copy $OUT/obj/busybox/full/.config to the source tree without
17 the CONFIG_CROSS_COMPILER_PREFIX line! (to stay compatible with x86 targets)
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020018
maxwen27116ba2015-08-14 21:41:28 +020019 bb_obj=$OUT/obj/busybox/full
20 cat $bb_obj/.config | grep -v CROSS_COMPILER_ > busybox-full.config
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020021
maxwen27116ba2015-08-14 21:41:28 +020022 bb_obj=$OUT/obj/busybox/minimal
23 cat $bb_obj/.config | grep -v CROSS_COMPILER_ > busybox-minimal.config
24
25 If you add or remove some applets,
26 please also update busybox-<profile>.links and busybox-<profile>.sources
Tanguy Pruvot8aeb3712011-06-30 08:59:26 +020027
28----------------
29
Rob Landleyd27d3be2005-10-09 18:20:54 +000030What is busybox:
Eric Andersencb81e642003-07-14 21:21:08 +000031
Rob Landleyd27d3be2005-10-09 18:20:54 +000032 BusyBox combines tiny versions of many common UNIX utilities into a single
33 small executable. It provides minimalist replacements for most of the
Rob Landley19d42df2006-05-19 22:14:19 +000034 utilities you usually find in bzip2, coreutils, dhcp, diffutils, e2fsprogs,
35 file, findutils, gawk, grep, inetutils, less, modutils, net-tools, procps,
36 sed, shadow, sysklogd, sysvinit, tar, util-linux, and vim. The utilities
37 in BusyBox often have fewer options than their full-featured cousins;
38 however, the options that are included provide the expected functionality
39 and behave very much like their larger counterparts.
Eric Andersencc8ed391999-10-05 16:24:54 +000040
Rob Landleyd27d3be2005-10-09 18:20:54 +000041 BusyBox has been written with size-optimization and limited resources in
42 mind, both to produce small binaries and to reduce run-time memory usage.
43 Busybox is also extremely modular so you can easily include or exclude
44 commands (or features) at compile time. This makes it easy to customize
45 embedded systems; to create a working system, just add /dev, /etc, and a
46 Linux kernel. Busybox (usually together with uClibc) has also been used as
47 a component of "thin client" desktop systems, live-CD distributions, rescue
48 disks, installers, and so on.
49
50 BusyBox provides a fairly complete POSIX environment for any small system,
51 both embedded environments and more full featured systems concerned about
52 space. Busybox is slowly working towards implementing the full Single Unix
53 Specification V3 (http://www.opengroup.org/onlinepubs/009695399/), but isn't
54 there yet (and for size reasons will probably support at most UTF-8 for
55 internationalization). We are also interested in passing the Linux Test
56 Project (http://ltp.sourceforge.net).
Eric Andersencb81e642003-07-14 21:21:08 +000057
Eric Andersena29dec22000-06-22 00:19:33 +000058----------------
Eric Andersenc7bda1c2004-03-15 08:29:22 +000059
Rob Landleyd27d3be2005-10-09 18:20:54 +000060Using busybox:
Mark Whitley3654ca52001-01-26 20:58:23 +000061
Rob Landleyd27d3be2005-10-09 18:20:54 +000062 BusyBox is extremely configurable. This allows you to include only the
63 components and options you need, thereby reducing binary size. Run 'make
64 config' or 'make menuconfig' to select the functionality that you wish to
65 enable. (See 'make help' for more commands.)
Eric Andersenfdfa09b2004-10-08 10:52:08 +000066
Rob Landleyd27d3be2005-10-09 18:20:54 +000067 The behavior of busybox is determined by the name it's called under: as
68 "cp" it behaves like cp, as "sed" it behaves like sed, and so on. Called
69 as "busybox" it takes the second argument as the name of the applet to
Tim Rikerc1ef7bd2006-01-25 00:08:53 +000070 run (I.E. "./busybox ls -l /proc").
Mark Whitley3654ca52001-01-26 20:58:23 +000071
Rob Landleyd27d3be2005-10-09 18:20:54 +000072 The "standalone shell" mode is an easy way to try out busybox; this is a
Dan Fandrichb5de0c12011-07-08 05:47:49 +020073 command shell that calls the built-in applets without needing them to be
Rob Landleyd27d3be2005-10-09 18:20:54 +000074 installed in the path. (Note that this requires /proc to be mounted, if
75 testing from a boot floppy or in a chroot environment.)
Mark Whitley3654ca52001-01-26 20:58:23 +000076
Rob Landleyd27d3be2005-10-09 18:20:54 +000077 The build automatically generates a file "busybox.links", which is used by
78 'make install' to create symlinks to the BusyBox binary for all compiled in
Denis Vlasenkoe8ce0622007-02-03 17:29:14 +000079 commands. This uses the CONFIG_PREFIX environment variable to specify
80 where to install, and installs hardlinks or symlinks depending
81 on the configuration preferences. (You can also manually run
82 the install script at "applets/install.sh").
Mark Whitley3654ca52001-01-26 20:58:23 +000083
84----------------
Eric Andersen235f66d2000-12-13 18:07:38 +000085
Rob Landleyd27d3be2005-10-09 18:20:54 +000086Downloading the current source code:
Eric Andersen235f66d2000-12-13 18:07:38 +000087
Rob Landleyd27d3be2005-10-09 18:20:54 +000088 Source for the latest released version, as well as daily snapshots, can always
89 be downloaded from
90
91 http://busybox.net/downloads/
92
93 You can browse the up to the minute source code and change history online.
Rob Landleyd27d3be2005-10-09 18:20:54 +000094
Denys Vlasenkob702d9a2010-02-24 06:59:54 +010095 http://git.busybox.net/busybox/
Rob Landleyd27d3be2005-10-09 18:20:54 +000096
Denys Vlasenko5370bfb2009-09-06 02:58:59 +020097 Anonymous GIT access is available. For instructions, check out:
Rob Landleyd27d3be2005-10-09 18:20:54 +000098
Denys Vlasenko5370bfb2009-09-06 02:58:59 +020099 http://www.busybox.net/source.html
Rob Landleyd27d3be2005-10-09 18:20:54 +0000100
101 For those that are actively contributing and would like to check files in,
102 see:
103
104 http://busybox.net/developer.html
105
106 The developers also have a bug and patch tracking system
Bernhard Reutner-Fischerf0dc2c12009-01-10 11:36:38 +0000107 (https://bugs.busybox.net) although posting a bug/patch to the mailing list
Rob Landleyd27d3be2005-10-09 18:20:54 +0000108 is generally a faster way of getting it fixed, and the complete archive of
Dan Fandrich96693632010-08-10 23:45:27 -0700109 what happened is the git changelog.
Eric Andersena29dec22000-06-22 00:19:33 +0000110
Denis Vlasenko97bd0e02008-02-08 15:41:01 +0000111 Note: if you want to compile busybox in a busybox environment you must
Denys Vlasenkob702d9a2010-02-24 06:59:54 +0100112 select CONFIG_DESKTOP.
Denis Vlasenko97bd0e02008-02-08 15:41:01 +0000113
Eric Andersena29dec22000-06-22 00:19:33 +0000114----------------
Eric Andersen235f66d2000-12-13 18:07:38 +0000115
Denys Vlasenkob702d9a2010-02-24 06:59:54 +0100116Getting help:
Eric Andersen235f66d2000-12-13 18:07:38 +0000117
Rob Landleyd27d3be2005-10-09 18:20:54 +0000118 when you find you need help, you can check out the busybox mailing list
119 archives at http://busybox.net/lists/busybox/ or even join
120 the mailing list if you are interested.
Eric Andersen235f66d2000-12-13 18:07:38 +0000121
Rob Landleyd27d3be2005-10-09 18:20:54 +0000122----------------
Eric Andersen235f66d2000-12-13 18:07:38 +0000123
Denys Vlasenkob702d9a2010-02-24 06:59:54 +0100124Bugs:
Eric Andersen235f66d2000-12-13 18:07:38 +0000125
Rob Landleyd27d3be2005-10-09 18:20:54 +0000126 if you find bugs, please submit a detailed bug report to the busybox mailing
127 list at busybox@busybox.net. a well-written bug report should include a
128 transcript of a shell session that demonstrates the bad behavior and enables
129 anyone else to duplicate the bug on their own machine. the following is such
130 an example:
131
132 to: busybox@busybox.net
133 from: diligent@testing.linux.org
134 subject: /bin/date doesn't work
135
136 package: busybox
137 version: 1.00
138
139 when i execute busybox 'date' it produces unexpected results.
140 with gnu date i get the following output:
Eric Andersencb81e642003-07-14 21:21:08 +0000141
142 $ date
Rob Landleyd27d3be2005-10-09 18:20:54 +0000143 fri oct 8 14:19:41 mdt 2004
Eric Andersencb81e642003-07-14 21:21:08 +0000144
Rob Landleyd27d3be2005-10-09 18:20:54 +0000145 but when i use busybox date i get this instead:
Eric Andersencb81e642003-07-14 21:21:08 +0000146
147 $ date
Eric Andersenfbcf06d2004-03-27 09:40:15 +0000148 illegal instruction
Eric Andersencb81e642003-07-14 21:21:08 +0000149
Rob Landleyd27d3be2005-10-09 18:20:54 +0000150 i am using debian unstable, kernel version 2.4.25-vrs2 on a netwinder,
Denis Vlasenko18875bf2008-07-17 18:33:35 +0000151 and the latest uclibc from cvs.
Eric Andersencb81e642003-07-14 21:21:08 +0000152
Rob Landleyd27d3be2005-10-09 18:20:54 +0000153 -diligent
Eric Andersen235f66d2000-12-13 18:07:38 +0000154
Rob Landleyd27d3be2005-10-09 18:20:54 +0000155 note the careful description and use of examples showing not only what
156 busybox does, but also a counter example showing what an equivalent app
157 does (or pointing to the text of a relevant standard). Bug reports lacking
158 such detail may never be fixed... Thanks for understanding.
Eric Andersena29dec22000-06-22 00:19:33 +0000159
160----------------
Eric Andersen235f66d2000-12-13 18:07:38 +0000161
Rob Landleyd27d3be2005-10-09 18:20:54 +0000162Portability:
Eric Andersen235f66d2000-12-13 18:07:38 +0000163
Rob Landleyd27d3be2005-10-09 18:20:54 +0000164 Busybox is developed and tested on Linux 2.4 and 2.6 kernels, compiled
165 with gcc (the unit-at-a-time optimizations in version 3.4 and later are
166 worth upgrading to get, but older versions should work), and linked against
167 uClibc (0.9.27 or greater) or glibc (2.2 or greater). In such an
168 environment, the full set of busybox features should work, and if
169 anything doesn't we want to know about it so we can fix it.
170
171 There are many other environments out there, in which busybox may build
172 and run just fine. We just don't test them. Since busybox consists of a
173 large number of more or less independent applets, portability is a question
174 of which features work where. Some busybox applets (such as cat and rm) are
175 highly portable and likely to work just about anywhere, while others (such as
176 insmod and losetup) require recent Linux kernels with recent C libraries.
177
178 Earlier versions of Linux and glibc may or may not work, for any given
179 configuration. Linux 2.2 or earlier should mostly work (there's still
180 some support code in things like mount.c) but this is no longer regularly
181 tested, and inherently won't support certain features (such as long files
182 and --bind mounts). The same is true for glibc 2.0 and 2.1: expect a higher
183 testing and debugging burden using such old infrastructure. (The busybox
184 developers are not very interested in supporting these older versions, but
185 will probably accept small self-contained patches to fix simple problems.)
186
187 Some environments are not recommended. Early versions of uClibc were buggy
188 and missing many features: upgrade. Linking against libc5 or dietlibc is
189 not supported and not interesting to the busybox developers. (The first is
190 obsolete and has no known size or feature advantages over uClibc, the second
191 has known bugs that its developers have actively refused to fix.) Ancient
192 Linux kernels (2.0.x and earlier) are similarly uninteresting.
193
194 In theory it's possible to use Busybox under other operating systems (such as
195 MacOS X, Solaris, Cygwin, or the BSD Fork Du Jour). This generally involves
196 a different kernel and a different C library at the same time. While it
197 should be possible to port the majority of the code to work in one of
Dan Fandrichb5de0c12011-07-08 05:47:49 +0200198 these environments, don't be surprised if it doesn't work out of the box. If
Rob Landleyd27d3be2005-10-09 18:20:54 +0000199 you're into that sort of thing, start small (selecting just a few applets)
200 and work your way up.
201
Denis Vlasenko18875bf2008-07-17 18:33:35 +0000202 In 2005 Shaun Jackman has ported busybox to a combination of newlib
203 and libgloss, and some of his patches have been integrated.
Rob Landleyd27d3be2005-10-09 18:20:54 +0000204
205Supported hardware:
206
207 BusyBox in general will build on any architecture supported by gcc. We
208 support both 32 and 64 bit platforms, and both big and little endian
209 systems.
210
211 Under 2.4 Linux kernels, kernel module loading was implemented in a
212 platform-specific manner. Busybox's insmod utility has been reported to
213 work under ARM, CRIS, H8/300, x86, ia64, x86_64, m68k, MIPS, PowerPC, S390,
214 SH3/4/5, Sparc, v850e, and x86_64. Anything else probably won't work.
215
216 The module loading mechanism for the 2.6 kernel is much more generic, and
217 we believe 2.6.x kernel module loading support should work on all
218 architectures supported by the kernel.
Eric Andersena29dec22000-06-22 00:19:33 +0000219
220----------------
Eric Andersen235f66d2000-12-13 18:07:38 +0000221
Rob Landleyd27d3be2005-10-09 18:20:54 +0000222Please feed suggestions, bug reports, insults, and bribes back to the busybox
Denys Vlasenkob702d9a2010-02-24 06:59:54 +0100223mailing list:
224
225 busybox@busybox.net
226
227and/or maintainer:
228
Denis Vlasenko18875bf2008-07-17 18:33:35 +0000229 Denys Vlasenko
Denys Vlasenkob702d9a2010-02-24 06:59:54 +0100230 <vda.linux@googlemail.com>