Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 1 | Please see the LICENSE file for details on copying and usage. |
Rob Landley | ff9f2f6 | 2005-10-09 20:18:32 +0000 | [diff] [blame] | 2 | Please refer to the INSTALL file for instructions on how to build. |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 3 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 4 | What is busybox: |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 5 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 6 | BusyBox combines tiny versions of many common UNIX utilities into a single |
| 7 | small executable. It provides minimalist replacements for most of the |
Rob Landley | c8e4115 | 2006-01-19 21:22:37 +0000 | [diff] [blame] | 8 | utilities you usually find in bzip2, coreutils, e2fsprogs, file, findutils, |
| 9 | gawk, grep, inetutils, less, modutils, net-tools, procps, sed, shadow, |
| 10 | sysklogd, sysvinit, tar, util-linux, and vim. The utilities in BusyBox |
| 11 | often have fewer options than their full-featured cousins; however, the |
| 12 | options that are included provide the expected functionality and behave |
| 13 | very much like their larger counterparts. |
Eric Andersen | cc8ed39 | 1999-10-05 16:24:54 +0000 | [diff] [blame] | 14 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 15 | BusyBox has been written with size-optimization and limited resources in |
| 16 | mind, both to produce small binaries and to reduce run-time memory usage. |
| 17 | Busybox is also extremely modular so you can easily include or exclude |
| 18 | commands (or features) at compile time. This makes it easy to customize |
| 19 | embedded systems; to create a working system, just add /dev, /etc, and a |
| 20 | Linux kernel. Busybox (usually together with uClibc) has also been used as |
| 21 | a component of "thin client" desktop systems, live-CD distributions, rescue |
| 22 | disks, installers, and so on. |
| 23 | |
| 24 | BusyBox provides a fairly complete POSIX environment for any small system, |
| 25 | both embedded environments and more full featured systems concerned about |
| 26 | space. Busybox is slowly working towards implementing the full Single Unix |
| 27 | Specification V3 (http://www.opengroup.org/onlinepubs/009695399/), but isn't |
| 28 | there yet (and for size reasons will probably support at most UTF-8 for |
| 29 | internationalization). We are also interested in passing the Linux Test |
| 30 | Project (http://ltp.sourceforge.net). |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 31 | |
Eric Andersen | a29dec2 | 2000-06-22 00:19:33 +0000 | [diff] [blame] | 32 | ---------------- |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 33 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 34 | Using busybox: |
Mark Whitley | 3654ca5 | 2001-01-26 20:58:23 +0000 | [diff] [blame] | 35 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 36 | BusyBox is extremely configurable. This allows you to include only the |
| 37 | components and options you need, thereby reducing binary size. Run 'make |
| 38 | config' or 'make menuconfig' to select the functionality that you wish to |
| 39 | enable. (See 'make help' for more commands.) |
Eric Andersen | fdfa09b | 2004-10-08 10:52:08 +0000 | [diff] [blame] | 40 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 41 | The behavior of busybox is determined by the name it's called under: as |
| 42 | "cp" it behaves like cp, as "sed" it behaves like sed, and so on. Called |
| 43 | as "busybox" it takes the second argument as the name of the applet to |
Tim Riker | c1ef7bd | 2006-01-25 00:08:53 +0000 | [diff] [blame] | 44 | run (I.E. "./busybox ls -l /proc"). |
Mark Whitley | 3654ca5 | 2001-01-26 20:58:23 +0000 | [diff] [blame] | 45 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 46 | The "standalone shell" mode is an easy way to try out busybox; this is a |
| 47 | command shell that calls the builtin applets without needing them to be |
| 48 | installed in the path. (Note that this requires /proc to be mounted, if |
| 49 | testing from a boot floppy or in a chroot environment.) |
Mark Whitley | 3654ca5 | 2001-01-26 20:58:23 +0000 | [diff] [blame] | 50 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 51 | The build automatically generates a file "busybox.links", which is used by |
| 52 | 'make install' to create symlinks to the BusyBox binary for all compiled in |
Rob Landley | c8e4115 | 2006-01-19 21:22:37 +0000 | [diff] [blame] | 53 | commands. This uses the PREFIX environment variable to specify where to |
| 54 | install, and installs hardlinks or symlinks depending on the configuration |
| 55 | preferences. (You can also manually run the install script at |
| 56 | "applets/install.sh"). |
Mark Whitley | 3654ca5 | 2001-01-26 20:58:23 +0000 | [diff] [blame] | 57 | |
| 58 | ---------------- |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 59 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 60 | Downloading the current source code: |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 61 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 62 | Source for the latest released version, as well as daily snapshots, can always |
| 63 | be downloaded from |
| 64 | |
| 65 | http://busybox.net/downloads/ |
| 66 | |
| 67 | You can browse the up to the minute source code and change history online. |
| 68 | The "stable" series is at: |
| 69 | |
| 70 | http://www.busybox.net/cgi-bin/viewcvs.cgi/branches/busybox_1_00_stable/busybox/ |
| 71 | |
| 72 | And the development series is at: |
| 73 | |
| 74 | http://www.busybox.net/cgi-bin/viewcvs.cgi/trunk/busybox/ |
| 75 | |
| 76 | Anonymous SVN access is available. For instructions, check out: |
| 77 | |
| 78 | http://busybox.net/subversion.html |
| 79 | |
| 80 | For those that are actively contributing and would like to check files in, |
| 81 | see: |
| 82 | |
| 83 | http://busybox.net/developer.html |
| 84 | |
| 85 | The developers also have a bug and patch tracking system |
| 86 | (http://bugs.busybox.net) although posting a bug/patch to the mailing list |
| 87 | is generally a faster way of getting it fixed, and the complete archive of |
| 88 | what happened is the subversion changelog. |
Eric Andersen | a29dec2 | 2000-06-22 00:19:33 +0000 | [diff] [blame] | 89 | |
| 90 | ---------------- |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 91 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 92 | getting help: |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 93 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 94 | when you find you need help, you can check out the busybox mailing list |
| 95 | archives at http://busybox.net/lists/busybox/ or even join |
| 96 | the mailing list if you are interested. |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 97 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 98 | ---------------- |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 99 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 100 | bugs: |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 101 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 102 | if you find bugs, please submit a detailed bug report to the busybox mailing |
| 103 | list at busybox@busybox.net. a well-written bug report should include a |
| 104 | transcript of a shell session that demonstrates the bad behavior and enables |
| 105 | anyone else to duplicate the bug on their own machine. the following is such |
| 106 | an example: |
| 107 | |
| 108 | to: busybox@busybox.net |
| 109 | from: diligent@testing.linux.org |
| 110 | subject: /bin/date doesn't work |
| 111 | |
| 112 | package: busybox |
| 113 | version: 1.00 |
| 114 | |
| 115 | when i execute busybox 'date' it produces unexpected results. |
| 116 | with gnu date i get the following output: |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 117 | |
| 118 | $ date |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 119 | fri oct 8 14:19:41 mdt 2004 |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 120 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 121 | but when i use busybox date i get this instead: |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 122 | |
| 123 | $ date |
Eric Andersen | fbcf06d | 2004-03-27 09:40:15 +0000 | [diff] [blame] | 124 | illegal instruction |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 125 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 126 | i am using debian unstable, kernel version 2.4.25-vrs2 on a netwinder, |
| 127 | and the latest uclibc from cvs. thanks for the wonderful program! |
Eric Andersen | cb81e64 | 2003-07-14 21:21:08 +0000 | [diff] [blame] | 128 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 129 | -diligent |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 130 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 131 | note the careful description and use of examples showing not only what |
| 132 | busybox does, but also a counter example showing what an equivalent app |
| 133 | does (or pointing to the text of a relevant standard). Bug reports lacking |
| 134 | such detail may never be fixed... Thanks for understanding. |
Eric Andersen | a29dec2 | 2000-06-22 00:19:33 +0000 | [diff] [blame] | 135 | |
| 136 | ---------------- |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 137 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 138 | Portability: |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 139 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 140 | Busybox is developed and tested on Linux 2.4 and 2.6 kernels, compiled |
| 141 | with gcc (the unit-at-a-time optimizations in version 3.4 and later are |
| 142 | worth upgrading to get, but older versions should work), and linked against |
| 143 | uClibc (0.9.27 or greater) or glibc (2.2 or greater). In such an |
| 144 | environment, the full set of busybox features should work, and if |
| 145 | anything doesn't we want to know about it so we can fix it. |
| 146 | |
| 147 | There are many other environments out there, in which busybox may build |
| 148 | and run just fine. We just don't test them. Since busybox consists of a |
| 149 | large number of more or less independent applets, portability is a question |
| 150 | of which features work where. Some busybox applets (such as cat and rm) are |
| 151 | highly portable and likely to work just about anywhere, while others (such as |
| 152 | insmod and losetup) require recent Linux kernels with recent C libraries. |
| 153 | |
| 154 | Earlier versions of Linux and glibc may or may not work, for any given |
| 155 | configuration. Linux 2.2 or earlier should mostly work (there's still |
| 156 | some support code in things like mount.c) but this is no longer regularly |
| 157 | tested, and inherently won't support certain features (such as long files |
| 158 | and --bind mounts). The same is true for glibc 2.0 and 2.1: expect a higher |
| 159 | testing and debugging burden using such old infrastructure. (The busybox |
| 160 | developers are not very interested in supporting these older versions, but |
| 161 | will probably accept small self-contained patches to fix simple problems.) |
| 162 | |
| 163 | Some environments are not recommended. Early versions of uClibc were buggy |
| 164 | and missing many features: upgrade. Linking against libc5 or dietlibc is |
| 165 | not supported and not interesting to the busybox developers. (The first is |
| 166 | obsolete and has no known size or feature advantages over uClibc, the second |
| 167 | has known bugs that its developers have actively refused to fix.) Ancient |
| 168 | Linux kernels (2.0.x and earlier) are similarly uninteresting. |
| 169 | |
| 170 | In theory it's possible to use Busybox under other operating systems (such as |
| 171 | MacOS X, Solaris, Cygwin, or the BSD Fork Du Jour). This generally involves |
| 172 | a different kernel and a different C library at the same time. While it |
| 173 | should be possible to port the majority of the code to work in one of |
| 174 | these environments, don't be suprised if it doesn't work out of the box. If |
| 175 | you're into that sort of thing, start small (selecting just a few applets) |
| 176 | and work your way up. |
| 177 | |
| 178 | Shaun Jackman has recently (2005) ported busybox to a combination of newlib |
| 179 | and libgloss, and some of his patches have been integrated. This platform |
| 180 | may join glibc/uclibc and Linux as a supported combination with the 1.1 |
| 181 | release, but is not supported in 1.0. |
| 182 | |
| 183 | Supported hardware: |
| 184 | |
| 185 | BusyBox in general will build on any architecture supported by gcc. We |
| 186 | support both 32 and 64 bit platforms, and both big and little endian |
| 187 | systems. |
| 188 | |
| 189 | Under 2.4 Linux kernels, kernel module loading was implemented in a |
| 190 | platform-specific manner. Busybox's insmod utility has been reported to |
| 191 | work under ARM, CRIS, H8/300, x86, ia64, x86_64, m68k, MIPS, PowerPC, S390, |
| 192 | SH3/4/5, Sparc, v850e, and x86_64. Anything else probably won't work. |
| 193 | |
| 194 | The module loading mechanism for the 2.6 kernel is much more generic, and |
| 195 | we believe 2.6.x kernel module loading support should work on all |
| 196 | architectures supported by the kernel. |
Eric Andersen | a29dec2 | 2000-06-22 00:19:33 +0000 | [diff] [blame] | 197 | |
| 198 | ---------------- |
Eric Andersen | 235f66d | 2000-12-13 18:07:38 +0000 | [diff] [blame] | 199 | |
Rob Landley | d27d3be | 2005-10-09 18:20:54 +0000 | [diff] [blame] | 200 | Please feed suggestions, bug reports, insults, and bribes back to the busybox |
| 201 | maintainer: |
Eric Andersen | c7bda1c | 2004-03-15 08:29:22 +0000 | [diff] [blame] | 202 | Erik Andersen |
Eric Andersen | bdfd0d7 | 2001-10-24 05:00:29 +0000 | [diff] [blame] | 203 | <andersen@codepoet.org> |