Update docs

This commit is contained in:
Eric Andersen 2004-03-27 09:40:15 +00:00
parent 97310d0253
commit fbcf06d296
4 changed files with 90 additions and 115 deletions

47
README
View File

@ -2,44 +2,40 @@ Please see the LICENSE file for details on copying and usage.
BusyBox combines tiny versions of many common UNIX utilities into a single BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides minimalist replacements for most of the utilities small executable. It provides minimalist replacements for most of the utilities
you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, you usually find in GNU coreutils, util-linux, etc. The utilities in BusyBox
tar, etc. BusyBox provides a fairly complete POSIX environment for any small or generally have fewer options than their full-featured GNU cousins; however, the
embedded system. The utilities in BusyBox generally have fewer options than options that are included provide the expected functionality and behave very
their full featured GNU cousins; however, the options that are included provide much like their GNU counterparts. BusyBox provides a fairly complete POSIX
the expected functionality and behave very much like their GNU counterparts. environment for any small or embedded system.
BusyBox was originally written to support the Debian Rescue/Install disks, but
it also makes an excellent environment for any small or embedded system.
BusyBox has been written with size-optimization and limited resources in mind. BusyBox has been written with size-optimization and limited resources in mind.
It is also extremely modular so you can easily include or exclude commands (or It is also extremely modular so you can easily include or exclude commands (or
features) at compile time. This makes it easy to customize your embedded features) at compile time. This makes it easy to customize your embedded
systems. To create a working system, just add /dev, /etc, and a kernel. systems. To create a working system, just add /dev, /etc, and a Linux kernel.
As of version 0.20 there is now a version number. : ) Also as of version 0.20, BusyBox is extremely configurable. This allows you to include only the
BusyBox is now modularized to easily allow you to build only the components you components you need, thereby reducing binary size. Run 'make config' or
need, thereby reducing binary size. Run 'make config' or 'make menuconfig' 'make menuconfig' for select the functionality that you wish to enable.
for select the functionality that you wish to enable.
After the build is complete, a busybox.links file is generated. This is After the build is complete, a busybox.links file is generated. This is
used by 'make install' to create symlinks to the busybox binary for all used by 'make install' to create symlinks to the BusyBox binary for all
compiled in functions. By default, 'make install' will place the symlink compiled in functions. By default, 'make install' will place the symlink
forest into `pwd`/_install unless you have defined the PREFIX environment forest into `pwd`/_install unless you have defined the PREFIX environment
variable (i.e., 'make PREFIX=/tmp/foo install') variable (i.e., 'make PREFIX=/tmp/foo install')
If you wish to install hardlinks, rather than symlinks, you can use If you wish to install hard links, rather than symlinks, you can use
'make install-hardlinks' instead. 'make PREFIX=/tmp/foo install-hardlinks' instead.
---------------- ----------------
Supported architectures: Supported architectures:
Busybox in general will build on any architecture supported by gcc. It has BusyBox in general will build on any architecture supported by gcc. It has
a few specialized features added for __sparc__ and __alpha__. insmod a few specialized features added for __sparc__ and __alpha__. insmod
functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k, functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k,
MIPS, cris, and v850e. MIPS, cris, and v850e.
Supported libcs: Supported C Libraries:
glibc-2.0.x, glibc-2.1.x, glibc-2.2.x, glibc-2.3.x, uClibc. People glibc-2.0.x, glibc-2.1.x, glibc-2.2.x, glibc-2.3.x, uClibc. People
are looking at newlib and diet-libc, but consider them unsupported, are looking at newlib and diet-libc, but consider them unsupported,
@ -66,7 +62,7 @@ the mailing list if you are interested.
Bugs: Bugs:
If you find bugs, please submit a detailed bug report to the busybox mailing If you find bugs, please submit a detailed bug report to the BusyBox mailing
list at busybox@mail.busybox.net. A well-written bug report should include a list at busybox@mail.busybox.net. A well-written bug report should include a
transcript of a shell session that demonstrates the bad behavior and enables transcript of a shell session that demonstrates the bad behavior and enables
anyone else to duplicate the bug on their own machine. The following is such anyone else to duplicate the bug on their own machine. The following is such
@ -76,21 +72,21 @@ an example:
From: diligent@testing.linux.org From: diligent@testing.linux.org
Subject: /bin/date doesn't work Subject: /bin/date doesn't work
Package: busybox Package: BusyBox
Version: 1.00 Version: 1.00
When I execute Busybox 'date' it produces unexpected results. When I execute BusyBox 'date' it produces unexpected results.
With GNU date I get the following output: With GNU date I get the following output:
$ date $ date
Wed Mar 21 14:19:41 MST 2001 Sat Mar 27 14:19:41 MST 2004
But when I use BusyBox date I get this instead: But when I use BusyBox date I get this instead:
$ date $ date
llegal instruction illegal instruction
I am using Debian unstable, kernel version 2.4.19-rmk1 on an Netwinder, I am using Debian unstable, kernel version 2.4.25-vrs2 on a Netwinder,
and the latest uClibc from CVS. Thanks for the wonderful program! and the latest uClibc from CVS. Thanks for the wonderful program!
-Diligent -Diligent
@ -101,7 +97,7 @@ reports lacking such detail may never be fixed... Thanks for understanding.
---------------- ----------------
FTP: Downloads:
Source for the latest released version, as well as daily snapshots, can always Source for the latest released version, as well as daily snapshots, can always
be downloaded from be downloaded from
@ -125,5 +121,4 @@ For those that are actively contributing there is even CVS write access:
Please feed suggestions, bug reports, insults, and bribes back to: Please feed suggestions, bug reports, insults, and bribes back to:
Erik Andersen Erik Andersen
<andersen@codepoet.org> <andersen@codepoet.org>
<andersen@codepoet.org>

