diff options
-rw-r--r-- | README | 47 | ||||
-rw-r--r-- | TODO | 49 | ||||
-rw-r--r-- | docs/busybox_footer.pod | 20 | ||||
-rw-r--r-- | docs/busybox_header.pod | 87 |
4 files changed, 89 insertions, 114 deletions
@@ -2,44 +2,40 @@ Please see the LICENSE file for details on copying and usage. | |||
2 | 2 | ||
3 | BusyBox combines tiny versions of many common UNIX utilities into a single | 3 | BusyBox combines tiny versions of many common UNIX utilities into a single |
4 | small executable. It provides minimalist replacements for most of the utilities | 4 | small executable. It provides minimalist replacements for most of the utilities |
5 | you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, | 5 | you usually find in GNU coreutils, util-linux, etc. The utilities in BusyBox |
6 | tar, etc. BusyBox provides a fairly complete POSIX environment for any small or | 6 | generally have fewer options than their full-featured GNU cousins; however, the |
7 | embedded system. The utilities in BusyBox generally have fewer options than | 7 | options that are included provide the expected functionality and behave very |
8 | their full featured GNU cousins; however, the options that are included provide | 8 | much like their GNU counterparts. BusyBox provides a fairly complete POSIX |
9 | the expected functionality and behave very much like their GNU counterparts. | 9 | environment for any small or embedded system. |
10 | |||
11 | BusyBox was originally written to support the Debian Rescue/Install disks, but | ||
12 | it also makes an excellent environment for any small or embedded system. | ||
13 | 10 | ||
14 | BusyBox has been written with size-optimization and limited resources in mind. | 11 | BusyBox has been written with size-optimization and limited resources in mind. |
15 | It is also extremely modular so you can easily include or exclude commands (or | 12 | It is also extremely modular so you can easily include or exclude commands (or |
16 | features) at compile time. This makes it easy to customize your embedded | 13 | features) at compile time. This makes it easy to customize your embedded |
17 | systems. To create a working system, just add /dev, /etc, and a kernel. | 14 | systems. To create a working system, just add /dev, /etc, and a Linux kernel. |
18 | 15 | ||
19 | As of version 0.20 there is now a version number. : ) Also as of version 0.20, | 16 | BusyBox is extremely configurable. This allows you to include only the |
20 | BusyBox is now modularized to easily allow you to build only the components you | 17 | components you need, thereby reducing binary size. Run 'make config' or |
21 | need, thereby reducing binary size. Run 'make config' or 'make menuconfig' | 18 | 'make menuconfig' for select the functionality that you wish to enable. |
22 | for select the functionality that you wish to enable. | ||
23 | 19 | ||
24 | After the build is complete, a busybox.links file is generated. This is | 20 | After the build is complete, a busybox.links file is generated. This is |
25 | used by 'make install' to create symlinks to the busybox binary for all | 21 | used by 'make install' to create symlinks to the BusyBox binary for all |
26 | compiled in functions. By default, 'make install' will place the symlink | 22 | compiled in functions. By default, 'make install' will place the symlink |
27 | forest into `pwd`/_install unless you have defined the PREFIX environment | 23 | forest into `pwd`/_install unless you have defined the PREFIX environment |
28 | variable (i.e., 'make PREFIX=/tmp/foo install') | 24 | variable (i.e., 'make PREFIX=/tmp/foo install') |
29 | 25 | ||
30 | If you wish to install hardlinks, rather than symlinks, you can use | 26 | If you wish to install hard links, rather than symlinks, you can use |
31 | 'make install-hardlinks' instead. | 27 | 'make PREFIX=/tmp/foo install-hardlinks' instead. |
32 | 28 | ||
33 | ---------------- | 29 | ---------------- |
34 | 30 | ||
35 | Supported architectures: | 31 | Supported architectures: |
36 | 32 | ||
37 | Busybox in general will build on any architecture supported by gcc. It has | 33 | BusyBox in general will build on any architecture supported by gcc. It has |
38 | a few specialized features added for __sparc__ and __alpha__. insmod | 34 | a few specialized features added for __sparc__ and __alpha__. insmod |
39 | functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k, | 35 | functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k, |
40 | MIPS, cris, and v850e. | 36 | MIPS, cris, and v850e. |
41 | 37 | ||
42 | Supported libcs: | 38 | Supported C Libraries: |
43 | 39 | ||
44 | glibc-2.0.x, glibc-2.1.x, glibc-2.2.x, glibc-2.3.x, uClibc. People | 40 | glibc-2.0.x, glibc-2.1.x, glibc-2.2.x, glibc-2.3.x, uClibc. People |
45 | are looking at newlib and diet-libc, but consider them unsupported, | 41 | are looking at newlib and diet-libc, but consider them unsupported, |
@@ -66,7 +62,7 @@ the mailing list if you are interested. | |||
66 | 62 | ||
67 | Bugs: | 63 | Bugs: |
68 | 64 | ||
69 | If you find bugs, please submit a detailed bug report to the busybox mailing | 65 | If you find bugs, please submit a detailed bug report to the BusyBox mailing |
70 | list at busybox@mail.busybox.net. A well-written bug report should include a | 66 | list at busybox@mail.busybox.net. A well-written bug report should include a |
71 | transcript of a shell session that demonstrates the bad behavior and enables | 67 | transcript of a shell session that demonstrates the bad behavior and enables |
72 | anyone else to duplicate the bug on their own machine. The following is such | 68 | anyone else to duplicate the bug on their own machine. The following is such |
@@ -76,21 +72,21 @@ an example: | |||
76 | From: diligent@testing.linux.org | 72 | From: diligent@testing.linux.org |
77 | Subject: /bin/date doesn't work | 73 | Subject: /bin/date doesn't work |
78 | 74 | ||
79 | Package: busybox | 75 | Package: BusyBox |
80 | Version: 1.00 | 76 | Version: 1.00 |
81 | 77 | ||
82 | When I execute Busybox 'date' it produces unexpected results. | 78 | When I execute BusyBox 'date' it produces unexpected results. |
83 | With GNU date I get the following output: | 79 | With GNU date I get the following output: |
84 | 80 | ||
85 | $ date | 81 | $ date |
86 | Wed Mar 21 14:19:41 MST 2001 | 82 | Sat Mar 27 14:19:41 MST 2004 |
87 | 83 | ||
88 | But when I use BusyBox date I get this instead: | 84 | But when I use BusyBox date I get this instead: |
89 | 85 | ||
90 | $ date | 86 | $ date |
91 | llegal instruction | 87 | illegal instruction |
92 | 88 | ||
93 | I am using Debian unstable, kernel version 2.4.19-rmk1 on an Netwinder, | 89 | I am using Debian unstable, kernel version 2.4.25-vrs2 on a Netwinder, |
94 | and the latest uClibc from CVS. Thanks for the wonderful program! | 90 | and the latest uClibc from CVS. Thanks for the wonderful program! |
95 | 91 | ||
96 | -Diligent | 92 | -Diligent |
@@ -101,7 +97,7 @@ reports lacking such detail may never be fixed... Thanks for understanding. | |||
101 | 97 | ||
102 | ---------------- | 98 | ---------------- |
103 | 99 | ||
104 | FTP: | 100 | Downloads: |
105 | 101 | ||
106 | Source for the latest released version, as well as daily snapshots, can always | 102 | Source for the latest released version, as well as daily snapshots, can always |
107 | be downloaded from | 103 | be downloaded from |
@@ -125,5 +121,4 @@ For those that are actively contributing there is even CVS write access: | |||
125 | Please feed suggestions, bug reports, insults, and bribes back to: | 121 | Please feed suggestions, bug reports, insults, and bribes back to: |
126 | Erik Andersen | 122 | Erik Andersen |
127 | <andersen@codepoet.org> | 123 | <andersen@codepoet.org> |
128 | <andersen@codepoet.org> | ||
129 | 124 | ||
@@ -1,49 +0,0 @@ | |||
1 | TODO list for busybox in no particular order. Just because something | ||
2 | is listed here doesn't mean that it is going to be added to busybox, | ||
3 | or that doing so is even a good idea. It just means that we _might_ get | ||
4 | around to it some time. If you have any good ideas, please send them | ||
5 | on in... | ||
6 | |||
7 | -Erik | ||
8 | |||
9 | ----------- | ||
10 | |||
11 | Possible apps to include some time: | ||
12 | |||
13 | * group/commonize strings, remove dups (for i18n, l10n) | ||
14 | |||
15 | ----------- | ||
16 | |||
17 | With sysvinit, reboot, poweroff and halt all used a named pipe, | ||
18 | /dev/initctl, to communicate with the init process. Busybox | ||
19 | currently uses signals to communicate with init. This makes | ||
20 | busybox incompatible with sysvinit. We should probably use | ||
21 | a named pipe as well so we can be compatible. | ||
22 | |||
23 | ----------------------- | ||
24 | |||
25 | Run the following: | ||
26 | |||
27 | rm -f busybox && make LDFLAGS+=-nostdlib 2>&1 | \ | ||
28 | sed -ne 's/.*undefined reference to `\(.*\)..*/\1/gp' | sort | uniq | ||
29 | |||
30 | reveals the list of all external (i.e., libc) things that BusyBox depends on. | ||
31 | It would be a very nice thing to reduce this list to an absolute minimum, to | ||
32 | reduce the footprint of busybox, especially when staticly linking with | ||
33 | libraries such as uClibc. | ||
34 | |||
35 | ----------------------- | ||
36 | |||
37 | Compile with debugging on, run 'nm --size-sort ./busybox' | ||
38 | and then start with the biggest things and make them smaller... | ||
39 | |||
40 | ----------------------- | ||
41 | |||
42 | xargs could use a -l option | ||
43 | |||
44 | ------------------------------------------------------------------ | ||
45 | |||
46 | libbb/unzip.c and archival/gzip.c have common constant static arrays and | ||
47 | code for initializing the CRC array. Both use CRC-32 and could use | ||
48 | common code for CRC calculation. Within archival/gzip.c, the CRC | ||
49 | array should be malloc-ed as it is in libbb/unzip.c . | ||
diff --git a/docs/busybox_footer.pod b/docs/busybox_footer.pod index d243a92d9..4f1058573 100644 --- a/docs/busybox_footer.pod +++ b/docs/busybox_footer.pod | |||
@@ -1,23 +1,5 @@ | |||
1 | =back | 1 | =back |
2 | 2 | ||
3 | =head1 LIBC NSS | ||
4 | |||
5 | GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C | ||
6 | library for the local environment, and to configure how it reads system data, | ||
7 | such as passwords and group information. BusyBox has made it Policy that it | ||
8 | will never use NSS, and will never use and libc calls that make use of NSS. | ||
9 | This allows you to run an embedded system without the need for installing an | ||
10 | /etc/nsswitch.conf file and without and /lib/libnss_* libraries installed. | ||
11 | |||
12 | If you are using a system that is using a remote LDAP server for authentication | ||
13 | via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the | ||
14 | BusyBox source. Chances are though, that if you have enough space to install | ||
15 | of that stuff on your system, then you probably want the full GNU utilities. | ||
16 | |||
17 | =head1 SEE ALSO | ||
18 | |||
19 | textutils(1), shellutils(1), etc... | ||
20 | |||
21 | =head1 MAINTAINER | 3 | =head1 MAINTAINER |
22 | 4 | ||
23 | Erik Andersen <andersen@codepoet.org> | 5 | Erik Andersen <andersen@codepoet.org> |
@@ -173,4 +155,4 @@ Glenn Engel <glenne@engel.org> | |||
173 | 155 | ||
174 | =cut | 156 | =cut |
175 | 157 | ||
176 | # $Id: busybox_footer.pod,v 1.13 2004/03/13 08:32:14 andersen Exp $ | 158 | # $Id: busybox_footer.pod,v 1.14 2004/03/27 09:40:15 andersen Exp $ |
diff --git a/docs/busybox_header.pod b/docs/busybox_header.pod index 132aa3b65..395e2c81a 100644 --- a/docs/busybox_header.pod +++ b/docs/busybox_header.pod | |||
@@ -14,42 +14,67 @@ BusyBox - The Swiss Army Knife of Embedded Linux | |||
14 | 14 | ||
15 | BusyBox combines tiny versions of many common UNIX utilities into a single | 15 | BusyBox combines tiny versions of many common UNIX utilities into a single |
16 | small executable. It provides minimalist replacements for most of the utilities | 16 | small executable. It provides minimalist replacements for most of the utilities |
17 | you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, | 17 | you usually find in GNU coreutils, util-linux, etc. The utilities in BusyBox |
18 | tar, etc. BusyBox provides a fairly complete POSIX environment for any small | 18 | generally have fewer options than their full-featured GNU cousins; however, the |
19 | or embedded system. The utilities in BusyBox generally have fewer options than | 19 | options that are included provide the expected functionality and behave very |
20 | their full-featured GNU cousins; however, the options that are included provide | 20 | much like their GNU counterparts. BusyBox provides a fairly complete POSIX |
21 | the expected functionality and behave very much like their GNU counterparts. | 21 | environment for any small or embedded system. |
22 | 22 | ||
23 | BusyBox has been written with size-optimization and limited resources in mind. | 23 | BusyBox has been written with size-optimization and limited resources in mind. |
24 | It is also extremely modular so you can easily include or exclude commands (or | 24 | It is also extremely modular so you can easily include or exclude commands (or |
25 | features) at compile time. This makes it easy to customize your embedded | 25 | features) at compile time. This makes it easy to customize your embedded |
26 | systems. To create a working system, just add a kernel, a shell (such as ash), | 26 | systems. To create a working system, just add /dev, /etc, and a Linux kernel. |
27 | and an editor (such as elvis-tiny or ae). | 27 | |
28 | BusyBox is extremely configurable. This allows you to include only the | ||
29 | components you need, thereby reducing binary size. Run 'make config' or 'make | ||
30 | menuconfig' for select the functionality that you wish to enable. The run | ||
31 | 'make' to compile BusyBox using your configuration. | ||
32 | |||
33 | After the compile has finished, you should use 'make install' to install | ||
34 | BusyBox. This will install the '/bin/busybox' binary, and will also create | ||
35 | symlinks pointing to the '/bin/busybox' binary for each utility that you | ||
36 | compile into BusyBox. By default, 'make install' will place these symlinks | ||
37 | into the './_install' directory, unless you have defined 'PREFIX', thereby | ||
38 | specifying some alternative location (i.e., 'make PREFIX=/tmp/foo install'). | ||
39 | If you wish to install using hardlinks, rather than the default of using | ||
40 | symlinks, you can use 'make PREFIX=/tmp/foo install-hardlinks' instead. | ||
28 | 41 | ||
29 | =head1 USAGE | 42 | =head1 USAGE |
30 | 43 | ||
31 | When you create a link to BusyBox for the function you wish to use, when BusyBox | 44 | BusyBox is a multi-call binary. A multi-call binary is an executable program |
32 | is called using that link it will behave as if the command itself has been invoked. | 45 | that performs the same job as more than one utility program. That means there |
46 | is just a single BusyBox binary, but that single binary acts like a large | ||
47 | number of utilities. This allows BusyBox to be smaller since all the built-in | ||
48 | utility programs (we call them applets) can share code for many common operations. | ||
49 | |||
50 | You can also invoke BusyBox by issuing the command as an argument on the | ||
51 | command line. For example, entering | ||
52 | |||
53 | /bin/busybox ls | ||
54 | |||
55 | will also cause BusyBox to behave as 'ls'. | ||
56 | |||
57 | Of course, adding '/bin/busybox' into every command would be painful. So most | ||
58 | people will invoke BusyBox using links to the BusyBox binary. | ||
33 | 59 | ||
34 | For example, entering | 60 | For example, entering |
35 | 61 | ||
36 | ln -s ./BusyBox ls | 62 | ln -s /bin/busybox ls |
37 | ./ls | 63 | ./ls |
38 | 64 | ||
39 | will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled | 65 | will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled |
40 | into BusyBox). | 66 | into BusyBox). Generally speaking, you should never need to make all these |
41 | 67 | links yourself, as the BusyBox build system will do this for you when you run | |
42 | You can also invoke BusyBox by issuing the command as an argument on the | 68 | the 'make install' command. |
43 | command line. For example, entering | ||
44 | 69 | ||
45 | ./BusyBox ls | 70 | If you invoke BusyBox with no arguments, it will provide you with a list of the |
46 | 71 | applets that have been compiled into your BusyBox binary. | |
47 | will also cause BusyBox to behave as 'ls'. | ||
48 | 72 | ||
49 | =head1 COMMON OPTIONS | 73 | =head1 COMMON OPTIONS |
50 | 74 | ||
51 | Most BusyBox commands support the B<-h> option to provide a | 75 | Most BusyBox commands support the B<--help> argument to provide a terse runtime |
52 | terse runtime description of their behavior. | 76 | description of their behavior. If the CONFIG_FEATURE_VERBOSE_USAGE option has |
77 | been enabled, more detailed usage information will also be available. | ||
53 | 78 | ||
54 | =head1 COMMANDS | 79 | =head1 COMMANDS |
55 | 80 | ||
@@ -80,4 +105,26 @@ Currently defined functions include: | |||
80 | 105 | ||
81 | =over 4 | 106 | =over 4 |
82 | 107 | ||
108 | =head1 LIBC NSS | ||
109 | |||
110 | GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behavior | ||
111 | of the C library for the local environment, and to configure how it reads | ||
112 | system data, such as passwords and group information. This is implemented | ||
113 | using an /etc/nsswitch.conf configuration file, and using one or more of the | ||
114 | /lib/libnss_* libraries. BusyBox tries to avoid using any libc calls that make | ||
115 | use of NSS. Some applets, such as login and su, will use libc functions that | ||
116 | usually require NSS. | ||
117 | |||
118 | If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal functions to | ||
119 | directly access the /etc/passwd, /etc/group, and /etc/shadow files without | ||
120 | using NSS. This may allow you to run your system without the need for | ||
121 | installing any of the NSS configuration files and libraries. | ||
122 | |||
123 | When used with glibc, the BusyBox 'networking' applets will similarly require | ||
124 | that you install at least some of the glibc NSS stuff (in particular, | ||
125 | /etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv*). | ||
126 | |||
127 | Shameless Plug: As an alternative one could use a C library such as uClibc. In | ||
128 | addition to making your system significantly smaller, uClibc does not need or | ||
129 | use any NSS support files or libraries. | ||
83 | 130 | ||