This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pull the busybox source code 16th September 2011
- Loading branch information
Botao Sun
committed
Sep 15, 2011
1 parent
4ae4248
commit 823a70d
Showing
1,750 changed files
with
321,351 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# | ||
# Kbuild ignores | ||
# | ||
.* | ||
*.o | ||
*.o.* | ||
*.a | ||
*.s | ||
Kbuild | ||
Config.in | ||
|
||
# | ||
# Never ignore these | ||
# | ||
!.gitignore | ||
|
||
# | ||
# Normal output | ||
# | ||
/busybox | ||
/busybox_old | ||
/busybox_unstripped* | ||
|
||
# | ||
# Backups / patches | ||
# | ||
*~ | ||
*.orig | ||
*.rej | ||
/*.patch | ||
|
||
# | ||
# debugging stuff | ||
# | ||
core | ||
.gdb_history | ||
.gdbinit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
List of the authors of code contained in BusyBox. | ||
|
||
If you have code in BusyBox, you should be listed here. If you should be | ||
listed, or the description of what you have done needs more detail, or is | ||
incorrect, _please_ let me know. | ||
|
||
-Erik | ||
|
||
----------- | ||
|
||
Peter Willis <psyphreak@phreaker.net> | ||
eject | ||
|
||
Emanuele Aina <emanuele.aina@tiscali.it> | ||
run-parts | ||
|
||
Erik Andersen <andersen@codepoet.org> | ||
Tons of new stuff, major rewrite of most of the | ||
core apps, tons of new apps as noted in header files. | ||
Lots of tedious effort writing these boring docs that | ||
nobody is going to actually read. | ||
|
||
Laurence Anderson <l.d.anderson@warwick.ac.uk> | ||
rpm2cpio, unzip, get_header_cpio, read_gz interface, rpm | ||
|
||
Jeff Angielski <jeff@theptrgroup.com> | ||
ftpput, ftpget | ||
|
||
Enrik Berkhan <Enrik.Berkhan@inka.de> | ||
setconsole | ||
|
||
Jim Bauer <jfbauer@nfr.com> | ||
modprobe shell dependency | ||
|
||
Edward Betts <edward@debian.org> | ||
expr, hostid, logname, whoami | ||
|
||
John Beppu <beppu@codepoet.org> | ||
du, nslookup, sort | ||
|
||
David Brownell <dbrownell@users.sourceforge.net> | ||
zcip | ||
|
||
Brian Candler <B.Candler@pobox.com> | ||
tiny-ls(ls) | ||
|
||
Randolph Chung <tausq@debian.org> | ||
fbset, ping, hostname | ||
|
||
Dave Cinege <dcinege@psychosis.com> | ||
more(v2), makedevs, dutmp, modularization, auto links file, | ||
various fixes, Linux Router Project maintenance | ||
|
||
Jordan Crouse <jordan@cosmicpenguin.net> | ||
ipcalc | ||
|
||
Magnus Damm <damm@opensource.se> | ||
tftp client | ||
insmod powerpc support | ||
|
||
Larry Doolittle <ldoolitt@recycle.lbl.gov> | ||
pristine source directory compilation, lots of patches and fixes. | ||
|
||
Glenn Engel <glenne@engel.org> | ||
httpd | ||
|
||
Gennady Feldman <gfeldman@gena01.com> | ||
Sysklogd (single threaded syslogd, IPC Circular buffer support, | ||
logread), various fixes. | ||
|
||
Robert Griebl <sandman@handhelds.org> | ||
modprobe, hwclock, suid/sgid handling, tinylogin integration | ||
many bugfixes and enhancements | ||
|
||
Karl M. Hegbloom <karlheg@debian.org> | ||
cp_mv.c, the test suite, various fixes to utility.c, &c. | ||
|
||
Daniel Jacobowitz <dan@debian.org> | ||
mktemp.c | ||
|
||
Matt Kraai <kraai@alumni.cmu.edu> | ||
documentation, bugfixes, test suite | ||
|
||
Rob Landley <rob@landley.net> | ||
Became busybox maintainer in 2006. | ||
|
||
sed (major rewrite in 2003, and I now maintain the thing) | ||
bunzip2 (complete from-scratch rewrite, then mjn3 optimized the result) | ||
sort (more or less from scratch rewrite in 2004, I now maintain it) | ||
mount (rewrite in 2005, I maintain the new one) | ||
|
||
Stephan Linz <linz@li-pro.net> | ||
ipcalc, Red Hat equivalence | ||
|
||
John Lombardo <john@deltanet.com> | ||
tr | ||
|
||
Glenn McGrath <glenn.l.mcgrath@gmail.com> | ||
Common unarchiving code and unarchiving applets, ifupdown, ftpgetput, | ||
nameif, sed, patch, fold, install, uudecode. | ||
Various bugfixes, review and apply numerous patches. | ||
|
||
Manuel Novoa III <mjn3@codepoet.org> | ||
cat, head, mkfifo, mknod, rmdir, sleep, tee, tty, uniq, usleep, wc, yes, | ||
mesg, vconfig, nice, renice, | ||
make_directory, parse_mode, dirname, mode_string, | ||
get_last_path_component, simplify_path, and a number trivial libbb routines | ||
|
||
also bug fixes, partial rewrites, and size optimizations in | ||
ash, basename, cal, cmp, cp, df, du, echo, env, ln, logname, md5sum, mkdir, | ||
mv, realpath, rm, sort, tail, touch, uname, watch, arith, human_readable, | ||
interface, dutmp, ifconfig, route | ||
|
||
Vladimir Oleynik <dzo@simtreas.ru> | ||
cmdedit; bb_mkdep, xargs(current), httpd(current); | ||
ports: ash, crond, fdisk (initial, unmaintained now), inetd, stty, traceroute, | ||
top; | ||
locale, various fixes | ||
and irreconcilable critic of everything not perfect. | ||
|
||
Bruce Perens <bruce@pixar.com> | ||
Original author of BusyBox in 1995, 1996. Some of his code can | ||
still be found hiding here and there... | ||
|
||
Rodney Radford <rradford@mindspring.com> | ||
ipcs, ipcrm | ||
|
||
Tim Riker <Tim@Rikers.org> | ||
bug fixes, member of fan club | ||
|
||
Kent Robotti <robotti@metconnect.com> | ||
reset, tons and tons of bug reports and patches. | ||
|
||
Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com> | ||
wget - Contributed by permission of Covad Communications | ||
|
||
Pavel Roskin <proski@gnu.org> | ||
Lots of bugs fixes and patches. | ||
|
||
Gyepi Sam <gyepi@praxis-sw.com> | ||
Remote logging feature for syslogd | ||
|
||
Rob Sullivan <cogito.ergo.cogito@gmail.com> | ||
comm | ||
|
||
Linus Torvalds | ||
mkswap, fsck.minix, mkfs.minix | ||
|
||
Mark Whitley <markw@codepoet.org> | ||
grep, sed, cut, xargs(previous), | ||
style-guide, new-applet-HOWTO, bug fixes, etc. | ||
|
||
Charles P. Wright <cpwright@villagenet.com> | ||
gzip, mini-netcat(nc) | ||
|
||
Enrique Zanardi <ezanardi@ull.es> | ||
tarcat (since removed), loadkmap, various fixes, Debian maintenance | ||
|
||
Tito Ragusa <farmatito@tiscali.it> | ||
devfsd and size optimizations in strings, openvt, chvt, deallocvt, hdparm, | ||
fdformat, lsattr, chattr, id and eject. | ||
|
||
Paul Fox <pgf@foxharp.boston.ma.us> | ||
vi editing mode for ash, various other patches/fixes | ||
|
||
Roberto A. Foglietta <me@roberto.foglietta.name> | ||
port: dnsd | ||
|
||
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | ||
misc | ||
|
||
Mike Frysinger <vapier@gentoo.org> | ||
initial e2fsprogs, printenv, setarch, sum, misc | ||
|
||
Jie Zhang <jie.zhang@analog.com> | ||
fixed two bugs in msh and hush (exitcode of killed processes) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
Building: | ||
========= | ||
|
||
The BusyBox build process is similar to the Linux kernel build: | ||
|
||
make menuconfig # This creates a file called ".config" | ||
make # This creates the "busybox" executable | ||
make install # or make CONFIG_PREFIX=/path/from/root install | ||
|
||
The full list of configuration and install options is available by typing: | ||
|
||
make help | ||
|
||
Quick Start: | ||
============ | ||
|
||
The easy way to try out BusyBox for the first time, without having to install | ||
it, is to enable all features and then use "standalone shell" mode with a | ||
blank command $PATH. | ||
|
||
To enable all features, use "make defconfig", which produces the largest | ||
general-purpose configuration. It's allyesconfig minus debugging options, | ||
optional packaging choices, and a few special-purpose features requiring | ||
extra configuration to use. Then enable "standalone shell" feature: | ||
|
||
make defconfig | ||
make menuconfig | ||
# select Busybox Settings | ||
# then General Configuration | ||
# then exec prefers applets | ||
# exit back to top level menu | ||
# select Shells | ||
# then Standalone shell | ||
# exit back to top level menu | ||
# exit and save new configuration | ||
# OR | ||
# use these commands to modify .config directly: | ||
sed -e 's/.*FEATURE_PREFER_APPLETS.*/CONFIG_FEATURE_PREFER_APPLETS=y/' -i .config | ||
sed -e 's/.*FEATURE_SH_STANDALONE.*/CONFIG_FEATURE_SH_STANDALONE=y/' -i .config | ||
make | ||
PATH= ./busybox ash | ||
|
||
Standalone shell mode causes busybox's built-in command shell to run | ||
any built-in busybox applets directly, without looking for external | ||
programs by that name. Supplying an empty command path (as above) means | ||
the only commands busybox can find are the built-in ones. | ||
|
||
Note that the standalone shell requires CONFIG_BUSYBOX_EXEC_PATH | ||
to be set appropriately, depending on whether or not /proc/self/exe is | ||
available or not. If you do not have /proc, then point that config option | ||
to the location of your busybox binary, usually /bin/busybox. | ||
|
||
Configuring Busybox: | ||
==================== | ||
|
||
Busybox is optimized for size, but enabling the full set of functionality | ||
still results in a fairly large executable -- more than 1 megabyte when | ||
statically linked. To save space, busybox can be configured with only the | ||
set of applets needed for each environment. The minimal configuration, with | ||
all applets disabled, produces a 4k executable. (It's useless, but very small.) | ||
|
||
The manual configurator "make menuconfig" modifies the existing configuration. | ||
(For systems without ncurses, try "make config" instead.) The two most | ||
interesting starting configurations are "make allnoconfig" (to start with | ||
everything disabled and add just what you need), and "make defconfig" (to | ||
start with everything enabled and remove what you don't need). If menuconfig | ||
is run without an existing configuration, make defconfig will run first to | ||
create a known starting point. | ||
|
||
Other starting configurations (mostly used for testing purposes) include | ||
"make allbareconfig" (enables all applets but disables all optional features), | ||
"make allyesconfig" (enables absolutely everything including debug features), | ||
and "make randconfig" (produce a random configuration). The configs/ directory | ||
contains a number of additional configuration files ending in _defconfig which | ||
are useful in specific cases. "make help" will list them. | ||
|
||
Configuring BusyBox produces a file ".config", which can be saved for future | ||
use. Run "make oldconfig" to bring a .config file from an older version of | ||
busybox up to date. | ||
|
||
Installing Busybox: | ||
=================== | ||
|
||
Busybox is a single executable that can behave like many different commands, | ||
and BusyBox uses the name it was invoked under to determine the desired | ||
behavior. (Try "mv busybox ls" and then "./ls -l".) | ||
|
||
Installing busybox consists of creating symlinks (or hardlinks) to the busybox | ||
binary for each applet enabled in busybox, and making sure these symlinks are | ||
in the shell's command $PATH. Running "make install" creates these symlinks, | ||
or "make install-hardlinks" creates hardlinks instead (useful on systems with | ||
a limited number of inodes). This install process uses the file | ||
"busybox.links" (created by make), which contains the list of enabled applets | ||
and the path at which to install them. | ||
|
||
Installing links to busybox is not always necessary. The special applet name | ||
"busybox" (or with any optional suffix, such as "busybox-static") uses the | ||
first argument to determine which applet to behave as, for example | ||
"./busybox cat LICENSE". (Running the busybox applet with no arguments gives | ||
a list of all enabled applets.) The standalone shell can also call busybox | ||
applets without links to busybox under other names in the filesystem. You can | ||
also configure a standalone install capability into the busybox base applet, | ||
and then install such links at runtime with one of "busybox --install" (for | ||
hardlinks) or "busybox --install -s" (for symlinks). | ||
|
||
If you enabled the busybox shared library feature (libbusybox.so) and want | ||
to run tests without installing, set your LD_LIBRARY_PATH accordingly when | ||
running the executable: | ||
|
||
LD_LIBRARY_PATH=`pwd` ./busybox | ||
|
||
Building out-of-tree: | ||
===================== | ||
|
||
By default, the BusyBox build puts its temporary files in the source tree. | ||
Building from a read-only source tree, or building multiple configurations from | ||
the same source directory, requires the ability to put the temporary files | ||
somewhere else. | ||
|
||
To build out of tree, cd to an empty directory and configure busybox from there: | ||
|
||
make KBUILD_SRC=/path/to/source -f /path/to/source/Makefile defconfig | ||
make | ||
make install | ||
|
||
Alternately, use the O=$BUILDPATH option (with an absolute path) during the | ||
configuration step, as in: | ||
|
||
make O=/some/empty/directory allyesconfig | ||
cd /some/empty/directory | ||
make | ||
make CONFIG_PREFIX=. install | ||
|
||
More Information: | ||
================= | ||
|
||
Se also the busybox FAQ, under the questions "How can I get started using | ||
BusyBox" and "How do I build a BusyBox-based system?" The BusyBox FAQ is | ||
available from http://www.busybox.net/FAQ.html |
Oops, something went wrong.