49
TODO
View File

@ -1,49 +0,0 @@
TODO list for busybox in no particular order. Just because something
is listed here doesn't mean that it is going to be added to busybox,
or that doing so is even a good idea. It just means that we _might_ get
around to it some time. If you have any good ideas, please send them
on in...
-Erik
-----------
Possible apps to include some time:
* group/commonize strings, remove dups (for i18n, l10n)
-----------
With sysvinit, reboot, poweroff and halt all used a named pipe,
/dev/initctl, to communicate with the init process. Busybox
currently uses signals to communicate with init. This makes
busybox incompatible with sysvinit. We should probably use
a named pipe as well so we can be compatible.
-----------------------
Run the following:
rm -f busybox && make LDFLAGS+=-nostdlib 2>&1 | \
sed -ne 's/.*undefined reference to `\(.*\)..*/\1/gp' | sort | uniq
reveals the list of all external (i.e., libc) things that BusyBox depends on.
It would be a very nice thing to reduce this list to an absolute minimum, to
reduce the footprint of busybox, especially when staticly linking with
libraries such as uClibc.
-----------------------
Compile with debugging on, run 'nm --size-sort ./busybox'
and then start with the biggest things and make them smaller...
-----------------------
xargs could use a -l option
------------------------------------------------------------------
libbb/unzip.c and archival/gzip.c have common constant static arrays and
code for initializing the CRC array. Both use CRC-32 and could use
common code for CRC calculation. Within archival/gzip.c, the CRC
array should be malloc-ed as it is in libbb/unzip.c .

View File

@ -1,23 +1,5 @@
=back =back
=head1 LIBC NSS
GNU Libc uses the Name Service Switch (NSS) to configure the behavior of the C
library for the local environment, and to configure how it reads system data,
such as passwords and group information. BusyBox has made it Policy that it
will never use NSS, and will never use and libc calls that make use of NSS.
This allows you to run an embedded system without the need for installing an
/etc/nsswitch.conf file and without and /lib/libnss_* libraries installed.
If you are using a system that is using a remote LDAP server for authentication
via GNU libc NSS, and you want to use BusyBox, then you will need to adjust the
BusyBox source. Chances are though, that if you have enough space to install
of that stuff on your system, then you probably want the full GNU utilities.
=head1 SEE ALSO
textutils(1), shellutils(1), etc...
=head1 MAINTAINER =head1 MAINTAINER
Erik Andersen <andersen@codepoet.org> Erik Andersen <andersen@codepoet.org>
@ -173,4 +155,4 @@ Glenn Engel <glenne@engel.org>
=cut =cut
# $Id: busybox_footer.pod,v 1.13 2004/03/13 08:32:14 andersen Exp $ # $Id: busybox_footer.pod,v 1.14 2004/03/27 09:40:15 andersen Exp $

View File

@ -14,42 +14,67 @@ BusyBox - The Swiss Army Knife of Embedded Linux
BusyBox combines tiny versions of many common UNIX utilities into a single BusyBox combines tiny versions of many common UNIX utilities into a single
small executable. It provides minimalist replacements for most of the utilities small executable. It provides minimalist replacements for most of the utilities
you usually find in fileutils, shellutils, findutils, textutils, grep, gzip, you usually find in GNU coreutils, util-linux, etc. The utilities in BusyBox
tar, etc. BusyBox provides a fairly complete POSIX environment for any small generally have fewer options than their full-featured GNU cousins; however, the
or embedded system. The utilities in BusyBox generally have fewer options than options that are included provide the expected functionality and behave very
their full-featured GNU cousins; however, the options that are included provide much like their GNU counterparts. BusyBox provides a fairly complete POSIX
the expected functionality and behave very much like their GNU counterparts. environment for any small or embedded system.
BusyBox has been written with size-optimization and limited resources in mind. BusyBox has been written with size-optimization and limited resources in mind.
It is also extremely modular so you can easily include or exclude commands (or It is also extremely modular so you can easily include or exclude commands (or
features) at compile time. This makes it easy to customize your embedded features) at compile time. This makes it easy to customize your embedded
systems. To create a working system, just add a kernel, a shell (such as ash), systems. To create a working system, just add /dev, /etc, and a Linux kernel.
and an editor (such as elvis-tiny or ae).
BusyBox is extremely configurable. This allows you to include only the
components you need, thereby reducing binary size. Run 'make config' or 'make
menuconfig' for select the functionality that you wish to enable. The run
'make' to compile BusyBox using your configuration.
After the compile has finished, you should use 'make install' to install
BusyBox. This will install the '/bin/busybox' binary, and will also create
symlinks pointing to the '/bin/busybox' binary for each utility that you
compile into BusyBox. By default, 'make install' will place these symlinks
into the './_install' directory, unless you have defined 'PREFIX', thereby
specifying some alternative location (i.e., 'make PREFIX=/tmp/foo install').
If you wish to install using hardlinks, rather than the default of using
symlinks, you can use 'make PREFIX=/tmp/foo install-hardlinks' instead.
=head1 USAGE =head1 USAGE
When you create a link to BusyBox for the function you wish to use, when BusyBox BusyBox is a multi-call binary. A multi-call binary is an executable program
is called using that link it will behave as if the command itself has been invoked. that performs the same job as more than one utility program. That means there
is just a single BusyBox binary, but that single binary acts like a large
For example, entering number of utilities. This allows BusyBox to be smaller since all the built-in
utility programs (we call them applets) can share code for many common operations.
ln -s ./BusyBox ls
./ls
will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
into BusyBox).
You can also invoke BusyBox by issuing the command as an argument on the You can also invoke BusyBox by issuing the command as an argument on the
command line. For example, entering command line. For example, entering
./BusyBox ls /bin/busybox ls
will also cause BusyBox to behave as 'ls'. will also cause BusyBox to behave as 'ls'.
Of course, adding '/bin/busybox' into every command would be painful. So most
people will invoke BusyBox using links to the BusyBox binary.
For example, entering
ln -s /bin/busybox ls
./ls
will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
into BusyBox). Generally speaking, you should never need to make all these
links yourself, as the BusyBox build system will do this for you when you run
the 'make install' command.
If you invoke BusyBox with no arguments, it will provide you with a list of the
applets that have been compiled into your BusyBox binary.
=head1 COMMON OPTIONS =head1 COMMON OPTIONS
Most BusyBox commands support the B<-h> option to provide a Most BusyBox commands support the B<--help> argument to provide a terse runtime
terse runtime description of their behavior. description of their behavior. If the CONFIG_FEATURE_VERBOSE_USAGE option has
been enabled, more detailed usage information will also be available.
=head1 COMMANDS =head1 COMMANDS
@ -80,4 +105,26 @@ Currently defined functions include:
=over 4 =over 4
=head1 LIBC NSS
GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behavior
of the C library for the local environment, and to configure how it reads
system data, such as passwords and group information. This is implemented
using an /etc/nsswitch.conf configuration file, and using one or more of the
/lib/libnss_* libraries. BusyBox tries to avoid using any libc calls that make
use of NSS. Some applets, such as login and su, will use libc functions that
usually require NSS.
If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal functions to
directly access the /etc/passwd, /etc/group, and /etc/shadow files without
using NSS. This may allow you to run your system without the need for
installing any of the NSS configuration files and libraries.
When used with glibc, the BusyBox 'networking' applets will similarly require
that you install at least some of the glibc NSS stuff (in particular,
/etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv*).
Shameless Plug: As an alternative one could use a C library such as uClibc. In
addition to making your system significantly smaller, uClibc does not need or
use any NSS support files or libraries.