Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
267b925bb4 | ||
|
|
aad0c53aa2 | ||
|
|
eb2a21f68d | ||
|
|
ce998051b4 | ||
|
|
2ecdbd9eb8 | ||
|
|
fe5bc552e6 | ||
|
|
d9ffc9caa6 | ||
|
|
62fda96120 | ||
|
|
75851b363b | ||
|
|
a97ef8eed4 | ||
|
|
41a82698c3 | ||
|
|
9019ed994f | ||
|
|
0eaef54878 | ||
|
|
f8d5b031c2 | ||
|
|
e5a1a23577 | ||
|
|
37ded2819b | ||
|
|
7f65e78f5c | ||
|
|
f295db8fbd | ||
|
|
9959ef4e2c | ||
|
|
cf969517dc | ||
|
|
64ef2d4cfa | ||
|
|
6a18de72c4 | ||
|
|
bf31a8c450 | ||
|
|
3f6bb561db | ||
|
|
2fd475509a | ||
|
|
93fc393486 | ||
|
|
6b4d645722 | ||
|
|
8ccef78172 | ||
|
|
018e9e8c0f | ||
|
|
9b2afe6dd6 | ||
|
|
3cba82678b | ||
|
|
b7090fda30 | ||
|
|
61a37e248d | ||
|
|
c960eda2eb | ||
|
|
c83f8e765d | ||
|
|
8fdaace1d9 | ||
|
|
43a6ed1171 | ||
|
|
170e4a7395 | ||
|
|
c4174b1b30 | ||
|
|
3b8b434e53 | ||
|
|
27656e1868 | ||
|
|
df73587122 | ||
|
|
59feb4b9bb | ||
|
|
b3d5dd7220 | ||
|
|
82c22aa311 | ||
|
|
afe07daf34 | ||
|
|
435680426e | ||
|
|
686a24b2f5 | ||
|
|
d85117bb85 | ||
|
|
6c8c51a470 | ||
|
|
4a5360b97e |
No files matched your search
@@ -1,5 +1,4 @@
|
||||
busybox
|
||||
busybox.links
|
||||
_install
|
||||
.config
|
||||
.menuconfig.log
|
||||
applet_source_list
|
||||
@@ -15,7 +15,7 @@ Erik Andersen <andersen@codepoet.org>, <andersee@debian.org>
|
||||
Edward Betts <edward@debian.org>
|
||||
expr, hostid, logname, tty, wc, whoami, yes
|
||||
|
||||
John Beppu <beppu@lineo.com>
|
||||
John Beppu <beppu@codepoet.org>
|
||||
du, head, nslookup, sort, tee, uniq
|
||||
|
||||
Brian Candler <B.Candler@pobox.com>
|
||||
@@ -45,7 +45,7 @@ Karl M. Hegbloom <karlheg@debian.org>
|
||||
Daniel Jacobowitz <dan@debian.org>
|
||||
mktemp.c
|
||||
|
||||
Matt Kraai <kraai@alumni.cmu.edu>
|
||||
Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
||||
documentation, bugfixes, test suite
|
||||
|
||||
John Lombardo <john@deltanet.com>
|
||||
@@ -79,7 +79,7 @@ Gyepi Sam <gyepi@praxis-sw.com>
|
||||
Linus Torvalds <torvalds@transmeta.com>
|
||||
mkswap, fsck.minix, mkfs.minix
|
||||
|
||||
Mark Whitley <markw@lineo.com> <markw@codepoet.org>
|
||||
Mark Whitley <markw@codepoet.org>
|
||||
grep, sed, cut, xargs, style-guide, new-applet-HOWTO, bug fixes, etc.
|
||||
|
||||
Charles P. Wright <cpwright@villagenet.com>
|
||||
|
||||
@@ -1,39 +1,222 @@
|
||||
0.61.pre
|
||||
0.60.5
|
||||
|
||||
Development Version
|
||||
Stable Release
|
||||
|
||||
Bugfixes:
|
||||
* Fixed a race that could cause init to hang
|
||||
* Fixed init orphan process reaping
|
||||
* Fixed init to always attempt to provide a controlling tty.
|
||||
This should fix most cases where ash would print
|
||||
"job control disabled" -- the other cases are user error.
|
||||
* Fixed 'gunzip -c' to not delete the source source file
|
||||
* Fixed a silly math problem in the time applet
|
||||
* Fixed 'cp -a' so it will once again copy symlinks properly
|
||||
* Fixed a long standing problem in tftp with freeing memory
|
||||
* Fixed Makefile largefile settings
|
||||
* Fixed a buffer overflow in vi
|
||||
* Cosmetic cleanups in lsmod, lash, init, swapon/off, and hostname
|
||||
* Set the close-on-exec flag on files opened by init
|
||||
* The updated top applet was backported from unstable
|
||||
* Several ash bugfixes were backported from unstable
|
||||
* Several warnings in ash, md5sum, and ifconfig
|
||||
|
||||
-Erik Andersen, 26 October 2002
|
||||
|
||||
|
||||
|
||||
New Applets:
|
||||
* Erik Andersen -- Merged several applets from tinylogin,
|
||||
namely adduser, addgroup, deluser, delgroup, getty.
|
||||
0.60.4
|
||||
|
||||
Stable Release
|
||||
|
||||
New Applets & New Features:
|
||||
* Added new a 'top' applet (by special request)
|
||||
* Lots of small uClinux adjustments
|
||||
|
||||
Bugfixes:
|
||||
* This release has _lots_ of bugfixes. See Changelog.full
|
||||
for the complete list of what was changed.
|
||||
|
||||
-Erik Andersen, 18 September 2002
|
||||
|
||||
|
||||
Other Changes:
|
||||
|
||||
* Vladimir Oleynik, Manuel Novoa III, Aaron Lehmann
|
||||
-- a whole bunch of ash size optimizations
|
||||
-- Fix for ash leading redirections (i.e. '2>/dev/null ls rubbish')
|
||||
* Rodney Brown <RDBrown@mira.net>
|
||||
-- Optimized gzip.c, shrinking it by ~1.5k
|
||||
0.60.3
|
||||
|
||||
Stable Release
|
||||
|
||||
New Applets & New Features:
|
||||
* Added new a 'time' applet (by special request)
|
||||
* Added new a 'losetup' applet
|
||||
* The tftp has been fixed to work
|
||||
* Default shell is now ash.
|
||||
* msh shell should work properly on mmu-less systems again
|
||||
* ls can now do color
|
||||
|
||||
Bugfixes:
|
||||
* Erik Andersen
|
||||
-- Hacked together a new time applet
|
||||
-- Fixed dangling comma in init.c (s390 arch only)
|
||||
-- Fixed more so when it is run on files in the procfs that
|
||||
claim 0 length, it will not do weird things i.e. more /proc/pci
|
||||
-- Copyright message cleanups. Fixed sash attributions.
|
||||
-- Backporting of fixes and general maintenance.
|
||||
-- Fixed several cases where reboot, halt, and poweroff would fail
|
||||
to function properly when Linux is booted into an initrd.
|
||||
-- Fixed a silly compile bug in cpio
|
||||
-- nslookup now works properly with uClibc, remove old workaround
|
||||
-- Added conv=noerror support to dd
|
||||
-- Fixed ash and msh cmdedit to properly account for the current
|
||||
PATH setting
|
||||
-- Document netcat options and add -e support
|
||||
-- Fixed insanely broken insmod endianness handling
|
||||
-- Update init.c for better syle conformance, properly detach from
|
||||
terminal when necessary, better code reuse, FIFO inittab file
|
||||
reading/executing, allow init to be halted and restarted, etc.
|
||||
-- Allow gunzip to work on multiple archives, add -v option
|
||||
-- Updated x86 optimizations to save over 10k.
|
||||
* Edward Betts
|
||||
-- added -x switch to du.c
|
||||
* Cliff L. Biffle
|
||||
-- Added memory usage to the ps listings
|
||||
* Przemyslaw Czerpak
|
||||
-- Made telnet 8-bit clean, handle screen size, and is now RFC
|
||||
compliant. Works nicely now.
|
||||
* Wolfgang Denk
|
||||
-- hush now supports shell loops (for, while, until) and control
|
||||
operators (||, &&)
|
||||
* Russ Dill
|
||||
-- Added an 'restart' inittab action, allowing init to re-exec
|
||||
itself (or call a script which calls pivot_root then exec...)
|
||||
* Larry Doolittle
|
||||
-- Made syslogd not give up when errno is EINTR
|
||||
* Geoffrey Espin
|
||||
-- support find -newer <file>
|
||||
* Robert Griebl
|
||||
-- Reworked modprobe so it now reads and uses modules.dep
|
||||
* Karl M. Hegbloom
|
||||
-- Fixed a silly bug where CONTEXT and EGREP_ALIAS were coupled.
|
||||
* Kevin Hilman
|
||||
-- Fixed memory corruption from long pathnames in /etc/fstab
|
||||
* J.W.Janssen
|
||||
-- color ls support!
|
||||
* Matt Kraai
|
||||
-- Fix sed s/[/]// handling (closes: #1208).
|
||||
-- Fix `-/bin/sh' invocation (closes: #1209).
|
||||
-- Fix ash exec (noted by Arne Bernin).
|
||||
-- Fix tar segfault when include list is empty and exclude list is
|
||||
not.
|
||||
-- Fix sed s/$/@/ handling (noted by Joshua Hudson).
|
||||
-- Fix opt type in dpkg (closes: #118975).
|
||||
* Magick
|
||||
-- made init run inittab command's in the order they show up
|
||||
in the inittab file (FIFO instead of LIFO).
|
||||
-- Fixed get_line_from_file() so that NULL is treated as end of
|
||||
line, thereby fixing cut, grep, sed, etc. when working on binary
|
||||
files or anything that might contain a NULL.
|
||||
-- Fixed wget to do DNS initial DNS lookups, and do that only once
|
||||
to avoid skipping to a different server when round-robin DNS is
|
||||
in use (bug found by Mike Coleman <mkc@mathdogs.com>)
|
||||
-- Several sed fixes
|
||||
-- Added new losetup applet
|
||||
* Ben Low
|
||||
-- allow tftp to work with stdin as well as stdout.
|
||||
* Frank P. MacLachlan <fpm-plutus@tgs.indyme.com> avoid a potential
|
||||
NULL pointer problem in mount.
|
||||
* Glenn McGrath
|
||||
-- gunzip was incorrectly reporting a failed crc and length
|
||||
(Discovered by Change, Shu-Hao). The problem was the bitbuffer
|
||||
needs to be unwound after decompression as it was eating into the
|
||||
crc/size field.
|
||||
-- Reworked wc.c to fix severe efficiency problems and make it
|
||||
smaller. When just counting file chars, simply stat the file
|
||||
instead of reading the whole thing. (Fixes Debian bug #103302)
|
||||
-- Updated dmalloc options
|
||||
* Manuel Novoa III
|
||||
-- rewrote get_last_path_component() so it would not be so
|
||||
horrible, and would behave correctly in several important corner
|
||||
cases.
|
||||
* Vladimir Oleynik
|
||||
-- reverse resolve network name and cache in route and ifconfig
|
||||
applets, fix print nslookup server name if compile without
|
||||
uClibc, fix route crashe 'route add', fix warnings compile
|
||||
networking and pwd_grp applets
|
||||
-- Fixed ash problem where ^C could be blocked
|
||||
-- Several command line editing updates (cmdedit now supports
|
||||
CTRL-K and CTRL-L, fixed a segfault, etc)
|
||||
-- Fixed ash problem where ^C could be blocked
|
||||
-- Several size optimizations for various applets
|
||||
* Tim Riker
|
||||
-- make ash prompt the same as other shells if cmdedit and
|
||||
fancyprompt are enabled.
|
||||
* Jeff Studer
|
||||
-- tftp now generates default values for localfilename and
|
||||
remotefilename based on provided file names when possible.
|
||||
* Stefan Soucek and Miles Bader
|
||||
-- Re-add mmu-less support to msh
|
||||
* Jim Treadway
|
||||
-- Fixed a buffer overflow in the local group handling code.
|
||||
-- Fixed a missing "\" in usage.h
|
||||
-- Made pidof not add trailing spaces
|
||||
-- Fixed msh bugs so things like "A = 1; B = `eval $A`; echo $B"
|
||||
can now work.
|
||||
* Mike Voytovich
|
||||
-- insmod big endian ARM support
|
||||
|
||||
|
||||
-Erik Andersen, 27 April 2002
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
0.60.2
|
||||
|
||||
Stable Release
|
||||
|
||||
* Please support busybox and help us buy busybox.net. See the
|
||||
(current) busybox webpage for details.
|
||||
|
||||
New Applets & New Features:
|
||||
* msh was reworked by Vladimir Oleynik's so it can handle things like
|
||||
for i in `ls *.c` ; do echo $i ; done
|
||||
unfortunately, this also means that msh is no-longer uClinux safe,
|
||||
and will require some surgery to make it use vfork() again.
|
||||
* Charles Steinkuehler <charles@steinkuehler.net> -- reworked hostname
|
||||
so it behaves as expected (backport from busybox unstable)
|
||||
|
||||
Known Problems
|
||||
none. :)
|
||||
|
||||
Bugfixes:
|
||||
* Erik Andersen
|
||||
-- Fixed grep -E and egrep so they actually behave as expected
|
||||
-- init cleanups and (theoretical) uClinux support
|
||||
-- Fixed large file (>2Gig) support (enable in the Makefile)
|
||||
-- Always enable test when a shell is enabled (least surprise)
|
||||
-- Made 'mount -a' use proc to avoid a static noauto list
|
||||
-- lots of source tree cleanups
|
||||
* Laurence Anderson
|
||||
-- Removed some traces of no-longer existant rpmunpack (which
|
||||
has been obsoleted by the rpm2cpio applet).
|
||||
-- Fixed unarchive.c to use the correct buffer when calling
|
||||
dirname, improve an error message, and plug some memory leaks.
|
||||
-- Fixed rpm2cpio.c mkfs_minix.c fsck_minix.c fbset.c to use
|
||||
standard types (s/u16/u_int16_t/g s/u32/u_int32_t/g etc)
|
||||
* ASA <llb@udm.net.ru> -- fixed ash handling of command line args
|
||||
when sourcing ('.') commands.
|
||||
* Ethan Benson <erbenson@alaska.net>
|
||||
-- Fix mount's noauto option to not automount as "usbdevfs"
|
||||
* David Kimdon <dwhedon@instant802.com> -- fixed md5sum binary sums
|
||||
* Matt Kraai
|
||||
-- Fix sed s/[/]// handling (noted by Dumas Patrice).
|
||||
-- Fix dirname(3) improper consts, allow libc version to override.
|
||||
-- Fixed invoking applets when their names contain a leading dash
|
||||
and a full pathname.
|
||||
-- Fix ash exec
|
||||
-- Fixed basename to be SUSv2 compliant (which specifies that the
|
||||
extension should stay if it is identical to the basename.
|
||||
-- Fixed rmdir, since SuS2 says rmdir must provide -p
|
||||
-- Fixed sed empty line substitutions (noted by Joshua Hudson).
|
||||
* Steve Merrifield <steve@labyrinth.net.au> -- make vi use xmalloc
|
||||
* Glenn McGrath
|
||||
-- dpkg cleanups, various bugfixes
|
||||
* Vladimir Oleynik
|
||||
-- Add support for `busybox --help APPLET'
|
||||
-- Fixed route so it properly displays all route entries
|
||||
-- Fix for ash leading redirections (i.e. '2>/dev/null ls rubbish')
|
||||
* Andrew Tipton <andrew@cadre5.com> -- enable vi cursor keys when in
|
||||
edit mode as vim does.
|
||||
|
||||
|
||||
-Erik Andersen, 20 November 2001
|
||||
|
||||
|
||||
-Erik Andersen, --not yet released--
|
||||
|
||||
|
||||
|
||||
@@ -57,8 +240,8 @@
|
||||
-- Fixed msh to support underscores in variable names.
|
||||
-- Fixed a sed problem with unsatisfied backrefs (the problem was
|
||||
noted by Martin Bene).
|
||||
-- Removed CONFIG_SH define entirely. Now one simply picks the shell
|
||||
or shells they want as CONFIG_<foo> in Config.h
|
||||
-- Removed BB_SH define entirely. Now one simply picks the shell
|
||||
or shells they want as BB_<foo> in Config.h
|
||||
-- Fixed head to use ferror(3) to check for errors, not errno.
|
||||
* Shu-Hao Chang <shuhao_chang@trend.com.tw>
|
||||
-- Fixed sed handling of multiple -e commands
|
||||
@@ -67,10 +250,10 @@
|
||||
* Jaspreet Singh <jsingh@somanetworks.com>
|
||||
-- Fixed both a segfault and cosmetic bug in route
|
||||
* Erik Andersen
|
||||
-- Made the insmod options CONFIG_FEATURE_NEW_MODULE_INTERFACE and
|
||||
CONFIG_FEATURE_OLD_MODULE_INTERFACE mutually exclusive
|
||||
-- Made the insmod options BB_FEATURE_NEW_MODULE_INTERFACE and
|
||||
BB_FEATURE_OLD_MODULE_INTERFACE mutually exclusive
|
||||
-- xgetcwd.c now includes sys/param.h to ensure PATH_MAX is defined
|
||||
-- Fixed a potential segfault with lash + CONFIG_FEATURE_CLEAN_UP
|
||||
-- Fixed a potential segfault with lash + BB_FEATURE_CLEAN_UP
|
||||
-- Removed uint64_t from dos2unix, avoiding C lib compat. problems.
|
||||
* Glenn McGrath
|
||||
-- Rewrite of tftp (commands match atftp, accepts -b, can use
|
||||
@@ -88,6 +271,8 @@
|
||||
-Erik Andersen, 23 August 2001
|
||||
|
||||
|
||||
|
||||
|
||||
0.60.0
|
||||
|
||||
Note:
|
||||
@@ -141,7 +326,7 @@
|
||||
* Matt Kraai
|
||||
-- Made tar read 20 512byte blocks at a time (like GNU tar)
|
||||
-- Allow msh.c assignments with the export and readonly commands.
|
||||
-- Added CONFIG_FEATURE_DEVFS to enable devfs device names.
|
||||
-- Added BB_FEATURE_DEVFS to enable devfs device names.
|
||||
-- Better devfs support
|
||||
-- Don't save/restore vi readonly flag if vi is compiled read-only.
|
||||
-- Reworked rdate option handling (is now smaller).
|
||||
@@ -322,7 +507,7 @@
|
||||
* Magnus Damm -- added a tftp applet
|
||||
* Magnus Damm -- powerpc support for busybox insmod.
|
||||
* David Douthitt -- fixed a build error in df.c when
|
||||
CONFIG_FEATURE_HUMAN_READABLE was disabled
|
||||
BB_FEATURE_HUMAN_READABLE was disabled
|
||||
* John Beppu -- wrote autodocifier.pl, which will be used to auto-
|
||||
generate the documentation from the source code, making life
|
||||
much simpler for all.
|
||||
@@ -429,7 +614,7 @@
|
||||
* Mark Whitley -- Updates to style guide
|
||||
* Mark Whitley -- Big cleanup in utility.c: style guide compliance,
|
||||
de-macro-ifying some variables and functions
|
||||
* Erik Andersen -- ls now honors CONFIG_FEATURE_AUTOWIDTH so it can find
|
||||
* Erik Andersen -- ls now honors BB_FEATURE_AUTOWIDTH so it can find
|
||||
the width and height of the console.
|
||||
* Erik Andersen -- insmod now ignores -L and accepts the -o option.
|
||||
* Erik Andersen -- updates so you can now select from the Makefile
|
||||
@@ -445,7 +630,7 @@
|
||||
0.48
|
||||
|
||||
* Glenn McGrath -- tar now supports uncompressing tar files,
|
||||
define CONFIG_FEATURE_TAR_GZIP to use the -z option.
|
||||
define BB_FEATURE_TAR_GZIP to use the -z option.
|
||||
* Matt Kraai -- fix all usage of TRUE and FALSE so all apps now
|
||||
return EXIT_SUCCESS or EXIT_FAILURE to the system.
|
||||
Now TRUE and FALSE are set to the C standard where TRUE=1.
|
||||
@@ -477,7 +662,7 @@
|
||||
GNU-date compatible
|
||||
* me -- Progress meter (optional) in wget
|
||||
* Doolittle/me -- programs invoked by full path name take
|
||||
precedence over applets unless CONFIG_FEATURE_SH_BUILTINS_ALWAYS_WIN
|
||||
precedence over applets unless BB_FEATURE_SH_BUILTINS_ALWAYS_WIN
|
||||
* Gaute B Strokkenes <gs234@cam.ac.uk> -- applets found using a
|
||||
binary search instead of linear search. Much faster!
|
||||
* new applets: cmp readlink
|
||||
@@ -599,7 +784,7 @@
|
||||
Arne Bernin <arne@matrix.loopback.org>
|
||||
* Fixed NFS so it supports 2.4.x kernels and NFSv3.
|
||||
* Brand, new versions of grep and sed which use libc regex routines,
|
||||
thanks to Mark Whitley <markw@lineo.com>. The hand-tooled
|
||||
thanks to Mark Whitley <markw@codepoet.org>. The hand-tooled
|
||||
"regexp.[ch]" files have been removed. Much help on these from
|
||||
Matt Kraai as well.
|
||||
|
||||
@@ -610,7 +795,7 @@
|
||||
0.45
|
||||
* Now compiles vs libc5 (which can save lots of space for
|
||||
embedded systems).
|
||||
* Added CONFIG_FEATURE_TRIVIAL_HELP which compiles out most all of the
|
||||
* Added BB_FEATURE_TRIVIAL_HELP which compiles out most all of the
|
||||
help messages (i.e --help). Saves 17k over a full compile.
|
||||
* Added cut and tr from minix, since due to the license change,
|
||||
we can now use minix code. Minix tr saves 4k.
|
||||
@@ -622,7 +807,7 @@
|
||||
* Added a mini ar archive utility, especially written for BusyBox by
|
||||
Glenn McGrath <bug1@netconnect.com.au>
|
||||
* Added mktemp, contributed by Daniel Jacobowitz <dan@debian.org>
|
||||
* Added setkeycodes, for those that have wierd keyboard buttons.
|
||||
* Added setkeycodes, for those that have weird keyboard buttons.
|
||||
* Added md5sum, uuencode and uudecode -- thanks to Alfred M. Szmidt
|
||||
<ams@trillian.itslinux.org> for contributing these.
|
||||
* Added 'grep -v' option (inverted search) and updated
|
||||
@@ -631,7 +816,7 @@
|
||||
* Replaced the telnet implementation with one written by
|
||||
Tomi Ollila <too@iki.fi> It works great and costs 3k.
|
||||
* BusyBox sh (lash) now supports being used as a standalone shell. When
|
||||
CONFIG_FEATURE_SH_STANDALONE_SHELL is defined, all the busybox commands may
|
||||
BB_FEATURE_SH_STANDALONE_SHELL is defined, all the busybox commands may
|
||||
be invoked as shell internals. Best used when compiling staticly
|
||||
(i.e. DOSTATIC=true)
|
||||
* BusyBox sh (lash) internals now behave as expected wrt pipes
|
||||
@@ -683,7 +868,7 @@
|
||||
* Fixed exit status for killall - Pavel Roskin
|
||||
* Fixed 'swapon -a' and 'swapoff -a', which were broken.
|
||||
* Fixed 'mount -a' so it works as expected.
|
||||
* Implemented 'ls -R' (enabled by enabling CONFIG_FEATURE_LS_RECURSIVE)
|
||||
* Implemented 'ls -R' (enabled by enabling BB_FEATURE_LS_RECURSIVE)
|
||||
* Implemented "ping -s", fixed error messages and argument parsing -
|
||||
Pavel Roskin
|
||||
* Syslogd will not go to background if "-n" is given. Better help
|
||||
@@ -721,7 +906,7 @@
|
||||
saving a bunch of memory (kernel /proc support is not thin). This
|
||||
is done by making use of some nice kernel patches I wrote up to
|
||||
support the features that busybox requires and that /proc usually
|
||||
provides. To enable this, turn on CONFIG_FEATURE_USE_DEVPS_PATCH and
|
||||
provides. To enable this, turn on BB_FEATURE_USE_DEVPS_PATCH and
|
||||
patch your kernel with the devps patch in the kernel-patches/
|
||||
directory.
|
||||
* Wrote basename, dirname, killall, and uptime.
|
||||
@@ -766,7 +951,7 @@
|
||||
* An initial telnet implementation was added by
|
||||
Randolph Chung <tausq@debian.org>.
|
||||
* Fixed a bug where "sed 's/foo/bar/g'" (i.e. a script w/o a "-e")
|
||||
* ps now supports CONFIG_FEATURE_AUTOWIDTH, and can adjust its width
|
||||
* ps now supports BB_FEATURE_AUTOWIDTH, and can adjust its width
|
||||
to match the terminal (defaults to width=79 when this is off).
|
||||
* ps now accepts (and ignores) all options except for "--help" (which
|
||||
as would be expected displays help).
|
||||
@@ -789,7 +974,7 @@
|
||||
|
||||
* Fairly massive restructuring of umount.c to deal with remounting
|
||||
busy devices read-only. Adds a -r option to control that; it is
|
||||
optionally compiled in with CONFIG_FEATURE_REMOUNT
|
||||
optionally compiled in with BB_FEATURE_REMOUNT
|
||||
* Added a bunch of functions to mtab.c to interact with the
|
||||
{get,set,end}mntent interface; as it turns out, those functions do
|
||||
not appear to be re-entrant, and that causes a lot of problems with
|
||||
@@ -860,7 +1045,7 @@
|
||||
* Created a tiny tail implementation, removing -c, -q, -v, and making
|
||||
tail -f work only with a single file. This reduced tail from 6k to
|
||||
2.4k. The bigger/more featured tail can still be had by disabling
|
||||
CONFIG_FEATURE_SIMPLE_TAIL in busybox.defs.h
|
||||
BB_FEATURE_SIMPLE_TAIL in busybox.defs.h
|
||||
* Ping now falls back to doing the right thing if /etc/protocols
|
||||
turns up missing.
|
||||
* Fixed mount and umount. Previously they could leak loop device
|
||||
@@ -912,14 +1097,14 @@
|
||||
devices. Support is toggled by MOUNT_LOOP feature -- Ben Collins
|
||||
<bcollins@debian.org>
|
||||
* Several fixes from Marco Pantaleoni <panta@prosa.it> compile in
|
||||
* fullWrite() not only if CONFIG_TAR is defined, but also
|
||||
if CONFIG_CP or CONFIG_MV are (fullWrite() is referenced by copyFile())
|
||||
* fullWrite() not only if BB_TAR is defined, but also
|
||||
if BB_CP or BB_MV are (fullWrite() is referenced by copyFile())
|
||||
* add some compiler optimizations to further reduce executable size
|
||||
(as a side note, on my machines the largest code is generated
|
||||
by gcc 2.95.2 with -Os ! The smallest by plain gcc 2.7.2.3 with
|
||||
-O2 -m386 ...)
|
||||
* Compile now won't fail if busybox.def.h defines
|
||||
CONFIG_FEATURE_INITRD but not CONFIG_INIT. (init_main used to be
|
||||
BB_FEATURE_LINUXRC but not BB_INIT. (init_main used to be
|
||||
referenced, but not compiled)
|
||||
* Fixed a bug in setting TERM for serial console support. TERM now
|
||||
defaults to "ansi" for serial consoles.
|
||||
@@ -979,7 +1164,7 @@
|
||||
to suit my evil purposes. Costs 6k. I'll make it smaller
|
||||
sometime.
|
||||
* on reboot, init called 'umount -a -n', which caused errors
|
||||
when CONFIG_MTAB was not enabled. Changed to 'umount -a', which does
|
||||
when BB_MTAB was not enabled. Changed to 'umount -a', which does
|
||||
the right thing.
|
||||
* init will now try to run /sbin/getty if it is present (for easy
|
||||
integration with the about-to-be-released tinylogin.)
|
||||
@@ -993,7 +1178,7 @@
|
||||
init is not at PID 1 (like when running in an initrd).
|
||||
* Added a prelinary du implementation. Some parameter parsing
|
||||
stuff still needs to be added. -beppu (John Beppu
|
||||
<beppu@lineo.com>)
|
||||
<beppu@codepoet.org>)
|
||||
* Implemented tee. -beppu Implemented head. -beppu
|
||||
|
||||
-Erik Andersen, Dec 10, 1999
|
||||
@@ -1014,7 +1199,7 @@
|
||||
* I've taken a first step to making busybox not need the /proc
|
||||
filesystem. Most apps don't need it. Those that _require_ it,
|
||||
will complain if you enable them when you disable
|
||||
CONFIG_FEATURE_USE_PROCFS.
|
||||
BB_FEATURE_USE_PROCFS.
|
||||
|
||||
-Erik Andersen, Dec 5, 1999
|
||||
|
||||
@@ -1052,7 +1237,7 @@
|
||||
* from
|
||||
Eric Delaunay).
|
||||
* Made createPath be quiet (again thanks to Eric Delaunay). If
|
||||
* CONFIG_CONSOLE_CMD_IF_RC_SCRIPT_EXITS is defined, then whatever
|
||||
* BB_CONSOLE_CMD_IF_RC_SCRIPT_EXITS is defined, then whatever
|
||||
command you define it as will be run if the init script exits.
|
||||
* Updated install.sh to make it more robust (thanks to Adam Di Carlo)
|
||||
* NFS support added to mount by Eric Delaunay. It costs 10k when
|
||||
@@ -1108,7 +1293,7 @@
|
||||
to Eric Delaunay.
|
||||
* more started to read from stdin after the last file was finished, and
|
||||
options were not parsed correctly (fix thanks to Eric Delaunay).
|
||||
* more will now use the terminal size if CONFIG_FEATURE_AUTOWIDTH is on.
|
||||
* more will now use the terminal size if BB_FEATURE_AUTOWIDTH is on.
|
||||
* rm wouldn't remove a symlink unless the symlink was valid. This was
|
||||
a side effect of the busybox 0.32 recursiveAction() fix. Things
|
||||
should now work correctly.
|
||||
@@ -1126,7 +1311,7 @@
|
||||
* Removed some debugging noise from init.c
|
||||
* Fixed ln so it works now (it was very broken).
|
||||
* Fixed df so it won't segfault when there is no /etc/fstab,
|
||||
* If CONFIG_MTAB is not defined, df and mount will whine if /etc/fstab
|
||||
* If BB_MTAB is not defined, df and mount will whine if /etc/fstab
|
||||
is not installed (since they cannot fixup "/dev/root" to
|
||||
state the real root device name)
|
||||
* merged some redundant code from mtab.c/df.c into utility.c
|
||||
@@ -1134,7 +1319,8 @@
|
||||
-Erik Andersen, Nov 5, 1999
|
||||
|
||||
0.32
|
||||
* More changes -- If you have any problems please let me know ASAP at
|
||||
* More changes -- many thanks to Lineo for paying me to work on
|
||||
busybox. If you have any problems please let me know ASAP at
|
||||
andersee@debian.org
|
||||
* usage() now prints the BusyBox version. This will help folks
|
||||
realize that they are not in Kansas anymore.
|
||||
@@ -1146,11 +1332,11 @@
|
||||
* with full regular expressions!). Fixed a stupid seg-fault in sync
|
||||
* Fixed mount -- mount -a failed to parse and apply mount options Fixed
|
||||
* umount -n (patch thanks to Matthew Grant <grantma@anathoth.gen.nz>)
|
||||
* umount -a no longer umounts /proc Added CONFIG_MTAB, allowing (at the
|
||||
* umount -a no longer umounts /proc Added BB_MTAB, allowing (at the
|
||||
* cost of ~1.5k and the need for a rw /etc)
|
||||
folks to use a real /etc/mtab file instead of a symlink to
|
||||
/proc/mounts. mount, and umount will add/remove entries and df
|
||||
will now use /etc/mtab if CONFIG_MTAB is defined.
|
||||
will now use /etc/mtab if BB_MTAB is defined.
|
||||
* Fixed a nice bug in recursiveAction() which caused it to infinitely
|
||||
hunt through /proc/../fd/* creating new file descriptors if it
|
||||
followed the /dev/fd link over to /proc. recursiveAction() now
|
||||
@@ -1177,9 +1363,10 @@
|
||||
-Erik Andersen, Oct 21, 1999
|
||||
|
||||
0.30
|
||||
Major changes -- lots of stuff rewritten. If you have any problems
|
||||
with busybox, or notice any bugs -- please let me know so I can fix
|
||||
it. These changes include:
|
||||
Major changes -- lots of stuff rewritten. Many thanks to Lineo for
|
||||
paying me to make these updates. If you have any problems with busybox,
|
||||
or notice any bugs -- please let me know so I can fix it. These
|
||||
changes include:
|
||||
|
||||
Core Changes:
|
||||
* busybox can now invoke apps in two ways: via symlinks to the
|
||||
|
||||
@@ -0,0 +1,138 @@
|
||||
2002-10-27 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* Makefile: Increment version number
|
||||
|
||||
* debian/control, debian/changelog: Update packaging info
|
||||
|
||||
2002-10-26 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* debian/Config.h-udeb:
|
||||
Don't support init being run as /linux in the debian installer
|
||||
-Erik
|
||||
|
||||
* swaponoff.c: last_patch64 from vodz:
|
||||
|
||||
The following usage from original user:
|
||||
$ ./busybox swapon -a
|
||||
Have typo problem:
|
||||
swapon: swapon: Operation not permitted
|
||||
|
||||
But regular version:
|
||||
swapon: /dev/hda5: Operation not permitted
|
||||
|
||||
Patch attached, reduced 9 bytes and advanced
|
||||
exit code also.
|
||||
|
||||
* vi.c:
|
||||
A patch from Jouni Malinen to avoid some buffer overflows in vi,
|
||||
closing bug #1270
|
||||
|
||||
* Makefile: Ivan Popov noticed that handling of PREFIX was bad.
|
||||
-Erik
|
||||
|
||||
2002-10-25 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* tftp.c: This patch from Magnus Damm fixed a long standing problem
|
||||
with freeing memory.
|
||||
|
||||
2002-10-23 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* top.c: Backport vodz' reworked top applet from unstable
|
||||
|
||||
2002-10-22 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* ash.c, ifconfig.c: Fix warnings
|
||||
|
||||
* md5sum.c: Fix undefined operation (temp = temp = <stuff>) and remove
|
||||
double definition.
|
||||
-Erik
|
||||
|
||||
* init.c: I committed the fflush in the wrong spot. I should go to bed
|
||||
earlier so I don't screw up such easy stuff.
|
||||
-Erik
|
||||
|
||||
* ash.c: Apply last_patch51_3 from vodz
|
||||
|
||||
* init.c: Be absurdly careful about flushing stdout.
|
||||
|
||||
2002-10-18 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* tests/sh.testcases: Missed a spot
|
||||
|
||||
* tests/sh.testcases: disambiguate a test
|
||||
|
||||
* lsmod.c: Fixup some needless formatting differences vs modutils
|
||||
|
||||
* hostname.c:
|
||||
Fixup slight difference in 'hostname -d' behavior vs GNU hostname
|
||||
|
||||
2002-10-12 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* init.c:
|
||||
After thinking about it, I think this patch from Matt Kraai is probably the
|
||||
best way to go. Sysvinit does not provide a controlling tty since it doesn't
|
||||
even try to open ttys for apps. We do. We we should _try_ to provide a
|
||||
controlling tty if possible, but we needn't freak out if it doesn't work. So
|
||||
we won't need to use openvt or similar, we'll just have init do the Right
|
||||
Thing(tm).
|
||||
|
||||
2002-10-08 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* docs/.cvsignore: oops
|
||||
|
||||
* docs/.cvsignore, Makefile: Remove docs/busybox.pod on 'make clean'
|
||||
|
||||
* init.c:
|
||||
Patch from Ben Gamsa <ben@somanetworks.com> to handle it when orphaned
|
||||
processes are created faster than busybox init reaps them.
|
||||
|
||||
* lsmod.c: Fix missing \n noticed by Robert Schwebel
|
||||
|
||||
* debian/Config.h-udeb: Enable pidof
|
||||
|
||||
* libbb/copy_file.c:
|
||||
Doh! It turns out I broke 'cp -a' symlink handling. Oops. This fix, from
|
||||
Tollef Fog Heen <tollef@add.no> fixes my stupid thinko so that 'cp -a' once
|
||||
again copies symlinks properly.
|
||||
|
||||
2002-09-30 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* usage.h: Fix docs
|
||||
|
||||
* lash.c:
|
||||
Use %m, not strerror (changing since strerror(err) was broken anyways)
|
||||
|
||||
* init.c: Set the close-on-exec flag, just to be safe
|
||||
|
||||
* time.c: Doh. We divide microseconds by 60?
|
||||
|
||||
2002-09-27 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* time.c: Bug fix from Nitin Gupta <gupta@equator.com>
|
||||
|
||||
2002-09-26 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* lash.c: Avoid calling exit() from within fork/vfork'ed processes.
|
||||
-Erik
|
||||
|
||||
2002-09-25 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* init.c:
|
||||
Ignoring SIGCHLD causes a race leading to the occasional hang of init
|
||||
when init will wait() on itself in waitfor() when the child exits before
|
||||
init is scheduled to run. Letting init hang is very seriously bad.
|
||||
-Erik
|
||||
|
||||
2002-09-22 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* Makefile: Fixup largefile settings.
|
||||
-Erik
|
||||
|
||||
2002-09-20 Erik Andersen <andersen@dillweed>
|
||||
|
||||
* gunzip.c: Doh! As noted by K.-P. Kirchdörfer" <kapeka@epost.de>,
|
||||
gunzip -c deletes the source source file! This fixes it.
|
||||
-Erik
|
||||
|
||||
* top.c: Don't leak FILEs
|
||||
|
||||
@@ -0,0 +1,494 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
// This file defines the feature set to be compiled into busybox.
|
||||
// When you turn things off here, they won't be compiled in at all.
|
||||
//
|
||||
//// This file is parsed by sed. You MUST use single line comments.
|
||||
// i.e., //#define BB_BLAH
|
||||
//
|
||||
//
|
||||
// BusyBox Applications
|
||||
//#define BB_ADJTIMEX
|
||||
//#define BB_AR
|
||||
#define BB_ASH
|
||||
#define BB_BASENAME
|
||||
#define BB_CAT
|
||||
#define BB_CHGRP
|
||||
#define BB_CHMOD
|
||||
#define BB_CHOWN
|
||||
#define BB_CHROOT
|
||||
#define BB_CHVT
|
||||
#define BB_CLEAR
|
||||
//#define BB_CMP
|
||||
#define BB_CP
|
||||
//#define BB_CPIO
|
||||
#define BB_CUT
|
||||
#define BB_DATE
|
||||
//#define BB_DC
|
||||
#define BB_DD
|
||||
//#define BB_DEALLOCVT
|
||||
#define BB_DF
|
||||
#define BB_DIRNAME
|
||||
#define BB_DMESG
|
||||
//#define BB_DOS2UNIX
|
||||
//#define BB_DPKG
|
||||
//#define BB_DPKG_DEB
|
||||
//#define BB_DUTMP
|
||||
#define BB_DU
|
||||
//#define BB_DUMPKMAP
|
||||
#define BB_ECHO
|
||||
#define BB_ENV
|
||||
//#define BB_EXPR
|
||||
//#define BB_FBSET
|
||||
//#define BB_FDFLUSH
|
||||
#define BB_FIND
|
||||
#define BB_FREE
|
||||
//#define BB_FREERAMDISK
|
||||
//#define BB_FSCK_MINIX
|
||||
//#define BB_GETOPT
|
||||
#define BB_GREP
|
||||
#define BB_GUNZIP
|
||||
#define BB_GZIP
|
||||
#define BB_HALT
|
||||
#define BB_HEAD
|
||||
//#define BB_HOSTID
|
||||
//#define BB_HOSTNAME
|
||||
//#define BB_HUSH
|
||||
#define BB_ID
|
||||
//#define BB_IFCONFIG
|
||||
#define BB_INIT
|
||||
//#define BB_INSMOD
|
||||
#define BB_KILL
|
||||
#define BB_KILLALL
|
||||
#define BB_KLOGD
|
||||
//#define BB_LASH
|
||||
//#define BB_LENGTH
|
||||
#define BB_LN
|
||||
//#define BB_LOADACM
|
||||
//#define BB_LOADFONT
|
||||
//#define BB_LOADKMAP
|
||||
#define BB_LOGGER
|
||||
//#define BB_LOGNAME
|
||||
//#define BB_LOSETUP
|
||||
#define BB_LS
|
||||
#define BB_LSMOD
|
||||
//#define BB_MAKEDEVS
|
||||
//#define BB_MD5SUM
|
||||
#define BB_MKDIR
|
||||
//#define BB_MKFIFO
|
||||
//#define BB_MKFS_MINIX
|
||||
#define BB_MKNOD
|
||||
#define BB_MKSWAP
|
||||
//#define BB_MKTEMP
|
||||
#define BB_MODPROBE
|
||||
#define BB_MORE
|
||||
#define BB_MOUNT
|
||||
//#define BB_MSH
|
||||
//#define BB_MT
|
||||
#define BB_MV
|
||||
//#define BB_NC
|
||||
//#define BB_NSLOOKUP
|
||||
#define BB_PIDOF
|
||||
//#define BB_PING
|
||||
//#define BB_PIVOT_ROOT
|
||||
#define BB_POWEROFF
|
||||
//#define BB_PRINTF
|
||||
#define BB_PS
|
||||
#define BB_PWD
|
||||
//#define BB_RDATE
|
||||
//#define BB_READLINK
|
||||
#define BB_REBOOT
|
||||
//#define BB_RENICE
|
||||
#define BB_RESET
|
||||
#define BB_RM
|
||||
#define BB_RMDIR
|
||||
//#define BB_RMMOD
|
||||
//#define BB_ROUTE
|
||||
//#define BB_RPM2CPIO
|
||||
#define BB_SED
|
||||
//#define BB_SETKEYCODES
|
||||
#define BB_SLEEP
|
||||
#define BB_SORT
|
||||
//#define BB_STTY
|
||||
#define BB_SWAPONOFF
|
||||
#define BB_SYNC
|
||||
#define BB_SYSLOGD
|
||||
#define BB_TAIL
|
||||
#define BB_TAR
|
||||
//#define BB_TEE
|
||||
//#define BB_TEST
|
||||
//#define BB_TELNET
|
||||
//#define BB_TFTP
|
||||
//#define BB_TIME
|
||||
//#define BB_TOP
|
||||
#define BB_TOUCH
|
||||
//#define BB_TR
|
||||
//#define BB_TRACEROUTE
|
||||
#define BB_TRUE_FALSE
|
||||
#define BB_TTY
|
||||
//#define BB_UNIX2DOS
|
||||
//#define BB_UUENCODE
|
||||
//#define BB_UUDECODE
|
||||
#define BB_UMOUNT
|
||||
#define BB_UNIQ
|
||||
#define BB_UNAME
|
||||
//#define BB_UPDATE
|
||||
#define BB_UPTIME
|
||||
//#define BB_USLEEP
|
||||
//#define BB_VI
|
||||
//#define BB_WATCHDOG
|
||||
#define BB_WC
|
||||
//#define BB_WGET
|
||||
#define BB_WHICH
|
||||
#define BB_WHOAMI
|
||||
#define BB_XARGS
|
||||
#define BB_YES
|
||||
// End of Applications List
|
||||
//
|
||||
//
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
// This is where feature definitions go. Generally speaking,
|
||||
// turning this stuff off makes things a bit smaller (and less
|
||||
// pretty/useful).
|
||||
//
|
||||
//
|
||||
// If you enabled one or more of the shells, you may select which one
|
||||
// should be run when sh is invoked:
|
||||
#define BB_FEATURE_SH_IS_ASH
|
||||
//#define BB_FEATURE_SH_IS_HUSH
|
||||
//#define BB_FEATURE_SH_IS_LASH
|
||||
//#define BB_FEATURE_SH_IS_MSH
|
||||
//
|
||||
// BusyBox will, by default, malloc space for its buffers. This costs code
|
||||
// size for the call to xmalloc. You can use the following feature to have
|
||||
// them put on the stack. For some very small machines with limited stack
|
||||
// space, this can be deadly. For most folks, this works just fine...
|
||||
//#define BB_FEATURE_BUFFERS_GO_ON_STACK
|
||||
// The third alternative for buffer allocation is to use BSS. This works
|
||||
// beautifully for computers with a real MMU (and OS support), but wastes
|
||||
// runtime RAM for uCLinux. This behavior was the only one available for
|
||||
// BusyBox versions 0.48 and earlier.
|
||||
//#define BB_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//
|
||||
// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
|
||||
// thereby eliminating the need for the /proc filesystem and thereby saving
|
||||
// lots and lots memory for more important things. NOTE: If you enable this
|
||||
// feature, you _must_ have patched the kernel to include the devps patch that
|
||||
// is included in the busybox/kernel-patches directory. You will also need to
|
||||
// create some device special files in /dev on your embedded system:
|
||||
// mknod /dev/mtab c 10 22
|
||||
// mknod /dev/ps c 10 21
|
||||
// I emailed Linus and this patch will not be going into the stock kernel.
|
||||
//#define BB_FEATURE_USE_DEVPS_PATCH
|
||||
//
|
||||
// show verbose usage messages
|
||||
#define BB_FEATURE_VERBOSE_USAGE
|
||||
//
|
||||
// Use termios to manipulate the screen ('more' is prettier with this on)
|
||||
//#define BB_FEATURE_USE_TERMIOS
|
||||
//
|
||||
// calculate terminal & column widths (for more, ls, and telnet)
|
||||
#define BB_FEATURE_AUTOWIDTH
|
||||
//
|
||||
// show username/groupnames for ls
|
||||
#define BB_FEATURE_LS_USERNAME
|
||||
//
|
||||
// show file timestamps in ls
|
||||
#define BB_FEATURE_LS_TIMESTAMPS
|
||||
//
|
||||
// enable ls -p and -F
|
||||
#define BB_FEATURE_LS_FILETYPES
|
||||
//
|
||||
// sort the file names
|
||||
#define BB_FEATURE_LS_SORTFILES
|
||||
//
|
||||
// enable ls -R
|
||||
#define BB_FEATURE_LS_RECURSIVE
|
||||
//
|
||||
// enable ls -L
|
||||
#define BB_FEATURE_LS_FOLLOWLINKS
|
||||
//
|
||||
// Use color to identify different file types
|
||||
#define BB_FEATURE_LS_COLOR
|
||||
//
|
||||
// Disable for a smaller (but less functional) ping
|
||||
#define BB_FEATURE_FANCY_PING
|
||||
//
|
||||
// Make init use a simplified /etc/inittab file (recommended).
|
||||
#define BB_FEATURE_USE_INITTAB
|
||||
//
|
||||
//Enable init being called as /linuxrc
|
||||
#define BB_FEATURE_LINUXRC
|
||||
//
|
||||
//Have init enable core dumping for child processes (for debugging only)
|
||||
//#define BB_FEATURE_INIT_COREDUMPS
|
||||
//
|
||||
//Make sure nothing is printed to the console on boot
|
||||
//#define BB_FEATURE_EXTRA_QUIET
|
||||
//
|
||||
// enable syslogd -R remotehost
|
||||
#define BB_FEATURE_REMOTE_LOG
|
||||
//
|
||||
// enable syslogd -C
|
||||
//#define BB_FEATURE_IPC_SYSLOG
|
||||
//
|
||||
//Disable for a simple tail implementation (2.34k vs 3k for the full one).
|
||||
//Both provide 'tail -f', but this cuts out -c, -q, -s, and -v.
|
||||
#define BB_FEATURE_FANCY_TAIL
|
||||
//
|
||||
// Enable support for loop devices in mount
|
||||
#define BB_FEATURE_MOUNT_LOOP
|
||||
//
|
||||
// Enable support for a real /etc/mtab file instead of /proc/mounts
|
||||
//#define BB_FEATURE_MTAB_SUPPORT
|
||||
//
|
||||
// Enable support for mounting remote NFS volumes.
|
||||
// You may need to mount with "-o nolock" if you are
|
||||
// not running a local portmapper daemon...
|
||||
//
|
||||
// If you are using uClibc, be sure that you've already compiled
|
||||
// uClibc with INCLUDE_RPC=true (contained in the Config file)
|
||||
//#define BB_FEATURE_NFSMOUNT
|
||||
//
|
||||
// Enable support forced filesystem unmounting
|
||||
// (i.e., in case of an unreachable NFS system).
|
||||
#define BB_FEATURE_MOUNT_FORCE
|
||||
//
|
||||
// Enable support for creation of tar files.
|
||||
#define BB_FEATURE_TAR_CREATE
|
||||
//
|
||||
// Enable support for "--exclude" and "-X" for excluding files
|
||||
#define BB_FEATURE_TAR_EXCLUDE
|
||||
//
|
||||
// Enable support for tar -z option (currently only works for inflating)
|
||||
#define BB_FEATURE_TAR_GZIP
|
||||
//
|
||||
// Enable reverse sort
|
||||
#define BB_FEATURE_SORT_REVERSE
|
||||
//
|
||||
// Enable uniqe sort
|
||||
#define BB_FEATURE_SORT_UNIQUE
|
||||
//
|
||||
// Enable command line editing in the shell.
|
||||
// Only relevant if a shell is enabled. On by default.
|
||||
#define BB_FEATURE_COMMAND_EDITING
|
||||
//
|
||||
// Enable tab completion in the shell. This is now working quite nicely.
|
||||
// This feature adds a bit over 4k. Only relevant if a shell is enabled.
|
||||
#define BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
//
|
||||
// Attempts to match usernames in a ~-prefixed path
|
||||
//#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//
|
||||
//Allow the shell to invoke all the compiled in BusyBox applets as if they
|
||||
//were shell builtins. Nice for staticly linking an emergency rescue shell,
|
||||
//among other things. Off by default.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define BB_FEATURE_SH_STANDALONE_SHELL
|
||||
//
|
||||
//When this is enabled, busybox shell applets can be called using full path
|
||||
//names. This causes applets (i.e., most busybox commands) to override
|
||||
//real commands on the filesystem. For example, if you run run /bin/cat, it
|
||||
//will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
|
||||
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
||||
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
// Only relevant if a shell is enabled. Off by default.
|
||||
//#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//
|
||||
// Uncomment this option for a fancy shell prompt that includes the
|
||||
// current username and hostname. On systems that don't have usernames
|
||||
// or hostnames, this can look hideous.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define BB_FEATURE_SH_FANCY_PROMPT
|
||||
//
|
||||
// Uncomment this option to disable job control. Job control lets you
|
||||
// run jobs in the background (which completely useless for is all you
|
||||
// are doing is running scripts). Disabing this is bad for interactive
|
||||
// use, since when you hit ^C in an application, it will also kill the
|
||||
// shell. This adds about 2.5k on an x86 system.
|
||||
#define BB_FEATURE_ASH_JOB_CONTROL
|
||||
//
|
||||
//Turn on extra fbset options
|
||||
//#define BB_FEATURE_FBSET_FANCY
|
||||
//
|
||||
//Turn on fbset readmode support
|
||||
//#define BB_FEATURE_FBSET_READMODE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for post 2.1 kernels
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for pre 2.1 kernels
|
||||
//#define BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
//
|
||||
// Support module version checking
|
||||
//#define BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//
|
||||
// Support for uClinux memory usage optimization, which will load the image
|
||||
// directly into the kernel memory. This divides memory requrements by three.
|
||||
// If you are not running uClinux (i.e., your CPU has an MMU) leave this
|
||||
// disabled...
|
||||
//#define BB_FEATURE_INSMOD_LOADINKMEM
|
||||
//
|
||||
// Support for Minix filesystem, version 2
|
||||
//#define BB_FEATURE_MINIX2
|
||||
//
|
||||
// Enable ifconfig status reporting output -- this feature adds 7k.
|
||||
//#define BB_FEATURE_IFCONFIG_STATUS
|
||||
//
|
||||
// Enable ifconfig slip-specific options "keepalive" and "outfill"
|
||||
//#define BB_FEATURE_IFCONFIG_SLIP
|
||||
//
|
||||
// Enable ifconfig options "mem_start", "io_addr", and "irq".
|
||||
//#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
//
|
||||
// Enable ifconfig option "hw". Currently works for only with "ether".
|
||||
//#define BB_FEATURE_IFCONFIG_HW
|
||||
//
|
||||
// Allows "broadcast +" to set broadcast automatically based on hostaddr
|
||||
// and netmask, at a cost of about 100 bytes of code (i386).
|
||||
//#define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
//
|
||||
// Enable busybox --install [-s]
|
||||
// to create links (or symlinks) for all the commands that are
|
||||
// compiled into the binary. (needs /proc filesystem)
|
||||
//#define BB_FEATURE_INSTALLER
|
||||
//
|
||||
// Enable a nifty progress meter in wget (adds just under 2k)
|
||||
#define BB_FEATURE_WGET_STATUSBAR
|
||||
//
|
||||
// Enable HTTP authentication in wget
|
||||
#define BB_FEATURE_WGET_AUTHENTICATION
|
||||
//
|
||||
// Clean up all memory before exiting -- usually not needed
|
||||
// as the OS can clean up... Don't enable this unless you
|
||||
// have a really good reason for cleaning things up manually.
|
||||
//#define BB_FEATURE_CLEAN_UP
|
||||
//
|
||||
// Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
|
||||
#define BB_FEATURE_HUMAN_READABLE
|
||||
//
|
||||
// Support for the find -type option.
|
||||
#define BB_FEATURE_FIND_TYPE
|
||||
//
|
||||
// Support for the find -perm option.
|
||||
#define BB_FEATURE_FIND_PERM
|
||||
//
|
||||
// Support for the find -mtime option.
|
||||
#define BB_FEATURE_FIND_MTIME
|
||||
//
|
||||
//// Support for the find -newer option.
|
||||
#define BB_FEATURE_FIND_NEWER
|
||||
//
|
||||
// Support for the -A -B and -C context flags in grep
|
||||
//#define BB_FEATURE_GREP_CONTEXT
|
||||
//
|
||||
// Support for the EGREP applet (alias to the grep applet)
|
||||
//#define BB_FEATURE_GREP_EGREP_ALIAS
|
||||
//
|
||||
// Tell tftp what commands that should be supported.
|
||||
#define BB_FEATURE_TFTP_PUT
|
||||
#define BB_FEATURE_TFTP_GET
|
||||
//
|
||||
// features for vi
|
||||
#define BB_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define BB_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define BB_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define BB_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define BB_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define BB_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define BB_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define BB_FEATURE_VI_SET // :set
|
||||
#define BB_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
//
|
||||
// Enable a if you system have setuped locale
|
||||
//#define BB_LOCALE_SUPPORT
|
||||
//
|
||||
// Support for TELNET to pass TERM type to remote host. Adds 384 bytes.
|
||||
#define BB_FEATURE_TELNET_TTYPE
|
||||
//
|
||||
// Support for devfs.
|
||||
//#define BB_FEATURE_DEVFS
|
||||
//
|
||||
// End of Features List
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
//---------------------------------------------------
|
||||
// Nothing beyond this point should ever be touched by
|
||||
// mere mortals so leave this stuff alone.
|
||||
//
|
||||
#include <features.h>
|
||||
#if defined(__uClinux__)
|
||||
#undef BB_ASH /* Not even a chance it will work */
|
||||
#undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef BB_UPDATE /* Uses daemon() */
|
||||
#endif
|
||||
#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
|
||||
#if defined BB_FEATURE_COMMAND_EDITING
|
||||
#define BB_CMDEDIT
|
||||
#else
|
||||
#undef BB_FEATURE_COMMAND_EDITING
|
||||
#undef BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
#else
|
||||
#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef BB_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
//
|
||||
#if (defined BB_ASH || defined BB_HUSH || defined BB_MSH) && ! defined BB_TEST
|
||||
#define BB_TEST
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_KILLALL
|
||||
#ifndef BB_KILL
|
||||
#define BB_KILL
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifndef BB_INIT
|
||||
#undef BB_FEATURE_LINUXRC
|
||||
#endif
|
||||
//
|
||||
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
|
||||
#define BB_NFSMOUNT
|
||||
#endif
|
||||
//
|
||||
#if defined BB_FEATURE_AUTOWIDTH
|
||||
#ifndef BB_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined BB_INSMOD || defined BB_LSMOD
|
||||
#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_UNIX2DOS
|
||||
#define BB_DOS2UNIX
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_SYSLOGD
|
||||
#if defined BB_FEATURE_IPC_SYSLOG
|
||||
#define BB_LOGREAD
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
|
||||
# define shell_main ash_main
|
||||
#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
|
||||
# define shell_main hush_main
|
||||
#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
|
||||
# define shell_main lash_main
|
||||
#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
|
||||
# define shell_main msh_main
|
||||
#endif
|
||||
@@ -1,13 +1,8 @@
|
||||
1) Run 'make config' or 'make menuconfig' and select the
|
||||
functionality that you wish to enable.
|
||||
1) Check Config.h and adjust if you need a different functionality than
|
||||
defined by default.
|
||||
|
||||
2) make dep
|
||||
2) Check the Makefile
|
||||
|
||||
3) Check the Makefile for any Makefile setting you wish
|
||||
to adjust for your system (things like like setting
|
||||
your cross compiler, adjusting optimizations, etc)
|
||||
3) make
|
||||
|
||||
4) make
|
||||
|
||||
5) Run 'make install' or 'make PREFIX=/target install' to
|
||||
install busybox and all the needed links.
|
||||
4) make install
|
||||
@@ -17,61 +17,318 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TOPDIR:= $(shell /bin/pwd)/
|
||||
include $(TOPDIR).config
|
||||
include $(TOPDIR)Rules.mak
|
||||
SUBDIRS:=applets archival archival/libunarchive console-tools \
|
||||
editors fileutils findutils init miscutils modutils networking \
|
||||
procps pwd_grp pwd_grp/libpwd_grp shell shellutils sysklogd \
|
||||
textutils util-linux libbb
|
||||
PROG := busybox
|
||||
VERSION := 0.60.5
|
||||
BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
|
||||
export VERSION
|
||||
|
||||
all: do-it-all
|
||||
# With a modern GNU make(1) (highly recommended, that's what all the
|
||||
# developers use), all of the following configuration values can be
|
||||
# overridden at the command line. For example:
|
||||
# make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app
|
||||
|
||||
# If you want to add some simple compiler switches (like -march=i686),
|
||||
# especially from the command line, use this instead of CFLAGS directly.
|
||||
# For optimization overrides, it's better still to set OPTIMIZATION.
|
||||
CFLAGS_EXTRA =
|
||||
|
||||
# If you want a static binary, turn this on.
|
||||
DOSTATIC = false
|
||||
|
||||
# Set the following to `true' to make a debuggable build.
|
||||
# Leave this set to `false' for production use.
|
||||
DODEBUG = false
|
||||
|
||||
# If you enable this option, busybox will use the system's password
|
||||
# and group functions. And if you are using the GNU C library
|
||||
# (glibc), you will then need to install the /etc/nsswitch.conf
|
||||
# configuration file and the required /lib/libnss_* libraries in
|
||||
# order for the password and group functions to work. This generally
|
||||
# makes your embedded system quite a bit larger.
|
||||
# Disabling this option will cause busybox to directly access the
|
||||
# system's /etc/password, /etc/group files (and your system will be
|
||||
# smaller, and I will get fewer emails asking about how glibc NSS
|
||||
# works). When this option is disabled, you will not be able to use
|
||||
# PAM to access remote LDAP password servers and whatnot. And if you
|
||||
# want hostname resolution to work with glibc, you still need the
|
||||
# /lib/libnss_* libraries.
|
||||
# If you disable this option, it will add about 1.5k to busybox.
|
||||
USE_SYSTEM_PWD_GRP = true
|
||||
|
||||
# This enables compiling with dmalloc ( http://dmalloc.com/ )
|
||||
# which is an excellent public domain mem leak and malloc problem
|
||||
# detector. To enable dmalloc, before running busybox you will
|
||||
# want to first set up your environment.
|
||||
# eg: `export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile`
|
||||
# The debug= value is generated using the following command
|
||||
# dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \
|
||||
# -p check-fence -p check-heap -p check-lists -p check-blank \
|
||||
# -p check-funcs -p realloc-copy -p allow-free-null
|
||||
# Do not enable this for production builds...
|
||||
DODMALLOC = false
|
||||
|
||||
# Electric-fence is another very useful malloc debugging library.
|
||||
# Do not enable this for production builds...
|
||||
DOEFENCE = false
|
||||
|
||||
# If you want large file summit support, turn this on.
|
||||
# This has no effect if you don't have a kernel with lfs
|
||||
# support, and a system with libc-2.1.3 or later.
|
||||
# Some of the programs that can benefit from lfs support
|
||||
# are dd, gzip, mount, tar, and mkfs_minix.
|
||||
# LFS allows you to use the above programs for files
|
||||
# larger than 2GB!
|
||||
DOLFS = false
|
||||
|
||||
# If you have a "pristine" source directory, point BB_SRC_DIR to it.
|
||||
# Experimental and incomplete; tell the mailing list
|
||||
# <busybox@busybox.net> if you do or don't like it so far.
|
||||
BB_SRC_DIR =
|
||||
|
||||
# If you are running a cross compiler, you may want to set this
|
||||
# to something more interesting, like "powerpc-linux-".
|
||||
CROSS =
|
||||
CC = $(CROSS)gcc
|
||||
AR = $(CROSS)ar
|
||||
STRIP = $(CROSS)strip
|
||||
|
||||
# To compile vs uClibc, just use the compiler wrapper built by uClibc...
|
||||
# Everything should compile and work as expected these days...
|
||||
#CC=/usr/i386-linux-uclibc/bin/i386-uclibc-gcc
|
||||
|
||||
# To compile vs some other alternative libc, you may need to use/adjust
|
||||
# the following lines to meet your needs...
|
||||
#
|
||||
# Make "config" the default target if there is no configuration file or
|
||||
# "depend" the target if there is no top-level dependency information.
|
||||
ifeq (.config,$(wildcard .config))
|
||||
include .config
|
||||
ifeq (.depend,$(wildcard .depend))
|
||||
include .depend
|
||||
do-it-all: busybox busybox.links #doc
|
||||
include $(patsubst %,%/Makefile.in, $(SUBDIRS))
|
||||
else
|
||||
CONFIGURATION = depend
|
||||
do-it-all: depend
|
||||
# If you are using Red Hat 6.x with the compatible RPMs (for developing under
|
||||
# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about
|
||||
# using the compatible RPMs (compat-*) at http://www.redhat.com !
|
||||
#LIBCDIR=/usr/i386-glibc20-linux
|
||||
#
|
||||
# The following is used for libc5 (if you install altgcc and libc5-altdev
|
||||
# on a Debian system).
|
||||
#LIBCDIR=/usr/i486-linuxlibc1
|
||||
#
|
||||
# For other libraries, you are on your own...
|
||||
#LDFLAGS+=-nostdlib
|
||||
#LIBRARIES = $(LIBCDIR)/lib/libc.a -lgcc
|
||||
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
|
||||
#GCCINCDIR = $(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
|
||||
|
||||
WARNINGS = -Wall -Wshadow
|
||||
|
||||
ARFLAGS = -r
|
||||
|
||||
|
||||
TARGET_ARCH:=${shell $(CC) -dumpmachine | sed -e s'/-.*//' \
|
||||
-e 's/i.86/i386/' \
|
||||
-e 's/sparc.*/sparc/' \
|
||||
-e 's/arm.*/arm/g' \
|
||||
-e 's/m68k.*/m68k/' \
|
||||
-e 's/ppc/powerpc/g' \
|
||||
-e 's/v850.*/v850/g' \
|
||||
-e 's/sh[234]/sh/' \
|
||||
-e 's/mips.*/mips/' \
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Arch specific compiler optimization stuff should go here.
|
||||
# Unless you want to override the defaults, do not set anything
|
||||
# for OPTIMIZATION...
|
||||
|
||||
# use '-Os' optimization if available, else use -O2
|
||||
OPTIMIZATION := ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
|
||||
then echo "-Os"; else echo "-O2" ; fi}
|
||||
|
||||
# Some nice architecture specific optimizations
|
||||
ifeq ($(strip $(TARGET_ARCH)),arm)
|
||||
OPTIMIZATION+=-fstrict-aliasing
|
||||
endif
|
||||
ifeq ($(strip $(TARGET_ARCH)),i386)
|
||||
OPTIMIZATION+=-march=i386
|
||||
OPTIMIZATION+=${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc \
|
||||
/dev/null >/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; fi}
|
||||
OPTIMIZATION+=${shell if $(CC) -falign-functions=1 -falign-jumps=0 -falign-loops=0 \
|
||||
-S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo \
|
||||
"-falign-functions=1 -falign-jumps=0 -falign-loops=0"; else \
|
||||
if $(CC) -malign-functions=0 -malign-jumps=0 -S -o /dev/null -xc \
|
||||
/dev/null >/dev/null 2>&1; then echo "-malign-functions=0 -malign-jumps=0"; fi; fi}
|
||||
endif
|
||||
OPTIMIZATIONS:=$(OPTIMIZATION) -fomit-frame-pointer
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# If you're going to do a lot of builds with a non-vanilla configuration,
|
||||
# it makes sense to adjust parameters above, so you can type "make"
|
||||
# by itself, instead of following it by the same half-dozen overrides
|
||||
# every time. The stuff below, on the other hand, is probably less
|
||||
# prone to casual user adjustment.
|
||||
#
|
||||
ifeq ($(strip $(DOLFS)),true)
|
||||
# For large file support
|
||||
CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
|
||||
endif
|
||||
ifeq ($(strip $(DODMALLOC)),true)
|
||||
# For testing mem leaks with dmalloc
|
||||
CFLAGS+=-DDMALLOC
|
||||
LIBRARIES = -ldmalloc
|
||||
# Force debug=true, since this is useless when not debugging...
|
||||
DODEBUG = true
|
||||
else
|
||||
CONFIGURATION = menuconfig
|
||||
do-it-all: menuconfig
|
||||
ifeq ($(strip $(DOEFENCE)),true)
|
||||
LIBRARIES = -lefence
|
||||
# Force debug=true, since this is useless when not debugging...
|
||||
DODEBUG = true
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(DODEBUG)),true)
|
||||
CFLAGS += $(WARNINGS) -g -D_GNU_SOURCE
|
||||
LDFLAGS += -Wl,-warn-common
|
||||
STRIPCMD = /bin/true -Since_we_are_debugging
|
||||
else
|
||||
CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE
|
||||
LDFLAGS += -s -Wl,-warn-common
|
||||
STRIPCMD = $(STRIP) -s --remove-section=.note --remove-section=.comment
|
||||
endif
|
||||
ifeq ($(strip $(DOSTATIC)),true)
|
||||
LDFLAGS += --static
|
||||
#
|
||||
#use '-ffunction-sections -fdata-sections' and '--gc-sections' (if they
|
||||
# work) to try and strip out any unused junk. Doesn't do much for me,
|
||||
# but you may want to give it a shot...
|
||||
#
|
||||
#ifeq ($(shell $(CC) -ffunction-sections -fdata-sections -S \
|
||||
# -o /dev/null -xc /dev/null 2>/dev/null && $(LD) \
|
||||
# --gc-sections -v >/dev/null && echo 1),1)
|
||||
# CFLAGS += -ffunction-sections -fdata-sections
|
||||
# LDFLAGS += --gc-sections
|
||||
#endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(PREFIX)),)
|
||||
PREFIX = `pwd`/_install
|
||||
endif
|
||||
|
||||
busybox: depend $(libraries-y)
|
||||
$(CC) $(LDFLAGS) $(libraries-y) $(LIBRARIES) -o $@
|
||||
$(STRIPCMD) $@
|
||||
# Additional complications due to support for pristine source dir.
|
||||
# Include files in the build directory should take precedence over
|
||||
# the copy in BB_SRC_DIR, both during the compilation phase and the
|
||||
# shell script that finds the list of object files.
|
||||
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
||||
#
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
VPATH = $(BB_SRC_DIR)
|
||||
endif
|
||||
#ifneq ($(strip $(VPATH)),)
|
||||
# CFLAGS += -I- -I. $(patsubst %,-I%,$(subst :, ,$(VPATH)))
|
||||
#endif
|
||||
|
||||
busybox.links: applets/busybox.mkll
|
||||
- $(SHELL) $^ >$@
|
||||
# We need to set APPLET_SOURCES to something like
|
||||
# $(shell busybox.sh Config.h)
|
||||
# but in a manner that works with VPATH and BB_SRC_DIR.
|
||||
# Possible ways to approach this:
|
||||
#
|
||||
# 1. Explicitly search through .:$(VPATH) for busybox.sh and config.h,
|
||||
# then $(shell $(BUSYBOX_SH) $(CONFIG_H) $(BB_SRC_DIR))
|
||||
#
|
||||
# 2. Explicity search through .:$(VPATH) for slist.mk,
|
||||
# then $(shell $(MAKE) -f $(SLIST_MK) VPATH=$(VPATH) BB_SRC_DIR=$(BB_SRC_DIR))
|
||||
#
|
||||
# 3. Create slist.mk in this directory, with commands embedded in
|
||||
# a $(shell ...) command, and $(MAKE) it immediately.
|
||||
#
|
||||
# 4. Use a real rule within this makefile to create a file that sets
|
||||
# APPLET_SOURCE_LIST, then include that file. Has complications
|
||||
# with the first trip through the makefile (before processing the
|
||||
# include) trying to do too much, and a spurious warning the first
|
||||
# time make is run.
|
||||
#
|
||||
# This is option 3:
|
||||
#
|
||||
#APPLET_SOURCES = $(shell \
|
||||
# echo -e 'all: busybox.sh Config.h\n\t@ $$(SHELL) $$^ $$(BB_SRC_DIR)' >slist.mk; \
|
||||
# make -f slist.mk VPATH=$(VPATH) BB_SRC_DIR=$(BB_SRC_DIR) \
|
||||
#)
|
||||
# And option 4:
|
||||
-include applet_source_list
|
||||
|
||||
install: applets/install.sh busybox busybox.links
|
||||
$(SHELL) $< $(PREFIX)
|
||||
OBJECTS = $(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o
|
||||
CFLAGS += $(CROSS_CFLAGS)
|
||||
CFLAGS += -DBB_VER='"$(VERSION)"'
|
||||
CFLAGS += -DBB_BT='"$(BUILDTIME)"'
|
||||
ifdef BB_INIT_SCRIPT
|
||||
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
|
||||
endif
|
||||
|
||||
uninstall: busybox busybox.links
|
||||
for i in `cat busybox.links` ; do rm -f $$PREFIX$$i; done
|
||||
ifneq ($(strip $(USE_SYSTEM_PWD_GRP)),true)
|
||||
PWD_GRP = pwd_grp
|
||||
PWD_GRP_DIR = $(BB_SRC_DIR:=/)$(PWD_GRP)
|
||||
PWD_LIB = libpwd.a
|
||||
PWD_CSRC=__getpwent.c pwent.c getpwnam.c getpwuid.c putpwent.c getpw.c \
|
||||
fgetpwent.c __getgrent.c grent.c getgrnam.c getgrgid.c fgetgrent.c \
|
||||
initgroups.c setgroups.c
|
||||
PWD_OBJS=$(patsubst %.c,$(PWD_GRP)/%.o, $(PWD_CSRC))
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
PWD_CFLAGS = -I- -I.
|
||||
endif
|
||||
PWD_CFLAGS += -I$(PWD_GRP_DIR)
|
||||
else
|
||||
CFLAGS += -DUSE_SYSTEM_PWD_GRP
|
||||
endif
|
||||
|
||||
LIBBB = libbb
|
||||
LIBBB_LIB = libbb.a
|
||||
LIBBB_CSRC= ask_confirmation.c chomp.c concat_path_file.c copy_file.c \
|
||||
copy_file_chunk.c libc5.c device_open.c error_msg.c inode_hash.c \
|
||||
error_msg_and_die.c fgets_str.c find_mount_point.c find_pid_by_name.c \
|
||||
find_root_device.c full_read.c full_write.c get_console.c \
|
||||
get_last_path_component.c get_line_from_file.c gz_open.c human_readable.c \
|
||||
isdirectory.c kernel_version.c loop.c mode_string.c module_syscalls.c mtab.c \
|
||||
mtab_file.c my_getgrnam.c my_getgrgid.c my_getpwnam.c my_getpwnamegid.c \
|
||||
my_getpwuid.c parse_mode.c parse_number.c perror_msg.c perror_msg_and_die.c \
|
||||
print_file.c process_escape_sequence.c read_package_field.c recursive_action.c \
|
||||
safe_read.c safe_write.c safe_strncpy.c syscalls.c syslog_msg_with_name.c time_string.c \
|
||||
trim.c unzip.c vdprintf.c verror_msg.c vperror_msg.c wfopen.c xfuncs.c \
|
||||
xgetcwd.c xreadlink.c xregcomp.c interface.c remove_file.c last_char_is.c \
|
||||
copyfd.c vherror_msg.c herror_msg.c herror_msg_and_die.c xgethostbyname.c \
|
||||
dirname.c make_directory.c create_icmp_socket.c u_signal_names.c arith.c \
|
||||
simplify_path.c
|
||||
LIBBB_OBJS=$(patsubst %.c,$(LIBBB)/%.o, $(LIBBB_CSRC))
|
||||
ifeq ($(strip $(BB_SRC_DIR)),)
|
||||
LIBBB_CFLAGS += -I$(LIBBB)
|
||||
else
|
||||
LIBBB_CFLAGS = -I- -I. -I./$(LIBBB) -I$(BB_SRC_DIR)/$(LIBBB) -I$(BB_SRC_DIR)
|
||||
endif
|
||||
|
||||
install-hardlinks: applets/install.sh busybox busybox.links
|
||||
$(SHELL) $< $(PREFIX) --hardlinks
|
||||
LIBBB_MSRC=libbb/messages.c
|
||||
LIBBB_MESSAGES= full_version name_too_long omitting_directory not_a_directory \
|
||||
memory_exhausted invalid_date invalid_option io_error dash_dash_help \
|
||||
write_error too_few_args name_longer_than_foo unknown can_not_create_raw_socket
|
||||
LIBBB_MOBJ=$(patsubst %,$(LIBBB)/%.o, $(LIBBB_MESSAGES))
|
||||
|
||||
LIBBB_ARCSRC=libbb/unarchive.c
|
||||
LIBBB_ARCOBJ= archive_offset seek_sub_file extract_archive unarchive \
|
||||
get_header_ar get_header_cpio get_header_tar deb_extract
|
||||
LIBBB_AROBJS=$(patsubst %,$(LIBBB)/%.o, $(LIBBB_ARCOBJ))
|
||||
|
||||
|
||||
# Documentation Targets
|
||||
# Put user-supplied flags at the end, where they
|
||||
# have a chance of winning.
|
||||
CFLAGS += $(CFLAGS_EXTRA)
|
||||
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
|
||||
all: applet_source_list busybox busybox.links doc
|
||||
|
||||
applet_source_list: busybox.sh Config.h
|
||||
(echo -n "APPLET_SOURCES := "; CC="$(CC)" BB_SRC_DIR="$(BB_SRC_DIR)" $(SHELL) $^) > $@
|
||||
|
||||
doc: olddoc
|
||||
|
||||
# Old Docs...
|
||||
olddoc: docs/busybox.pod docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html
|
||||
|
||||
docs/busybox.pod : docs/busybox_header.pod include/usage.h docs/busybox_footer.pod
|
||||
docs/busybox.pod : docs/busybox_header.pod usage.h docs/busybox_footer.pod
|
||||
- ( cat docs/busybox_header.pod; \
|
||||
docs/autodocifier.pl include/usage.h; \
|
||||
docs/autodocifier.pl usage.h; \
|
||||
cat docs/busybox_footer.pod ) > docs/busybox.pod
|
||||
|
||||
docs/BusyBox.txt: docs/busybox.pod
|
||||
@@ -86,15 +343,9 @@ docs/BusyBox.1: docs/busybox.pod
|
||||
- pod2man --center=BusyBox --release="version $(VERSION)" \
|
||||
$< > $@
|
||||
|
||||
docs/BusyBox.html: docs/busybox.net/BusyBox.html
|
||||
- mkdir -p docs
|
||||
-@ rm -f docs/BusyBox.html
|
||||
-@ ln -s busybox.net/BusyBox.html docs/BusyBox.html
|
||||
|
||||
docs/busybox.net/BusyBox.html: docs/busybox.pod
|
||||
-@ mkdir -p docs/busybox.net
|
||||
- pod2html --noindex $< > \
|
||||
docs/busybox.net/BusyBox.html
|
||||
docs/BusyBox.html: docs/busybox.pod
|
||||
-@ mkdir -p docs
|
||||
- pod2html --noindex $< > docs/BusyBox.html
|
||||
-@ rm -f pod2htm*
|
||||
|
||||
|
||||
@@ -122,114 +373,97 @@ docs/busybox.pdf: docs/busybox.ps
|
||||
|
||||
docs/busybox/busyboxdocumentation.html: docs/busybox.sgml
|
||||
- mkdir -p docs
|
||||
(cd docs/busybox.net; sgmltools -b html ../busybox.sgml)
|
||||
(cd docs; sgmltools -b html ../busybox.sgml)
|
||||
|
||||
|
||||
busybox: $(PWD_LIB) $(LIBBB_LIB) $(OBJECTS)
|
||||
$(CC) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBBB_LIB) $(PWD_LIB) $(LIBRARIES)
|
||||
$(STRIPCMD) $(PROG)
|
||||
|
||||
# The nifty new buildsystem stuff
|
||||
$(TOPDIR)scripts/mkdep: scripts/mkdep.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
|
||||
|
||||
$(TOPDIR)scripts/split-include: scripts/split-include.c
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
|
||||
|
||||
$(TOPDIR).depend: $(TOPDIR)scripts/mkdep
|
||||
rm -f .depend .hdepend;
|
||||
mkdir -p $(TOPDIR)include/config;
|
||||
$(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
|
||||
scripts/mkdep -I $(TOPDIR)include -- \
|
||||
`find $(TOPDIR) -name \*.c -print` >> .depend;
|
||||
scripts/mkdep -I $(TOPDIR)include -- \
|
||||
`find $(TOPDIR) -name \*.h -print` >> .hdepend;
|
||||
$(MAKE) $(patsubst %,_sfdep_%,$(SUBDIRS)) _FASTDEP_ALL_SUB_DIRS="$(SUBDIRS)" ;
|
||||
@ echo -e "\n\nNow run 'make' to build BusyBox\n\n"
|
||||
|
||||
depend dep: $(TOPDIR)include/config.h $(TOPDIR).depend
|
||||
|
||||
BB_SHELL := ${shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
else if [ -x /bin/bash ]; then echo /bin/bash; \
|
||||
else echo sh; fi ; fi}
|
||||
|
||||
include/config/MARKER: depend $(TOPDIR)scripts/split-include
|
||||
scripts/split-include include/config.h include/config
|
||||
@ touch include/config/MARKER
|
||||
|
||||
$(TOPDIR)include/config.h:
|
||||
@if [ ! -f $(TOPDIR)include/config.h ] ; then \
|
||||
make oldconfig; \
|
||||
fi;
|
||||
|
||||
$(TOPDIR).config:
|
||||
cp $(TOPDIR)sysdeps/$(TARGET_OS)/defconfig $(TOPDIR).config
|
||||
mkdir -p $(TOPDIR)include/config
|
||||
$(MAKE) -C scripts/lxdialog all
|
||||
$(BB_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in
|
||||
|
||||
menuconfig:
|
||||
mkdir -p $(TOPDIR)include/config
|
||||
$(MAKE) -C scripts/lxdialog all
|
||||
$(BB_SHELL) scripts/Menuconfig sysdeps/$(TARGET_OS)/config.in
|
||||
|
||||
config:
|
||||
mkdir -p $(TOPDIR)include/config
|
||||
$(BB_SHELL) scripts/Configure sysdeps/$(TARGET_OS)/config.in
|
||||
|
||||
oldconfig:
|
||||
mkdir -p $(TOPDIR)include/config
|
||||
$(BB_SHELL) scripts/Configure -d sysdeps/$(TARGET_OS)/config.in
|
||||
|
||||
|
||||
ifdef CONFIGURATION
|
||||
..$(CONFIGURATION):
|
||||
@echo
|
||||
@echo "You have a bad or nonexistent" .$(CONFIGURATION) ": running 'make" $(CONFIGURATION)"'"
|
||||
@echo
|
||||
$(MAKE) $(CONFIGURATION)
|
||||
@echo
|
||||
@echo "Successful. Try re-making (ignore the error that follows)"
|
||||
@echo
|
||||
exit 1
|
||||
|
||||
dummy:
|
||||
# Without VPATH, rule expands to "/bin/sh busybox.mkll Config.h applets.h"
|
||||
# but with VPATH, some or all of those file names are resolved to the
|
||||
# directories in which they live.
|
||||
busybox.links: busybox.mkll Config.h applets.h
|
||||
- $(SHELL) $^ >$@
|
||||
|
||||
nfsmount.o cmdedit.o: %.o: %.h
|
||||
ash.o hush.o lash.o msh.o: cmdedit.h
|
||||
$(OBJECTS): %.o: %.c Config.h busybox.h applets.h Makefile
|
||||
ifeq ($(strip $(BB_SRC_DIR)),)
|
||||
$(CC) $(CFLAGS) -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
|
||||
else
|
||||
|
||||
dummy:
|
||||
|
||||
$(CC) $(CFLAGS) -I- -I. $(patsubst %,-I%,$(subst :, ,$(BB_SRC_DIR))) -c $< -o $*.o
|
||||
endif
|
||||
|
||||
$(PWD_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
-mkdir -p $(PWD_GRP)
|
||||
endif
|
||||
$(CC) $(CFLAGS) $(PWD_CFLAGS) -c $< -o $*.o
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
||||
$(LIBBB_OBJS): %.o: %.c Config.h busybox.h applets.h Makefile libbb/libbb.h
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
-mkdir -p $(LIBBB)
|
||||
endif
|
||||
$(CC) $(CFLAGS) $(LIBBB_CFLAGS) -c $< -o $*.o
|
||||
|
||||
$(LIBBB_MOBJ): $(LIBBB_MSRC)
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
-mkdir -p $(LIBBB)
|
||||
endif
|
||||
$(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst libbb/%,%,$*) -c $< -o $*.o
|
||||
|
||||
$(LIBBB_AROBJS): $(LIBBB_ARCSRC)
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
-mkdir -p $(LIBBB)
|
||||
endif
|
||||
$(CC) $(CFLAGS) $(LIBBB_CFLAGS) -DL_$(patsubst libbb/%,%,$*) -c $< -o $*.o
|
||||
|
||||
libpwd.a: $(PWD_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
libbb.a: $(LIBBB_MOBJ) $(LIBBB_AROBJS) $(LIBBB_OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $^
|
||||
|
||||
usage.o: usage.h
|
||||
|
||||
libbb/loop.o: libbb/loop.h
|
||||
|
||||
libbb/loop.h: mk_loop_h.sh
|
||||
@ $(SHELL) $< > $@
|
||||
|
||||
# Testing...
|
||||
test tests:
|
||||
# old way of doing it
|
||||
#cd tests && $(MAKE) all
|
||||
# new way of doing it
|
||||
cd tests && ./tester.sh
|
||||
|
||||
# Cleanup
|
||||
clean:
|
||||
- $(MAKE) -C tests clean
|
||||
- $(MAKE) -C scripts/lxdialog clean
|
||||
- rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html \
|
||||
docs/busybox.net/BusyBox.html
|
||||
- cd tests && $(MAKE) clean
|
||||
- rm -f docs/BusyBox.txt docs/BusyBox.1 docs/BusyBox.html docs/BusyBox.html
|
||||
- rm -f docs/busybox.txt docs/busybox.dvi docs/busybox.ps \
|
||||
docs/busybox.pdf docs/busybox.net/busybox.html \
|
||||
docs/busybox _install pod2htm* *.gdb *.elf *~ core
|
||||
- rm -f busybox busybox.links libbb/loop.h .config.old .hdepend
|
||||
- rm -f scripts/split-include scripts/mkdep .*config.log
|
||||
- rm -rf include/config include/config.h
|
||||
- find -name .\*.flags -exec rm -f {} \;
|
||||
- find -name .depend -exec rm -f {} \;
|
||||
- find -name \*.o -exec rm -f {} \;
|
||||
- find -name \*.a -exec rm -f {} \;
|
||||
docs/busybox.pdf docs/busybox.html docs/busybox.pod
|
||||
- rm -f multibuild.log Config.h.orig *.gdb *.elf
|
||||
- rm -rf docs/busybox _install libpwd.a libbb.a pod2htm*
|
||||
- rm -f busybox busybox.links libbb/loop.h *~ slist.mk core applet_source_list
|
||||
- find . -name \*.o -exec rm -f {} \;
|
||||
|
||||
distclean: clean
|
||||
- rm -f busybox
|
||||
- cd tests && $(MAKE) distclean
|
||||
- rm -f busybox applet_source_list
|
||||
|
||||
install: install.sh busybox busybox.links
|
||||
$(SHELL) $< $(PREFIX)
|
||||
|
||||
uninstall: busybox busybox.links
|
||||
for i in `cat busybox.links` ; do rm -f $$PREFIX$$i; done
|
||||
|
||||
install-hardlinks: install.sh busybox busybox.links
|
||||
$(SHELL) $< $(PREFIX) --hardlinks
|
||||
|
||||
debug_pristine:
|
||||
@ echo VPATH=\"$(VPATH)\"
|
||||
@ echo OBJECTS=\"$(OBJECTS)\"
|
||||
|
||||
dist release: distclean doc
|
||||
cd ..; \
|
||||
@@ -248,13 +482,6 @@ dist release: distclean doc
|
||||
\
|
||||
tar -cvzf busybox-$(VERSION).tar.gz busybox-$(VERSION)/;
|
||||
|
||||
|
||||
|
||||
.PHONY: tags check depend
|
||||
|
||||
.PHONY: tags
|
||||
tags:
|
||||
ctags -R .
|
||||
|
||||
check: busybox
|
||||
cd testsuite && ./runtest
|
||||
|
||||
@@ -35,7 +35,7 @@ Supported architectures:
|
||||
Busybox in general will build on any architecture supported by gcc. It has
|
||||
a few specialized features added for __sparc__ and __alpha__. insmod
|
||||
functionality is currently limited to x86, ARM, SH3/4, powerpc, m68k,
|
||||
MIPS, and v850e.
|
||||
and MIPS.
|
||||
|
||||
Supported libcs:
|
||||
|
||||
@@ -123,8 +123,7 @@ understanding.
|
||||
|
||||
FTP:
|
||||
|
||||
Source for the latest released version, as well as daily snapshots, can always
|
||||
be downloaded from
|
||||
Source for the latest released version can always be downloaded from
|
||||
http://busybox.net/downloads/
|
||||
|
||||
----------------
|
||||
|
||||
@@ -1,208 +0,0 @@
|
||||
# Rules.make for busybox
|
||||
#
|
||||
# Copyright (C) 2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
PROG := busybox
|
||||
VERSION := 0.61.pre
|
||||
BUILDTIME := $(shell TZ=UTC date -u "+%Y.%m.%d-%H:%M%z")
|
||||
HOSTCC := gcc
|
||||
HOSTCFLAGS:= -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||
|
||||
|
||||
# What OS are you compiling busybox for? This allows you to include
|
||||
# OS specific things, syscall overrides, etc.
|
||||
TARGET_OS:=linux
|
||||
|
||||
# With a modern GNU make(1) (highly recommended, that's what all the
|
||||
# developers use), all of the following configuration values can be
|
||||
# overridden at the command line. For example:
|
||||
# make CROSS=powerpc-linux- BB_SRC_DIR=$HOME/busybox PREFIX=/mnt/app
|
||||
|
||||
# If you want to add some simple compiler switches (like -march=i686),
|
||||
# especially from the command line, use this instead of CFLAGS directly.
|
||||
# For optimization overrides, it's better still to set OPTIMIZATION.
|
||||
CFLAGS_EXTRA:=
|
||||
|
||||
# If you want a static binary, turn this on.
|
||||
DOSTATIC:=false
|
||||
|
||||
# Set the following to `true' to make a debuggable build.
|
||||
# Leave this set to `false' for production use.
|
||||
DODEBUG:=false
|
||||
|
||||
# This enables compiling with dmalloc ( http://dmalloc.com/ )
|
||||
# which is an excellent public domain mem leak and malloc problem
|
||||
# detector. To enable dmalloc, before running busybox you will
|
||||
# want to first set up your environment.
|
||||
# eg: `export DMALLOC_OPTIONS=debug=0x34f47d83,inter=100,log=logfile`
|
||||
# The debug= value is generated using the following command
|
||||
# dmalloc -p log-stats -p log-non-free -p log-bad-space -p log-elapsed-time \
|
||||
# -p check-fence -p check-heap -p check-lists -p check-blank \
|
||||
# -p check-funcs -p realloc-copy -p allow-free-null
|
||||
# Do not enable this for production builds...
|
||||
DODMALLOC:=false
|
||||
|
||||
# Electric-fence is another very useful malloc debugging library.
|
||||
# Do not enable this for production builds...
|
||||
DOEFENCE:=false
|
||||
|
||||
# If you want large file summit support, turn this on.
|
||||
# This has no effect if you don't have a kernel with lfs
|
||||
# support, and a system with libc-2.1.3 or later.
|
||||
# Some of the programs that can benefit from lfs support
|
||||
# are dd, gzip, mount, tar, and mkfs_minix.
|
||||
# LFS allows you to use the above programs for files
|
||||
# larger than 2GB!
|
||||
DOLFS:=false
|
||||
|
||||
# If you have a "pristine" source directory, point BB_SRC_DIR to it.
|
||||
# Experimental and incomplete; tell the mailing list
|
||||
# <busybox@busybox.net> if you do or don't like it so far.
|
||||
BB_SRC_DIR:=
|
||||
|
||||
# If you are running a cross compiler, you may want to set CROSS
|
||||
# to something more interesting, like "arm-linux-".
|
||||
CROSS:=
|
||||
CC := $(CROSS)gcc
|
||||
AR := $(CROSS)ar
|
||||
AS := $(CROSS)as
|
||||
LD := $(CROSS)ld
|
||||
NM := $(CROSS)nm
|
||||
STRIP := $(CROSS)strip
|
||||
CPP := $(CC) -E
|
||||
MAKEFILES := $(TOPDIR).config
|
||||
export VERSION BUILDTIME TOPDIR HOSTCC HOSTCFLAGS CROSS CC AR AS LD NM STRIP CPP
|
||||
|
||||
|
||||
# To compile vs uClibc, just use the compiler wrapper built by uClibc...
|
||||
# Everything should compile and work as expected these days...
|
||||
#CC:=/usr/i386-linux-uclibc/usr/bin/i386-uclibc-gcc
|
||||
|
||||
# To compile vs some other alternative libc, you may need to use/adjust
|
||||
# the following lines to meet your needs...
|
||||
#
|
||||
# If you are using Red Hat 6.x with the compatible RPMs (for developing under
|
||||
# Red Hat 5.x and glibc 2.0) uncomment the following. Be sure to read about
|
||||
# using the compatible RPMs (compat-*) at http://www.redhat.com !
|
||||
#LIBCDIR:=/usr/i386-glibc20-linux
|
||||
#
|
||||
# The following is used for libc5 (if you install altgcc and libc5-altdev
|
||||
# on a Debian system).
|
||||
#LIBCDIR:=/usr/i486-linuxlibc1
|
||||
#
|
||||
# For other libraries, you are on your own...
|
||||
#LDFLAGS+=-nostdlib
|
||||
#LIBRARIES:=$(LIBCDIR)/lib/libc.a -lgcc
|
||||
#CROSS_CFLAGS+=-nostdinc -I$(LIBCDIR)/include -I$(GCCINCDIR)
|
||||
#GCCINCDIR:=$(shell gcc -print-search-dirs | sed -ne "s/install: \(.*\)/\1include/gp")
|
||||
|
||||
# use '-Os' optimization if available, else use -O2
|
||||
OPTIMIZATION:=${shell if $(CC) -Os -S -o /dev/null -xc /dev/null \
|
||||
>/dev/null 2>&1; then echo "-Os"; else echo "-O2" ; fi}
|
||||
GCC_STACK_BOUNDRY:=${shell if $(CC) -mpreferred-stack-boundary=2 -S -o /dev/null -xc /dev/null \
|
||||
>/dev/null 2>&1; then echo "-mpreferred-stack-boundary=2"; else echo "" ; fi}
|
||||
OPTIMIZATIONS:=$(OPTIMIZATION) -fomit-frame-pointer $(GCC_STACK_BOUNDRY) #-fstrict-aliasing -march=i386 -mcpu=i386 -malign-functions=0 -malign-jumps=0
|
||||
WARNINGS:=-Wall -Wstrict-prototypes -Wshadow
|
||||
CFLAGS:=-I$(TOPDIR)include
|
||||
ARFLAGS:=-r
|
||||
|
||||
#
|
||||
#--------------------------------------------------------
|
||||
# If you're going to do a lot of builds with a non-vanilla configuration,
|
||||
# it makes sense to adjust parameters above, so you can type "make"
|
||||
# by itself, instead of following it by the same half-dozen overrides
|
||||
# every time. The stuff below, on the other hand, is probably less
|
||||
# prone to casual user adjustment.
|
||||
#
|
||||
|
||||
ifeq ($(strip $(DOLFS)),true)
|
||||
# For large file summit support
|
||||
CFLAGS+=-D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64
|
||||
endif
|
||||
ifeq ($(strip $(DODMALLOC)),true)
|
||||
# For testing mem leaks with dmalloc
|
||||
CFLAGS+=-DDMALLOC
|
||||
LIBRARIES:=-ldmalloc
|
||||
# Force debug=true, since this is useless when not debugging...
|
||||
DODEBUG:=true
|
||||
else
|
||||
ifeq ($(strip $(DOEFENCE)),true)
|
||||
LIBRARIES:=-lefence
|
||||
# Force debug=true, since this is useless when not debugging...
|
||||
DODEBUG:=true
|
||||
endif
|
||||
endif
|
||||
ifeq ($(strip $(DODEBUG)),true)
|
||||
CFLAGS +=$(WARNINGS) -g -D_GNU_SOURCE
|
||||
LDFLAGS +=-Wl,-warn-common
|
||||
STRIPCMD:=/bin/true -Not_stripping_since_we_are_debugging
|
||||
else
|
||||
CFLAGS += $(WARNINGS) $(OPTIMIZATIONS) -D_GNU_SOURCE
|
||||
LDFLAGS += -s -Wl,-warn-common
|
||||
STRIPCMD:=$(STRIP) --remove-section=.note --remove-section=.comment
|
||||
endif
|
||||
ifeq ($(strip $(DOSTATIC)),true)
|
||||
LDFLAGS += --static
|
||||
endif
|
||||
|
||||
ifndef $(PREFIX)
|
||||
PREFIX:=`pwd`/_install
|
||||
endif
|
||||
|
||||
# Additional complications due to support for pristine source dir.
|
||||
# Include files in the build directory should take precedence over
|
||||
# the copy in BB_SRC_DIR, both during the compilation phase and the
|
||||
# shell script that finds the list of object files.
|
||||
# Work in progress by <ldoolitt@recycle.lbl.gov>.
|
||||
#
|
||||
ifneq ($(strip $(BB_SRC_DIR)),)
|
||||
VPATH:=$(BB_SRC_DIR)
|
||||
endif
|
||||
|
||||
CFLAGS += -DBB_VER='"$(VERSION)"'
|
||||
CFLAGS += -DBB_BT='"$(BUILDTIME)"'
|
||||
OBJECTS:=$(APPLET_SOURCES:.c=.o) busybox.o usage.o applets.o
|
||||
CFLAGS += $(CROSS_CFLAGS)
|
||||
ifdef BB_INIT_SCRIPT
|
||||
CFLAGS += -DINIT_SCRIPT='"$(BB_INIT_SCRIPT)"'
|
||||
endif
|
||||
|
||||
# Put user-supplied flags at the end, where they
|
||||
# have a chance of winning.
|
||||
CFLAGS += $(CFLAGS_EXTRA)
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
|
||||
|
||||
ifdef _FASTDEP_ALL_SUB_DIRS
|
||||
fastdep: dummy
|
||||
$(TOPDIR)scripts/mkdep $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -- $(wildcard *.[chS]) > .depend
|
||||
ifdef ALL_SUB_DIRS
|
||||
$(MAKE) $(patsubst %,_sfdep_%,$(ALL_SUB_DIRS)) _FASTDEP_ALL_SUB_DIRS="$(ALL_SUB_DIRS)"
|
||||
endif
|
||||
|
||||
$(patsubst %,_sfdep_%,$(_FASTDEP_ALL_SUB_DIRS)):
|
||||
$(MAKE) -C $(patsubst _sfdep_%,%,$@) fastdep
|
||||
endif
|
||||
|
||||
.PHONY: dummy
|
||||
|
||||
|
||||
|
||||
.EXPORT_ALL_VARIABLES:
|
||||
|
||||
@@ -3,15 +3,14 @@ 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 I _might_ get
|
||||
around to it some time. If you have any good ideas, please let me know.
|
||||
|
||||
* login/sulogin/passwd/etc are part of tinylogin. We are in the
|
||||
process of merging these applications into busybox, since the
|
||||
new build system allows us to add Libraries (i.e. libcrypt),
|
||||
when certain applets are enabled.
|
||||
* login/sulogin/passwd/getty/etc are part of tinylogin, and so are not
|
||||
needed or wanted in busybox (or else I'd have to link to libcrypt).
|
||||
|
||||
* We _were_ going to split networking apps into a new package called
|
||||
netkit-tiny. Per discussions on the mailing list, this isn't going
|
||||
to happen. False alarm. Sorry about the confusion.
|
||||
|
||||
|
||||
-Erik
|
||||
|
||||
-----------
|
||||
@@ -20,8 +19,6 @@ Possible apps to include some time:
|
||||
|
||||
* hwclock
|
||||
* group/commonize strings, remove dups (for i18n, l10n)
|
||||
* login/sulogin/passwd/etc are part of tinylogin. These are
|
||||
being merged into busybox as time allows.
|
||||
|
||||
-----------
|
||||
|
||||
@@ -48,17 +45,8 @@ libraries such as uClibc.
|
||||
Compile with debugging on, run 'nm --size-sort ./busybox'
|
||||
and then start with the biggest things and make them smaller...
|
||||
|
||||
-----------------------
|
||||
|
||||
du.c probably ought to have an -x switch like GNU du does...
|
||||
|
||||
-----------------------
|
||||
|
||||
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 .
|
||||
@@ -21,7 +21,7 @@
|
||||
#define APPLET_ODDNAME(a,b,c,d) extern int b(int argc, char **argv);
|
||||
extern const char usage_messages[];
|
||||
#elif defined(MAKE_USAGE)
|
||||
#ifdef CONFIG_FEATURE_VERBOSE_USAGE
|
||||
#ifdef BB_FEATURE_VERBOSE_USAGE
|
||||
#define APPLET(a,b,c) a##_trivial_usage "\n\n" a##_full_usage "\0"
|
||||
#define APPLET_NOUSAGE(a,b,c) "\0"
|
||||
#define APPLET_ODDNAME(a,b,c,d) d##_trivial_usage "\n\n" d##_full_usage "\0"
|
||||
@@ -43,482 +43,440 @@
|
||||
|
||||
|
||||
|
||||
#ifdef CONFIG_TEST
|
||||
#ifdef BB_TEST
|
||||
APPLET_NOUSAGE("[", test_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ADDGROUP
|
||||
APPLET(addgroup, addgroup_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ADDUSER
|
||||
APPLET(adduser, adduser_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ADJTIMEX
|
||||
#ifdef BB_ADJTIMEX
|
||||
APPLET(adjtimex, adjtimex_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_AR
|
||||
#ifdef BB_AR
|
||||
APPLET(ar, ar_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ASH
|
||||
#ifdef BB_ASH
|
||||
APPLET_NOUSAGE("ash", ash_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_BASENAME
|
||||
#ifdef BB_BASENAME
|
||||
APPLET(basename, basename_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_BUNZIP2
|
||||
APPLET(bunzip2, bunzip2_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
APPLET_NOUSAGE("busybox", busybox_main, _BB_DIR_BIN)
|
||||
#ifdef CONFIG_BUNZIP2
|
||||
APPLET(bzcat, bunzip2_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CAL
|
||||
APPLET(cal, cal_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CAT
|
||||
#ifdef BB_CAT
|
||||
APPLET(cat, cat_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CHGRP
|
||||
#ifdef BB_CHGRP
|
||||
APPLET(chgrp, chgrp_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CHMOD
|
||||
#ifdef BB_CHMOD
|
||||
APPLET(chmod, chmod_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CHOWN
|
||||
#ifdef BB_CHOWN
|
||||
APPLET(chown, chown_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CHROOT
|
||||
#ifdef BB_CHROOT
|
||||
APPLET(chroot, chroot_main, _BB_DIR_USR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CHVT
|
||||
#ifdef BB_CHVT
|
||||
APPLET(chvt, chvt_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CLEAR
|
||||
#ifdef BB_CLEAR
|
||||
APPLET(clear, clear_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CMP
|
||||
#ifdef BB_CMP
|
||||
APPLET(cmp, cmp_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CP
|
||||
#ifdef BB_CP
|
||||
APPLET(cp, cp_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CPIO
|
||||
#ifdef BB_CPIO
|
||||
APPLET(cpio, cpio_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_CUT
|
||||
#ifdef BB_CUT
|
||||
APPLET(cut, cut_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DATE
|
||||
#ifdef BB_DATE
|
||||
APPLET(date, date_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DC
|
||||
#ifdef BB_DC
|
||||
APPLET(dc, dc_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DD
|
||||
#ifdef BB_DD
|
||||
APPLET(dd, dd_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DEALLOCVT
|
||||
#ifdef BB_DEALLOCVT
|
||||
APPLET(deallocvt, deallocvt_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DELGROUP
|
||||
APPLET(delgroup, delgroup_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DELUSER
|
||||
APPLET(deluser, deluser_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DF
|
||||
#ifdef BB_DF
|
||||
APPLET(df, df_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DIRNAME
|
||||
#ifdef BB_DIRNAME
|
||||
APPLET(dirname, dirname_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DMESG
|
||||
#ifdef BB_DMESG
|
||||
APPLET(dmesg, dmesg_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DOS2UNIX
|
||||
#ifdef BB_DOS2UNIX
|
||||
APPLET(dos2unix, dos2unix_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DPKG
|
||||
#ifdef BB_DPKG
|
||||
APPLET(dpkg, dpkg_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DPKG_DEB
|
||||
#ifdef BB_DPKG_DEB
|
||||
APPLET_ODDNAME("dpkg-deb", dpkg_deb_main, _BB_DIR_USR_BIN, dpkg_deb)
|
||||
#endif
|
||||
#ifdef CONFIG_DU
|
||||
#ifdef BB_DU
|
||||
APPLET(du, du_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DUMPKMAP
|
||||
#ifdef BB_DUMPKMAP
|
||||
APPLET(dumpkmap, dumpkmap_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_DUTMP
|
||||
#ifdef BB_DUTMP
|
||||
APPLET(dutmp, dutmp_main, _BB_DIR_USR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ECHO
|
||||
#ifdef BB_ECHO
|
||||
APPLET(echo, echo_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#if defined(CONFIG_FEATURE_GREP_EGREP_ALIAS)
|
||||
#if defined(BB_FEATURE_GREP_EGREP_ALIAS) && defined(BB_GREP)
|
||||
APPLET_NOUSAGE("egrep", grep_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ENV
|
||||
#ifdef BB_ENV
|
||||
APPLET(env, env_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_EXPR
|
||||
#ifdef BB_EXPR
|
||||
APPLET(expr, expr_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FALSE
|
||||
#ifdef BB_TRUE_FALSE
|
||||
APPLET(false, false_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FBSET
|
||||
#ifdef BB_FBSET
|
||||
APPLET(fbset, fbset_main, _BB_DIR_USR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FDFLUSH
|
||||
#ifdef BB_FDFLUSH
|
||||
APPLET(fdflush, fdflush_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FIND
|
||||
#ifdef BB_FIND
|
||||
APPLET(find, find_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FREE
|
||||
#ifdef BB_FREE
|
||||
APPLET(free, free_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FREERAMDISK
|
||||
#ifdef BB_FREERAMDISK
|
||||
APPLET(freeramdisk, freeramdisk_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FSCK_MINIX
|
||||
#ifdef BB_FSCK_MINIX
|
||||
APPLET_ODDNAME("fsck.minix", fsck_minix_main, _BB_DIR_SBIN, fsck_minix)
|
||||
#endif
|
||||
#ifdef CONFIG_GETOPT
|
||||
#ifdef BB_GETOPT
|
||||
APPLET(getopt, getopt_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_GETTY
|
||||
APPLET(getty, getty_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_GREP
|
||||
#ifdef BB_GREP
|
||||
APPLET(grep, grep_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_GUNZIP
|
||||
#ifdef BB_GUNZIP
|
||||
APPLET(gunzip, gunzip_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_GZIP
|
||||
#ifdef BB_GZIP
|
||||
APPLET(gzip, gzip_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HALT
|
||||
#ifdef BB_HALT
|
||||
APPLET(halt, halt_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HEAD
|
||||
#ifdef BB_HEAD
|
||||
APPLET(head, head_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HEXDUMP
|
||||
APPLET(hexdump, hexdump_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HOSTID
|
||||
#ifdef BB_HOSTID
|
||||
APPLET(hostid, hostid_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HOSTNAME
|
||||
#ifdef BB_HOSTNAME
|
||||
APPLET(hostname, hostname_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_HUSH
|
||||
#ifdef BB_HUSH
|
||||
APPLET_NOUSAGE("hush", hush_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ID
|
||||
#ifdef BB_ID
|
||||
APPLET(id, id_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_IFCONFIG
|
||||
#ifdef BB_IFCONFIG
|
||||
APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_INIT
|
||||
#ifdef BB_INIT
|
||||
APPLET(init, init_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_INSMOD
|
||||
#ifdef BB_INSMOD
|
||||
APPLET(insmod, insmod_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_KILL
|
||||
#ifdef BB_KILL
|
||||
APPLET(kill, kill_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_KILLALL
|
||||
#ifdef BB_KILLALL
|
||||
APPLET(killall, kill_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_KLOGD
|
||||
#ifdef BB_KLOGD
|
||||
APPLET(klogd, klogd_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LASH
|
||||
#ifdef BB_LASH
|
||||
APPLET(lash, lash_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LENGTH
|
||||
#ifdef BB_LENGTH
|
||||
APPLET(length, length_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_INITRD
|
||||
#ifdef BB_FEATURE_LINUXRC
|
||||
APPLET_NOUSAGE("linuxrc", init_main, _BB_DIR_ROOT)
|
||||
#endif
|
||||
#ifdef CONFIG_LN
|
||||
#ifdef BB_LN
|
||||
APPLET(ln, ln_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOADACM
|
||||
#ifdef BB_LOADACM
|
||||
APPLET(loadacm, loadacm_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOADFONT
|
||||
#ifdef BB_LOADFONT
|
||||
APPLET(loadfont, loadfont_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOADKMAP
|
||||
#ifdef BB_LOADKMAP
|
||||
APPLET(loadkmap, loadkmap_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOGGER
|
||||
#ifdef BB_LOGGER
|
||||
APPLET(logger, logger_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOGNAME
|
||||
#ifdef BB_LOGNAME
|
||||
APPLET(logname, logname_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOGREAD
|
||||
#ifdef BB_LOGREAD
|
||||
APPLET(logread, logread_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LOSETUP
|
||||
#ifdef BB_LOSETUP
|
||||
APPLET(losetup, losetup_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LS
|
||||
#ifdef BB_LS
|
||||
APPLET(ls, ls_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_LSMOD
|
||||
#ifdef BB_LSMOD
|
||||
APPLET(lsmod, lsmod_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MAKEDEVS
|
||||
#ifdef BB_MAKEDEVS
|
||||
APPLET(makedevs, makedevs_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MD5SUM
|
||||
#ifdef BB_MD5SUM
|
||||
APPLET(md5sum, md5sum_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MKDIR
|
||||
#ifdef BB_MKDIR
|
||||
APPLET(mkdir, mkdir_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MKFIFO
|
||||
#ifdef BB_MKFIFO
|
||||
APPLET(mkfifo, mkfifo_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MKFS_MINIX
|
||||
#ifdef BB_MKFS_MINIX
|
||||
APPLET_ODDNAME("mkfs.minix", mkfs_minix_main, _BB_DIR_SBIN, mkfs_minix)
|
||||
#endif
|
||||
#ifdef CONFIG_MKNOD
|
||||
#ifdef BB_MKNOD
|
||||
APPLET(mknod, mknod_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MKSWAP
|
||||
#ifdef BB_MKSWAP
|
||||
APPLET(mkswap, mkswap_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MKTEMP
|
||||
#ifdef BB_MKTEMP
|
||||
APPLET(mktemp, mktemp_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MODPROBE
|
||||
#ifdef BB_MODPROBE
|
||||
APPLET(modprobe, modprobe_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MORE
|
||||
#ifdef BB_MORE
|
||||
APPLET(more, more_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MOUNT
|
||||
#ifdef BB_MOUNT
|
||||
APPLET(mount, mount_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MSH
|
||||
#ifdef BB_MSH
|
||||
APPLET_NOUSAGE("msh", msh_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MT
|
||||
#ifdef BB_MT
|
||||
APPLET(mt, mt_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_MV
|
||||
#ifdef BB_MV
|
||||
APPLET(mv, mv_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_NC
|
||||
#ifdef BB_NC
|
||||
APPLET(nc, nc_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_NETSTAT
|
||||
APPLET(netstat, netstat_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_NSLOOKUP
|
||||
#ifdef BB_NSLOOKUP
|
||||
APPLET(nslookup, nslookup_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_OD
|
||||
APPLET(od, od_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PIDOF
|
||||
#ifdef BB_PIDOF
|
||||
APPLET(pidof, pidof_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PING
|
||||
#ifdef BB_PING
|
||||
APPLET(ping, ping_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PIVOT_ROOT
|
||||
#ifdef BB_PIVOT_ROOT
|
||||
APPLET(pivot_root, pivot_root_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_POWEROFF
|
||||
#ifdef BB_POWEROFF
|
||||
APPLET(poweroff, poweroff_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PRINTF
|
||||
#ifdef BB_PRINTF
|
||||
APPLET(printf, printf_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PS
|
||||
#ifdef BB_PS
|
||||
APPLET(ps, ps_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_PWD
|
||||
#ifdef BB_PWD
|
||||
APPLET(pwd, pwd_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RDATE
|
||||
#ifdef BB_RDATE
|
||||
APPLET(rdate, rdate_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_READLINK
|
||||
#ifdef BB_READLINK
|
||||
APPLET(readlink, readlink_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_REBOOT
|
||||
#ifdef BB_REBOOT
|
||||
APPLET(reboot, reboot_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RENICE
|
||||
#ifdef BB_RENICE
|
||||
APPLET(renice, renice_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RESET
|
||||
#ifdef BB_RESET
|
||||
APPLET(reset, reset_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RM
|
||||
#ifdef BB_RM
|
||||
APPLET(rm, rm_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RMDIR
|
||||
#ifdef BB_RMDIR
|
||||
APPLET(rmdir, rmdir_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RMMOD
|
||||
#ifdef BB_RMMOD
|
||||
APPLET(rmmod, rmmod_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_ROUTE
|
||||
#ifdef BB_ROUTE
|
||||
APPLET(route, route_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RPM2CPIO
|
||||
#ifdef BB_RPM2CPIO
|
||||
APPLET(rpm2cpio, rpm2cpio_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_RUN_PARTS
|
||||
APPLET_ODDNAME("run-parts", run_parts_main, _BB_DIR_BIN, run_parts)
|
||||
#endif
|
||||
#ifdef CONFIG_SED
|
||||
#ifdef BB_SED
|
||||
APPLET(sed, sed_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SETKEYCODES
|
||||
#ifdef BB_SETKEYCODES
|
||||
APPLET(setkeycodes, setkeycodes_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#if defined(CONFIG_FEATURE_SH_IS_ASH) && defined(CONFIG_ASH)
|
||||
#if defined(BB_FEATURE_SH_IS_ASH) && defined(BB_ASH)
|
||||
APPLET_NOUSAGE("sh", ash_main, _BB_DIR_BIN)
|
||||
#elif defined(CONFIG_FEATURE_SH_IS_HUSH) && defined(CONFIG_HUSH)
|
||||
#elif defined(BB_FEATURE_SH_IS_HUSH) && defined(BB_HUSH)
|
||||
APPLET_NOUSAGE("sh", hush_main, _BB_DIR_BIN)
|
||||
#elif defined(CONFIG_FEATURE_SH_IS_LASH) && defined(CONFIG_LASH)
|
||||
#elif defined(BB_FEATURE_SH_IS_LASH) && defined(BB_LASH)
|
||||
APPLET_NOUSAGE("sh", lash_main, _BB_DIR_BIN)
|
||||
#elif defined(CONFIG_FEATURE_SH_IS_MSH) && defined(CONFIG_MSH)
|
||||
#elif defined(BB_FEATURE_SH_IS_MSH) && defined(BB_MSH)
|
||||
APPLET_NOUSAGE("sh", msh_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SLEEP
|
||||
#ifdef BB_SLEEP
|
||||
APPLET(sleep, sleep_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SORT
|
||||
#ifdef BB_SORT
|
||||
APPLET(sort, sort_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_START_STOP_DAEMON
|
||||
APPLET_ODDNAME("start-stop-daemon", start_stop_daemon_main, _BB_DIR_SBIN, start_stop_daemon)
|
||||
#endif
|
||||
#ifdef CONFIG_STTY
|
||||
#ifdef BB_STTY
|
||||
APPLET(stty, stty_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SWAPONOFF
|
||||
#ifdef BB_SWAPONOFF
|
||||
APPLET(swapoff, swap_on_off_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SWAPONOFF
|
||||
#ifdef BB_SWAPONOFF
|
||||
APPLET(swapon, swap_on_off_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SYNC
|
||||
#ifdef BB_SYNC
|
||||
APPLET(sync, sync_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_SYSLOGD
|
||||
#ifdef BB_SYSLOGD
|
||||
APPLET(syslogd, syslogd_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TAIL
|
||||
#ifdef BB_TAIL
|
||||
APPLET(tail, tail_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TAR
|
||||
#ifdef BB_TAR
|
||||
APPLET(tar, tar_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TEE
|
||||
#ifdef BB_TEE
|
||||
APPLET(tee, tee_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TELNET
|
||||
#ifdef BB_TELNET
|
||||
APPLET(telnet, telnet_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TEST
|
||||
#ifdef BB_TEST
|
||||
APPLET(test, test_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TFTP
|
||||
#ifdef BB_TFTP
|
||||
APPLET(tftp, tftp_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TIME
|
||||
#ifdef BB_TIME
|
||||
APPLET(time, time_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TOUCH
|
||||
#ifdef BB_TOP
|
||||
APPLET(top, top_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef BB_TOUCH
|
||||
APPLET(touch, touch_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TR
|
||||
#ifdef BB_TR
|
||||
APPLET(tr, tr_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TRACEROUTE
|
||||
#ifdef BB_TRACEROUTE
|
||||
APPLET(traceroute, traceroute_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TRUE
|
||||
#ifdef BB_TRUE_FALSE
|
||||
APPLET(true, true_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_TTY
|
||||
#ifdef BB_TTY
|
||||
APPLET(tty, tty_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UMOUNT
|
||||
#ifdef BB_UMOUNT
|
||||
APPLET(umount, umount_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UNAME
|
||||
#ifdef BB_UNAME
|
||||
APPLET(uname, uname_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UNIQ
|
||||
#ifdef BB_UNIQ
|
||||
APPLET(uniq, uniq_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UNIX2DOS
|
||||
#ifdef BB_UNIX2DOS
|
||||
APPLET(unix2dos, dos2unix_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UNZIP
|
||||
APPLET(unzip, unzip_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UPDATE
|
||||
#ifdef BB_UPDATE
|
||||
APPLET(update, update_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UPTIME
|
||||
#ifdef BB_UPTIME
|
||||
APPLET(uptime, uptime_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_USLEEP
|
||||
#ifdef BB_USLEEP
|
||||
APPLET(usleep, usleep_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UUDECODE
|
||||
#ifdef BB_UUDECODE
|
||||
APPLET(uudecode, uudecode_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_UUENCODE
|
||||
#ifdef BB_UUENCODE
|
||||
APPLET(uuencode, uuencode_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_VI
|
||||
#ifdef BB_VI
|
||||
APPLET(vi, vi_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WATCHDOG
|
||||
#ifdef BB_WATCHDOG
|
||||
APPLET(watchdog, watchdog_main, _BB_DIR_SBIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WC
|
||||
#ifdef BB_WC
|
||||
APPLET(wc, wc_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WGET
|
||||
#ifdef BB_WGET
|
||||
APPLET(wget, wget_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WHICH
|
||||
#ifdef BB_WHICH
|
||||
APPLET(which, which_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WHO
|
||||
APPLET(who, who_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_WHOAMI
|
||||
#ifdef BB_WHOAMI
|
||||
APPLET(whoami, whoami_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_XARGS
|
||||
#ifdef BB_XARGS
|
||||
APPLET(xargs, xargs_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_YES
|
||||
#ifdef BB_YES
|
||||
APPLET(yes, yes_main, _BB_DIR_USR_BIN)
|
||||
#endif
|
||||
#ifdef CONFIG_GUNZIP
|
||||
#ifdef BB_GUNZIP
|
||||
APPLET(zcat, gunzip_main, _BB_DIR_BIN)
|
||||
#endif
|
||||
|
||||
@@ -527,4 +485,3 @@
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TOPDIR:= ../
|
||||
APPLETS_DIR:=./
|
||||
include $(TOPDIR).config
|
||||
include $(TOPDIR)Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(TOPDIR).depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
APPLETS_AR:=applets.a
|
||||
ifndef $(APPLETS_DIR)
|
||||
APPLETS_DIR:=$(TOPDIR)applets/
|
||||
endif
|
||||
|
||||
APPLET_SRC:=applets.c busybox.c usage.c
|
||||
APPLET_OBJ:= $(patsubst %.c,$(APPLETS_DIR)%.o, $(APPLET_SRC))
|
||||
|
||||
libraries-y+=$(APPLETS_DIR)$(APPLETS_AR)
|
||||
|
||||
$(APPLETS_DIR)$(APPLETS_AR): $(APPLET_OBJ)
|
||||
$(AR) -ro $@ $(APPLET_OBJ)
|
||||
|
||||
@@ -23,11 +23,10 @@
|
||||
*
|
||||
*/
|
||||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <getopt.h>
|
||||
#include "unarchive.h"
|
||||
#include <unistd.h>
|
||||
#include "busybox.h"
|
||||
|
||||
extern int ar_main(int argc, char **argv)
|
||||
@@ -85,6 +84,6 @@ extern int ar_main(int argc, char **argv)
|
||||
optind++;
|
||||
}
|
||||
|
||||
unarchive(src_stream, stdout, &get_header_ar, extract_function, "./", extract_names, NULL);
|
||||
unarchive(src_stream, stdout, &get_header_ar, extract_function, "./", extract_names);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TOPDIR:= ../
|
||||
ARCHIVAL_DIR:=./
|
||||
include $(TOPDIR).config
|
||||
include $(TOPDIR)Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(TOPDIR).depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
ARCHIVAL_AR:=archival.a
|
||||
ifndef $(ARCHIVAL_DIR)
|
||||
ARCHIVAL_DIR:=$(TOPDIR)archival/
|
||||
endif
|
||||
|
||||
ARCHIVAL-y:=
|
||||
ARCHIVAL-$(CONFIG_AR) += ar.o
|
||||
ARCHIVAL-$(CONFIG_BUNZIP2) += bunzip2.o
|
||||
ARCHIVAL-$(CONFIG_CPIO) += cpio.o
|
||||
ARCHIVAL-$(CONFIG_DPKG) += dpkg.o
|
||||
ARCHIVAL-$(CONFIG_DPKG_DEB) += dpkg_deb.o
|
||||
ARCHIVAL-$(CONFIG_GUNZIP) += gunzip.o
|
||||
ARCHIVAL-$(CONFIG_GZIP) += gzip.o
|
||||
ARCHIVAL-$(CONFIG_RPM2CPIO) += rpm2cpio.o
|
||||
ARCHIVAL-$(CONFIG_TAR) += tar.o
|
||||
ARCHIVAL-$(CONFIG_UNZIP) += unzip.o
|
||||
|
||||
libraries-y+=$(ARCHIVAL_DIR)$(ARCHIVAL_AR)
|
||||
|
||||
$(ARCHIVAL_DIR)$(ARCHIVAL_AR): $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
|
||||
$(AR) -ro $@ $(patsubst %,$(ARCHIVAL_DIR)%, $(ARCHIVAL-y))
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see scripts/kbuild/config-language.txt.
|
||||
#
|
||||
|
||||
mainmenu_option next_comment
|
||||
comment 'Archival Utilities'
|
||||
|
||||
bool 'ar' CONFIG_AR
|
||||
bool 'bunzip2' CONFIG_BUNZIP2
|
||||
bool 'cpio' CONFIG_CPIO
|
||||
bool 'dpkg' CONFIG_DPKG
|
||||
bool 'dpkg_deb' CONFIG_DPKG_DEB
|
||||
bool 'gunzip' CONFIG_GUNZIP
|
||||
bool 'gzip' CONFIG_GZIP
|
||||
bool 'rpm2cpio' CONFIG_RPM2CPIO
|
||||
bool 'tar' CONFIG_TAR
|
||||
if [ "$CONFIG_TAR" = "y" ] ; then
|
||||
bool ' Enable archive creation' CONFIG_FEATURE_TAR_CREATE
|
||||
bool ' Enable -X and --exclude options (exclude files)' CONFIG_FEATURE_TAR_EXCLUDE
|
||||
bool ' Enable -z option (currently only for extracting)' CONFIG_FEATURE_TAR_GZIP
|
||||
fi
|
||||
if [ "$CONFIG_CPIO" = "y" -o "$CONFIG_TAR" = "y" ] ; then
|
||||
bool ' Enable tape drive support' CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
fi
|
||||
bool 'unzip' CONFIG_UNZIP
|
||||
endmenu
|
||||
@@ -1,30 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TOPDIR:= ../../
|
||||
LIBUNARCHIVE_DIR:=./
|
||||
include $(TOPDIR).config
|
||||
include $(TOPDIR)Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(TOPDIR).depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
LIBUNARCHIVE_AR:=libunarchive.a
|
||||
ifndef $(LIBUNARCHIVE_DIR)
|
||||
LIBUNARCHIVE_DIR:=$(TOPDIR)archival/libunarchive/
|
||||
endif
|
||||
|
||||
LIBUNARCHIVE-y:=unarchive.o seek_sub_file.o
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG) += deb_extract.o get_header_ar.o get_header_tar.o
|
||||
LIBUNARCHIVE-$(CONFIG_DPKG_DEB) += deb_extract.o get_header_ar.o get_header_tar.o
|
||||
LIBUNARCHIVE-$(CONFIG_AR) += get_header_ar.o
|
||||
LIBUNARCHIVE-$(CONFIG_CPIO) += get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_RPM2CPIO) += get_header_cpio.o
|
||||
LIBUNARCHIVE-$(CONFIG_TAR) += get_header_tar.o
|
||||
LIBUNARCHIVE-$(CONFIG_UNZIP) += get_header_zip.o
|
||||
|
||||
libraries-y+=$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR)
|
||||
|
||||
$(LIBUNARCHIVE_DIR)$(LIBUNARCHIVE_AR): $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
|
||||
$(AR) -ro $@ $(patsubst %,$(LIBUNARCHIVE_DIR)%, $(LIBUNARCHIVE-y))
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
char *deb_extract(const char *package_filename, FILE *out_stream,
|
||||
const int extract_function, const char *prefix, const char *filename)
|
||||
{
|
||||
FILE *deb_stream;
|
||||
FILE *uncompressed_stream = NULL;
|
||||
file_header_t *ar_header = NULL;
|
||||
char **file_list = NULL;
|
||||
char *output_buffer = NULL;
|
||||
char *ared_file = NULL;
|
||||
char ar_magic[8];
|
||||
int gunzip_pid;
|
||||
|
||||
if (filename != NULL) {
|
||||
file_list = xmalloc(sizeof(char *) * 2);
|
||||
file_list[0] = xstrdup(filename);
|
||||
file_list[1] = NULL;
|
||||
}
|
||||
|
||||
if (extract_function & extract_control_tar_gz) {
|
||||
ared_file = xstrdup("control.tar.gz");
|
||||
}
|
||||
else if (extract_function & extract_data_tar_gz) {
|
||||
ared_file = xstrdup("data.tar.gz");
|
||||
}
|
||||
|
||||
/* open the debian package to be worked on */
|
||||
deb_stream = wfopen(package_filename, "r");
|
||||
if (deb_stream == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
/* set the buffer size */
|
||||
setvbuf(deb_stream, NULL, _IOFBF, 0x8000);
|
||||
|
||||
/* check ar magic */
|
||||
fread(ar_magic, 1, 8, deb_stream);
|
||||
if (strncmp(ar_magic,"!<arch>",7) != 0) {
|
||||
error_msg_and_die("invalid magic");
|
||||
}
|
||||
archive_offset = 8;
|
||||
|
||||
while ((ar_header = get_header_ar(deb_stream)) != NULL) {
|
||||
if (strcmp(ared_file, ar_header->name) == 0) {
|
||||
/* open a stream of decompressed data */
|
||||
uncompressed_stream = gz_open(deb_stream, &gunzip_pid);
|
||||
archive_offset = 0;
|
||||
output_buffer = unarchive(uncompressed_stream, out_stream, get_header_tar, extract_function, prefix, file_list, NULL);
|
||||
}
|
||||
seek_sub_file(deb_stream, ar_header->size);
|
||||
free(ar_header->name);
|
||||
free(ar_header);
|
||||
}
|
||||
gz_close(gunzip_pid);
|
||||
fclose(deb_stream);
|
||||
fclose(uncompressed_stream);
|
||||
free(ared_file);
|
||||
if (filename != NULL) {
|
||||
free(file_list[0]);
|
||||
free(file_list);
|
||||
}
|
||||
return(output_buffer);
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
file_header_t *get_header_ar(FILE *src_stream)
|
||||
{
|
||||
file_header_t *typed;
|
||||
union {
|
||||
char raw[60];
|
||||
struct {
|
||||
char name[16];
|
||||
char date[12];
|
||||
char uid[6];
|
||||
char gid[6];
|
||||
char mode[8];
|
||||
char size[10];
|
||||
char magic[2];
|
||||
} formated;
|
||||
} ar;
|
||||
static char *ar_long_names;
|
||||
|
||||
if (fread(ar.raw, 1, 60, src_stream) != 60) {
|
||||
return(NULL);
|
||||
}
|
||||
archive_offset += 60;
|
||||
/* align the headers based on the header magic */
|
||||
if ((ar.formated.magic[0] != '`') || (ar.formated.magic[1] != '\n')) {
|
||||
/* some version of ar, have an extra '\n' after each data entry,
|
||||
* this puts the next header out by 1 */
|
||||
if (ar.formated.magic[1] != '`') {
|
||||
error_msg("Invalid magic");
|
||||
return(NULL);
|
||||
}
|
||||
/* read the next char out of what would be the data section,
|
||||
* if its a '\n' then it is a valid header offset by 1*/
|
||||
archive_offset++;
|
||||
if (fgetc(src_stream) != '\n') {
|
||||
error_msg("Invalid magic");
|
||||
return(NULL);
|
||||
}
|
||||
/* fix up the header, we started reading 1 byte too early */
|
||||
/* raw_header[60] wont be '\n' as it should, but it doesnt matter */
|
||||
memmove(ar.raw, &ar.raw[1], 59);
|
||||
}
|
||||
|
||||
typed = (file_header_t *) xcalloc(1, sizeof(file_header_t));
|
||||
|
||||
typed->size = (size_t) atoi(ar.formated.size);
|
||||
/* long filenames have '/' as the first character */
|
||||
if (ar.formated.name[0] == '/') {
|
||||
if (ar.formated.name[1] == '/') {
|
||||
/* If the second char is a '/' then this entries data section
|
||||
* stores long filename for multiple entries, they are stored
|
||||
* in static variable long_names for use in future entries */
|
||||
ar_long_names = (char *) xrealloc(ar_long_names, typed->size);
|
||||
fread(ar_long_names, 1, typed->size, src_stream);
|
||||
archive_offset += typed->size;
|
||||
/* This ar entries data section only contained filenames for other records
|
||||
* they are stored in the static ar_long_names for future reference */
|
||||
return (get_header_ar(src_stream)); /* Return next header */
|
||||
} else if (ar.formated.name[1] == ' ') {
|
||||
/* This is the index of symbols in the file for compilers */
|
||||
seek_sub_file(src_stream, typed->size);
|
||||
return (get_header_ar(src_stream)); /* Return next header */
|
||||
} else {
|
||||
/* The number after the '/' indicates the offset in the ar data section
|
||||
(saved in variable long_name) that conatains the real filename */
|
||||
if (!ar_long_names) {
|
||||
error_msg("Cannot resolve long file name");
|
||||
return (NULL);
|
||||
}
|
||||
typed->name = xstrdup(ar_long_names + atoi(&ar.formated.name[1]));
|
||||
}
|
||||
} else {
|
||||
/* short filenames */
|
||||
typed->name = xcalloc(1, 16);
|
||||
strncpy(typed->name, ar.formated.name, 16);
|
||||
}
|
||||
typed->name[strcspn(typed->name, " /")]='\0';
|
||||
|
||||
/* convert the rest of the now valid char header to its typed struct */
|
||||
parse_mode(ar.formated.mode, &typed->mode);
|
||||
typed->mtime = atoi(ar.formated.date);
|
||||
typed->uid = atoi(ar.formated.uid);
|
||||
typed->gid = atoi(ar.formated.gid);
|
||||
|
||||
return(typed);
|
||||
}
|
||||
@@ -1,136 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
struct hardlinks {
|
||||
file_header_t *entry;
|
||||
int inode;
|
||||
struct hardlinks *next;
|
||||
};
|
||||
|
||||
file_header_t *get_header_cpio(FILE *src_stream)
|
||||
{
|
||||
file_header_t *cpio_entry = NULL;
|
||||
char cpio_header[110];
|
||||
int namesize;
|
||||
char dummy[16];
|
||||
int major, minor, nlink, inode;
|
||||
static struct hardlinks *saved_hardlinks = NULL;
|
||||
static int pending_hardlinks = 0;
|
||||
|
||||
if (pending_hardlinks) { /* Deal with any pending hardlinks */
|
||||
struct hardlinks *tmp = saved_hardlinks, *oldtmp = NULL;
|
||||
while (tmp) {
|
||||
if (tmp->entry->link_name) { /* Found a hardlink ready to be extracted */
|
||||
cpio_entry = tmp->entry;
|
||||
if (oldtmp) oldtmp->next = tmp->next; /* Remove item from linked list */
|
||||
else saved_hardlinks = tmp->next;
|
||||
free(tmp);
|
||||
return (cpio_entry);
|
||||
}
|
||||
oldtmp = tmp;
|
||||
tmp = tmp->next;
|
||||
}
|
||||
pending_hardlinks = 0; /* No more pending hardlinks, read next file entry */
|
||||
}
|
||||
|
||||
/* There can be padding before archive header */
|
||||
seek_sub_file(src_stream, (4 - (archive_offset % 4)) % 4);
|
||||
if (fread(cpio_header, 1, 110, src_stream) == 110) {
|
||||
archive_offset += 110;
|
||||
if (strncmp(cpio_header, "07070", 5) != 0) {
|
||||
error_msg("Unsupported format or invalid magic");
|
||||
return(NULL);
|
||||
}
|
||||
switch (cpio_header[5]) {
|
||||
case '2': /* "crc" header format */
|
||||
/* Doesnt do the crc check yet */
|
||||
case '1': /* "newc" header format */
|
||||
cpio_entry = (file_header_t *) xcalloc(1, sizeof(file_header_t));
|
||||
sscanf(cpio_header, "%6c%8x%8x%8x%8x%8x%8lx%8lx%16c%8x%8x%8x%8c",
|
||||
dummy, &inode, (unsigned int*)&cpio_entry->mode,
|
||||
(unsigned int*)&cpio_entry->uid, (unsigned int*)&cpio_entry->gid,
|
||||
&nlink, &cpio_entry->mtime, &cpio_entry->size,
|
||||
dummy, &major, &minor, &namesize, dummy);
|
||||
|
||||
cpio_entry->name = (char *) xcalloc(1, namesize);
|
||||
fread(cpio_entry->name, 1, namesize, src_stream); /* Read in filename */
|
||||
archive_offset += namesize;
|
||||
/* Skip padding before file contents */
|
||||
seek_sub_file(src_stream, (4 - (archive_offset % 4)) % 4);
|
||||
if (strcmp(cpio_entry->name, "TRAILER!!!") == 0) {
|
||||
printf("%d blocks\n", (int) (archive_offset % 512 ? (archive_offset / 512) + 1 : archive_offset / 512)); /* Always round up */
|
||||
if (saved_hardlinks) { /* Bummer - we still have unresolved hardlinks */
|
||||
struct hardlinks *tmp = saved_hardlinks, *oldtmp = NULL;
|
||||
while (tmp) {
|
||||
error_msg("%s not created: cannot resolve hardlink", tmp->entry->name);
|
||||
oldtmp = tmp;
|
||||
tmp = tmp->next;
|
||||
free (oldtmp->entry->name);
|
||||
free (oldtmp->entry);
|
||||
free (oldtmp);
|
||||
}
|
||||
saved_hardlinks = NULL;
|
||||
pending_hardlinks = 0;
|
||||
}
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
if (S_ISLNK(cpio_entry->mode)) {
|
||||
cpio_entry->link_name = (char *) xcalloc(1, cpio_entry->size + 1);
|
||||
fread(cpio_entry->link_name, 1, cpio_entry->size, src_stream);
|
||||
archive_offset += cpio_entry->size;
|
||||
cpio_entry->size = 0; /* Stop possiable seeks in future */
|
||||
}
|
||||
if (nlink > 1 && !S_ISDIR(cpio_entry->mode)) {
|
||||
if (cpio_entry->size == 0) { /* Put file on a linked list for later */
|
||||
struct hardlinks *new = xmalloc(sizeof(struct hardlinks));
|
||||
new->next = saved_hardlinks;
|
||||
new->inode = inode;
|
||||
new->entry = cpio_entry;
|
||||
saved_hardlinks = new;
|
||||
return(get_header_cpio(src_stream)); /* Recurse to next file */
|
||||
} else { /* Found the file with data in */
|
||||
struct hardlinks *tmp = saved_hardlinks;
|
||||
pending_hardlinks = 1;
|
||||
while (tmp) {
|
||||
if (tmp->inode == inode) {
|
||||
tmp->entry->link_name = xstrdup(cpio_entry->name);
|
||||
nlink--;
|
||||
}
|
||||
tmp = tmp->next;
|
||||
}
|
||||
if (nlink > 1) error_msg("error resolving hardlink: did you create the archive with GNU cpio 2.0-2.2?");
|
||||
}
|
||||
}
|
||||
cpio_entry->device = (major << 8) | minor;
|
||||
break;
|
||||
default:
|
||||
error_msg("Unsupported format");
|
||||
return(NULL);
|
||||
}
|
||||
if (ferror(src_stream) || feof(src_stream)) {
|
||||
perror_msg("Stream error");
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
return(cpio_entry);
|
||||
}
|
||||
@@ -1,99 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
file_header_t *get_header_tar(FILE *tar_stream)
|
||||
{
|
||||
union {
|
||||
unsigned char raw[512];
|
||||
struct {
|
||||
char name[100]; /* 0-99 */
|
||||
char mode[8]; /* 100-107 */
|
||||
char uid[8]; /* 108-115 */
|
||||
char gid[8]; /* 116-123 */
|
||||
char size[12]; /* 124-135 */
|
||||
char mtime[12]; /* 136-147 */
|
||||
char chksum[8]; /* 148-155 */
|
||||
char typeflag; /* 156-156 */
|
||||
char linkname[100]; /* 157-256 */
|
||||
char magic[6]; /* 257-262 */
|
||||
char version[2]; /* 263-264 */
|
||||
char uname[32]; /* 265-296 */
|
||||
char gname[32]; /* 297-328 */
|
||||
char devmajor[8]; /* 329-336 */
|
||||
char devminor[8]; /* 337-344 */
|
||||
char prefix[155]; /* 345-499 */
|
||||
char padding[12]; /* 500-512 */
|
||||
} formated;
|
||||
} tar;
|
||||
file_header_t *tar_entry = NULL;
|
||||
long sum = 0;
|
||||
long i;
|
||||
|
||||
if (archive_offset % 512 != 0) {
|
||||
seek_sub_file(tar_stream, 512 - (archive_offset % 512));
|
||||
}
|
||||
|
||||
if (fread(tar.raw, 1, 512, tar_stream) != 512) {
|
||||
/* Unfortunatly its common for tar files to have all sorts of
|
||||
* trailing garbage, fail silently */
|
||||
// error_msg("Couldnt read header");
|
||||
return(NULL);
|
||||
}
|
||||
archive_offset += 512;
|
||||
|
||||
/* Check header has valid magic, unfortunately some tar files
|
||||
* have empty (0'ed) tar entries at the end, which will
|
||||
* cause this to fail, so fail silently for now
|
||||
*/
|
||||
if (strncmp(tar.formated.magic, "ustar", 5) != 0) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/* Do checksum on headers */
|
||||
for (i = 0; i < 148 ; i++) {
|
||||
sum += tar.raw[i];
|
||||
}
|
||||
sum += ' ' * 8;
|
||||
for (i = 156; i < 512 ; i++) {
|
||||
sum += tar.raw[i];
|
||||
}
|
||||
if (sum != strtol(tar.formated.chksum, NULL, 8)) {
|
||||
error_msg("Invalid tar header checksum");
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
/* convert to type'ed variables */
|
||||
tar_entry = xcalloc(1, sizeof(file_header_t));
|
||||
tar_entry->name = xstrdup(tar.formated.name);
|
||||
|
||||
parse_mode(tar.formated.mode, &tar_entry->mode);
|
||||
tar_entry->uid = strtol(tar.formated.uid, NULL, 8);
|
||||
tar_entry->gid = strtol(tar.formated.gid, NULL, 8);
|
||||
tar_entry->size = strtol(tar.formated.size, NULL, 8);
|
||||
tar_entry->mtime = strtol(tar.formated.mtime, NULL, 8);
|
||||
tar_entry->link_name = strlen(tar.formated.linkname) ?
|
||||
xstrdup(tar.formated.linkname) : NULL;
|
||||
tar_entry->device = (strtol(tar.formated.devmajor, NULL, 8) << 8) +
|
||||
strtol(tar.formated.devminor, NULL, 8);
|
||||
|
||||
return(tar_entry);
|
||||
}
|
||||
@@ -1,110 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* get_header_zip for busybox
|
||||
*
|
||||
* Copyright (C) 2001 by Laurence Anderson
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "unarchive.h"
|
||||
#include "libbb.h"
|
||||
|
||||
#define ZIP_FILEHEADER_MAGIC 0x04034b50
|
||||
#define ZIP_CDS_MAGIC 0x02014b50
|
||||
#define ZIP_CDS_END_MAGIC 0x06054b50
|
||||
#define ZIP_DD_MAGIC 0x8074b50
|
||||
|
||||
file_header_t *get_header_zip(FILE *zip_stream)
|
||||
{
|
||||
struct {
|
||||
short version __attribute__ ((packed));
|
||||
short flags __attribute__ ((packed));
|
||||
short method __attribute__ ((packed));
|
||||
short modtime __attribute__ ((packed));
|
||||
short moddate __attribute__ ((packed));
|
||||
int crc32 __attribute__ ((packed));
|
||||
int cmpsize __attribute__ ((packed));
|
||||
int ucmpsize __attribute__ ((packed));
|
||||
short filename_len __attribute__ ((packed));
|
||||
short extra_len __attribute__ ((packed));
|
||||
} zip_header;
|
||||
file_header_t *zip_entry = NULL;
|
||||
int magic;
|
||||
static int dd_ahead = 0; // If this is true, the we didn't know how long the last extraced file was
|
||||
|
||||
fread (&magic, 4, 1, zip_stream);
|
||||
archive_offset += 4;
|
||||
|
||||
if (feof(zip_stream)) return(NULL);
|
||||
checkmagic:
|
||||
switch (magic) {
|
||||
case ZIP_FILEHEADER_MAGIC:
|
||||
zip_entry = xcalloc(1, sizeof(file_header_t));
|
||||
fread (&zip_header, sizeof(zip_header), 1, zip_stream);
|
||||
archive_offset += sizeof(zip_header);
|
||||
if (!(zip_header.method == 8 || zip_header.method == 0)) { printf("Unsupported compression method %d\n", zip_header.method); return(NULL); }
|
||||
zip_entry->name = calloc(zip_header.filename_len + 1, sizeof(char));
|
||||
fread (zip_entry->name, sizeof(char), zip_header.filename_len, zip_stream);
|
||||
archive_offset += zip_header.filename_len;
|
||||
seek_sub_file(zip_stream, zip_header.extra_len);
|
||||
zip_entry->size = zip_header.cmpsize;
|
||||
if (zip_header.method == 8) zip_entry->extract_func = &inflate;
|
||||
zip_entry->mode = S_IFREG | 0777;
|
||||
// Time/Date?
|
||||
if (*(zip_entry->name + strlen(zip_entry->name) - 1) == '/') { // Files that end in a / are directories
|
||||
zip_entry->mode ^= S_IFREG;
|
||||
zip_entry->mode |= S_IFDIR;
|
||||
*(zip_entry->name + strlen(zip_entry->name) - 1) = '\0'; // Remove trailing / so unarchive doesn't get confused
|
||||
}
|
||||
//printf("cmpsize: %d, ucmpsize: %d, method: %d\n", zip_header.cmpsize, zip_header.ucmpsize, zip_header.method);
|
||||
if (zip_header.flags & 0x8) { // crc32, and sizes are in the data description _after_ the file
|
||||
if (zip_header.cmpsize == 0) dd_ahead = 1; // As we don't know how long this file it is difficult to skip! but it is compressed, so normally its ok
|
||||
if (zip_header.ucmpsize != 0) dd_ahead = 2; // Humm... we would otherwise skip this twice - not good!
|
||||
}
|
||||
break;
|
||||
case ZIP_CDS_MAGIC: /* FALLTHRU */
|
||||
case ZIP_CDS_END_MAGIC:
|
||||
return(NULL);
|
||||
break;
|
||||
case ZIP_DD_MAGIC: {
|
||||
int cmpsize;
|
||||
seek_sub_file(zip_stream, 4); // Skip crc32
|
||||
fread(&cmpsize, 4, 1, zip_stream);
|
||||
archive_offset += 4;
|
||||
if (dd_ahead == 1) archive_offset += cmpsize;
|
||||
seek_sub_file(zip_stream, 4); // Skip uncompressed size
|
||||
dd_ahead = 0;
|
||||
return (get_header_zip(zip_stream));
|
||||
break; }
|
||||
default:
|
||||
if (!dd_ahead) error_msg("Invalid magic (%#x): Trying to skip junk", magic);
|
||||
dd_ahead = 0;
|
||||
while (!feof(zip_stream)) {
|
||||
int tmpmagic;
|
||||
tmpmagic = fgetc(zip_stream);
|
||||
archive_offset++;
|
||||
magic = ((magic >> 8) & 0x00ffffff) | ((tmpmagic << 24) & 0xff000000);
|
||||
if (magic == ZIP_FILEHEADER_MAGIC || magic == ZIP_CDS_MAGIC || magic == ZIP_CDS_END_MAGIC) goto checkmagic;
|
||||
}
|
||||
error_msg("End of archive reached: Bad archive");
|
||||
return(NULL);
|
||||
}
|
||||
//if (archive_offset != ftell(zip_stream)) printf("Archive offset out of sync (%d,%d)\n", (int) archive_offset, (int) ftell(zip_stream));
|
||||
return(zip_entry);
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
off_t archive_offset;
|
||||
|
||||
void seek_sub_file(FILE *src_stream, const int count)
|
||||
{
|
||||
/* Try to fseek as faster */
|
||||
archive_offset += count;
|
||||
if (fseek(src_stream, count, SEEK_CUR) != 0 && errno == ESPIPE) {
|
||||
int i;
|
||||
for (i = 0; i < count; i++) {
|
||||
fgetc(src_stream);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <fnmatch.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include <utime.h>
|
||||
#include <sys/wait.h>
|
||||
#include <signal.h>
|
||||
#include "unarchive.h"
|
||||
#include "busybox.h"
|
||||
|
||||
/* Extract the data postioned at src_stream to either filesystem, stdout or
|
||||
* buffer depending on the value of 'function' which is defined in libbb.h
|
||||
*
|
||||
* prefix doesnt have to be just a directory, it may prefix the filename as well.
|
||||
*
|
||||
* e.g. '/var/lib/dpkg/info/dpkg.' will extract all files to the base bath
|
||||
* '/var/lib/dpkg/info/' and all files/dirs created in that dir will have
|
||||
* 'dpkg.' as their prefix
|
||||
*
|
||||
* For this reason if prefix does point to a dir then it must end with a
|
||||
* trailing '/' or else the last dir will be assumed to be the file prefix
|
||||
*/
|
||||
char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *file_entry,
|
||||
const int function, const char *prefix)
|
||||
{
|
||||
FILE *dst_stream = NULL;
|
||||
char *full_name = NULL;
|
||||
char *buffer = NULL;
|
||||
struct utimbuf t;
|
||||
|
||||
/* prefix doesnt have to be a proper path it may prepend
|
||||
* the filename as well */
|
||||
if (prefix != NULL) {
|
||||
/* strip leading '/' in filename to extract as prefix may not be dir */
|
||||
/* Cant use concat_path_file here as prefix might not be a directory */
|
||||
char *path = file_entry->name;
|
||||
if (strncmp("./", path, 2) == 0) {
|
||||
path += 2;
|
||||
if (strlen(path) == 0) {
|
||||
return(NULL);
|
||||
}
|
||||
}
|
||||
full_name = xmalloc(strlen(prefix) + strlen(path) + 1);
|
||||
strcpy(full_name, prefix);
|
||||
strcat(full_name, path);
|
||||
} else {
|
||||
full_name = file_entry->name;
|
||||
}
|
||||
if (function & extract_to_stdout) {
|
||||
if (S_ISREG(file_entry->mode)) {
|
||||
copy_file_chunk(src_stream, out_stream, file_entry->size);
|
||||
archive_offset += file_entry->size;
|
||||
}
|
||||
}
|
||||
else if (function & extract_one_to_buffer) {
|
||||
if (S_ISREG(file_entry->mode)) {
|
||||
buffer = (char *) xmalloc(file_entry->size + 1);
|
||||
fread(buffer, 1, file_entry->size, src_stream);
|
||||
buffer[file_entry->size] = '\0';
|
||||
archive_offset += file_entry->size;
|
||||
return(buffer);
|
||||
}
|
||||
}
|
||||
else if (function & extract_all_to_fs) {
|
||||
struct stat oldfile;
|
||||
int stat_res;
|
||||
stat_res = lstat (full_name, &oldfile);
|
||||
if (stat_res == 0) { /* The file already exists */
|
||||
if ((function & extract_unconditional) || (oldfile.st_mtime < file_entry->mtime)) {
|
||||
if (!S_ISDIR(oldfile.st_mode)) {
|
||||
unlink(full_name); /* Directories might not be empty etc */
|
||||
}
|
||||
} else {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
error_msg("%s not created: newer or same age file exists", file_entry->name);
|
||||
}
|
||||
seek_sub_file(src_stream, file_entry->size);
|
||||
return (NULL);
|
||||
}
|
||||
}
|
||||
if (function & extract_create_leading_dirs) { /* Create leading directories with default umask */
|
||||
char *buf, *parent;
|
||||
buf = xstrdup(full_name);
|
||||
parent = dirname(buf);
|
||||
if (make_directory (parent, -1, FILEUTILS_RECUR) != 0) {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
error_msg("couldn't create leading directories");
|
||||
}
|
||||
}
|
||||
free (buf);
|
||||
}
|
||||
switch(file_entry->mode & S_IFMT) {
|
||||
case S_IFREG:
|
||||
if (file_entry->link_name) { /* Found a cpio hard link */
|
||||
if (link(file_entry->link_name, full_name) != 0) {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
perror_msg("Cannot link from %s to '%s'",
|
||||
file_entry->name, file_entry->link_name);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((dst_stream = wfopen(full_name, "w")) == NULL) {
|
||||
seek_sub_file(src_stream, file_entry->size);
|
||||
return NULL;
|
||||
}
|
||||
archive_offset += file_entry->size;
|
||||
if (file_entry->extract_func) file_entry->extract_func(src_stream, dst_stream);
|
||||
else copy_file_chunk(src_stream, dst_stream, file_entry->size);
|
||||
fclose(dst_stream);
|
||||
}
|
||||
break;
|
||||
case S_IFDIR:
|
||||
if (stat_res != 0) {
|
||||
if (mkdir(full_name, file_entry->mode) < 0) {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
perror_msg("extract_archive: %s", full_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case S_IFLNK:
|
||||
if (symlink(file_entry->link_name, full_name) < 0) {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
perror_msg("Cannot create symlink from %s to '%s'", file_entry->name, file_entry->link_name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
case S_IFSOCK:
|
||||
case S_IFBLK:
|
||||
case S_IFCHR:
|
||||
case S_IFIFO:
|
||||
if (mknod(full_name, file_entry->mode, file_entry->device) == -1) {
|
||||
if ((function & extract_quiet) != extract_quiet) {
|
||||
perror_msg("Cannot create node %s", file_entry->name);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
/* Changing a symlink's properties normally changes the properties of the
|
||||
* file pointed to, so dont try and change the date or mode, lchown does
|
||||
* does the right thing, but isnt available in older versions of libc */
|
||||
if (S_ISLNK(file_entry->mode)) {
|
||||
#if (__GLIBC__ > 2) && (__GLIBC_MINOR__ > 1)
|
||||
lchown(full_name, file_entry->uid, file_entry->gid);
|
||||
#endif
|
||||
} else {
|
||||
if (function & extract_preserve_date) {
|
||||
t.actime = file_entry->mtime;
|
||||
t.modtime = file_entry->mtime;
|
||||
utime(full_name, &t);
|
||||
}
|
||||
chmod(full_name, file_entry->mode);
|
||||
chown(full_name, file_entry->uid, file_entry->gid);
|
||||
}
|
||||
} else {
|
||||
/* If we arent extracting data we have to skip it,
|
||||
* if data size is 0 then then just do it anyway
|
||||
* (saves testing for it) */
|
||||
seek_sub_file(src_stream, file_entry->size);
|
||||
}
|
||||
|
||||
/* extract_list and extract_verbose_list can be used in conjunction
|
||||
* with one of the above four extraction functions, so do this seperately */
|
||||
if (function & extract_verbose_list) {
|
||||
fprintf(out_stream, "%s %d/%d %8d %s ", mode_string(file_entry->mode),
|
||||
file_entry->uid, file_entry->gid,
|
||||
(int) file_entry->size, time_string(file_entry->mtime));
|
||||
}
|
||||
if ((function & extract_list) || (function & extract_verbose_list)){
|
||||
/* fputs doesnt add a trailing \n, so use fprintf */
|
||||
fprintf(out_stream, "%s\n", full_name);
|
||||
}
|
||||
|
||||
free(full_name);
|
||||
|
||||
return(NULL); /* Maybe we should say if failed */
|
||||
}
|
||||
|
||||
char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers)(FILE *),
|
||||
const int extract_function, const char *prefix, char **include_name, char **exclude_name)
|
||||
{
|
||||
file_header_t *file_entry;
|
||||
int extract_flag = TRUE;
|
||||
int i;
|
||||
char *buffer = NULL;
|
||||
#ifdef CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
int pid, tape_pipe[2];
|
||||
|
||||
if (pipe(tape_pipe) != 0) error_msg_and_die("Can't create pipe\n");
|
||||
if ((pid = fork()) == -1) error_msg_and_die("Fork failed\n");
|
||||
if (pid==0) { /* child process */
|
||||
close(tape_pipe[0]); /* We don't wan't to read from the pipe */
|
||||
copyfd(fileno(src_stream), tape_pipe[1]);
|
||||
close(tape_pipe[1]); /* Send EOF */
|
||||
exit(0);
|
||||
/* notreached */
|
||||
}
|
||||
close(tape_pipe[1]); /* Don't want to write down the pipe */
|
||||
fclose(src_stream);
|
||||
src_stream = fdopen(tape_pipe[0], "r");
|
||||
#endif
|
||||
archive_offset = 0;
|
||||
while ((file_entry = get_headers(src_stream)) != NULL) {
|
||||
|
||||
if (include_name != NULL) {
|
||||
extract_flag = FALSE;
|
||||
for(i = 0; include_name[i] != 0; i++) {
|
||||
if (fnmatch(include_name[i], file_entry->name, FNM_LEADING_DIR) == 0) {
|
||||
extract_flag = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
extract_flag = TRUE;
|
||||
}
|
||||
|
||||
/* If the file entry is in the exclude list dont extract it */
|
||||
if (exclude_name != NULL) {
|
||||
for(i = 0; exclude_name[i] != 0; i++) {
|
||||
if (fnmatch(exclude_name[i], file_entry->name, FNM_LEADING_DIR) == 0) {
|
||||
extract_flag = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (extract_flag) {
|
||||
buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix);
|
||||
} else {
|
||||
/* seek past the data entry */
|
||||
seek_sub_file(src_stream, file_entry->size);
|
||||
}
|
||||
free(file_entry->name);
|
||||
free(file_entry->link_name);
|
||||
free(file_entry);
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_UNARCHIVE_TAPE
|
||||
kill(pid, SIGTERM);
|
||||
waitpid(pid, NULL, 0);
|
||||
#endif
|
||||
return(buffer);
|
||||
}
|
||||
@@ -1,741 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini tar implementation for busybox
|
||||
*
|
||||
* Modifed to use common extraction code used by ar, cpio, dpkg-deb, dpkg
|
||||
* Glenn McGrath <bug1@optushome.com.au>
|
||||
*
|
||||
* Note, that as of BusyBox-0.43, tar has been completely rewritten from the
|
||||
* ground up. It still has remnents of the old code lying about, but it is
|
||||
* very different now (i.e., cleaner, less global variables, etc.)
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999-2002 by Erik Andersen <andersee@debian.org>
|
||||
*
|
||||
* Based in part in the tar implementation in sash
|
||||
* Copyright (c) 1999 by David I. Bell
|
||||
* Permission is granted to use, distribute, or modify this source,
|
||||
* provided that this copyright notice remains intact.
|
||||
* Permission to distribute sash derived code under the GPL has been granted.
|
||||
*
|
||||
* Based in part on the tar implementation from busybox-0.28
|
||||
* Copyright (C) 1995 Bruce Perens
|
||||
* This is free software under the GNU General Public License.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <search.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <fnmatch.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "unarchive.h"
|
||||
#include "busybox.h"
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_CREATE
|
||||
|
||||
/* Tar file constants */
|
||||
# define TAR_MAGIC "ustar" /* ustar and a null */
|
||||
# define TAR_VERSION " " /* Be compatable with GNU tar format */
|
||||
|
||||
# ifndef MAJOR
|
||||
# define MAJOR(dev) (((dev)>>8)&0xff)
|
||||
# define MINOR(dev) ((dev)&0xff)
|
||||
# endif
|
||||
|
||||
static const int TAR_BLOCK_SIZE = 512;
|
||||
static const int TAR_MAGIC_LEN = 6;
|
||||
static const int TAR_VERSION_LEN = 2;
|
||||
|
||||
/* POSIX tar Header Block, from POSIX 1003.1-1990 */
|
||||
enum { NAME_SIZE = 100 }; /* because gcc won't let me use 'static const int' */
|
||||
struct TarHeader
|
||||
{ /* byte offset */
|
||||
char name[NAME_SIZE]; /* 0-99 */
|
||||
char mode[8]; /* 100-107 */
|
||||
char uid[8]; /* 108-115 */
|
||||
char gid[8]; /* 116-123 */
|
||||
char size[12]; /* 124-135 */
|
||||
char mtime[12]; /* 136-147 */
|
||||
char chksum[8]; /* 148-155 */
|
||||
char typeflag; /* 156-156 */
|
||||
char linkname[NAME_SIZE]; /* 157-256 */
|
||||
char magic[6]; /* 257-262 */
|
||||
char version[2]; /* 263-264 */
|
||||
char uname[32]; /* 265-296 */
|
||||
char gname[32]; /* 297-328 */
|
||||
char devmajor[8]; /* 329-336 */
|
||||
char devminor[8]; /* 337-344 */
|
||||
char prefix[155]; /* 345-499 */
|
||||
char padding[12]; /* 500-512 (pad to exactly the TAR_BLOCK_SIZE) */
|
||||
};
|
||||
typedef struct TarHeader TarHeader;
|
||||
|
||||
/*
|
||||
** writeTarFile(), writeFileToTarball(), and writeTarHeader() are
|
||||
** the only functions that deal with the HardLinkInfo structure.
|
||||
** Even these functions use the xxxHardLinkInfo() functions.
|
||||
*/
|
||||
typedef struct HardLinkInfo HardLinkInfo;
|
||||
struct HardLinkInfo
|
||||
{
|
||||
HardLinkInfo *next; /* Next entry in list */
|
||||
dev_t dev; /* Device number */
|
||||
ino_t ino; /* Inode number */
|
||||
short linkCount; /* (Hard) Link Count */
|
||||
char name[1]; /* Start of filename (must be last) */
|
||||
};
|
||||
|
||||
/* Some info to be carried along when creating a new tarball */
|
||||
struct TarBallInfo
|
||||
{
|
||||
char* fileName; /* File name of the tarball */
|
||||
int tarFd; /* Open-for-write file descriptor
|
||||
for the tarball */
|
||||
struct stat statBuf; /* Stat info for the tarball, letting
|
||||
us know the inode and device that the
|
||||
tarball lives, so we can avoid trying
|
||||
to include the tarball into itself */
|
||||
int verboseFlag; /* Whether to print extra stuff or not */
|
||||
char** excludeList; /* List of files to not include */
|
||||
HardLinkInfo *hlInfoHead; /* Hard Link Tracking Information */
|
||||
HardLinkInfo *hlInfo; /* Hard Link Info for the current file */
|
||||
};
|
||||
typedef struct TarBallInfo TarBallInfo;
|
||||
|
||||
/* A nice enum with all the possible tar file content types */
|
||||
enum TarFileType
|
||||
{
|
||||
REGTYPE = '0', /* regular file */
|
||||
REGTYPE0 = '\0', /* regular file (ancient bug compat)*/
|
||||
LNKTYPE = '1', /* hard link */
|
||||
SYMTYPE = '2', /* symbolic link */
|
||||
CHRTYPE = '3', /* character special */
|
||||
BLKTYPE = '4', /* block special */
|
||||
DIRTYPE = '5', /* directory */
|
||||
FIFOTYPE = '6', /* FIFO special */
|
||||
CONTTYPE = '7', /* reserved */
|
||||
GNULONGLINK = 'K', /* GNU long (>100 chars) link name */
|
||||
GNULONGNAME = 'L', /* GNU long (>100 chars) file name */
|
||||
};
|
||||
typedef enum TarFileType TarFileType;
|
||||
|
||||
/* Might be faster (and bigger) if the dev/ino were stored in numeric order;) */
|
||||
static void
|
||||
addHardLinkInfo (HardLinkInfo **hlInfoHeadPtr, dev_t dev, ino_t ino,
|
||||
short linkCount, const char *name)
|
||||
{
|
||||
/* Note: hlInfoHeadPtr can never be NULL! */
|
||||
HardLinkInfo *hlInfo;
|
||||
|
||||
hlInfo = (HardLinkInfo *)xmalloc(sizeof(HardLinkInfo)+strlen(name)+1);
|
||||
if (hlInfo) {
|
||||
hlInfo->next = *hlInfoHeadPtr;
|
||||
*hlInfoHeadPtr = hlInfo;
|
||||
hlInfo->dev = dev;
|
||||
hlInfo->ino = ino;
|
||||
hlInfo->linkCount = linkCount;
|
||||
strcpy(hlInfo->name, name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
static void
|
||||
freeHardLinkInfo (HardLinkInfo **hlInfoHeadPtr)
|
||||
{
|
||||
HardLinkInfo *hlInfo = NULL;
|
||||
HardLinkInfo *hlInfoNext = NULL;
|
||||
|
||||
if (hlInfoHeadPtr) {
|
||||
hlInfo = *hlInfoHeadPtr;
|
||||
while (hlInfo) {
|
||||
hlInfoNext = hlInfo->next;
|
||||
free(hlInfo);
|
||||
hlInfo = hlInfoNext;
|
||||
}
|
||||
*hlInfoHeadPtr = NULL;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/* Might be faster (and bigger) if the dev/ino were stored in numeric order;) */
|
||||
static HardLinkInfo *
|
||||
findHardLinkInfo (HardLinkInfo *hlInfo, dev_t dev, ino_t ino)
|
||||
{
|
||||
while(hlInfo) {
|
||||
if ((ino == hlInfo->ino) && (dev == hlInfo->dev))
|
||||
break;
|
||||
hlInfo = hlInfo->next;
|
||||
}
|
||||
return(hlInfo);
|
||||
}
|
||||
|
||||
/* Put an octal string into the specified buffer.
|
||||
* The number is zero and space padded and possibly null padded.
|
||||
* Returns TRUE if successful. */
|
||||
static int putOctal (char *cp, int len, long value)
|
||||
{
|
||||
int tempLength;
|
||||
char tempBuffer[32];
|
||||
char *tempString = tempBuffer;
|
||||
|
||||
/* Create a string of the specified length with an initial space,
|
||||
* leading zeroes and the octal number, and a trailing null. */
|
||||
sprintf (tempString, "%0*lo", len - 1, value);
|
||||
|
||||
/* If the string is too large, suppress the leading space. */
|
||||
tempLength = strlen (tempString) + 1;
|
||||
if (tempLength > len) {
|
||||
tempLength--;
|
||||
tempString++;
|
||||
}
|
||||
|
||||
/* If the string is still too large, suppress the trailing null. */
|
||||
if (tempLength > len)
|
||||
tempLength--;
|
||||
|
||||
/* If the string is still too large, fail. */
|
||||
if (tempLength > len)
|
||||
return FALSE;
|
||||
|
||||
/* Copy the string to the field. */
|
||||
memcpy (cp, tempString, len);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Write out a tar header for the specified file/directory/whatever */
|
||||
static int
|
||||
writeTarHeader(struct TarBallInfo *tbInfo, const char *header_name,
|
||||
const char *real_name, struct stat *statbuf)
|
||||
{
|
||||
long chksum=0;
|
||||
struct TarHeader header;
|
||||
const unsigned char *cp = (const unsigned char *) &header;
|
||||
ssize_t size = sizeof(struct TarHeader);
|
||||
|
||||
memset( &header, 0, size);
|
||||
|
||||
strncpy(header.name, header_name, sizeof(header.name));
|
||||
|
||||
putOctal(header.mode, sizeof(header.mode), statbuf->st_mode);
|
||||
putOctal(header.uid, sizeof(header.uid), statbuf->st_uid);
|
||||
putOctal(header.gid, sizeof(header.gid), statbuf->st_gid);
|
||||
putOctal(header.size, sizeof(header.size), 0); /* Regular file size is handled later */
|
||||
putOctal(header.mtime, sizeof(header.mtime), statbuf->st_mtime);
|
||||
strncpy(header.magic, TAR_MAGIC TAR_VERSION,
|
||||
TAR_MAGIC_LEN + TAR_VERSION_LEN );
|
||||
|
||||
/* Enter the user and group names (default to root if it fails) */
|
||||
my_getpwuid(header.uname, statbuf->st_uid);
|
||||
if (! *header.uname)
|
||||
strcpy(header.uname, "root");
|
||||
my_getgrgid(header.gname, statbuf->st_gid);
|
||||
if (! *header.uname)
|
||||
strcpy(header.uname, "root");
|
||||
|
||||
if (tbInfo->hlInfo) {
|
||||
/* This is a hard link */
|
||||
header.typeflag = LNKTYPE;
|
||||
strncpy(header.linkname, tbInfo->hlInfo->name, sizeof(header.linkname));
|
||||
} else if (S_ISLNK(statbuf->st_mode)) {
|
||||
char *lpath = xreadlink(real_name);
|
||||
if (!lpath) /* Already printed err msg inside xreadlink() */
|
||||
return ( FALSE);
|
||||
header.typeflag = SYMTYPE;
|
||||
strncpy(header.linkname, lpath, sizeof(header.linkname));
|
||||
free(lpath);
|
||||
} else if (S_ISDIR(statbuf->st_mode)) {
|
||||
header.typeflag = DIRTYPE;
|
||||
strncat(header.name, "/", sizeof(header.name));
|
||||
} else if (S_ISCHR(statbuf->st_mode)) {
|
||||
header.typeflag = CHRTYPE;
|
||||
putOctal(header.devmajor, sizeof(header.devmajor), MAJOR(statbuf->st_rdev));
|
||||
putOctal(header.devminor, sizeof(header.devminor), MINOR(statbuf->st_rdev));
|
||||
} else if (S_ISBLK(statbuf->st_mode)) {
|
||||
header.typeflag = BLKTYPE;
|
||||
putOctal(header.devmajor, sizeof(header.devmajor), MAJOR(statbuf->st_rdev));
|
||||
putOctal(header.devminor, sizeof(header.devminor), MINOR(statbuf->st_rdev));
|
||||
} else if (S_ISFIFO(statbuf->st_mode)) {
|
||||
header.typeflag = FIFOTYPE;
|
||||
} else if (S_ISREG(statbuf->st_mode)) {
|
||||
header.typeflag = REGTYPE;
|
||||
putOctal(header.size, sizeof(header.size), statbuf->st_size);
|
||||
} else {
|
||||
error_msg("%s: Unknown file type", real_name);
|
||||
return ( FALSE);
|
||||
}
|
||||
|
||||
/* Calculate and store the checksum (i.e., the sum of all of the bytes of
|
||||
* the header). The checksum field must be filled with blanks for the
|
||||
* calculation. The checksum field is formatted differently from the
|
||||
* other fields: it has [6] digits, a null, then a space -- rather than
|
||||
* digits, followed by a null like the other fields... */
|
||||
memset(header.chksum, ' ', sizeof(header.chksum));
|
||||
cp = (const unsigned char *) &header;
|
||||
while (size-- > 0)
|
||||
chksum += *cp++;
|
||||
putOctal(header.chksum, 7, chksum);
|
||||
|
||||
/* Now write the header out to disk */
|
||||
if ((size=full_write(tbInfo->tarFd, (char*)&header, sizeof(struct TarHeader))) < 0) {
|
||||
error_msg(io_error, real_name, strerror(errno));
|
||||
return ( FALSE);
|
||||
}
|
||||
/* Pad the header up to the tar block size */
|
||||
for (; size<TAR_BLOCK_SIZE; size++) {
|
||||
write(tbInfo->tarFd, "\0", 1);
|
||||
}
|
||||
/* Now do the verbose thing (or not) */
|
||||
if (tbInfo->verboseFlag==TRUE) {
|
||||
FILE *vbFd = stdout;
|
||||
if (tbInfo->tarFd == fileno(stdout)) // If the archive goes to stdout, verbose to stderr
|
||||
vbFd = stderr;
|
||||
fprintf(vbFd, "%s\n", header.name);
|
||||
}
|
||||
|
||||
return ( TRUE);
|
||||
}
|
||||
|
||||
# if defined CONFIG_FEATURE_TAR_EXCLUDE
|
||||
static int exclude_file(char **excluded_files, const char *file)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (excluded_files == NULL)
|
||||
return 0;
|
||||
|
||||
for (i = 0; excluded_files[i] != NULL; i++) {
|
||||
if (excluded_files[i][0] == '/') {
|
||||
if (fnmatch(excluded_files[i], file,
|
||||
FNM_PATHNAME | FNM_LEADING_DIR) == 0)
|
||||
return 1;
|
||||
} else {
|
||||
const char *p;
|
||||
|
||||
for (p = file; p[0] != '\0'; p++) {
|
||||
if ((p == file || p[-1] == '/') && p[0] != '/' &&
|
||||
fnmatch(excluded_files[i], p,
|
||||
FNM_PATHNAME | FNM_LEADING_DIR) == 0)
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int writeFileToTarball(const char *fileName, struct stat *statbuf, void* userData)
|
||||
{
|
||||
struct TarBallInfo *tbInfo = (struct TarBallInfo *)userData;
|
||||
const char *header_name;
|
||||
|
||||
/*
|
||||
** Check to see if we are dealing with a hard link.
|
||||
** If so -
|
||||
** Treat the first occurance of a given dev/inode as a file while
|
||||
** treating any additional occurances as hard links. This is done
|
||||
** by adding the file information to the HardLinkInfo linked list.
|
||||
*/
|
||||
tbInfo->hlInfo = NULL;
|
||||
if (statbuf->st_nlink > 1) {
|
||||
tbInfo->hlInfo = findHardLinkInfo(tbInfo->hlInfoHead, statbuf->st_dev,
|
||||
statbuf->st_ino);
|
||||
if (tbInfo->hlInfo == NULL)
|
||||
addHardLinkInfo (&tbInfo->hlInfoHead, statbuf->st_dev,
|
||||
statbuf->st_ino, statbuf->st_nlink, fileName);
|
||||
}
|
||||
|
||||
/* It is against the rules to archive a socket */
|
||||
if (S_ISSOCK(statbuf->st_mode)) {
|
||||
error_msg("%s: socket ignored", fileName);
|
||||
return( TRUE);
|
||||
}
|
||||
|
||||
/* It is a bad idea to store the archive we are in the process of creating,
|
||||
* so check the device and inode to be sure that this particular file isn't
|
||||
* the new tarball */
|
||||
if (tbInfo->statBuf.st_dev == statbuf->st_dev &&
|
||||
tbInfo->statBuf.st_ino == statbuf->st_ino) {
|
||||
error_msg("%s: file is the archive; skipping", fileName);
|
||||
return( TRUE);
|
||||
}
|
||||
|
||||
header_name = fileName;
|
||||
while (header_name[0] == '/') {
|
||||
static int alreadyWarned=FALSE;
|
||||
if (alreadyWarned==FALSE) {
|
||||
error_msg("Removing leading '/' from member names");
|
||||
alreadyWarned=TRUE;
|
||||
}
|
||||
header_name++;
|
||||
}
|
||||
|
||||
if (strlen(fileName) >= NAME_SIZE) {
|
||||
error_msg(name_longer_than_foo, NAME_SIZE);
|
||||
return ( TRUE);
|
||||
}
|
||||
|
||||
if (header_name[0] == '\0')
|
||||
return TRUE;
|
||||
|
||||
# if defined CONFIG_FEATURE_TAR_EXCLUDE
|
||||
if (exclude_file(tbInfo->excludeList, header_name)) {
|
||||
return SKIP;
|
||||
}
|
||||
# endif //CONFIG_FEATURE_TAR_EXCLUDE
|
||||
|
||||
if (writeTarHeader(tbInfo, header_name, fileName, statbuf)==FALSE) {
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
/* Now, if the file is a regular file, copy it out to the tarball */
|
||||
if ((tbInfo->hlInfo == NULL)
|
||||
&& (S_ISREG(statbuf->st_mode))) {
|
||||
int inputFileFd;
|
||||
char buffer[BUFSIZ];
|
||||
ssize_t size=0, readSize=0;
|
||||
|
||||
/* open the file we want to archive, and make sure all is well */
|
||||
if ((inputFileFd = open(fileName, O_RDONLY)) < 0) {
|
||||
error_msg("%s: Cannot open: %s", fileName, strerror(errno));
|
||||
return( FALSE);
|
||||
}
|
||||
|
||||
/* write the file to the archive */
|
||||
while ( (size = full_read(inputFileFd, buffer, sizeof(buffer))) > 0 ) {
|
||||
if (full_write(tbInfo->tarFd, buffer, size) != size ) {
|
||||
/* Output file seems to have a problem */
|
||||
error_msg(io_error, fileName, strerror(errno));
|
||||
return( FALSE);
|
||||
}
|
||||
readSize+=size;
|
||||
}
|
||||
if (size == -1) {
|
||||
error_msg(io_error, fileName, strerror(errno));
|
||||
return( FALSE);
|
||||
}
|
||||
/* Pad the file up to the tar block size */
|
||||
for (; (readSize%TAR_BLOCK_SIZE) != 0; readSize++) {
|
||||
write(tbInfo->tarFd, "\0", 1);
|
||||
}
|
||||
close( inputFileFd);
|
||||
}
|
||||
|
||||
return( TRUE);
|
||||
}
|
||||
|
||||
static int writeTarFile(const char* tarName, int verboseFlag, char **argv,
|
||||
char** excludeList)
|
||||
{
|
||||
int tarFd=-1;
|
||||
int errorFlag=FALSE;
|
||||
ssize_t size;
|
||||
struct TarBallInfo tbInfo;
|
||||
tbInfo.verboseFlag = verboseFlag;
|
||||
tbInfo.hlInfoHead = NULL;
|
||||
|
||||
/* Make sure there is at least one file to tar up. */
|
||||
if (*argv == NULL)
|
||||
error_msg_and_die("Cowardly refusing to create an empty archive");
|
||||
|
||||
/* Open the tar file for writing. */
|
||||
if (tarName == NULL)
|
||||
tbInfo.tarFd = fileno(stdout);
|
||||
else
|
||||
tbInfo.tarFd = open (tarName, O_WRONLY | O_CREAT | O_TRUNC, 0644);
|
||||
if (tbInfo.tarFd < 0) {
|
||||
perror_msg( "Error opening '%s'", tarName);
|
||||
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
||||
return ( FALSE);
|
||||
}
|
||||
tbInfo.excludeList=excludeList;
|
||||
/* Store the stat info for the tarball's file, so
|
||||
* can avoid including the tarball into itself.... */
|
||||
if (fstat(tbInfo.tarFd, &tbInfo.statBuf) < 0)
|
||||
error_msg_and_die(io_error, tarName, strerror(errno));
|
||||
|
||||
/* Read the directory/files and iterate over them one at a time */
|
||||
while (*argv != NULL) {
|
||||
if (! recursive_action(*argv++, TRUE, FALSE, FALSE,
|
||||
writeFileToTarball, writeFileToTarball,
|
||||
(void*) &tbInfo)) {
|
||||
errorFlag = TRUE;
|
||||
}
|
||||
}
|
||||
/* Write two empty blocks to the end of the archive */
|
||||
for (size=0; size<(2*TAR_BLOCK_SIZE); size++) {
|
||||
write(tbInfo.tarFd, "\0", 1);
|
||||
}
|
||||
|
||||
/* To be pedantically correct, we would check if the tarball
|
||||
* is smaller than 20 tar blocks, and pad it if it was smaller,
|
||||
* but that isn't necessary for GNU tar interoperability, and
|
||||
* so is considered a waste of space */
|
||||
|
||||
/* Hang up the tools, close up shop, head home */
|
||||
close(tarFd);
|
||||
if (errorFlag) {
|
||||
error_msg("Error exit delayed from previous errors");
|
||||
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
||||
return(FALSE);
|
||||
}
|
||||
freeHardLinkInfo(&tbInfo.hlInfoHead);
|
||||
return( TRUE);
|
||||
}
|
||||
#endif //tar_create
|
||||
|
||||
void append_file_to_list(const char *new_name, char ***list, int *list_count)
|
||||
{
|
||||
*list = realloc(*list, sizeof(char *) * (*list_count + 2));
|
||||
(*list)[*list_count] = xstrdup(new_name);
|
||||
(*list_count)++;
|
||||
(*list)[*list_count] = NULL;
|
||||
}
|
||||
|
||||
void append_file_list_to_list(char *filename, char ***name_list, int *num_of_entries)
|
||||
{
|
||||
FILE *src_stream;
|
||||
char *line;
|
||||
|
||||
src_stream = xfopen(filename, "r");
|
||||
while ((line = get_line_from_file(src_stream)) != NULL) {
|
||||
chomp (line);
|
||||
append_file_to_list(line, name_list, num_of_entries);
|
||||
free(line);
|
||||
}
|
||||
fclose(src_stream);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
|
||||
/*
|
||||
* Create a list of names that are in the include list AND NOT in the exclude lists
|
||||
*/
|
||||
char **list_and_not_list(char **include_list, char **exclude_list)
|
||||
{
|
||||
char **new_include_list = NULL;
|
||||
int new_include_count = 0;
|
||||
int include_count = 0;
|
||||
int exclude_count;
|
||||
|
||||
if (include_list == NULL) {
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
while (include_list[include_count] != NULL) {
|
||||
int found = FALSE;
|
||||
exclude_count = 0;
|
||||
while (exclude_list[exclude_count] != NULL) {
|
||||
if (strcmp(include_list[include_count], exclude_list[exclude_count]) == 0) {
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
exclude_count++;
|
||||
}
|
||||
|
||||
if (! found) {
|
||||
new_include_list = realloc(new_include_list, sizeof(char *) * (include_count + 2));
|
||||
new_include_list[new_include_count] = include_list[include_count];
|
||||
new_include_count++;
|
||||
} else {
|
||||
free(include_list[include_count]);
|
||||
}
|
||||
include_count++;
|
||||
}
|
||||
new_include_list[new_include_count] = NULL;
|
||||
return(new_include_list);
|
||||
}
|
||||
#endif
|
||||
|
||||
int tar_main(int argc, char **argv)
|
||||
{
|
||||
enum untar_funct_e {
|
||||
/* This is optional */
|
||||
untar_unzip = 1,
|
||||
/* Require one and only one of these */
|
||||
untar_list = 2,
|
||||
untar_create = 4,
|
||||
untar_extract = 8
|
||||
};
|
||||
|
||||
FILE *src_stream = NULL;
|
||||
FILE *uncompressed_stream = NULL;
|
||||
char **include_list = NULL;
|
||||
char **exclude_list = NULL;
|
||||
char *src_filename = NULL;
|
||||
char *dst_prefix = NULL;
|
||||
int opt;
|
||||
unsigned short untar_funct = 0;
|
||||
unsigned short untar_funct_required = 0;
|
||||
unsigned short extract_function = 0;
|
||||
int include_list_count = 0;
|
||||
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
|
||||
int exclude_list_count = 0;
|
||||
#endif
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
int gunzip_pid;
|
||||
int gz_fd = 0;
|
||||
#endif
|
||||
|
||||
if (argc < 2) {
|
||||
show_usage();
|
||||
}
|
||||
|
||||
/* Prepend '-' to the first argument if required */
|
||||
if (argv[1][0] != '-') {
|
||||
char *tmp = xmalloc(strlen(argv[1]) + 2);
|
||||
tmp[0] = '-';
|
||||
strcpy(tmp + 1, argv[1]);
|
||||
argv[1] = tmp;
|
||||
}
|
||||
|
||||
while ((opt = getopt(argc, argv, "ctxT:X:C:f:Opvz")) != -1) {
|
||||
switch (opt) {
|
||||
|
||||
/* One and only one of these is required */
|
||||
case 'c':
|
||||
untar_funct_required |= untar_create;
|
||||
break;
|
||||
case 't':
|
||||
untar_funct_required |= untar_list;
|
||||
extract_function |= extract_list |extract_unconditional;
|
||||
break;
|
||||
case 'x':
|
||||
untar_funct_required |= untar_extract;
|
||||
extract_function |= (extract_all_to_fs | extract_unconditional | extract_create_leading_dirs);
|
||||
break;
|
||||
|
||||
/* These are optional */
|
||||
/* Exclude or Include files listed in <filename>*/
|
||||
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
|
||||
case 'X':
|
||||
append_file_list_to_list(optarg, &exclude_list, &exclude_list_count);
|
||||
break;
|
||||
#endif
|
||||
case 'T':
|
||||
// by default a list is an include list
|
||||
append_file_list_to_list(optarg, &include_list, &include_list_count);
|
||||
break;
|
||||
|
||||
case 'C': // Change to dir <optarg>
|
||||
/* Make sure dst_prefix ends in a '/' */
|
||||
dst_prefix = concat_path_file(optarg, "/");
|
||||
break;
|
||||
case 'f': // archive filename
|
||||
if (strcmp(optarg, "-") == 0) {
|
||||
src_filename = NULL;
|
||||
} else {
|
||||
src_filename = xstrdup(optarg);
|
||||
}
|
||||
break;
|
||||
case 'O':
|
||||
extract_function |= extract_to_stdout;
|
||||
break;
|
||||
case 'p':
|
||||
break;
|
||||
case 'v':
|
||||
if (extract_function & extract_list) {
|
||||
extract_function |= extract_verbose_list;
|
||||
}
|
||||
extract_function |= extract_list;
|
||||
break;
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
case 'z':
|
||||
untar_funct |= untar_unzip;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
}
|
||||
|
||||
/* Make sure the valid arguments were passed */
|
||||
if (untar_funct_required == 0) {
|
||||
error_msg_and_die("You must specify one of the `-ctx' options");
|
||||
}
|
||||
if ((untar_funct_required != untar_create) &&
|
||||
(untar_funct_required != untar_extract) &&
|
||||
(untar_funct_required != untar_list)) {
|
||||
error_msg_and_die("You may not specify more than one `ctx' option.");
|
||||
}
|
||||
untar_funct |= untar_funct_required;
|
||||
|
||||
/* Setup an array of filenames to work with */
|
||||
while (optind < argc) {
|
||||
append_file_to_list(argv[optind], &include_list, &include_list_count);
|
||||
optind++;
|
||||
}
|
||||
if (extract_function & (extract_list | extract_all_to_fs)) {
|
||||
if (dst_prefix == NULL) {
|
||||
dst_prefix = xstrdup("./");
|
||||
}
|
||||
|
||||
/* Setup the source of the tar data */
|
||||
if (src_filename != NULL) {
|
||||
src_stream = xfopen(src_filename, "r");
|
||||
} else {
|
||||
src_stream = stdin;
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
/* Get a binary tree of all the tar file headers */
|
||||
if (untar_funct & untar_unzip) {
|
||||
uncompressed_stream = gz_open(src_stream, &gunzip_pid);
|
||||
} else
|
||||
#endif // CONFIG_FEATURE_TAR_GZIP
|
||||
uncompressed_stream = src_stream;
|
||||
|
||||
/* extract or list archive */
|
||||
unarchive(uncompressed_stream, stdout, &get_header_tar, extract_function, dst_prefix, include_list, exclude_list);
|
||||
fclose(uncompressed_stream);
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_TAR_CREATE
|
||||
/* create an archive */
|
||||
else if (untar_funct & untar_create) {
|
||||
int verboseFlag = FALSE;
|
||||
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
if (untar_funct & untar_unzip) {
|
||||
error_msg_and_die("Creation of compressed tarfile not internally support by tar, pipe to busybox gunzip");
|
||||
}
|
||||
#endif // CONFIG_FEATURE_TAR_GZIP
|
||||
if (extract_function & extract_verbose_list) {
|
||||
verboseFlag = TRUE;
|
||||
}
|
||||
writeTarFile(src_filename, verboseFlag, include_list, exclude_list);
|
||||
}
|
||||
#endif // CONFIG_FEATURE_TAR_CREATE
|
||||
|
||||
/* Cleanups */
|
||||
#ifdef CONFIG_FEATURE_TAR_GZIP
|
||||
if (untar_funct & untar_unzip) {
|
||||
fclose(src_stream);
|
||||
close(gz_fd);
|
||||
gz_close(gunzip_pid);
|
||||
}
|
||||
#endif // CONFIG_FEATURE_TAR_GZIP
|
||||
#ifdef CONFIG_FEATURE_CLEAN_UP
|
||||
if (src_filename) {
|
||||
free(src_filename);
|
||||
}
|
||||
#endif
|
||||
return(EXIT_SUCCESS);
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini unzip implementation for busybox
|
||||
*
|
||||
* Copyright (C) 2001 by Laurence Anderson
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "unarchive.h"
|
||||
#include "busybox.h"
|
||||
|
||||
extern int unzip_main(int argc, char **argv)
|
||||
{
|
||||
FILE *src_stream;
|
||||
int extract_function = extract_all_to_fs | extract_create_leading_dirs;
|
||||
char **extract_names = NULL;
|
||||
char **exclude_names = NULL;
|
||||
int opt = 0;
|
||||
int num_of_entries = 0;
|
||||
int exclude = 0;
|
||||
char *outdir = "./";
|
||||
FILE *msgout = stdout;
|
||||
|
||||
while ((opt = getopt(argc, argv, "lnopqxd:")) != -1) {
|
||||
switch (opt) {
|
||||
case 'l':
|
||||
extract_function |= extract_verbose_list;
|
||||
extract_function ^= extract_all_to_fs;
|
||||
break;
|
||||
case 'n':
|
||||
break;
|
||||
case 'o':
|
||||
extract_function |= extract_unconditional;
|
||||
break;
|
||||
case 'p':
|
||||
extract_function |= extract_to_stdout;
|
||||
extract_function ^= extract_all_to_fs;
|
||||
/* FALLTHROUGH */
|
||||
case 'q':
|
||||
msgout = xfopen("/dev/null", "w");
|
||||
break;
|
||||
case 'd':
|
||||
outdir = xstrdup(optarg);
|
||||
strcat(outdir, "/");
|
||||
break;
|
||||
case 'x':
|
||||
exclude = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (optind == argc) {
|
||||
show_usage();
|
||||
}
|
||||
|
||||
if (*argv[optind] == '-') src_stream = stdin;
|
||||
else src_stream = xfopen(argv[optind++], "r");
|
||||
|
||||
while (optind < argc) {
|
||||
if (exclude) {
|
||||
exclude_names = xrealloc(exclude_names, sizeof(char *) * (num_of_entries + 2));
|
||||
exclude_names[num_of_entries] = xstrdup(argv[optind]);
|
||||
} else {
|
||||
extract_names = xrealloc(extract_names, sizeof(char *) * (num_of_entries + 2));
|
||||
extract_names[num_of_entries] = xstrdup(argv[optind]);
|
||||
}
|
||||
num_of_entries++;
|
||||
if (exclude) exclude_names[num_of_entries] = NULL;
|
||||
else extract_names[num_of_entries] = NULL;
|
||||
optind++;
|
||||
}
|
||||
|
||||
unarchive(src_stream, msgout, &get_header_zip, extract_function, outdir, extract_names, exclude_names);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -5,14 +5,14 @@
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include "busybox.h"
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
#ifdef BB_LOCALE_SUPPORT
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
int been_there_done_that = 0; /* Also used in applets.c */
|
||||
const char *applet_name;
|
||||
|
||||
#ifdef CONFIG_FEATURE_INSTALLER
|
||||
#ifdef BB_FEATURE_INSTALLER
|
||||
/*
|
||||
* directory table
|
||||
* this should be consistent w/ the enum, busybox.h::Location,
|
||||
@@ -20,29 +20,17 @@ const char *applet_name;
|
||||
*/
|
||||
static const char usr_bin [] ="/usr/bin";
|
||||
static const char usr_sbin[] ="/usr/sbin";
|
||||
|
||||
static const char* const install_dir[] = {
|
||||
&usr_bin [8], /* "", equivalent to "/" for concat_path_file() */
|
||||
&usr_bin [4], /* "/bin" */
|
||||
&usr_sbin[4], /* "/sbin" */
|
||||
usr_bin,
|
||||
usr_sbin
|
||||
};
|
||||
};
|
||||
|
||||
/* abstract link() */
|
||||
typedef int (*__link_f)(const char *, const char *);
|
||||
|
||||
/*
|
||||
* Where in the filesystem is this busybox?
|
||||
* [return]
|
||||
* malloc'd string w/ full pathname of busybox's location
|
||||
* NULL on failure
|
||||
*/
|
||||
static inline char *busybox_fullpath(void)
|
||||
{
|
||||
return xreadlink("/proc/self/exe");
|
||||
}
|
||||
|
||||
/* create (sym)links for each applet */
|
||||
static void install_links(const char *busybox, int use_symbolic_links)
|
||||
{
|
||||
@@ -66,7 +54,7 @@ static void install_links(const char *busybox, int use_symbolic_links)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* CONFIG_FEATURE_INSTALLER */
|
||||
#endif /* BB_FEATURE_INSTALLER */
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -82,8 +70,8 @@ int main(int argc, char **argv)
|
||||
applet_name = s;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
#ifdef CONFIG_INIT
|
||||
#ifdef BB_LOCALE_SUPPORT
|
||||
#ifdef BB_INIT
|
||||
if(getpid()!=1) /* Do not set locale for `init' */
|
||||
#endif
|
||||
{
|
||||
@@ -100,7 +88,7 @@ int busybox_main(int argc, char **argv)
|
||||
{
|
||||
int col = 0, len, i;
|
||||
|
||||
#ifdef CONFIG_FEATURE_INSTALLER
|
||||
#ifdef BB_FEATURE_INSTALLER
|
||||
/*
|
||||
* This style of argument parsing doesn't scale well
|
||||
* in the event that busybox starts wanting more --options.
|
||||
@@ -119,7 +107,7 @@ int busybox_main(int argc, char **argv)
|
||||
}
|
||||
|
||||
/* link */
|
||||
busybox = busybox_fullpath();
|
||||
busybox = xreadlink("/proc/self/exe");
|
||||
if (busybox) {
|
||||
install_links(busybox, use_symbolic_links);
|
||||
free(busybox);
|
||||
@@ -128,7 +116,7 @@ int busybox_main(int argc, char **argv)
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
#endif /* CONFIG_FEATURE_INSTALLER */
|
||||
#endif /* BB_FEATURE_INSTALLER */
|
||||
|
||||
argc--;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef _BB_INTERNAL_H_
|
||||
#define _BB_INTERNAL_H_ 1
|
||||
|
||||
#include "config.h"
|
||||
#include "Config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
@@ -34,7 +34,7 @@
|
||||
#define BB_BANNER "BusyBox v" BB_VER " (" BB_BT ")"
|
||||
|
||||
#ifdef DMALLOC
|
||||
#include <dmalloc.h>
|
||||
#include "dmalloc.h"
|
||||
#endif
|
||||
|
||||
#include <features.h>
|
||||
@@ -66,19 +66,19 @@ extern const struct BB_applet applets[];
|
||||
#include "applets.h"
|
||||
#undef PROTOTYPES
|
||||
|
||||
#ifdef CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
#define RESERVE_CONFIG_BUFFER(buffer,len) char buffer[len]
|
||||
#define RESERVE_CONFIG_UBUFFER(buffer,len) unsigned char buffer[len]
|
||||
#define RELEASE_CONFIG_BUFFER(buffer) ((void)0)
|
||||
#ifdef BB_FEATURE_BUFFERS_GO_ON_STACK
|
||||
#define RESERVE_BB_BUFFER(buffer,len) char buffer[len]
|
||||
#define RESERVE_BB_UBUFFER(buffer,len) unsigned char buffer[len]
|
||||
#define RELEASE_BB_BUFFER(buffer) ((void)0)
|
||||
#else
|
||||
#ifdef CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
#define RESERVE_CONFIG_BUFFER(buffer,len) static char buffer[len]
|
||||
#define RESERVE_CONFIG_UBUFFER(buffer,len) static unsigned char buffer[len]
|
||||
#define RELEASE_CONFIG_BUFFER(buffer) ((void)0)
|
||||
#ifdef BB_FEATURE_BUFFERS_GO_IN_BSS
|
||||
#define RESERVE_BB_BUFFER(buffer,len) static char buffer[len]
|
||||
#define RESERVE_BB_UBUFFER(buffer,len) static unsigned char buffer[len]
|
||||
#define RELEASE_BB_BUFFER(buffer) ((void)0)
|
||||
#else
|
||||
#define RESERVE_CONFIG_BUFFER(buffer,len) char *buffer=xmalloc(len)
|
||||
#define RESERVE_CONFIG_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
|
||||
#define RELEASE_CONFIG_BUFFER(buffer) free (buffer)
|
||||
#define RESERVE_BB_BUFFER(buffer,len) char *buffer=xmalloc(len)
|
||||
#define RESERVE_BB_UBUFFER(buffer,len) unsigned char *buffer=xmalloc(len)
|
||||
#define RELEASE_BB_BUFFER(buffer) free (buffer)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -99,7 +99,7 @@ extern const struct BB_applet applets[];
|
||||
|
||||
|
||||
/* Pull in the utility routines from libbb */
|
||||
#include "libbb.h"
|
||||
#include "libbb/libbb.h"
|
||||
|
||||
/* Try to pull in PATH_MAX */
|
||||
#include <limits.h>
|
||||
@@ -10,8 +10,8 @@
|
||||
export LC_ALL=POSIX
|
||||
export LC_CTYPE=POSIX
|
||||
|
||||
CONFIG_H=${1:-include/config.h}
|
||||
APPLETS_H=${2:-include/applets.h}
|
||||
CONFIG_H=${1:-Config.h}
|
||||
APPLETS_H=${2:-applets.h}
|
||||
gcc -E -DMAKE_LINKS -include $CONFIG_H $APPLETS_H |
|
||||
awk '/^[ \t]*LINK/{
|
||||
dir=substr($2,8)
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
export LC_ALL=POSIX
|
||||
export LC_CTYPE=POSIX
|
||||
|
||||
RAW=` \
|
||||
$CC -E -dM ${1:-Config.h} | \
|
||||
sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\<BB_\(.*\)\>/\1.c/gp;' \
|
||||
| tr A-Z a-z | sort
|
||||
`
|
||||
test "${RAW}" != "" || exit
|
||||
if [ -d "$BB_SRC_DIR" ]; then cd $BB_SRC_DIR; fi
|
||||
# By running $RAW through "ls", we avoid listing
|
||||
# source files that don't exist.
|
||||
ls $RAW 2>/dev/null | tr '\n' ' '
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
%define name busybox
|
||||
%define epoch 0
|
||||
%define version 0.61.pre
|
||||
%define version 0.60.3
|
||||
%define release %(date -I | sed -e 's/-/_/g')
|
||||
%define serial 1
|
||||
|
||||
@@ -37,7 +37,7 @@ extern int cat_main(int argc, char **argv)
|
||||
while (--argc > 0) {
|
||||
if(!(strcmp(*++argv, "-"))) {
|
||||
print_file(stdin);
|
||||
} else if (! print_file_by_name(*argv)) {
|
||||
} else if (print_file_by_name(*argv) == FALSE) {
|
||||
status = EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini chgrp implementation for busybox
|
||||
* Mini chown/chmod/chgrp implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
|
||||
@@ -72,8 +73,8 @@ int chgrp_main(int argc, char **argv)
|
||||
|
||||
/* Ok, ready to do the deed now */
|
||||
while (++optind < argc) {
|
||||
if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL)) {
|
||||
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL) == FALSE) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini chmod implementation for busybox
|
||||
* Mini chown/chmod/chgrp implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
|
||||
@@ -43,22 +44,34 @@ int chmod_main(int argc, char **argv)
|
||||
int i;
|
||||
int opt;
|
||||
int recursiveFlag = FALSE;
|
||||
int opt_eq_modeFlag = FALSE;
|
||||
|
||||
/* do normal option parsing */
|
||||
while ((opt = getopt(argc, argv, "R")) > 0) {
|
||||
while ((opt = getopt(argc, argv, "Rrwxst")) > 0) {
|
||||
switch (opt) {
|
||||
case 'R':
|
||||
recursiveFlag = TRUE;
|
||||
break;
|
||||
case 'r':
|
||||
case 'w':
|
||||
case 'x':
|
||||
case 's':
|
||||
case 't':
|
||||
opt_eq_modeFlag = TRUE;
|
||||
break;
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (opt_eq_modeFlag == TRUE) {
|
||||
optind--;
|
||||
}
|
||||
|
||||
if (argc > optind && argc > 2 && argv[optind]) {
|
||||
/* Parse the specified mode */
|
||||
mode_t mode;
|
||||
if (! parse_mode(argv[optind], &mode)) {
|
||||
if (parse_mode(argv[optind], &mode) == FALSE) {
|
||||
error_msg_and_die( "unknown mode: %s", argv[optind]);
|
||||
}
|
||||
} else {
|
||||
@@ -67,8 +80,8 @@ int chmod_main(int argc, char **argv)
|
||||
|
||||
/* Ok, ready to do the deed now */
|
||||
for (i = optind + 1; i < argc; i++) {
|
||||
if (! recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
|
||||
fileAction, argv[optind])) {
|
||||
if (recursive_action (argv[i], recursiveFlag, FALSE, FALSE, fileAction,
|
||||
fileAction, argv[optind]) == FALSE) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini chown implementation for busybox
|
||||
* Mini chown/chmod/chgrp implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
|
||||
@@ -94,8 +95,8 @@ int chown_main(int argc, char **argv)
|
||||
|
||||
/* Ok, ready to do the deed now */
|
||||
while (++optind < argc) {
|
||||
if (! recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL)) {
|
||||
if (recursive_action (argv[optind], recursiveFlag, FALSE, FALSE,
|
||||
fileAction, fileAction, NULL) == FALSE) {
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
/*
|
||||
* Mini chroot implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
|
||||
*
|
||||
@@ -47,7 +48,7 @@ int chroot_main(int argc, char **argv)
|
||||
prog = *argv;
|
||||
execvp(*argv, argv);
|
||||
} else {
|
||||
#if defined shell_main && defined CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
#if defined shell_main && defined BB_FEATURE_SH_STANDALONE_SHELL
|
||||
char shell[] = "/bin/sh";
|
||||
char *shell_argv[2] = { shell, NULL };
|
||||
applet_name = shell;
|
||||
@@ -24,7 +24,7 @@ int chvt_main(int argc, char **argv)
|
||||
|
||||
if ((argc != 2) || (**(argv + 1) == '-'))
|
||||
show_usage();
|
||||
fd = get_console_fd("/dev/console");
|
||||
fd = get_console_fd();
|
||||
num = atoi(argv[1]);
|
||||
if (ioctl(fd, VT_ACTIVATE, num))
|
||||
perror_msg_and_die("VT_ACTIVATE");
|
||||
@@ -2,6 +2,7 @@
|
||||
/*
|
||||
* Mini clear implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Erik Andersen
|
||||
* Copyright (C) 1999,2000,2001 by Erik Andersen <andersee@debian.org>
|
||||
*
|
||||
@@ -0,0 +1,11 @@
|
||||
#ifndef CMDEDIT_H
|
||||
#define CMDEDIT_H
|
||||
|
||||
int cmdedit_read_input(char* promptStr, char* command);
|
||||
|
||||
#ifdef CONFIG_FEATURE_COMMAND_SAVEHISTORY
|
||||
void load_history ( const char *fromfile );
|
||||
void save_history ( const char *tofile );
|
||||
#endif
|
||||
|
||||
#endif /* CMDEDIT_H */
|
||||
@@ -2,7 +2,7 @@
|
||||
/*
|
||||
* Mini cmp implementation for busybox
|
||||
*
|
||||
* Copyright (C) 2000,2001 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
||||
* Copyright (C) 1999,2000,2001 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1,30 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
TOPDIR:= ../
|
||||
CONSOLETOOLS_DIR:=./
|
||||
include $(TOPDIR).config
|
||||
include $(TOPDIR)Rules.mak
|
||||
include Makefile.in
|
||||
all: $(libraries-y)
|
||||
-include $(TOPDIR).depend
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a $(AR_TARGET)
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
# Makefile for busybox
|
||||
#
|
||||
# Copyright (C) 1999-2002 Erik Andersen <andersee@debian.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
# General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
|
||||
CONSOLETOOLS_AR:=console-tools.a
|
||||
ifndef $(CONSOLETOOLS_DIR)
|
||||
CONSOLETOOLS_DIR:=$(TOPDIR)console-tools/
|
||||
endif
|
||||
|
||||
CONSOLETOOLS_DIR-y:=
|
||||
CONSOLETOOLS_DIR-$(CONFIG_CHVT) += chvt.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_CLEAR) += clear.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_DEALLOCVT) += deallocvt.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_DUMPKMAP) += dumpkmap.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADACM) += loadacm.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADFONT) += loadfont.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_LOADKMAP) += loadkmap.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_RESET) += reset.o
|
||||
CONSOLETOOLS_DIR-$(CONFIG_SETKEYCODES) += setkeycodes.o
|
||||
|
||||
libraries-y+=$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR)
|
||||
|
||||
$(CONSOLETOOLS_DIR)$(CONSOLETOOLS_AR): $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y))
|
||||
$(AR) -ro $@ $(patsubst %,$(CONSOLETOOLS_DIR)%, $(CONSOLETOOLS_DIR-y))
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#
|
||||
# For a description of the syntax of this configuration file,
|
||||
# see scripts/kbuild/config-language.txt.
|
||||
#
|
||||
|
||||
mainmenu_option next_comment
|
||||
comment 'Console Utilities'
|
||||
bool 'chvt' CONFIG_CHVT
|
||||
bool 'clear' CONFIG_CLEAR
|
||||
bool 'deallocvt' CONFIG_DEALLOCVT
|
||||
bool 'dumpkmap' CONFIG_DUMPKMAP
|
||||
bool 'loadacm' CONFIG_LOADACM
|
||||
bool 'loadfont' CONFIG_LOADFONT
|
||||
bool 'loadkmap' CONFIG_LOADKMAP
|
||||
bool 'reset' CONFIG_RESET
|
||||
bool 'setkeycodes' CONFIG_SETKEYCODES
|
||||
|
||||
endmenu
|
||||
@@ -1,428 +0,0 @@
|
||||
/*
|
||||
* Calendar implementation for busybox
|
||||
*
|
||||
* Copyright (C) 2001 by Steven J. Merrifield <steve@labyrinth.net.au>
|
||||
*
|
||||
* See original copyright at the end of this file
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <ctype.h>
|
||||
#include <err.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
#include <locale.h>
|
||||
#endif
|
||||
|
||||
#include "busybox.h"
|
||||
|
||||
#define THURSDAY 4 /* for reformation */
|
||||
#define SATURDAY 6 /* 1 Jan 1 was a Saturday */
|
||||
|
||||
#define FIRST_MISSING_DAY 639787 /* 3 Sep 1752 */
|
||||
#define NUMBER_MISSING_DAYS 11 /* 11 day correction */
|
||||
|
||||
#define MAXDAYS 42 /* max slots in a month array */
|
||||
#define SPACE -1 /* used in day array */
|
||||
|
||||
static int days_in_month[2][13] = {
|
||||
{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
|
||||
{0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31},
|
||||
};
|
||||
|
||||
int sep1752[MAXDAYS] = {
|
||||
SPACE, SPACE, 1, 2, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23,
|
||||
24, 25, 26, 27, 28, 29, 30,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
}, j_sep1752[MAXDAYS] = {
|
||||
SPACE, SPACE, 245, 246, 258, 259, 260,
|
||||
261, 262, 263, 264, 265, 266, 267,
|
||||
268, 269, 270, 271, 272, 273, 274,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
}, empty[MAXDAYS] = {
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
SPACE, SPACE, SPACE, SPACE, SPACE, SPACE, SPACE,
|
||||
};
|
||||
|
||||
char *month_names[12];
|
||||
|
||||
char day_headings[] = " ";
|
||||
char j_day_headings[] = " ";
|
||||
|
||||
/* leap year -- account for gregorian reformation in 1752 */
|
||||
#define leap_year(yr) \
|
||||
((yr) <= 1752 ? !((yr) % 4) : \
|
||||
(!((yr) % 4) && ((yr) % 100)) || !((yr) % 400))
|
||||
|
||||
/* number of centuries since 1700, not inclusive */
|
||||
#define centuries_since_1700(yr) \
|
||||
((yr) > 1700 ? (yr) / 100 - 17 : 0)
|
||||
|
||||
/* number of centuries since 1700 whose modulo of 400 is 0 */
|
||||
#define quad_centuries_since_1700(yr) \
|
||||
((yr) > 1600 ? ((yr) - 1600) / 400 : 0)
|
||||
|
||||
/* number of leap years between year 1 and this year, not inclusive */
|
||||
#define leap_years_since_year_1(yr) \
|
||||
((yr) / 4 - centuries_since_1700(yr) + quad_centuries_since_1700(yr))
|
||||
|
||||
int julian;
|
||||
void ascii_day __P((char *, int));
|
||||
void center __P((char *, int, int));
|
||||
void day_array __P((int, int, int *));
|
||||
int day_in_week __P((int, int, int));
|
||||
int day_in_year __P((int, int, int));
|
||||
void j_yearly __P((int));
|
||||
void monthly __P((int, int));
|
||||
void trim_trailing_spaces __P((char *));
|
||||
void yearly __P((int));
|
||||
|
||||
int cal_main(int argc, char **argv)
|
||||
{
|
||||
struct tm *local_time;
|
||||
static struct tm zero_tm;
|
||||
time_t now;
|
||||
int ch, month, year, yflag, i;
|
||||
char buf[40];
|
||||
|
||||
#ifdef CONFIG_LOCALE_SUPPORT
|
||||
setlocale(LC_TIME, "");
|
||||
#endif
|
||||
|
||||
yflag = 0;
|
||||
while ((ch = getopt(argc, argv, "jy")) != -1)
|
||||
switch(ch) {
|
||||
case 'j':
|
||||
julian = 1;
|
||||
break;
|
||||
case 'y':
|
||||
yflag = 1;
|
||||
break;
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
month = 0;
|
||||
switch(argc) {
|
||||
case 2:
|
||||
if ((month = atoi(*argv++)) < 1 || month > 12)
|
||||
error_msg_and_die("Illegal month value: use 1-12");
|
||||
/* FALLTHROUGH */
|
||||
case 1:
|
||||
if ((year = atoi(*argv)) < 1 || year > 9999)
|
||||
error_msg_and_die("Illegal year value: use 1-9999");
|
||||
break;
|
||||
case 0:
|
||||
time(&now);
|
||||
local_time = localtime(&now);
|
||||
year = local_time->tm_year + 1900;
|
||||
if (!yflag)
|
||||
month = local_time->tm_mon + 1;
|
||||
break;
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
|
||||
for (i = 0; i < 12; i++) {
|
||||
zero_tm.tm_mon = i;
|
||||
strftime(buf, sizeof(buf), "%B", &zero_tm);
|
||||
month_names[i] = xstrdup(buf);
|
||||
}
|
||||
for (i = 0; i < 7; i++) {
|
||||
zero_tm.tm_wday = i;
|
||||
strftime(buf, sizeof(buf), "%a", &zero_tm);
|
||||
strncpy(day_headings + i * 3, buf, 2);
|
||||
strncpy(j_day_headings + i * 4 + 1, buf, 2);
|
||||
}
|
||||
|
||||
if (month)
|
||||
monthly(month, year);
|
||||
else if (julian)
|
||||
j_yearly(year);
|
||||
else
|
||||
yearly(year);
|
||||
exit(0);
|
||||
}
|
||||
|
||||
#define DAY_LEN 3 /* 3 spaces per day */
|
||||
#define J_DAY_LEN 4 /* 4 spaces per day */
|
||||
#define WEEK_LEN 20 /* 7 * 3 - one space at the end */
|
||||
#define J_WEEK_LEN 27 /* 7 * 4 - one space at the end */
|
||||
#define HEAD_SEP 2 /* spaces between day headings */
|
||||
#define J_HEAD_SEP 2
|
||||
|
||||
void monthly(int month, int year)
|
||||
{
|
||||
int col, row, len, days[MAXDAYS];
|
||||
char *p, lineout[30];
|
||||
|
||||
day_array(month, year, days);
|
||||
len = sprintf(lineout, "%s %d", month_names[month - 1], year);
|
||||
printf("%*s%s\n%s\n",
|
||||
((julian ? J_WEEK_LEN : WEEK_LEN) - len) / 2, "",
|
||||
lineout, julian ? j_day_headings : day_headings);
|
||||
for (row = 0; row < 6; row++) {
|
||||
for (col = 0, p = lineout; col < 7; col++,
|
||||
p += julian ? J_DAY_LEN : DAY_LEN)
|
||||
ascii_day(p, days[row * 7 + col]);
|
||||
*p = '\0';
|
||||
trim_trailing_spaces(lineout);
|
||||
printf("%s\n", lineout);
|
||||
}
|
||||
}
|
||||
|
||||
void j_yearly(int year)
|
||||
{
|
||||
int col, *dp, i, month, row, which_cal;
|
||||
int days[12][MAXDAYS];
|
||||
char *p, lineout[80];
|
||||
|
||||
sprintf(lineout, "%d", year);
|
||||
center(lineout, J_WEEK_LEN * 2 + J_HEAD_SEP, 0);
|
||||
printf("\n\n");
|
||||
for (i = 0; i < 12; i++)
|
||||
day_array(i + 1, year, days[i]);
|
||||
memset(lineout, ' ', sizeof(lineout) - 1);
|
||||
lineout[sizeof(lineout) - 1] = '\0';
|
||||
for (month = 0; month < 12; month += 2) {
|
||||
center(month_names[month], J_WEEK_LEN, J_HEAD_SEP);
|
||||
center(month_names[month + 1], J_WEEK_LEN, 0);
|
||||
printf("\n%s%*s%s\n", j_day_headings, J_HEAD_SEP, "",
|
||||
j_day_headings);
|
||||
for (row = 0; row < 6; row++) {
|
||||
for (which_cal = 0; which_cal < 2; which_cal++) {
|
||||
p = lineout + which_cal * (J_WEEK_LEN + 2);
|
||||
dp = &days[month + which_cal][row * 7];
|
||||
for (col = 0; col < 7; col++, p += J_DAY_LEN)
|
||||
ascii_day(p, *dp++);
|
||||
}
|
||||
*p = '\0';
|
||||
trim_trailing_spaces(lineout);
|
||||
printf("%s\n", lineout);
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
void yearly(int year)
|
||||
{
|
||||
int col, *dp, i, month, row, which_cal;
|
||||
int days[12][MAXDAYS];
|
||||
char *p, lineout[80];
|
||||
|
||||
sprintf(lineout, "%d", year);
|
||||
center(lineout, WEEK_LEN * 3 + HEAD_SEP * 2, 0);
|
||||
printf("\n\n");
|
||||
for (i = 0; i < 12; i++)
|
||||
day_array(i + 1, year, days[i]);
|
||||
memset(lineout, ' ', sizeof(lineout) - 1);
|
||||
lineout[sizeof(lineout) - 1] = '\0';
|
||||
for (month = 0; month < 12; month += 3) {
|
||||
center(month_names[month], WEEK_LEN, HEAD_SEP);
|
||||
center(month_names[month + 1], WEEK_LEN, HEAD_SEP);
|
||||
center(month_names[month + 2], WEEK_LEN, 0);
|
||||
printf("\n%s%*s%s%*s%s\n", day_headings, HEAD_SEP,
|
||||
"", day_headings, HEAD_SEP, "", day_headings);
|
||||
for (row = 0; row < 6; row++) {
|
||||
for (which_cal = 0; which_cal < 3; which_cal++) {
|
||||
p = lineout + which_cal * (WEEK_LEN + 2);
|
||||
dp = &days[month + which_cal][row * 7];
|
||||
for (col = 0; col < 7; col++, p += DAY_LEN)
|
||||
ascii_day(p, *dp++);
|
||||
}
|
||||
*p = '\0';
|
||||
trim_trailing_spaces(lineout);
|
||||
printf("%s\n", lineout);
|
||||
}
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* day_array --
|
||||
* Fill in an array of 42 integers with a calendar. Assume for a moment
|
||||
* that you took the (maximum) 6 rows in a calendar and stretched them
|
||||
* out end to end. You would have 42 numbers or spaces. This routine
|
||||
* builds that array for any month from Jan. 1 through Dec. 9999.
|
||||
*/
|
||||
void day_array(int month, int year, int *days)
|
||||
{
|
||||
int day, dw, dm;
|
||||
|
||||
if ((month == 9) && (year == 1752)) {
|
||||
memmove(days,
|
||||
julian ? j_sep1752 : sep1752, MAXDAYS * sizeof(int));
|
||||
return;
|
||||
}
|
||||
memmove(days, empty, MAXDAYS * sizeof(int));
|
||||
dm = days_in_month[leap_year(year)][month];
|
||||
dw = day_in_week(1, month, year);
|
||||
day = julian ? day_in_year(1, month, year) : 1;
|
||||
while (dm--)
|
||||
days[dw++] = day++;
|
||||
}
|
||||
|
||||
/*
|
||||
* day_in_year --
|
||||
* return the 1 based day number within the year
|
||||
*/
|
||||
int day_in_year(int day, int month, int year)
|
||||
{
|
||||
int i, leap;
|
||||
|
||||
leap = leap_year(year);
|
||||
for (i = 1; i < month; i++)
|
||||
day += days_in_month[leap][i];
|
||||
return (day);
|
||||
}
|
||||
|
||||
/*
|
||||
* day_in_week
|
||||
* return the 0 based day number for any date from 1 Jan. 1 to
|
||||
* 31 Dec. 9999. Assumes the Gregorian reformation eliminates
|
||||
* 3 Sep. 1752 through 13 Sep. 1752. Returns Thursday for all
|
||||
* missing days.
|
||||
*/
|
||||
int day_in_week(int day, int month, int year)
|
||||
{
|
||||
long temp;
|
||||
|
||||
temp = (long)(year - 1) * 365 + leap_years_since_year_1(year - 1)
|
||||
+ day_in_year(day, month, year);
|
||||
if (temp < FIRST_MISSING_DAY)
|
||||
return ((temp - 1 + SATURDAY) % 7);
|
||||
if (temp >= (FIRST_MISSING_DAY + NUMBER_MISSING_DAYS))
|
||||
return (((temp - 1 + SATURDAY) - NUMBER_MISSING_DAYS) % 7);
|
||||
return (THURSDAY);
|
||||
}
|
||||
|
||||
void ascii_day(char *p, int day)
|
||||
{
|
||||
int display, val;
|
||||
static char *aday[] = {
|
||||
"",
|
||||
" 1", " 2", " 3", " 4", " 5", " 6", " 7",
|
||||
" 8", " 9", "10", "11", "12", "13", "14",
|
||||
"15", "16", "17", "18", "19", "20", "21",
|
||||
"22", "23", "24", "25", "26", "27", "28",
|
||||
"29", "30", "31",
|
||||
};
|
||||
|
||||
if (day == SPACE) {
|
||||
memset(p, ' ', julian ? J_DAY_LEN : DAY_LEN);
|
||||
return;
|
||||
}
|
||||
if (julian) {
|
||||
if ((val = day / 100) != 0) {
|
||||
day %= 100;
|
||||
*p++ = val + '0';
|
||||
display = 1;
|
||||
} else {
|
||||
*p++ = ' ';
|
||||
display = 0;
|
||||
}
|
||||
val = day / 10;
|
||||
if (val || display)
|
||||
*p++ = val + '0';
|
||||
else
|
||||
*p++ = ' ';
|
||||
*p++ = day % 10 + '0';
|
||||
} else {
|
||||
*p++ = aday[day][0];
|
||||
*p++ = aday[day][1];
|
||||
}
|
||||
*p = ' ';
|
||||
}
|
||||
|
||||
void trim_trailing_spaces(char *s)
|
||||
{
|
||||
char *p;
|
||||
|
||||
for (p = s; *p; ++p)
|
||||
continue;
|
||||
while (p > s && isspace(*--p))
|
||||
continue;
|
||||
if (p > s)
|
||||
++p;
|
||||
*p = '\0';
|
||||
}
|
||||
|
||||
void center(char *str, int len, int separate)
|
||||
{
|
||||
|
||||
len -= strlen(str);
|
||||
printf("%*s%s%*s", len / 2, "", str, len / 2 + len % 2, "");
|
||||
if (separate)
|
||||
printf("%*s", separate, "");
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Kim Letkeman.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
/*
|
||||
* od implementation for busybox
|
||||
* Based on code from util-linux v 2.11l
|
||||
*
|
||||
* Copyright (c) 1990
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*
|
||||
* Original copyright notice is retained at the end of this file.
|
||||
*/
|
||||
|
||||
#include <ctype.h>
|
||||
#include <getopt.h>
|
||||
#include <stdlib.h>
|
||||
#include "dump.h"
|
||||
#include "busybox.h"
|
||||
|
||||
extern FS *fshead; /* head of format strings */
|
||||
extern int blocksize; /* data block size */
|
||||
extern int length; /* max bytes to read */
|
||||
|
||||
#define ishexdigit(c) \
|
||||
((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))
|
||||
|
||||
static void
|
||||
odoffset(int argc, char ***argvp)
|
||||
{
|
||||
extern off_t skip;
|
||||
register char *num, *p;
|
||||
int base;
|
||||
char *end;
|
||||
|
||||
/*
|
||||
* The offset syntax of od(1) was genuinely bizarre. First, if
|
||||
* it started with a plus it had to be an offset. Otherwise, if
|
||||
* there were at least two arguments, a number or lower-case 'x'
|
||||
* followed by a number makes it an offset. By default it was
|
||||
* octal; if it started with 'x' or '0x' it was hex. If it ended
|
||||
* in a '.', it was decimal. If a 'b' or 'B' was appended, it
|
||||
* multiplied the number by 512 or 1024 byte units. There was
|
||||
* no way to assign a block count to a hex offset.
|
||||
*
|
||||
* We assumes it's a file if the offset is bad.
|
||||
*/
|
||||
p = **argvp;
|
||||
if (*p != '+' && (argc < 2 ||
|
||||
(!isdigit(p[0]) && (p[0] != 'x' || !ishexdigit(p[1])))))
|
||||
return;
|
||||
|
||||
base = 0;
|
||||
/*
|
||||
* skip over leading '+', 'x[0-9a-fA-f]' or '0x', and
|
||||
* set base.
|
||||
*/
|
||||
if (p[0] == '+')
|
||||
++p;
|
||||
if (p[0] == 'x' && ishexdigit(p[1])) {
|
||||
++p;
|
||||
base = 16;
|
||||
} else if (p[0] == '0' && p[1] == 'x') {
|
||||
p += 2;
|
||||
base = 16;
|
||||
}
|
||||
|
||||
/* skip over the number */
|
||||
if (base == 16)
|
||||
for (num = p; ishexdigit(*p); ++p);
|
||||
else
|
||||
for (num = p; isdigit(*p); ++p);
|
||||
|
||||
/* check for no number */
|
||||
if (num == p)
|
||||
return;
|
||||
|
||||
/* if terminates with a '.', base is decimal */
|
||||
if (*p == '.') {
|
||||
if (base)
|
||||
return;
|
||||
base = 10;
|
||||
}
|
||||
|
||||
skip = strtol(num, &end, base ? base : 8);
|
||||
|
||||
/* if end isn't the same as p, we got a non-octal digit */
|
||||
if (end != p)
|
||||
skip = 0;
|
||||
else {
|
||||
if (*p) {
|
||||
if (*p == 'b')
|
||||
skip *= 512;
|
||||
else if (*p == 'B')
|
||||
skip *= 1024;
|
||||
++p;
|
||||
}
|
||||
if (*p)
|
||||
skip = 0;
|
||||
else {
|
||||
++*argvp;
|
||||
/*
|
||||
* If the offset uses a non-octal base, the base of
|
||||
* the offset is changed as well. This isn't pretty,
|
||||
* but it's easy.
|
||||
*/
|
||||
#define TYPE_OFFSET 7
|
||||
if (base == 16) {
|
||||
fshead->nextfu->fmt[TYPE_OFFSET] = 'x';
|
||||
fshead->nextfs->nextfu->fmt[TYPE_OFFSET] = 'x';
|
||||
} else if (base == 10) {
|
||||
fshead->nextfu->fmt[TYPE_OFFSET] = 'd';
|
||||
fshead->nextfs->nextfu->fmt[TYPE_OFFSET] = 'd';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void odprecede(void)
|
||||
{
|
||||
static int first = 1;
|
||||
|
||||
if (first) {
|
||||
first = 0;
|
||||
add("\"%07.7_Ao\n\"");
|
||||
add("\"%07.7_ao \"");
|
||||
} else
|
||||
add("\" \"");
|
||||
}
|
||||
|
||||
int od_main(int argc, char **argv)
|
||||
{
|
||||
int ch;
|
||||
extern enum _vflag vflag;
|
||||
vflag = FIRST;
|
||||
length = -1;
|
||||
|
||||
while ((ch = getopt(argc, argv, "aBbcDdeFfHhIiLlOoPpswvXx")) != EOF)
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
odprecede();
|
||||
add("16/1 \"%3_u \" \"\\n\"");
|
||||
break;
|
||||
case 'B':
|
||||
case 'o':
|
||||
odprecede();
|
||||
add("8/2 \" %06o \" \"\\n\"");
|
||||
break;
|
||||
case 'b':
|
||||
odprecede();
|
||||
add("16/1 \"%03o \" \"\\n\"");
|
||||
break;
|
||||
case 'c':
|
||||
odprecede();
|
||||
add("16/1 \"%3_c \" \"\\n\"");
|
||||
break;
|
||||
case 'd':
|
||||
odprecede();
|
||||
add("8/2 \" %05u \" \"\\n\"");
|
||||
break;
|
||||
case 'D':
|
||||
odprecede();
|
||||
add("4/4 \" %010u \" \"\\n\"");
|
||||
break;
|
||||
case 'e': /* undocumented in od */
|
||||
case 'F':
|
||||
odprecede();
|
||||
add("2/8 \" %21.14e \" \"\\n\"");
|
||||
break;
|
||||
|
||||
case 'f':
|
||||
odprecede();
|
||||
add("4/4 \" %14.7e \" \"\\n\"");
|
||||
break;
|
||||
case 'H':
|
||||
case 'X':
|
||||
odprecede();
|
||||
add("4/4 \" %08x \" \"\\n\"");
|
||||
break;
|
||||
case 'h':
|
||||
case 'x':
|
||||
odprecede();
|
||||
add("8/2 \" %04x \" \"\\n\"");
|
||||
break;
|
||||
case 'I':
|
||||
case 'L':
|
||||
case 'l':
|
||||
odprecede();
|
||||
add("4/4 \" %11d \" \"\\n\"");
|
||||
break;
|
||||
case 'i':
|
||||
odprecede();
|
||||
add("8/2 \" %6d \" \"\\n\"");
|
||||
break;
|
||||
case 'O':
|
||||
odprecede();
|
||||
add("4/4 \" %011o \" \"\\n\"");
|
||||
break;
|
||||
case 'v':
|
||||
vflag = ALL;
|
||||
break;
|
||||
case 'P':
|
||||
case 'p':
|
||||
case 's':
|
||||
case 'w':
|
||||
case '?':
|
||||
default:
|
||||
error_msg("od: od(1) has been deprecated for hexdump(1).\n");
|
||||
if (ch != '?') {
|
||||
error_msg("od: hexdump(1) compatibility doesn't support the -%c option%s\n",
|
||||
ch, ch == 's' ? "; see strings(1)." : ".");
|
||||
}
|
||||
show_usage();
|
||||
}
|
||||
|
||||
if (!fshead) {
|
||||
add("\"%07.7_Ao\n\"");
|
||||
add("\"%07.7_ao \" 8/2 \"%06o \" \"\\n\"");
|
||||
}
|
||||
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
odoffset(argc, &argv);
|
||||
|
||||
return(dump(argv));
|
||||
}
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
@@ -1,112 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/* uname -- print system information
|
||||
Copyright (C) 1989-1999 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software Foundation,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||
|
||||
/* Option Example
|
||||
|
||||
-s, --sysname SunOS
|
||||
-n, --nodename rocky8
|
||||
-r, --release 4.0
|
||||
-v, --version
|
||||
-m, --machine sun
|
||||
-a, --all SunOS rocky8 4.0 sun
|
||||
|
||||
The default behavior is equivalent to `-s'.
|
||||
|
||||
David MacKenzie <djm@gnu.ai.mit.edu> */
|
||||
|
||||
/* Busyboxed by Erik Andersen */
|
||||
|
||||
/* Further size reductions by Glenn McGrath and Manuel Novoa III. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/utsname.h>
|
||||
#include <getopt.h>
|
||||
#include "busybox.h"
|
||||
|
||||
typedef struct {
|
||||
struct utsname name;
|
||||
char processor[8]; /* for "unknown" */
|
||||
} uname_info_t;
|
||||
|
||||
static const char options[] = "snrvmpa";
|
||||
static const char flags[] = "\x01\x02\x04\x08\x10\x20\x3f";
|
||||
static const unsigned short int utsname_offset[] = {
|
||||
offsetof(uname_info_t,name.sysname),
|
||||
offsetof(uname_info_t,name.nodename),
|
||||
offsetof(uname_info_t,name.release),
|
||||
offsetof(uname_info_t,name.version),
|
||||
offsetof(uname_info_t,name.machine),
|
||||
offsetof(uname_info_t,processor)
|
||||
};
|
||||
|
||||
int uname_main(int argc, char **argv)
|
||||
{
|
||||
uname_info_t uname_info;
|
||||
|
||||
#if defined(__sparc__) && defined(__linux__)
|
||||
char *fake_sparc = getenv("FAKE_SPARC");
|
||||
#endif
|
||||
|
||||
const unsigned short int *delta;
|
||||
int opt;
|
||||
char toprint = 0;
|
||||
|
||||
while ((opt = getopt(argc, argv, options)) != -1) {
|
||||
const char *p = strchr(options,opt);
|
||||
if (p == NULL) {
|
||||
show_usage();
|
||||
}
|
||||
toprint |= flags[(int)(p-options)];
|
||||
}
|
||||
|
||||
if (toprint == 0) {
|
||||
toprint = flags[0]; /* sysname */
|
||||
}
|
||||
|
||||
if (uname(&uname_info.name) == -1) {
|
||||
error_msg_and_die("cannot get system name");
|
||||
}
|
||||
|
||||
#if defined(__sparc__) && defined(__linux__)
|
||||
if ((fake_sparc != NULL)
|
||||
&& ((fake_sparc[0] == 'y')
|
||||
|| (fake_sparc[0] == 'Y'))) {
|
||||
strcpy(uname_info.name.machine, "sparc");
|
||||
}
|
||||
#endif
|
||||
|
||||
strcpy(uname_info.processor, "unknown");
|
||||
|
||||
delta=utsname_offset;
|
||||
do {
|
||||
if (toprint & 1) {
|
||||
printf(((char *)(&uname_info)) + *delta);
|
||||
if (toprint > 1) {
|
||||
putchar(' ');
|
||||
}
|
||||
}
|
||||
++delta;
|
||||
} while (toprint >>= 1);
|
||||
putchar('\n');
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*----------------------------------------------------------------------
|
||||
* Mini who is used to display user name, login time,
|
||||
* idle time and host name.
|
||||
*
|
||||
* Author: Da Chen <dchen@ayrnetworks.com>
|
||||
*
|
||||
* This is a free document; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation:
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* Copyright (c) 2002 AYR Networks, Inc.
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <utmp.h>
|
||||
#include <sys/stat.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <busybox.h>
|
||||
|
||||
extern int who_main(int argc, char **argv)
|
||||
{
|
||||
struct utmp *ut;
|
||||
struct stat st;
|
||||
int devlen, len;
|
||||
time_t now, idle;
|
||||
|
||||
if (argc > 1)
|
||||
show_usage();
|
||||
|
||||
setutent();
|
||||
devlen = sizeof("/dev/") - 1;
|
||||
printf("USER TTY IDLE FROM HOST\n");
|
||||
|
||||
while ((ut = getutent()) != NULL) {
|
||||
char name[40];
|
||||
|
||||
if (ut->ut_user[0] && ut->ut_type == USER_PROCESS) {
|
||||
len = strlen(ut->ut_line);
|
||||
if (ut->ut_line[0] == '/') {
|
||||
strncpy(name, ut->ut_line, len);
|
||||
name[len] = '\0';
|
||||
strcpy(ut->ut_line, ut->ut_line + devlen);
|
||||
} else {
|
||||
strcpy(name, "/dev/");
|
||||
strncpy(name+devlen, ut->ut_line, len);
|
||||
name[devlen+len] = '\0';
|
||||
}
|
||||
|
||||
printf("%-10s %-8s ", ut->ut_user, ut->ut_line);
|
||||
|
||||
if (stat(name, &st) == 0) {
|
||||
now = time(NULL);
|
||||
idle = now - st.st_atime;
|
||||
|
||||
if (idle < 60)
|
||||
printf("00:00m ");
|
||||
else if (idle < (60 * 60))
|
||||
printf("00:%02dm ", (int)(idle / 60));
|
||||
else if (idle < (24 * 60 * 60))
|
||||
printf("%02d:%02dm ", (int)(idle / (60 * 60)),
|
||||
(int)(idle % (60 * 60)) / 60);
|
||||
else if (idle < (24 * 60 * 60 * 365))
|
||||
printf("%03ddays ", (int)(idle / (24 * 60 * 60)));
|
||||
else
|
||||
printf("%02dyears ", (int) (idle / (24 * 60 * 60 * 365)));
|
||||
} else
|
||||
printf("%-8s ", "?");
|
||||
|
||||
printf("%-12.12s %s\n", ctime(&(ut->ut_tv.tv_sec)) + 4, ut->ut_host);
|
||||
}
|
||||
}
|
||||
endutent();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,16 +36,16 @@ extern int cp_main(int argc, char **argv)
|
||||
{
|
||||
int status = 0;
|
||||
int opt;
|
||||
int flags = FILEUTILS_DEREFERENCE;
|
||||
int flags = 0;
|
||||
int i;
|
||||
|
||||
while ((opt = getopt(argc, argv, "adfipR")) != -1)
|
||||
while ((opt = getopt(argc, argv, "adfipRr")) != -1)
|
||||
switch (opt) {
|
||||
case 'a':
|
||||
flags |= FILEUTILS_PRESERVE_STATUS | FILEUTILS_RECUR;
|
||||
/* fallthrough */
|
||||
case 'd':
|
||||
flags &= ~FILEUTILS_DEREFERENCE;
|
||||
flags |= FILEUTILS_PRESERVE_SYMLINKS;
|
||||
break;
|
||||
case 'f':
|
||||
flags |= FILEUTILS_FORCE;
|
||||
@@ -57,6 +57,9 @@ extern int cp_main(int argc, char **argv)
|
||||
flags |= FILEUTILS_PRESERVE_STATUS;
|
||||
break;
|
||||
case 'R':
|
||||
flags |= FILEUTILS_RECUR | FILEUTILS_PRESERVE_STATUS;
|
||||
break;
|
||||
case 'r':
|
||||
flags |= FILEUTILS_RECUR;
|
||||
break;
|
||||
default:
|
||||
@@ -73,9 +76,9 @@ extern int cp_main(int argc, char **argv)
|
||||
int source_exists = 1;
|
||||
int dest_exists = 1;
|
||||
|
||||
if ((!(flags & FILEUTILS_DEREFERENCE) &&
|
||||
if (((flags & FILEUTILS_PRESERVE_SYMLINKS) &&
|
||||
lstat(argv[optind], &source_stat) < 0) ||
|
||||
((flags & FILEUTILS_DEREFERENCE) &&
|
||||
(!(flags & FILEUTILS_PRESERVE_SYMLINKS) &&
|
||||
stat(argv[optind], &source_stat))) {
|
||||
if (errno != ENOENT)
|
||||
perror_msg_and_die("unable to stat `%s'", argv[optind]);
|
||||
@@ -28,7 +28,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#include "unarchive.h"
|
||||
#include "busybox.h"
|
||||
|
||||
extern int cpio_main(int argc, char **argv)
|
||||
@@ -87,7 +86,7 @@ extern int cpio_main(int argc, char **argv)
|
||||
optind++;
|
||||
}
|
||||
|
||||
unarchive(src_stream, stdout, &get_header_cpio, extract_function, "./", extract_names, NULL);
|
||||
unarchive(src_stream, stdout, &get_header_cpio, extract_function, "./", extract_names);
|
||||
if (oldmask) {
|
||||
umask(oldmask); /* Restore umask if we changed it */
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
/*
|
||||
* cut.c - minimalist version of cut
|
||||
*
|
||||
* Copyright (C) 1999,2000,2001 by Lineo, inc.
|
||||
* Written by Mark Whitley <markw@lineo.com>, <markw@codepoet.org>
|
||||
* Copyright (C) 1999,2000 by Lineo, inc. and Mark Whitley
|
||||
* Copyright (C) 1999,2000,2001 by Mark Whitley <markw@codepoet.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -222,8 +222,8 @@ int date_main(int argc, char **argv)
|
||||
if (date_fmt == NULL) {
|
||||
date_fmt = (rfc822
|
||||
? (utc
|
||||
? "%a, %_d %b %Y %H:%M:%S GMT"
|
||||
: "%a, %_d %b %Y %H:%M:%S %z")
|
||||
? "%a, %e %b %Y %H:%M:%S GMT"
|
||||
: "%a, %e %b %Y %H:%M:%S %z")
|
||||
: "%a %b %e %H:%M:%S %Z %Y");
|
||||
|
||||
} else if (*date_fmt == '\0') {
|
||||
@@ -19,65 +19,65 @@ static void push(double a)
|
||||
stack[pointer++] = a;
|
||||
}
|
||||
|
||||
static double pop(void)
|
||||
static double pop()
|
||||
{
|
||||
if (pointer == 0)
|
||||
error_msg_and_die("stack underflow");
|
||||
return stack[--pointer];
|
||||
}
|
||||
|
||||
static void add(void)
|
||||
static void add()
|
||||
{
|
||||
push(pop() + pop());
|
||||
}
|
||||
|
||||
static void sub(void)
|
||||
static void sub()
|
||||
{
|
||||
double subtrahend = pop();
|
||||
|
||||
push(pop() - subtrahend);
|
||||
}
|
||||
|
||||
static void mul(void)
|
||||
static void mul()
|
||||
{
|
||||
push(pop() * pop());
|
||||
}
|
||||
|
||||
static void divide(void)
|
||||
static void divide()
|
||||
{
|
||||
double divisor = pop();
|
||||
|
||||
push(pop() / divisor);
|
||||
}
|
||||
|
||||
static void and(void)
|
||||
static void and()
|
||||
{
|
||||
push((unsigned int) pop() & (unsigned int) pop());
|
||||
}
|
||||
|
||||
static void or(void)
|
||||
static void or()
|
||||
{
|
||||
push((unsigned int) pop() | (unsigned int) pop());
|
||||
}
|
||||
|
||||
static void eor(void)
|
||||
static void eor()
|
||||
{
|
||||
push((unsigned int) pop() ^ (unsigned int) pop());
|
||||
}
|
||||
|
||||
static void not(void)
|
||||
static void not()
|
||||
{
|
||||
push(~(unsigned int) pop());
|
||||
}
|
||||
|
||||
static void print(void)
|
||||
static void print()
|
||||
{
|
||||
printf("%g\n", pop());
|
||||
}
|
||||
|
||||
struct op {
|
||||
const char *name;
|
||||
void (*function) (void);
|
||||
void (*function) ();
|
||||
};
|
||||
|
||||
static const struct op operators[] = {
|
||||
@@ -3,7 +3,7 @@
|
||||
* Mini dd implementation for busybox
|
||||
*
|
||||
*
|
||||
* Copyright (C) 2000,2001 Matt Kraai
|
||||
* Copyright (C) 2000 by Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -22,7 +22,6 @@
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
@@ -112,7 +111,6 @@ int dd_main(int argc, char **argv)
|
||||
if (seek && trunc) {
|
||||
if (ftruncate(ofd, seek * bs) < 0) {
|
||||
struct stat st;
|
||||
|
||||
if (fstat (ofd, &st) < 0 || S_ISREG (st.st_mode) ||
|
||||
S_ISDIR (st.st_mode))
|
||||
perror_msg_and_die("%s", outfile);
|
||||
@@ -166,12 +164,6 @@ int dd_main(int argc, char **argv)
|
||||
out_part++;
|
||||
}
|
||||
|
||||
if (close (ifd) < 0)
|
||||
perror_msg_and_die("%s", infile);
|
||||
|
||||
if (close (ofd) < 0)
|
||||
perror_msg_and_die("%s", outfile);
|
||||
|
||||
fprintf(stderr, "%ld+%ld records in\n", (long)in_full, (long)in_part);
|
||||
fprintf(stderr, "%ld+%ld records out\n", (long)out_full, (long)out_part);
|
||||
|
||||
@@ -21,7 +21,7 @@ int deallocvt_main(int argc, char *argv[])
|
||||
if (argc > 2)
|
||||
show_usage();
|
||||
|
||||
fd = get_console_fd("/dev/console");
|
||||
fd = get_console_fd();
|
||||
|
||||
if (argc == 1) {
|
||||
/* deallocate all unused consoles */
|
||||
@@ -3,142 +3,145 @@
|
||||
// When you turn things off here, they won't be compiled in at all.
|
||||
//
|
||||
//// This file is parsed by sed. You MUST use single line comments.
|
||||
// i.e., //#define CONFIG_BLAH
|
||||
// i.e., //#define BB_BLAH
|
||||
//
|
||||
//
|
||||
// BusyBox Applications
|
||||
//#define CONFIG_ADJTIMEX
|
||||
#define CONFIG_AR
|
||||
//#define CONFIG_ASH
|
||||
#define CONFIG_BASENAME
|
||||
#define CONFIG_CAT
|
||||
#define CONFIG_CHGRP
|
||||
#define CONFIG_CHMOD
|
||||
#define CONFIG_CHOWN
|
||||
#define CONFIG_CHROOT
|
||||
#define CONFIG_CHVT
|
||||
#define CONFIG_CLEAR
|
||||
//#define CONFIG_CMP
|
||||
#define CONFIG_CP
|
||||
//#define CONFIG_CPIO
|
||||
#define CONFIG_CUT
|
||||
#define CONFIG_DATE
|
||||
//#define CONFIG_DC
|
||||
#define CONFIG_DD
|
||||
//#define CONFIG_DEALLOCVT
|
||||
#define CONFIG_DF
|
||||
#define CONFIG_DIRNAME
|
||||
#define CONFIG_DMESG
|
||||
//#define CONFIG_DOS2UNIX
|
||||
//#define CONFIG_DPKG
|
||||
//#define CONFIG_DPKG_DEB
|
||||
//#define CONFIG_DUTMP
|
||||
#define CONFIG_DU
|
||||
//#define CONFIG_DUMPKMAP
|
||||
#define CONFIG_ECHO
|
||||
#define CONFIG_ENV
|
||||
#define CONFIG_EXPR
|
||||
//#define CONFIG_FBSET
|
||||
//#define CONFIG_FDFLUSH
|
||||
#define CONFIG_FIND
|
||||
#define CONFIG_FREE
|
||||
//#define CONFIG_FREERAMDISK
|
||||
//#define CONFIG_FSCK_MINIX
|
||||
//#define CONFIG_GETOPT
|
||||
#define CONFIG_GREP
|
||||
#define CONFIG_GUNZIP
|
||||
#define CONFIG_GZIP
|
||||
#define CONFIG_HALT
|
||||
#define CONFIG_HEAD
|
||||
//#define CONFIG_HOSTID
|
||||
//#define CONFIG_HOSTNAME
|
||||
//#define CONFIG_HUSH
|
||||
#define CONFIG_ID
|
||||
//#define CONFIG_IFCONFIG
|
||||
#define CONFIG_INIT
|
||||
//#define CONFIG_INSMOD
|
||||
#define CONFIG_KILL
|
||||
#define CONFIG_KILLALL
|
||||
#define CONFIG_KLOGD
|
||||
//#define CONFIG_LASH
|
||||
//#define CONFIG_LENGTH
|
||||
#define CONFIG_LN
|
||||
//#define CONFIG_LOADACM
|
||||
//#define CONFIG_LOADFONT
|
||||
#define CONFIG_LOADKMAP
|
||||
#define CONFIG_LOGGER
|
||||
//#define CONFIG_LOGNAME
|
||||
#define CONFIG_LS
|
||||
#define CONFIG_LSMOD
|
||||
//#define CONFIG_MAKEDEVS
|
||||
#define CONFIG_MD5SUM
|
||||
#define CONFIG_MKDIR
|
||||
//#define CONFIG_MKFIFO
|
||||
//#define CONFIG_MKFS_MINIX
|
||||
#define CONFIG_MKNOD
|
||||
#define CONFIG_MKSWAP
|
||||
//#define CONFIG_MKTEMP
|
||||
//#define CONFIG_MODPROBE
|
||||
#define CONFIG_MORE
|
||||
#define CONFIG_MOUNT
|
||||
//#define CONFIG_MSH
|
||||
//#define CONFIG_MT
|
||||
#define CONFIG_MV
|
||||
//#define CONFIG_NC
|
||||
//#define CONFIG_NSLOOKUP
|
||||
//#define CONFIG_PIDOF
|
||||
#define CONFIG_PING
|
||||
//#define CONFIG_PIVOT_ROOT
|
||||
#define CONFIG_POWEROFF
|
||||
//#define CONFIG_PRINTF
|
||||
#define CONFIG_PS
|
||||
#define CONFIG_PWD
|
||||
//#define CONFIG_RDATE
|
||||
//#define CONFIG_READLINK
|
||||
#define CONFIG_REBOOT
|
||||
//#define CONFIG_RENICE
|
||||
#define CONFIG_RESET
|
||||
#define CONFIG_RM
|
||||
#define CONFIG_RMDIR
|
||||
//#define CONFIG_RMMOD
|
||||
//#define CONFIG_ROUTE
|
||||
//#define CONFIG_RPM2CPIO
|
||||
#define CONFIG_SED
|
||||
//#define CONFIG_SETKEYCODES
|
||||
#define CONFIG_SLEEP
|
||||
#define CONFIG_SORT
|
||||
//#define CONFIG_STTY
|
||||
#define CONFIG_SWAPONOFF
|
||||
#define CONFIG_SYNC
|
||||
#define CONFIG_SYSLOGD
|
||||
#define CONFIG_TAIL
|
||||
#define CONFIG_TAR
|
||||
//#define CONFIG_TEE
|
||||
//#define CONFIG_TEST
|
||||
#define CONFIG_TELNET
|
||||
//#define CONFIG_TFTP
|
||||
#define CONFIG_TOUCH
|
||||
#define CONFIG_TR
|
||||
//#define CONFIG_TRACEROUTE
|
||||
#define CONFIG_TRUE_FALSE
|
||||
#define CONFIG_TTY
|
||||
//#define CONFIG_UNIX2DOS
|
||||
//#define CONFIG_UUENCODE
|
||||
//#define CONFIG_UUDECODE
|
||||
#define CONFIG_UMOUNT
|
||||
#define CONFIG_UNIQ
|
||||
#define CONFIG_UNAME
|
||||
//#define CONFIG_UPDATE
|
||||
#define CONFIG_UPTIME
|
||||
//#define CONFIG_USLEEP
|
||||
#define CONFIG_VI
|
||||
//#define CONFIG_WATCHDOG
|
||||
#define CONFIG_WC
|
||||
#define CONFIG_WGET
|
||||
#define CONFIG_WHICH
|
||||
#define CONFIG_WHOAMI
|
||||
#define CONFIG_XARGS
|
||||
#define CONFIG_YES
|
||||
//#define BB_ADJTIMEX
|
||||
#define BB_AR
|
||||
//#define BB_ASH
|
||||
//#define BB_BASENAME
|
||||
#define BB_CAT
|
||||
#define BB_CHGRP
|
||||
#define BB_CHMOD
|
||||
#define BB_CHOWN
|
||||
#define BB_CHROOT
|
||||
//#define BB_CHVT
|
||||
#define BB_CLEAR
|
||||
//#define BB_CMP
|
||||
#define BB_CP
|
||||
//#define BB_CPIO
|
||||
#define BB_CUT
|
||||
//#define BB_DATE
|
||||
//#define BB_DC
|
||||
//#define BB_DD
|
||||
//#define BB_DEALLOCVT
|
||||
#define BB_DF
|
||||
#define BB_DIRNAME
|
||||
#define BB_DMESG
|
||||
//#define BB_DOS2UNIX
|
||||
//#define BB_DPKG
|
||||
//#define BB_DPKG_DEB
|
||||
//#define BB_DUTMP
|
||||
//#define BB_DU
|
||||
//#define BB_DUMPKMAP
|
||||
#define BB_ECHO
|
||||
//#define BB_ENV
|
||||
#define BB_EXPR
|
||||
//#define BB_FBSET
|
||||
//#define BB_FDFLUSH
|
||||
#define BB_FIND
|
||||
#define BB_FREE
|
||||
//#define BB_FREERAMDISK
|
||||
//#define BB_FSCK_MINIX
|
||||
//#define BB_GETOPT
|
||||
#define BB_GREP
|
||||
#define BB_GUNZIP
|
||||
#define BB_GZIP
|
||||
#define BB_HALT
|
||||
#define BB_HEAD
|
||||
//#define BB_HOSTID
|
||||
#define BB_HOSTNAME
|
||||
//#define BB_HUSH
|
||||
#define BB_ID
|
||||
#define BB_IFCONFIG
|
||||
#define BB_INIT
|
||||
//#define BB_INSMOD
|
||||
#define BB_KILL
|
||||
#define BB_KILLALL
|
||||
#define BB_KLOGD
|
||||
//#define BB_LASH
|
||||
//#define BB_LENGTH
|
||||
#define BB_LN
|
||||
//#define BB_LOADACM
|
||||
//#define BB_LOADFONT
|
||||
#define BB_LOADKMAP
|
||||
#define BB_LOGGER
|
||||
//#define BB_LOGNAME
|
||||
#define BB_LOSETUP
|
||||
#define BB_LS
|
||||
//#define BB_LSMOD
|
||||
//#define BB_MAKEDEVS
|
||||
#define BB_MD5SUM
|
||||
#define BB_MKDIR
|
||||
//#define BB_MKFIFO
|
||||
//#define BB_MKFS_MINIX
|
||||
#define BB_MKNOD
|
||||
#define BB_MKSWAP
|
||||
//#define BB_MKTEMP
|
||||
//#define BB_MODPROBE
|
||||
#define BB_MORE
|
||||
#define BB_MOUNT
|
||||
//#define BB_MSH
|
||||
//#define BB_MT
|
||||
#define BB_MV
|
||||
//#define BB_NC
|
||||
//#define BB_NSLOOKUP
|
||||
//#define BB_PIDOF
|
||||
#define BB_PING
|
||||
//#define BB_PIVOT_ROOT
|
||||
#define BB_POWEROFF
|
||||
//#define BB_PRINTF
|
||||
#define BB_PS
|
||||
#define BB_PWD
|
||||
//#define BB_RDATE
|
||||
//#define BB_READLINK
|
||||
#define BB_REBOOT
|
||||
//#define BB_RENICE
|
||||
#define BB_RESET
|
||||
#define BB_RM
|
||||
#define BB_RMDIR
|
||||
//#define BB_RMMOD
|
||||
#define BB_ROUTE
|
||||
//#define BB_RPM2CPIO
|
||||
#define BB_SED
|
||||
//#define BB_SETKEYCODES
|
||||
#define BB_SLEEP
|
||||
#define BB_SORT
|
||||
//#define BB_STTY
|
||||
#define BB_SWAPONOFF
|
||||
#define BB_SYNC
|
||||
#define BB_SYSLOGD
|
||||
#define BB_TAIL
|
||||
#define BB_TAR
|
||||
//#define BB_TEE
|
||||
#define BB_TEST
|
||||
//#define BB_TELNET
|
||||
//#define BB_TFTP
|
||||
//#define BB_TIME
|
||||
//#define BB_TOP
|
||||
#define BB_TOUCH
|
||||
#define BB_TR
|
||||
//#define BB_TRACEROUTE
|
||||
#define BB_TRUE_FALSE
|
||||
#define BB_TTY
|
||||
//#define BB_UNIX2DOS
|
||||
//#define BB_UUENCODE
|
||||
//#define BB_UUDECODE
|
||||
#define BB_UMOUNT
|
||||
#define BB_UNIQ
|
||||
#define BB_UNAME
|
||||
//#define BB_UPDATE
|
||||
#define BB_UPTIME
|
||||
//#define BB_USLEEP
|
||||
//#define BB_VI
|
||||
//#define BB_WATCHDOG
|
||||
#define BB_WC
|
||||
#define BB_WGET
|
||||
#define BB_WHICH
|
||||
#define BB_WHOAMI
|
||||
//#define BB_XARGS
|
||||
//#define BB_YES
|
||||
// End of Applications List
|
||||
//
|
||||
//
|
||||
@@ -151,21 +154,21 @@
|
||||
//
|
||||
// If you enabled one or more of the shells, you may select which one
|
||||
// should be run when sh is invoked:
|
||||
//#define CONFIG_FEATURE_SH_IS_ASH
|
||||
//#define CONFIG_FEATURE_SH_IS_HUSH
|
||||
//#define CONFIG_FEATURE_SH_IS_LASH
|
||||
#define CONFIG_FEATURE_SH_IS_MSH
|
||||
//#define BB_FEATURE_SH_IS_ASH
|
||||
//#define BB_FEATURE_SH_IS_HUSH
|
||||
//#define BB_FEATURE_SH_IS_LASH
|
||||
//#define BB_FEATURE_SH_IS_MSH
|
||||
//
|
||||
// BusyBox will, by default, malloc space for its buffers. This costs code
|
||||
// size for the call to xmalloc. You can use the following feature to have
|
||||
// them put on the stack. For some very small machines with limited stack
|
||||
// space, this can be deadly. For most folks, this works just fine...
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
//#define BB_FEATURE_BUFFERS_GO_ON_STACK
|
||||
// The third alternative for buffer allocation is to use BSS. This works
|
||||
// beautifully for computers with a real MMU (and OS support), but wastes
|
||||
// runtime RAM for uCLinux. This behavior was the only one available for
|
||||
// BusyBox versions 0.48 and earlier.
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//#define BB_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//
|
||||
// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
|
||||
// thereby eliminating the need for the /proc filesystem and thereby saving
|
||||
@@ -176,212 +179,235 @@
|
||||
// mknod /dev/mtab c 10 22
|
||||
// mknod /dev/ps c 10 21
|
||||
// I emailed Linus and this patch will not be going into the stock kernel.
|
||||
//#define CONFIG_FEATURE_USE_DEVPS_PATCH
|
||||
//#define BB_FEATURE_USE_DEVPS_PATCH
|
||||
//
|
||||
// show verbose usage messages
|
||||
//#define CONFIG_FEATURE_VERBOSE_USAGE
|
||||
//#define BB_FEATURE_VERBOSE_USAGE
|
||||
//
|
||||
// Use termios to manipulate the screen ('more' is prettier with this on)
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
//
|
||||
// calculate terminal & column widths (for more and ls)
|
||||
#define CONFIG_FEATURE_AUTOWIDTH
|
||||
// calculate terminal & column widths (for more, ls, and telnet)
|
||||
#define BB_FEATURE_AUTOWIDTH
|
||||
//
|
||||
// show username/groupnames for ls
|
||||
#define CONFIG_FEATURE_LS_USERNAME
|
||||
#define BB_FEATURE_LS_USERNAME
|
||||
//
|
||||
// show file timestamps in ls
|
||||
#define CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
#define BB_FEATURE_LS_TIMESTAMPS
|
||||
//
|
||||
// enable ls -p and -F
|
||||
#define CONFIG_FEATURE_LS_FILETYPES
|
||||
#define BB_FEATURE_LS_FILETYPES
|
||||
//
|
||||
// sort the file names
|
||||
#define CONFIG_FEATURE_LS_SORTFILES
|
||||
#define BB_FEATURE_LS_SORTFILES
|
||||
//
|
||||
// enable ls -R
|
||||
#define CONFIG_FEATURE_LS_RECURSIVE
|
||||
#define BB_FEATURE_LS_RECURSIVE
|
||||
//
|
||||
// enable ls -L
|
||||
#define CONFIG_FEATURE_LS_FOLLOWLINKS
|
||||
#define BB_FEATURE_LS_FOLLOWLINKS
|
||||
//
|
||||
// Use color to identify different file types
|
||||
#define BB_FEATURE_LS_COLOR
|
||||
//
|
||||
// Disable for a smaller (but less functional) ping
|
||||
#define CONFIG_FEATURE_FANCY_PING
|
||||
#define BB_FEATURE_FANCY_PING
|
||||
//
|
||||
// Make init use a simplified /etc/inittab file (recommended).
|
||||
#define CONFIG_FEATURE_USE_INITTAB
|
||||
#define BB_FEATURE_USE_INITTAB
|
||||
//
|
||||
//Enable init being called as /linuxrc
|
||||
#define CONFIG_FEATURE_INITRD
|
||||
#define BB_FEATURE_LINUXRC
|
||||
//
|
||||
//Have init enable core dumping for child processes (for debugging only)
|
||||
//#define CONFIG_FEATURE_INIT_COREDUMPS
|
||||
//#define BB_FEATURE_INIT_COREDUMPS
|
||||
//
|
||||
//Make sure nothing is printed to the console on boot
|
||||
//#define CONFIG_FEATURE_EXTRA_QUIET
|
||||
//#define BB_FEATURE_EXTRA_QUIET
|
||||
//
|
||||
// enable syslogd -R remotehost
|
||||
#define CONFIG_FEATURE_REMOTE_LOG
|
||||
//#define BB_FEATURE_REMOTE_LOG
|
||||
//
|
||||
// enable syslogd -C
|
||||
//#define CONFIG_FEATURE_IPC_SYSLOG
|
||||
//#define BB_FEATURE_IPC_SYSLOG
|
||||
//
|
||||
//Disable for a simple tail implementation (2.34k vs 3k for the full one).
|
||||
//Both provide 'tail -f', but this cuts out -c, -q, -s, and -v.
|
||||
#define CONFIG_FEATURE_FANCY_TAIL
|
||||
#define BB_FEATURE_FANCY_TAIL
|
||||
//
|
||||
// Enable support for loop devices in mount
|
||||
#define CONFIG_FEATURE_MOUNT_LOOP
|
||||
#define BB_FEATURE_MOUNT_LOOP
|
||||
//
|
||||
// Enable support for a real /etc/mtab file instead of /proc/mounts
|
||||
//#define CONFIG_FEATURE_MTAB_SUPPORT
|
||||
//#define BB_FEATURE_MTAB_SUPPORT
|
||||
//
|
||||
// Enable support for mounting remote NFS volumes.
|
||||
// You may need to mount with "-o nolock" if you are
|
||||
// not running a local portmapper daemon...
|
||||
#define CONFIG_FEATURE_NFSMOUNT
|
||||
//
|
||||
// If you are using uClibc, be sure that you've already compiled
|
||||
// uClibc with INCLUDE_RPC=true (contained in the Config file)
|
||||
#define BB_FEATURE_NFSMOUNT
|
||||
//
|
||||
// Enable support forced filesystem unmounting
|
||||
// (i.e., in case of an unreachable NFS system).
|
||||
#define CONFIG_FEATURE_MOUNT_FORCE
|
||||
#define BB_FEATURE_MOUNT_FORCE
|
||||
//
|
||||
// Enable support for creation of tar files.
|
||||
#define CONFIG_FEATURE_TAR_CREATE
|
||||
#define BB_FEATURE_TAR_CREATE
|
||||
//
|
||||
// Enable support for "--exclude" and "-X" for excluding files
|
||||
#define CONFIG_FEATURE_TAR_EXCLUDE
|
||||
//#define BB_FEATURE_TAR_EXCLUDE
|
||||
//
|
||||
// Enable support for tar -z option (currently only works for inflating)
|
||||
#define CONFIG_FEATURE_TAR_GZIP
|
||||
#define BB_FEATURE_TAR_GZIP
|
||||
//
|
||||
// Enable reverse sort
|
||||
#define CONFIG_FEATURE_SORT_REVERSE
|
||||
//#define BB_FEATURE_SORT_REVERSE
|
||||
//
|
||||
// Enable uniqe sort
|
||||
#define CONFIG_FEATURE_SORT_UNIQUE
|
||||
//#define BB_FEATURE_SORT_UNIQUE
|
||||
//
|
||||
// Enable command line editing in the shell.
|
||||
// Only relevant if a shell is enabled. On by default.
|
||||
#define CONFIG_FEATURE_COMMAND_EDITING
|
||||
//#define BB_FEATURE_COMMAND_EDITING
|
||||
//
|
||||
// Enable tab completion in the shell. This is now working quite nicely.
|
||||
// This feature adds a bit over 4k. Only relevant if a shell is enabled.
|
||||
#define CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
//#define BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
//
|
||||
// Attempts to match usernames in a ~-prefixed path
|
||||
//#define CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//
|
||||
//Allow the shell to invoke all the compiled in BusyBox applets as if they
|
||||
//were shell builtins. Nice for staticly linking an emergency rescue shell,
|
||||
//among other things. Off by default.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
//#define BB_FEATURE_SH_STANDALONE_SHELL
|
||||
//
|
||||
//When this is enabled, busybox shell applets can be called using full path
|
||||
//names. This causes applets (i.e., most busybox commands) to override
|
||||
//real commands on the filesystem. For example, if you run run /bin/cat, it
|
||||
//will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
|
||||
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
||||
//only has meaning when CONFIG_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
// Only relevant if a shell is enabled. Off by default.
|
||||
//#define CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//
|
||||
// Uncomment this option for a fancy shell prompt that includes the
|
||||
// current username and hostname. On systems that don't have usernames
|
||||
// or hostnames, this can look hideous.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
//#define BB_FEATURE_SH_FANCY_PROMPT
|
||||
//
|
||||
// Uncomment this option to disable job control. Job control lets you
|
||||
// run jobs in the background (which completely useless for is all you
|
||||
// are doing is running scripts). Disabing this is bad for interactive
|
||||
// use, since when you hit ^C in an application, it will also kill the
|
||||
// shell. This adds about 2.5k on an x86 system.
|
||||
//#define BB_FEATURE_ASH_JOB_CONTROL
|
||||
//
|
||||
//Turn on extra fbset options
|
||||
//#define CONFIG_FEATURE_FBSET_FANCY
|
||||
//#define BB_FEATURE_FBSET_FANCY
|
||||
//
|
||||
//Turn on fbset readmode support
|
||||
//#define CONFIG_FEATURE_FBSET_READMODE
|
||||
//#define BB_FEATURE_FBSET_READMODE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for post 2.1 kernels
|
||||
//#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
//#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for pre 2.1 kernels
|
||||
//#define CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
//#define BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
//
|
||||
// Support module version checking
|
||||
//#define CONFIG_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//#define BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//
|
||||
// Support for uClinux memory usage optimization, which will load the image
|
||||
// directly into the kernel memory. This divides memory requrements by three.
|
||||
// If you are not running uClinux (i.e., your CPU has an MMU) leave this
|
||||
// disabled...
|
||||
//#define CONFIG_FEATURE_INSMOD_LOADINKMEM
|
||||
//#define BB_FEATURE_INSMOD_LOADINKMEM
|
||||
//
|
||||
// Support for Minix filesystem, version 2
|
||||
//#define CONFIG_FEATURE_MINIX2
|
||||
//#define BB_FEATURE_MINIX2
|
||||
//
|
||||
// Enable ifconfig status reporting output -- this feature adds 12k.
|
||||
#define CONFIG_FEATURE_IFCONFIG_STATUS
|
||||
// Enable ifconfig status reporting output -- this feature adds 7k.
|
||||
#define BB_FEATURE_IFCONFIG_STATUS
|
||||
//
|
||||
// Enable ifconfig slip-specific options "keepalive" and "outfill"
|
||||
//#define CONFIG_FEATURE_IFCONFIG_SLIP
|
||||
//#define BB_FEATURE_IFCONFIG_SLIP
|
||||
//
|
||||
// Enable ifconfig options "mem_start", "io_addr", and "irq".
|
||||
//#define CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
//
|
||||
// Enable ifconfig option "hw". Currently works for only with "ether".
|
||||
#define CONFIG_FEATURE_IFCONFIG_HW
|
||||
#define BB_FEATURE_IFCONFIG_HW
|
||||
//
|
||||
// Allows "broadcast +" to set broadcast automatically based on hostaddr
|
||||
// and netmask, at a cost of about 100 bytes of code (i386).
|
||||
//#define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
//
|
||||
// Enable busybox --install [-s]
|
||||
// to create links (or symlinks) for all the commands that are
|
||||
// compiled into the binary. (needs /proc filesystem)
|
||||
#define CONFIG_FEATURE_INSTALLER
|
||||
#define BB_FEATURE_INSTALLER
|
||||
//
|
||||
// Enable a nifty progress meter in wget (adds just under 2k)
|
||||
#define CONFIG_FEATURE_WGET_STATUSBAR
|
||||
#define BB_FEATURE_WGET_STATUSBAR
|
||||
//
|
||||
// Enable HTTP authentication in wget
|
||||
#define CONFIG_FEATURE_WGET_AUTHENTICATION
|
||||
#define BB_FEATURE_WGET_AUTHENTICATION
|
||||
//
|
||||
// Clean up all memory before exiting -- usually not needed
|
||||
// as the OS can clean up... Don't enable this unless you
|
||||
// have a really good reason for cleaning things up manually.
|
||||
//#define CONFIG_FEATURE_CLEAN_UP
|
||||
//#define BB_FEATURE_CLEAN_UP
|
||||
//
|
||||
// Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
|
||||
#define CONFIG_FEATURE_HUMAN_READABLE
|
||||
#define BB_FEATURE_HUMAN_READABLE
|
||||
//
|
||||
// Support for the find -type option.
|
||||
#define CONFIG_FEATURE_FIND_TYPE
|
||||
#define BB_FEATURE_FIND_TYPE
|
||||
//
|
||||
// Support for the find -perm option.
|
||||
#define CONFIG_FEATURE_FIND_PERM
|
||||
#define BB_FEATURE_FIND_PERM
|
||||
//
|
||||
// Support for the find -mtine option.
|
||||
#define CONFIG_FEATURE_FIND_MTIME
|
||||
// Support for the find -mtime option.
|
||||
#define BB_FEATURE_FIND_MTIME
|
||||
//
|
||||
//// Support for the find -newer option.
|
||||
#define BB_FEATURE_FIND_NEWER
|
||||
//
|
||||
// Support for the -A -B and -C context flags in grep
|
||||
//#define CONFIG_FEATURE_GREP_CONTEXT
|
||||
//#define BB_FEATURE_GREP_CONTEXT
|
||||
//
|
||||
// Support for the EGREP applet (alias to the grep applet)
|
||||
//#define CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||
//#define BB_FEATURE_GREP_EGREP_ALIAS
|
||||
//
|
||||
// Tell tftp what commands that should be supported.
|
||||
#define CONFIG_FEATURE_TFTP_PUT
|
||||
#define CONFIG_FEATURE_TFTP_GET
|
||||
#define BB_FEATURE_TFTP_PUT
|
||||
#define BB_FEATURE_TFTP_GET
|
||||
//
|
||||
// features for vi
|
||||
#define CONFIG_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define CONFIG_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define CONFIG_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define CONFIG_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define CONFIG_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define CONFIG_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define CONFIG_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define CONFIG_FEATURE_VI_SET // :set
|
||||
#define CONFIG_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
//#define BB_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
//#define BB_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
//#define BB_FEATURE_VI_SEARCH // search and replace cmds
|
||||
//#define BB_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
//#define BB_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
//#define BB_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
//#define BB_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
//#define BB_FEATURE_VI_SET // :set
|
||||
//#define BB_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
//
|
||||
// Enable a if you system have setuped locale
|
||||
//#define CONFIG_LOCALE_SUPPORT
|
||||
//#define BB_LOCALE_SUPPORT
|
||||
//
|
||||
// Support for TELNET to pass TERM type to remote host. Adds 384 bytes.
|
||||
#define CONFIG_FEATURE_TELNET_TTYPE
|
||||
#define BB_FEATURE_TELNET_TTYPE
|
||||
//
|
||||
// Support for devfs.
|
||||
//#define BB_FEATURE_DEVFS
|
||||
//
|
||||
// End of Features List
|
||||
//
|
||||
@@ -395,75 +421,73 @@
|
||||
// mere mortals so leave this stuff alone.
|
||||
//
|
||||
#include <features.h>
|
||||
#if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
|
||||
#undef CONFIG_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_ASH /* Uses fork() */
|
||||
#undef CONFIG_HUSH /* Uses fork() */
|
||||
#undef CONFIG_LASH /* Uses fork() */
|
||||
#undef CONFIG_INIT /* Uses fork() */
|
||||
#undef CONFIG_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef CONFIG_SYSLOGD /* Uses daemon() */
|
||||
#undef CONFIG_KLOGD /* Uses daemon() */
|
||||
#undef CONFIG_UPDATE /* Uses daemon() */
|
||||
#if defined(__uClinux__)
|
||||
#undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef BB_UPDATE /* Uses daemon() */
|
||||
#endif
|
||||
#if defined CONFIG_ASH || defined CONFIG_HUSH || defined CONFIG_LASH || defined CONFIG_MSH
|
||||
#if defined CONFIG_FEATURE_COMMAND_EDITING
|
||||
#define CONFIG_CMDEDIT
|
||||
#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
|
||||
#if defined BB_FEATURE_COMMAND_EDITING
|
||||
#define BB_CMDEDIT
|
||||
#else
|
||||
#undef CONFIG_FEATURE_COMMAND_EDITING
|
||||
#undef CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_COMMAND_EDITING
|
||||
#undef BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
#else
|
||||
#undef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef BB_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_KILLALL
|
||||
#ifndef CONFIG_KILL
|
||||
#define CONFIG_KILL
|
||||
#if (defined BB_ASH || defined BB_HUSH || defined BB_MSH) && ! defined BB_TEST
|
||||
#define BB_TEST
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_KILLALL
|
||||
#ifndef BB_KILL
|
||||
#define BB_KILL
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifndef CONFIG_INIT
|
||||
#undef CONFIG_FEATURE_INITRD
|
||||
#ifndef BB_INIT
|
||||
#undef BB_FEATURE_LINUXRC
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_MOUNT && defined CONFIG_FEATURE_NFSMOUNT
|
||||
#define CONFIG_NFSMOUNT
|
||||
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
|
||||
#define BB_NFSMOUNT
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_FEATURE_AUTOWIDTH
|
||||
#ifndef CONFIG_FEATURE_USE_TERMIOS
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#if defined BB_FEATURE_AUTOWIDTH
|
||||
#ifndef BB_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_INSMOD || defined CONFIG_LSMOD
|
||||
#if ! defined CONFIG_FEATURE_NEW_MODULE_INTERFACE && ! defined CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
#if defined BB_INSMOD || defined BB_LSMOD
|
||||
#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_UNIX2DOS
|
||||
#define CONFIG_DOS2UNIX
|
||||
#ifdef BB_UNIX2DOS
|
||||
#define BB_DOS2UNIX
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_SYSLOGD
|
||||
#if defined CONFIG_FEATURE_IPC_SYSLOG
|
||||
#define CONFIG_LOGREAD
|
||||
#ifdef BB_SYSLOGD
|
||||
#if defined BB_FEATURE_IPC_SYSLOG
|
||||
#define BB_LOGREAD
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_ASH && defined CONFIG_FEATURE_SH_IS_ASH
|
||||
#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
|
||||
# define shell_main ash_main
|
||||
#elif defined CONFIG_HUSH && defined CONFIG_FEATURE_SH_IS_HUSH
|
||||
#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
|
||||
# define shell_main hush_main
|
||||
#elif defined CONFIG_LASH && defined CONFIG_FEATURE_SH_IS_LASH
|
||||
#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
|
||||
# define shell_main lash_main
|
||||
#elif defined CONFIG_MSH && defined CONFIG_FEATURE_SH_IS_MSH
|
||||
#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
|
||||
# define shell_main msh_main
|
||||
#endif
|
||||
@@ -3,142 +3,145 @@
|
||||
// When you turn things off here, they won't be compiled in at all.
|
||||
//
|
||||
//// This file is parsed by sed. You MUST use single line comments.
|
||||
// i.e., //#define CONFIG_BLAH
|
||||
// i.e., //#define BB_BLAH
|
||||
//
|
||||
//
|
||||
// BusyBox Applications
|
||||
//#define CONFIG_ADJTIMEX
|
||||
#define CONFIG_AR
|
||||
#define CONFIG_ASH
|
||||
#define CONFIG_BASENAME
|
||||
#define CONFIG_CAT
|
||||
#define CONFIG_CHGRP
|
||||
#define CONFIG_CHMOD
|
||||
#define CONFIG_CHOWN
|
||||
#define CONFIG_CHROOT
|
||||
#define CONFIG_CHVT
|
||||
#define CONFIG_CLEAR
|
||||
#define CONFIG_CMP
|
||||
#define CONFIG_CP
|
||||
#define CONFIG_CPIO
|
||||
#define CONFIG_CUT
|
||||
#define CONFIG_DATE
|
||||
#define CONFIG_DC
|
||||
#define CONFIG_DD
|
||||
#define CONFIG_DEALLOCVT
|
||||
#define CONFIG_DF
|
||||
#define CONFIG_DIRNAME
|
||||
#define CONFIG_DMESG
|
||||
#define CONFIG_DOS2UNIX
|
||||
#define CONFIG_DPKG
|
||||
#define CONFIG_DPKG_DEB
|
||||
#define CONFIG_DUTMP
|
||||
#define CONFIG_DU
|
||||
#define CONFIG_DUMPKMAP
|
||||
#define CONFIG_ECHO
|
||||
#define CONFIG_ENV
|
||||
#define CONFIG_EXPR
|
||||
#define CONFIG_FBSET
|
||||
#define CONFIG_FDFLUSH
|
||||
#define CONFIG_FIND
|
||||
#define CONFIG_FREE
|
||||
#define CONFIG_FREERAMDISK
|
||||
#define CONFIG_FSCK_MINIX
|
||||
#define CONFIG_GETOPT
|
||||
#define CONFIG_GREP
|
||||
#define CONFIG_GUNZIP
|
||||
#define CONFIG_GZIP
|
||||
#define CONFIG_HALT
|
||||
#define CONFIG_HEAD
|
||||
#define CONFIG_HOSTID
|
||||
#define CONFIG_HOSTNAME
|
||||
//#define CONFIG_HUSH
|
||||
#define CONFIG_ID
|
||||
#define CONFIG_IFCONFIG
|
||||
#define CONFIG_INIT
|
||||
//#define CONFIG_INSMOD
|
||||
#define CONFIG_KILL
|
||||
#define CONFIG_KILLALL
|
||||
#define CONFIG_KLOGD
|
||||
//#define CONFIG_LASH
|
||||
#define CONFIG_LENGTH
|
||||
#define CONFIG_LN
|
||||
#define CONFIG_LOADACM
|
||||
#define CONFIG_LOADFONT
|
||||
#define CONFIG_LOADKMAP
|
||||
#define CONFIG_LOGGER
|
||||
#define CONFIG_LOGNAME
|
||||
#define CONFIG_LS
|
||||
#define CONFIG_LSMOD
|
||||
#define CONFIG_MAKEDEVS
|
||||
#define CONFIG_MD5SUM
|
||||
#define CONFIG_MKDIR
|
||||
#define CONFIG_MKFIFO
|
||||
#define CONFIG_MKFS_MINIX
|
||||
#define CONFIG_MKNOD
|
||||
#define CONFIG_MKSWAP
|
||||
#define CONFIG_MKTEMP
|
||||
//#define CONFIG_MODPROBE
|
||||
#define CONFIG_MORE
|
||||
#define CONFIG_MOUNT
|
||||
//#define CONFIG_MSH
|
||||
#define CONFIG_MT
|
||||
#define CONFIG_MV
|
||||
#define CONFIG_NC
|
||||
#define CONFIG_NSLOOKUP
|
||||
#define CONFIG_PIDOF
|
||||
#define CONFIG_PING
|
||||
#define CONFIG_PIVOT_ROOT
|
||||
#define CONFIG_POWEROFF
|
||||
#define CONFIG_PRINTF
|
||||
#define CONFIG_PS
|
||||
#define CONFIG_PWD
|
||||
#define CONFIG_RDATE
|
||||
#define CONFIG_READLINK
|
||||
#define CONFIG_REBOOT
|
||||
#define CONFIG_RENICE
|
||||
#define CONFIG_RESET
|
||||
#define CONFIG_RM
|
||||
#define CONFIG_RMDIR
|
||||
#define CONFIG_RMMOD
|
||||
#define CONFIG_ROUTE
|
||||
#define CONFIG_RPM2CPIO
|
||||
#define CONFIG_SED
|
||||
#define CONFIG_SETKEYCODES
|
||||
#define CONFIG_SLEEP
|
||||
#define CONFIG_SORT
|
||||
#define CONFIG_STTY
|
||||
#define CONFIG_SWAPONOFF
|
||||
#define CONFIG_SYNC
|
||||
#define CONFIG_SYSLOGD
|
||||
#define CONFIG_TAIL
|
||||
#define CONFIG_TAR
|
||||
#define CONFIG_TEE
|
||||
#define CONFIG_TEST
|
||||
#define CONFIG_TELNET
|
||||
#define CONFIG_TFTP
|
||||
#define CONFIG_TOUCH
|
||||
#define CONFIG_TR
|
||||
#define CONFIG_TRACEROUTE
|
||||
#define CONFIG_TRUE_FALSE
|
||||
#define CONFIG_TTY
|
||||
#define CONFIG_UNIX2DOS
|
||||
#define CONFIG_UUENCODE
|
||||
#define CONFIG_UUDECODE
|
||||
#define CONFIG_UMOUNT
|
||||
#define CONFIG_UNIQ
|
||||
#define CONFIG_UNAME
|
||||
#define CONFIG_UPDATE
|
||||
#define CONFIG_UPTIME
|
||||
#define CONFIG_USLEEP
|
||||
#define CONFIG_VI
|
||||
#define CONFIG_WATCHDOG
|
||||
#define CONFIG_WC
|
||||
#define CONFIG_WGET
|
||||
#define CONFIG_WHICH
|
||||
#define CONFIG_WHOAMI
|
||||
#define CONFIG_XARGS
|
||||
#define CONFIG_YES
|
||||
//#define BB_ADJTIMEX
|
||||
#define BB_AR
|
||||
#define BB_ASH
|
||||
#define BB_BASENAME
|
||||
#define BB_CAT
|
||||
#define BB_CHGRP
|
||||
#define BB_CHMOD
|
||||
#define BB_CHOWN
|
||||
#define BB_CHROOT
|
||||
#define BB_CHVT
|
||||
#define BB_CLEAR
|
||||
#define BB_CMP
|
||||
#define BB_CP
|
||||
#define BB_CPIO
|
||||
#define BB_CUT
|
||||
#define BB_DATE
|
||||
#define BB_DC
|
||||
#define BB_DD
|
||||
#define BB_DEALLOCVT
|
||||
#define BB_DF
|
||||
#define BB_DIRNAME
|
||||
#define BB_DMESG
|
||||
#define BB_DOS2UNIX
|
||||
#define BB_DPKG
|
||||
#define BB_DPKG_DEB
|
||||
#define BB_DUTMP
|
||||
#define BB_DU
|
||||
#define BB_DUMPKMAP
|
||||
#define BB_ECHO
|
||||
#define BB_ENV
|
||||
#define BB_EXPR
|
||||
#define BB_FBSET
|
||||
#define BB_FDFLUSH
|
||||
#define BB_FIND
|
||||
#define BB_FREE
|
||||
#define BB_FREERAMDISK
|
||||
#define BB_FSCK_MINIX
|
||||
#define BB_GETOPT
|
||||
#define BB_GREP
|
||||
#define BB_GUNZIP
|
||||
#define BB_GZIP
|
||||
#define BB_HALT
|
||||
#define BB_HEAD
|
||||
#define BB_HOSTID
|
||||
#define BB_HOSTNAME
|
||||
//#define BB_HUSH
|
||||
#define BB_ID
|
||||
#define BB_IFCONFIG
|
||||
#define BB_INIT
|
||||
//#define BB_INSMOD
|
||||
#define BB_KILL
|
||||
#define BB_KILLALL
|
||||
#define BB_KLOGD
|
||||
//#define BB_LASH
|
||||
#define BB_LENGTH
|
||||
#define BB_LN
|
||||
#define BB_LOADACM
|
||||
#define BB_LOADFONT
|
||||
#define BB_LOADKMAP
|
||||
#define BB_LOGGER
|
||||
#define BB_LOGNAME
|
||||
#define BB_LOSETUP
|
||||
#define BB_LS
|
||||
#define BB_LSMOD
|
||||
#define BB_MAKEDEVS
|
||||
#define BB_MD5SUM
|
||||
#define BB_MKDIR
|
||||
#define BB_MKFIFO
|
||||
#define BB_MKFS_MINIX
|
||||
#define BB_MKNOD
|
||||
#define BB_MKSWAP
|
||||
#define BB_MKTEMP
|
||||
#define BB_MODPROBE
|
||||
#define BB_MORE
|
||||
#define BB_MOUNT
|
||||
//#define BB_MSH
|
||||
#define BB_MT
|
||||
#define BB_MV
|
||||
#define BB_NC
|
||||
#define BB_NSLOOKUP
|
||||
#define BB_PIDOF
|
||||
#define BB_PING
|
||||
#define BB_PIVOT_ROOT
|
||||
#define BB_POWEROFF
|
||||
#define BB_PRINTF
|
||||
#define BB_PS
|
||||
#define BB_PWD
|
||||
#define BB_RDATE
|
||||
#define BB_READLINK
|
||||
#define BB_REBOOT
|
||||
#define BB_RENICE
|
||||
#define BB_RESET
|
||||
#define BB_RM
|
||||
#define BB_RMDIR
|
||||
#define BB_RMMOD
|
||||
#define BB_ROUTE
|
||||
#define BB_RPM2CPIO
|
||||
#define BB_SED
|
||||
#define BB_SETKEYCODES
|
||||
#define BB_SLEEP
|
||||
#define BB_SORT
|
||||
#define BB_STTY
|
||||
#define BB_SWAPONOFF
|
||||
#define BB_SYNC
|
||||
#define BB_SYSLOGD
|
||||
#define BB_TAIL
|
||||
#define BB_TAR
|
||||
#define BB_TEE
|
||||
#define BB_TEST
|
||||
#define BB_TELNET
|
||||
#define BB_TFTP
|
||||
#define BB_TIME
|
||||
#define BB_TOP
|
||||
#define BB_TOUCH
|
||||
#define BB_TR
|
||||
#define BB_TRACEROUTE
|
||||
#define BB_TRUE_FALSE
|
||||
#define BB_TTY
|
||||
#define BB_UNIX2DOS
|
||||
#define BB_UUENCODE
|
||||
#define BB_UUDECODE
|
||||
#define BB_UMOUNT
|
||||
#define BB_UNIQ
|
||||
#define BB_UNAME
|
||||
#define BB_UPDATE
|
||||
#define BB_UPTIME
|
||||
#define BB_USLEEP
|
||||
#define BB_VI
|
||||
#define BB_WATCHDOG
|
||||
#define BB_WC
|
||||
#define BB_WGET
|
||||
#define BB_WHICH
|
||||
#define BB_WHOAMI
|
||||
#define BB_XARGS
|
||||
#define BB_YES
|
||||
// End of Applications List
|
||||
//
|
||||
//
|
||||
@@ -151,21 +154,21 @@
|
||||
//
|
||||
// If you enabled one or more of the shells, you may select which one
|
||||
// should be run when sh is invoked:
|
||||
#define CONFIG_FEATURE_SH_IS_ASH
|
||||
//#define CONFIG_FEATURE_SH_IS_HUSH
|
||||
//#define CONFIG_FEATURE_SH_IS_LASH
|
||||
//#define CONFIG_FEATURE_SH_IS_MSH
|
||||
#define BB_FEATURE_SH_IS_ASH
|
||||
//#define BB_FEATURE_SH_IS_HUSH
|
||||
//#define BB_FEATURE_SH_IS_LASH
|
||||
//#define BB_FEATURE_SH_IS_MSH
|
||||
//
|
||||
// BusyBox will, by default, malloc space for its buffers. This costs code
|
||||
// size for the call to xmalloc. You can use the following feature to have
|
||||
// them put on the stack. For some very small machines with limited stack
|
||||
// space, this can be deadly. For most folks, this works just fine...
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
//#define BB_FEATURE_BUFFERS_GO_ON_STACK
|
||||
// The third alternative for buffer allocation is to use BSS. This works
|
||||
// beautifully for computers with a real MMU (and OS support), but wastes
|
||||
// runtime RAM for uCLinux. This behavior was the only one available for
|
||||
// BusyBox versions 0.48 and earlier.
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//#define BB_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//
|
||||
// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
|
||||
// thereby eliminating the need for the /proc filesystem and thereby saving
|
||||
@@ -176,212 +179,235 @@
|
||||
// mknod /dev/mtab c 10 22
|
||||
// mknod /dev/ps c 10 21
|
||||
// I emailed Linus and this patch will not be going into the stock kernel.
|
||||
//#define CONFIG_FEATURE_USE_DEVPS_PATCH
|
||||
//#define BB_FEATURE_USE_DEVPS_PATCH
|
||||
//
|
||||
// show verbose usage messages
|
||||
#define CONFIG_FEATURE_VERBOSE_USAGE
|
||||
#define BB_FEATURE_VERBOSE_USAGE
|
||||
//
|
||||
// Use termios to manipulate the screen ('more' is prettier with this on)
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
//
|
||||
// calculate terminal & column widths (for more and ls)
|
||||
#define CONFIG_FEATURE_AUTOWIDTH
|
||||
// calculate terminal & column widths (for more, ls, and telnet)
|
||||
#define BB_FEATURE_AUTOWIDTH
|
||||
//
|
||||
// show username/groupnames for ls
|
||||
#define CONFIG_FEATURE_LS_USERNAME
|
||||
#define BB_FEATURE_LS_USERNAME
|
||||
//
|
||||
// show file timestamps in ls
|
||||
#define CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
#define BB_FEATURE_LS_TIMESTAMPS
|
||||
//
|
||||
// enable ls -p and -F
|
||||
#define CONFIG_FEATURE_LS_FILETYPES
|
||||
#define BB_FEATURE_LS_FILETYPES
|
||||
//
|
||||
// sort the file names
|
||||
#define CONFIG_FEATURE_LS_SORTFILES
|
||||
#define BB_FEATURE_LS_SORTFILES
|
||||
//
|
||||
// enable ls -R
|
||||
#define CONFIG_FEATURE_LS_RECURSIVE
|
||||
#define BB_FEATURE_LS_RECURSIVE
|
||||
//
|
||||
// enable ls -L
|
||||
#define CONFIG_FEATURE_LS_FOLLOWLINKS
|
||||
#define BB_FEATURE_LS_FOLLOWLINKS
|
||||
//
|
||||
// Use color to identify different file types
|
||||
#define BB_FEATURE_LS_COLOR
|
||||
//
|
||||
// Disable for a smaller (but less functional) ping
|
||||
#define CONFIG_FEATURE_FANCY_PING
|
||||
#define BB_FEATURE_FANCY_PING
|
||||
//
|
||||
// Make init use a simplified /etc/inittab file (recommended).
|
||||
#define CONFIG_FEATURE_USE_INITTAB
|
||||
#define BB_FEATURE_USE_INITTAB
|
||||
//
|
||||
//Enable init being called as /linuxrc
|
||||
#define CONFIG_FEATURE_INITRD
|
||||
#define BB_FEATURE_LINUXRC
|
||||
//
|
||||
//Have init enable core dumping for child processes (for debugging only)
|
||||
//#define CONFIG_FEATURE_INIT_COREDUMPS
|
||||
//#define BB_FEATURE_INIT_COREDUMPS
|
||||
//
|
||||
//Make sure nothing is printed to the console on boot
|
||||
//#define CONFIG_FEATURE_EXTRA_QUIET
|
||||
//#define BB_FEATURE_EXTRA_QUIET
|
||||
//
|
||||
// enable syslogd -R remotehost
|
||||
#define CONFIG_FEATURE_REMOTE_LOG
|
||||
#define BB_FEATURE_REMOTE_LOG
|
||||
//
|
||||
// enable syslogd -C
|
||||
//#define CONFIG_FEATURE_IPC_SYSLOG
|
||||
//#define BB_FEATURE_IPC_SYSLOG
|
||||
//
|
||||
//Disable for a simple tail implementation (2.34k vs 3k for the full one).
|
||||
//Both provide 'tail -f', but this cuts out -c, -q, -s, and -v.
|
||||
#define CONFIG_FEATURE_FANCY_TAIL
|
||||
#define BB_FEATURE_FANCY_TAIL
|
||||
//
|
||||
// Enable support for loop devices in mount
|
||||
#define CONFIG_FEATURE_MOUNT_LOOP
|
||||
#define BB_FEATURE_MOUNT_LOOP
|
||||
//
|
||||
// Enable support for a real /etc/mtab file instead of /proc/mounts
|
||||
//#define CONFIG_FEATURE_MTAB_SUPPORT
|
||||
//#define BB_FEATURE_MTAB_SUPPORT
|
||||
//
|
||||
// Enable support for mounting remote NFS volumes.
|
||||
// You may need to mount with "-o nolock" if you are
|
||||
// not running a local portmapper daemon...
|
||||
#define CONFIG_FEATURE_NFSMOUNT
|
||||
//
|
||||
// If you are using uClibc, be sure that you've already compiled
|
||||
// uClibc with INCLUDE_RPC=true (contained in the Config file)
|
||||
#define BB_FEATURE_NFSMOUNT
|
||||
//
|
||||
// Enable support forced filesystem unmounting
|
||||
// (i.e., in case of an unreachable NFS system).
|
||||
#define CONFIG_FEATURE_MOUNT_FORCE
|
||||
#define BB_FEATURE_MOUNT_FORCE
|
||||
//
|
||||
// Enable support for creation of tar files.
|
||||
#define CONFIG_FEATURE_TAR_CREATE
|
||||
#define BB_FEATURE_TAR_CREATE
|
||||
//
|
||||
// Enable support for "--exclude" and "-X" for excluding files
|
||||
#define CONFIG_FEATURE_TAR_EXCLUDE
|
||||
#define BB_FEATURE_TAR_EXCLUDE
|
||||
//
|
||||
// Enable support for tar -z option (currently only works for inflating)
|
||||
#define CONFIG_FEATURE_TAR_GZIP
|
||||
#define BB_FEATURE_TAR_GZIP
|
||||
//
|
||||
// Enable reverse sort
|
||||
#define CONFIG_FEATURE_SORT_REVERSE
|
||||
#define BB_FEATURE_SORT_REVERSE
|
||||
//
|
||||
// Enable uniqe sort
|
||||
#define CONFIG_FEATURE_SORT_UNIQUE
|
||||
#define BB_FEATURE_SORT_UNIQUE
|
||||
//
|
||||
// Enable command line editing in the shell.
|
||||
// Only relevant if a shell is enabled. On by default.
|
||||
#define CONFIG_FEATURE_COMMAND_EDITING
|
||||
#define BB_FEATURE_COMMAND_EDITING
|
||||
//
|
||||
// Enable tab completion in the shell. This is now working quite nicely.
|
||||
// This feature adds a bit over 4k. Only relevant if a shell is enabled.
|
||||
#define CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#define BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
//
|
||||
// Attempts to match usernames in a ~-prefixed path
|
||||
//#define CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//
|
||||
//Allow the shell to invoke all the compiled in BusyBox applets as if they
|
||||
//were shell builtins. Nice for staticly linking an emergency rescue shell,
|
||||
//among other things. Off by default.
|
||||
// Only relevant if a shell is enabled.
|
||||
#define CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
#define BB_FEATURE_SH_STANDALONE_SHELL
|
||||
//
|
||||
//When this is enabled, busybox shell applets can be called using full path
|
||||
//names. This causes applets (i.e., most busybox commands) to override
|
||||
//real commands on the filesystem. For example, if you run run /bin/cat, it
|
||||
//will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
|
||||
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
||||
//only has meaning when CONFIG_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
// Only relevant if a shell is enabled. Off by default.
|
||||
#define CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//
|
||||
// Uncomment this option for a fancy shell prompt that includes the
|
||||
// current username and hostname. On systems that don't have usernames
|
||||
// or hostnames, this can look hideous.
|
||||
// Only relevant if a shell is enabled.
|
||||
#define CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#define BB_FEATURE_SH_FANCY_PROMPT
|
||||
//
|
||||
// Uncomment this option to disable job control. Job control lets you
|
||||
// run jobs in the background (which completely useless for is all you
|
||||
// are doing is running scripts). Disabing this is bad for interactive
|
||||
// use, since when you hit ^C in an application, it will also kill the
|
||||
// shell. This adds about 2.5k on an x86 system.
|
||||
#define BB_FEATURE_ASH_JOB_CONTROL
|
||||
//
|
||||
//Turn on extra fbset options
|
||||
//#define CONFIG_FEATURE_FBSET_FANCY
|
||||
//#define BB_FEATURE_FBSET_FANCY
|
||||
//
|
||||
//Turn on fbset readmode support
|
||||
//#define CONFIG_FEATURE_FBSET_READMODE
|
||||
#define BB_FEATURE_FBSET_READMODE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for post 2.1 kernels
|
||||
#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for pre 2.1 kernels
|
||||
//#define CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
//#define BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
//
|
||||
// Support module version checking
|
||||
//#define CONFIG_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//#define BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//
|
||||
// Support for uClinux memory usage optimization, which will load the image
|
||||
// directly into the kernel memory. This divides memory requrements by three.
|
||||
// If you are not running uClinux (i.e., your CPU has an MMU) leave this
|
||||
// disabled...
|
||||
//#define CONFIG_FEATURE_INSMOD_LOADINKMEM
|
||||
//#define BB_FEATURE_INSMOD_LOADINKMEM
|
||||
//
|
||||
// Support for Minix filesystem, version 2
|
||||
//#define CONFIG_FEATURE_MINIX2
|
||||
#define BB_FEATURE_MINIX2
|
||||
//
|
||||
// Enable ifconfig status reporting output -- this feature adds 12k.
|
||||
#define CONFIG_FEATURE_IFCONFIG_STATUS
|
||||
// Enable ifconfig status reporting output -- this feature adds 7k.
|
||||
#define BB_FEATURE_IFCONFIG_STATUS
|
||||
//
|
||||
// Enable ifconfig slip-specific options "keepalive" and "outfill"
|
||||
//#define CONFIG_FEATURE_IFCONFIG_SLIP
|
||||
#define BB_FEATURE_IFCONFIG_SLIP
|
||||
//
|
||||
// Enable ifconfig options "mem_start", "io_addr", and "irq".
|
||||
//#define CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
//
|
||||
// Enable ifconfig option "hw". Currently works for only with "ether".
|
||||
#define CONFIG_FEATURE_IFCONFIG_HW
|
||||
#define BB_FEATURE_IFCONFIG_HW
|
||||
//
|
||||
// Allows "broadcast +" to set broadcast automatically based on hostaddr
|
||||
// and netmask, at a cost of about 100 bytes of code (i386).
|
||||
#define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
//
|
||||
// Enable busybox --install [-s]
|
||||
// to create links (or symlinks) for all the commands that are
|
||||
// compiled into the binary. (needs /proc filesystem)
|
||||
#define CONFIG_FEATURE_INSTALLER
|
||||
//#define BB_FEATURE_INSTALLER
|
||||
//
|
||||
// Enable a nifty progress meter in wget (adds just under 2k)
|
||||
#define CONFIG_FEATURE_WGET_STATUSBAR
|
||||
#define BB_FEATURE_WGET_STATUSBAR
|
||||
//
|
||||
// Enable HTTP authentication in wget
|
||||
#define CONFIG_FEATURE_WGET_AUTHENTICATION
|
||||
#define BB_FEATURE_WGET_AUTHENTICATION
|
||||
//
|
||||
// Clean up all memory before exiting -- usually not needed
|
||||
// as the OS can clean up... Don't enable this unless you
|
||||
// have a really good reason for cleaning things up manually.
|
||||
//#define CONFIG_FEATURE_CLEAN_UP
|
||||
//#define BB_FEATURE_CLEAN_UP
|
||||
//
|
||||
// Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
|
||||
#define CONFIG_FEATURE_HUMAN_READABLE
|
||||
#define BB_FEATURE_HUMAN_READABLE
|
||||
//
|
||||
// Support for the find -type option.
|
||||
#define CONFIG_FEATURE_FIND_TYPE
|
||||
#define BB_FEATURE_FIND_TYPE
|
||||
//
|
||||
// Support for the find -perm option.
|
||||
#define CONFIG_FEATURE_FIND_PERM
|
||||
#define BB_FEATURE_FIND_PERM
|
||||
//
|
||||
// Support for the find -mtine option.
|
||||
#define CONFIG_FEATURE_FIND_MTIME
|
||||
// Support for the find -mtime option.
|
||||
#define BB_FEATURE_FIND_MTIME
|
||||
//
|
||||
//// Support for the find -newer option.
|
||||
#define BB_FEATURE_FIND_NEWER
|
||||
//
|
||||
// Support for the -A -B and -C context flags in grep
|
||||
//#define CONFIG_FEATURE_GREP_CONTEXT
|
||||
#define BB_FEATURE_GREP_CONTEXT
|
||||
//
|
||||
// Support for the EGREP applet (alias to the grep applet)
|
||||
//#define CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||
#define BB_FEATURE_GREP_EGREP_ALIAS
|
||||
//
|
||||
// Tell tftp what commands that should be supported.
|
||||
#define CONFIG_FEATURE_TFTP_PUT
|
||||
#define CONFIG_FEATURE_TFTP_GET
|
||||
#define BB_FEATURE_TFTP_PUT
|
||||
#define BB_FEATURE_TFTP_GET
|
||||
//
|
||||
// features for vi
|
||||
#define CONFIG_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define CONFIG_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define CONFIG_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define CONFIG_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define CONFIG_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define CONFIG_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define CONFIG_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define CONFIG_FEATURE_VI_SET // :set
|
||||
#define CONFIG_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
#define BB_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define BB_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define BB_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define BB_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define BB_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define BB_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define BB_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define BB_FEATURE_VI_SET // :set
|
||||
#define BB_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
//
|
||||
// Enable a if you system have setuped locale
|
||||
//#define CONFIG_LOCALE_SUPPORT
|
||||
//#define BB_LOCALE_SUPPORT
|
||||
//
|
||||
// Support for TELNET to pass TERM type to remote host. Adds 384 bytes.
|
||||
#define CONFIG_FEATURE_TELNET_TTYPE
|
||||
#define BB_FEATURE_TELNET_TTYPE
|
||||
//
|
||||
// Support for devfs.
|
||||
//#define BB_FEATURE_DEVFS
|
||||
//
|
||||
// End of Features List
|
||||
//
|
||||
@@ -395,75 +421,73 @@
|
||||
// mere mortals so leave this stuff alone.
|
||||
//
|
||||
#include <features.h>
|
||||
#if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
|
||||
#undef CONFIG_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_ASH /* Uses fork() */
|
||||
#undef CONFIG_HUSH /* Uses fork() */
|
||||
#undef CONFIG_LASH /* Uses fork() */
|
||||
#undef CONFIG_INIT /* Uses fork() */
|
||||
#undef CONFIG_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef CONFIG_SYSLOGD /* Uses daemon() */
|
||||
#undef CONFIG_KLOGD /* Uses daemon() */
|
||||
#undef CONFIG_UPDATE /* Uses daemon() */
|
||||
#if defined(__uClinux__)
|
||||
#undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef BB_UPDATE /* Uses daemon() */
|
||||
#endif
|
||||
#if defined CONFIG_ASH || defined CONFIG_HUSH || defined CONFIG_LASH || defined CONFIG_MSH
|
||||
#if defined CONFIG_FEATURE_COMMAND_EDITING
|
||||
#define CONFIG_CMDEDIT
|
||||
#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
|
||||
#if defined BB_FEATURE_COMMAND_EDITING
|
||||
#define BB_CMDEDIT
|
||||
#else
|
||||
#undef CONFIG_FEATURE_COMMAND_EDITING
|
||||
#undef CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_COMMAND_EDITING
|
||||
#undef BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
#else
|
||||
#undef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef BB_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_KILLALL
|
||||
#ifndef CONFIG_KILL
|
||||
#define CONFIG_KILL
|
||||
#if (defined BB_ASH || defined BB_HUSH || defined BB_MSH) && ! defined BB_TEST
|
||||
#define BB_TEST
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_KILLALL
|
||||
#ifndef BB_KILL
|
||||
#define BB_KILL
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifndef CONFIG_INIT
|
||||
#undef CONFIG_FEATURE_INITRD
|
||||
#ifndef BB_INIT
|
||||
#undef BB_FEATURE_LINUXRC
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_MOUNT && defined CONFIG_FEATURE_NFSMOUNT
|
||||
#define CONFIG_NFSMOUNT
|
||||
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
|
||||
#define BB_NFSMOUNT
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_FEATURE_AUTOWIDTH
|
||||
#ifndef CONFIG_FEATURE_USE_TERMIOS
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#if defined BB_FEATURE_AUTOWIDTH
|
||||
#ifndef BB_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_INSMOD || defined CONFIG_LSMOD
|
||||
#if ! defined CONFIG_FEATURE_NEW_MODULE_INTERFACE && ! defined CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
#if defined BB_INSMOD || defined BB_LSMOD
|
||||
#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_UNIX2DOS
|
||||
#define CONFIG_DOS2UNIX
|
||||
#ifdef BB_UNIX2DOS
|
||||
#define BB_DOS2UNIX
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_SYSLOGD
|
||||
#if defined CONFIG_FEATURE_IPC_SYSLOG
|
||||
#define CONFIG_LOGREAD
|
||||
#ifdef BB_SYSLOGD
|
||||
#if defined BB_FEATURE_IPC_SYSLOG
|
||||
#define BB_LOGREAD
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_ASH && defined CONFIG_FEATURE_SH_IS_ASH
|
||||
#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
|
||||
# define shell_main ash_main
|
||||
#elif defined CONFIG_HUSH && defined CONFIG_FEATURE_SH_IS_HUSH
|
||||
#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
|
||||
# define shell_main hush_main
|
||||
#elif defined CONFIG_LASH && defined CONFIG_FEATURE_SH_IS_LASH
|
||||
#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
|
||||
# define shell_main lash_main
|
||||
#elif defined CONFIG_MSH && defined CONFIG_FEATURE_SH_IS_MSH
|
||||
#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
|
||||
# define shell_main msh_main
|
||||
#endif
|
||||
@@ -3,142 +3,145 @@
|
||||
// When you turn things off here, they won't be compiled in at all.
|
||||
//
|
||||
//// This file is parsed by sed. You MUST use single line comments.
|
||||
// i.e., //#define CONFIG_BLAH
|
||||
// i.e., //#define BB_BLAH
|
||||
//
|
||||
//
|
||||
// BusyBox Applications
|
||||
//#define CONFIG_ADJTIMEX
|
||||
//#define CONFIG_AR
|
||||
//#define CONFIG_ASH
|
||||
#define CONFIG_BASENAME
|
||||
#define CONFIG_CAT
|
||||
#define CONFIG_CHGRP
|
||||
#define CONFIG_CHMOD
|
||||
#define CONFIG_CHOWN
|
||||
#define CONFIG_CHROOT
|
||||
#define CONFIG_CHVT
|
||||
#define CONFIG_CLEAR
|
||||
//#define CONFIG_CMP
|
||||
#define CONFIG_CP
|
||||
//#define CONFIG_CPIO
|
||||
#define CONFIG_CUT
|
||||
#define CONFIG_DATE
|
||||
//#define CONFIG_DC
|
||||
#define CONFIG_DD
|
||||
//#define CONFIG_DEALLOCVT
|
||||
#define CONFIG_DF
|
||||
#define CONFIG_DIRNAME
|
||||
#define CONFIG_DMESG
|
||||
//#define CONFIG_DOS2UNIX
|
||||
//#define CONFIG_DPKG
|
||||
//#define CONFIG_DPKG_DEB
|
||||
//#define CONFIG_DUTMP
|
||||
#define CONFIG_DU
|
||||
//#define CONFIG_DUMPKMAP
|
||||
#define CONFIG_ECHO
|
||||
#define CONFIG_ENV
|
||||
#define CONFIG_EXPR
|
||||
//#define CONFIG_FBSET
|
||||
//#define CONFIG_FDFLUSH
|
||||
#define CONFIG_FIND
|
||||
#define CONFIG_FREE
|
||||
#define CONFIG_FREERAMDISK
|
||||
//#define CONFIG_FSCK_MINIX
|
||||
//#define CONFIG_GETOPT
|
||||
#define CONFIG_GREP
|
||||
#define CONFIG_GUNZIP
|
||||
#define CONFIG_GZIP
|
||||
#define CONFIG_HALT
|
||||
#define CONFIG_HEAD
|
||||
//#define CONFIG_HOSTID
|
||||
//#define CONFIG_HOSTNAME
|
||||
//#define CONFIG_HUSH
|
||||
#define CONFIG_ID
|
||||
//#define CONFIG_IFCONFIG
|
||||
#define CONFIG_INIT
|
||||
//#define CONFIG_INSMOD
|
||||
#define CONFIG_KILL
|
||||
#define CONFIG_KILLALL
|
||||
#define CONFIG_KLOGD
|
||||
//#define CONFIG_LASH
|
||||
//#define CONFIG_LENGTH
|
||||
#define CONFIG_LN
|
||||
//#define CONFIG_LOADACM
|
||||
//#define CONFIG_LOADFONT
|
||||
#define CONFIG_LOADKMAP
|
||||
#define CONFIG_LOGGER
|
||||
//#define CONFIG_LOGNAME
|
||||
#define CONFIG_LS
|
||||
#define CONFIG_LSMOD
|
||||
//#define CONFIG_MAKEDEVS
|
||||
#define CONFIG_MD5SUM
|
||||
#define CONFIG_MKDIR
|
||||
//#define CONFIG_MKFIFO
|
||||
//#define CONFIG_MKFS_MINIX
|
||||
#define CONFIG_MKNOD
|
||||
#define CONFIG_MKSWAP
|
||||
//#define CONFIG_MKTEMP
|
||||
//#define CONFIG_MODPROBE
|
||||
#define CONFIG_MORE
|
||||
#define CONFIG_MOUNT
|
||||
//#define CONFIG_MSH
|
||||
//#define CONFIG_MT
|
||||
#define CONFIG_MV
|
||||
//#define CONFIG_NC
|
||||
//#define CONFIG_NSLOOKUP
|
||||
//#define CONFIG_PIDOF
|
||||
#define CONFIG_PING
|
||||
#define CONFIG_PIVOT_ROOT
|
||||
#define CONFIG_POWEROFF
|
||||
//#define CONFIG_PRINTF
|
||||
#define CONFIG_PS
|
||||
#define CONFIG_PWD
|
||||
//#define CONFIG_RDATE
|
||||
//#define CONFIG_READLINK
|
||||
#define CONFIG_REBOOT
|
||||
//#define CONFIG_RENICE
|
||||
#define CONFIG_RESET
|
||||
#define CONFIG_RM
|
||||
#define CONFIG_RMDIR
|
||||
//#define CONFIG_RMMOD
|
||||
//#define CONFIG_ROUTE
|
||||
//#define CONFIG_RPM2CPIO
|
||||
#define CONFIG_SED
|
||||
//#define CONFIG_SETKEYCODES
|
||||
#define CONFIG_SLEEP
|
||||
#define CONFIG_SORT
|
||||
//#define CONFIG_STTY
|
||||
#define CONFIG_SWAPONOFF
|
||||
#define CONFIG_SYNC
|
||||
#define CONFIG_SYSLOGD
|
||||
#define CONFIG_TAIL
|
||||
#define CONFIG_TAR
|
||||
//#define CONFIG_TEE
|
||||
//#define CONFIG_TEST
|
||||
#define CONFIG_TELNET
|
||||
//#define CONFIG_TFTP
|
||||
#define CONFIG_TOUCH
|
||||
#define CONFIG_TR
|
||||
//#define CONFIG_TRACEROUTE
|
||||
#define CONFIG_TRUE_FALSE
|
||||
#define CONFIG_TTY
|
||||
//#define CONFIG_UNIX2DOS
|
||||
//#define CONFIG_UUENCODE
|
||||
//#define CONFIG_UUDECODE
|
||||
#define CONFIG_UMOUNT
|
||||
#define CONFIG_UNIQ
|
||||
#define CONFIG_UNAME
|
||||
//#define CONFIG_UPDATE
|
||||
#define CONFIG_UPTIME
|
||||
//#define CONFIG_USLEEP
|
||||
#define CONFIG_VI
|
||||
//#define CONFIG_WATCHDOG
|
||||
#define CONFIG_WC
|
||||
#define CONFIG_WGET
|
||||
#define CONFIG_WHICH
|
||||
#define CONFIG_WHOAMI
|
||||
#define CONFIG_XARGS
|
||||
#define CONFIG_YES
|
||||
//#define BB_ADJTIMEX
|
||||
#define BB_AR
|
||||
//#define BB_ASH
|
||||
#define BB_BASENAME
|
||||
#define BB_CAT
|
||||
//#define BB_CHGRP
|
||||
#define BB_CHMOD
|
||||
#define BB_CHOWN
|
||||
#define BB_CHROOT
|
||||
#define BB_CHVT
|
||||
//#define BB_CLEAR
|
||||
//#define BB_CMP
|
||||
#define BB_CP
|
||||
//#define BB_CPIO
|
||||
#define BB_CUT
|
||||
//#define BB_DATE
|
||||
//#define BB_DC
|
||||
//#define BB_DD
|
||||
//#define BB_DEALLOCVT
|
||||
#define BB_DF
|
||||
#define BB_DIRNAME
|
||||
#define BB_DMESG
|
||||
//#define BB_DOS2UNIX
|
||||
//#define BB_DPKG
|
||||
//#define BB_DPKG_DEB
|
||||
//#define BB_DUTMP
|
||||
//#define BB_DU
|
||||
//#define BB_DUMPKMAP
|
||||
#define BB_ECHO
|
||||
#define BB_ENV
|
||||
#define BB_EXPR
|
||||
//#define BB_FBSET
|
||||
//#define BB_FDFLUSH
|
||||
#define BB_FIND
|
||||
#define BB_FREE
|
||||
#define BB_FREERAMDISK
|
||||
//#define BB_FSCK_MINIX
|
||||
//#define BB_GETOPT
|
||||
#define BB_GREP
|
||||
#define BB_GUNZIP
|
||||
//#define BB_GZIP
|
||||
//#define BB_HALT
|
||||
#define BB_HEAD
|
||||
//#define BB_HOSTID
|
||||
//#define BB_HOSTNAME
|
||||
//#define BB_HUSH
|
||||
#define BB_ID
|
||||
#define BB_IFCONFIG
|
||||
#define BB_INIT
|
||||
//#define BB_INSMOD
|
||||
#define BB_KILL
|
||||
//#define BB_KILLALL
|
||||
#define BB_KLOGD
|
||||
//#define BB_LASH
|
||||
//#define BB_LENGTH
|
||||
#define BB_LN
|
||||
//#define BB_LOADACM
|
||||
//#define BB_LOADFONT
|
||||
//#define BB_LOADKMAP
|
||||
//#define BB_LOGGER
|
||||
//#define BB_LOGNAME
|
||||
//#define BB_LOSETUP
|
||||
#define BB_LS
|
||||
#define BB_LSMOD
|
||||
//#define BB_MAKEDEVS
|
||||
#define BB_MD5SUM
|
||||
#define BB_MKDIR
|
||||
//#define BB_MKFIFO
|
||||
//#define BB_MKFS_MINIX
|
||||
#define BB_MKNOD
|
||||
//#define BB_MKSWAP
|
||||
//#define BB_MKTEMP
|
||||
//#define BB_MODPROBE
|
||||
//#define BB_MORE
|
||||
#define BB_MOUNT
|
||||
//#define BB_MSH
|
||||
//#define BB_MT
|
||||
#define BB_MV
|
||||
//#define BB_NC
|
||||
//#define BB_NSLOOKUP
|
||||
#define BB_PIDOF
|
||||
#define BB_PING
|
||||
#define BB_PIVOT_ROOT
|
||||
//#define BB_POWEROFF
|
||||
//#define BB_PRINTF
|
||||
#define BB_PS
|
||||
#define BB_PWD
|
||||
//#define BB_RDATE
|
||||
//#define BB_READLINK
|
||||
#define BB_REBOOT
|
||||
//#define BB_RENICE
|
||||
//#define BB_RESET
|
||||
#define BB_RM
|
||||
#define BB_RMDIR
|
||||
//#define BB_RMMOD
|
||||
#define BB_ROUTE
|
||||
//#define BB_RPM2CPIO
|
||||
#define BB_SED
|
||||
//#define BB_SETKEYCODES
|
||||
//#define BB_SLEEP
|
||||
#define BB_SORT
|
||||
//#define BB_STTY
|
||||
//#define BB_SWAPONOFF
|
||||
#define BB_SYNC
|
||||
#define BB_SYSLOGD
|
||||
#define BB_TAIL
|
||||
#define BB_TAR
|
||||
//#define BB_TEE
|
||||
//#define BB_TEST
|
||||
#define BB_TELNET
|
||||
//#define BB_TFTP
|
||||
//#define BB_TIME
|
||||
//#define BB_TOP
|
||||
#define BB_TOUCH
|
||||
#define BB_TR
|
||||
//#define BB_TRACEROUTE
|
||||
#define BB_TRUE_FALSE
|
||||
//#define BB_TTY
|
||||
//#define BB_UNIX2DOS
|
||||
//#define BB_UUENCODE
|
||||
//#define BB_UUDECODE
|
||||
#define BB_UMOUNT
|
||||
//#define BB_UNIQ
|
||||
#define BB_UNAME
|
||||
//#define BB_UPDATE
|
||||
//#define BB_UPTIME
|
||||
//#define BB_USLEEP
|
||||
//#define BB_VI
|
||||
//#define BB_WATCHDOG
|
||||
#define BB_WC
|
||||
#define BB_WGET
|
||||
//#define BB_WHICH
|
||||
//#define BB_WHOAMI
|
||||
//#define BB_XARGS
|
||||
//#define BB_YES
|
||||
// End of Applications List
|
||||
//
|
||||
//
|
||||
@@ -151,21 +154,21 @@
|
||||
//
|
||||
// If you enabled one or more of the shells, you may select which one
|
||||
// should be run when sh is invoked:
|
||||
//#define CONFIG_FEATURE_SH_IS_ASH
|
||||
//#define CONFIG_FEATURE_SH_IS_HUSH
|
||||
//#define CONFIG_FEATURE_SH_IS_LASH
|
||||
#define CONFIG_FEATURE_SH_IS_MSH
|
||||
//#define BB_FEATURE_SH_IS_ASH
|
||||
//#define BB_FEATURE_SH_IS_HUSH
|
||||
//#define BB_FEATURE_SH_IS_LASH
|
||||
#define BB_FEATURE_SH_IS_MSH
|
||||
//
|
||||
// BusyBox will, by default, malloc space for its buffers. This costs code
|
||||
// size for the call to xmalloc. You can use the following feature to have
|
||||
// them put on the stack. For some very small machines with limited stack
|
||||
// space, this can be deadly. For most folks, this works just fine...
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_ON_STACK
|
||||
//#define BB_FEATURE_BUFFERS_GO_ON_STACK
|
||||
// The third alternative for buffer allocation is to use BSS. This works
|
||||
// beautifully for computers with a real MMU (and OS support), but wastes
|
||||
// runtime RAM for uCLinux. This behavior was the only one available for
|
||||
// BusyBox versions 0.48 and earlier.
|
||||
//#define CONFIG_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//#define BB_FEATURE_BUFFERS_GO_IN_BSS
|
||||
//
|
||||
// Turn this on to use Erik's very cool devps, and devmtab kernel drivers,
|
||||
// thereby eliminating the need for the /proc filesystem and thereby saving
|
||||
@@ -176,212 +179,235 @@
|
||||
// mknod /dev/mtab c 10 22
|
||||
// mknod /dev/ps c 10 21
|
||||
// I emailed Linus and this patch will not be going into the stock kernel.
|
||||
//#define CONFIG_FEATURE_USE_DEVPS_PATCH
|
||||
//#define BB_FEATURE_USE_DEVPS_PATCH
|
||||
//
|
||||
// show verbose usage messages
|
||||
//#define CONFIG_FEATURE_VERBOSE_USAGE
|
||||
//#define BB_FEATURE_VERBOSE_USAGE
|
||||
//
|
||||
// Use termios to manipulate the screen ('more' is prettier with this on)
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
//
|
||||
// calculate terminal & column widths (for more and ls)
|
||||
#define CONFIG_FEATURE_AUTOWIDTH
|
||||
// calculate terminal & column widths (for more, ls, and telnet)
|
||||
#define BB_FEATURE_AUTOWIDTH
|
||||
//
|
||||
// show username/groupnames for ls
|
||||
#define CONFIG_FEATURE_LS_USERNAME
|
||||
#define BB_FEATURE_LS_USERNAME
|
||||
//
|
||||
// show file timestamps in ls
|
||||
#define CONFIG_FEATURE_LS_TIMESTAMPS
|
||||
#define BB_FEATURE_LS_TIMESTAMPS
|
||||
//
|
||||
// enable ls -p and -F
|
||||
#define CONFIG_FEATURE_LS_FILETYPES
|
||||
//#define BB_FEATURE_LS_FILETYPES
|
||||
//
|
||||
// sort the file names
|
||||
#define CONFIG_FEATURE_LS_SORTFILES
|
||||
#define BB_FEATURE_LS_SORTFILES
|
||||
//
|
||||
// enable ls -R
|
||||
#define CONFIG_FEATURE_LS_RECURSIVE
|
||||
//#define BB_FEATURE_LS_RECURSIVE
|
||||
//
|
||||
// enable ls -L
|
||||
#define CONFIG_FEATURE_LS_FOLLOWLINKS
|
||||
#define BB_FEATURE_LS_FOLLOWLINKS
|
||||
//
|
||||
// Use color to identify different file types
|
||||
#define BB_FEATURE_LS_COLOR
|
||||
//
|
||||
// Disable for a smaller (but less functional) ping
|
||||
#define CONFIG_FEATURE_FANCY_PING
|
||||
#define BB_FEATURE_FANCY_PING
|
||||
//
|
||||
// Make init use a simplified /etc/inittab file (recommended).
|
||||
#define CONFIG_FEATURE_USE_INITTAB
|
||||
#define BB_FEATURE_USE_INITTAB
|
||||
//
|
||||
//Enable init being called as /linuxrc
|
||||
#define CONFIG_FEATURE_INITRD
|
||||
#define BB_FEATURE_LINUXRC
|
||||
//
|
||||
//Have init enable core dumping for child processes (for debugging only)
|
||||
//#define CONFIG_FEATURE_INIT_COREDUMPS
|
||||
//#define BB_FEATURE_INIT_COREDUMPS
|
||||
//
|
||||
//Make sure nothing is printed to the console on boot
|
||||
//#define CONFIG_FEATURE_EXTRA_QUIET
|
||||
//#define BB_FEATURE_EXTRA_QUIET
|
||||
//
|
||||
// enable syslogd -R remotehost
|
||||
#define CONFIG_FEATURE_REMOTE_LOG
|
||||
//#define BB_FEATURE_REMOTE_LOG
|
||||
//
|
||||
// enable syslogd -C
|
||||
//#define CONFIG_FEATURE_IPC_SYSLOG
|
||||
//#define BB_FEATURE_IPC_SYSLOG
|
||||
//
|
||||
//Disable for a simple tail implementation (2.34k vs 3k for the full one).
|
||||
//Both provide 'tail -f', but this cuts out -c, -q, -s, and -v.
|
||||
#define CONFIG_FEATURE_FANCY_TAIL
|
||||
//#define BB_FEATURE_FANCY_TAIL
|
||||
//
|
||||
// Enable support for loop devices in mount
|
||||
#define CONFIG_FEATURE_MOUNT_LOOP
|
||||
#define BB_FEATURE_MOUNT_LOOP
|
||||
//
|
||||
// Enable support for a real /etc/mtab file instead of /proc/mounts
|
||||
//#define CONFIG_FEATURE_MTAB_SUPPORT
|
||||
//#define BB_FEATURE_MTAB_SUPPORT
|
||||
//
|
||||
// Enable support for mounting remote NFS volumes.
|
||||
// You may need to mount with "-o nolock" if you are
|
||||
// not running a local portmapper daemon...
|
||||
#define CONFIG_FEATURE_NFSMOUNT
|
||||
//
|
||||
// If you are using uClibc, be sure that you've already compiled
|
||||
// uClibc with INCLUDE_RPC=true (contained in the Config file)
|
||||
#define BB_FEATURE_NFSMOUNT
|
||||
//
|
||||
// Enable support forced filesystem unmounting
|
||||
// (i.e., in case of an unreachable NFS system).
|
||||
#define CONFIG_FEATURE_MOUNT_FORCE
|
||||
#define BB_FEATURE_MOUNT_FORCE
|
||||
//
|
||||
// Enable support for creation of tar files.
|
||||
#define CONFIG_FEATURE_TAR_CREATE
|
||||
//#define BB_FEATURE_TAR_CREATE
|
||||
//
|
||||
// Enable support for "--exclude" and "-X" for excluding files
|
||||
#define CONFIG_FEATURE_TAR_EXCLUDE
|
||||
//#define BB_FEATURE_TAR_EXCLUDE
|
||||
//
|
||||
// Enable support for tar -z option (currently only works for inflating)
|
||||
#define CONFIG_FEATURE_TAR_GZIP
|
||||
#define BB_FEATURE_TAR_GZIP
|
||||
//
|
||||
// Enable reverse sort
|
||||
#define CONFIG_FEATURE_SORT_REVERSE
|
||||
//#define BB_FEATURE_SORT_REVERSE
|
||||
//
|
||||
// Enable uniqe sort
|
||||
#define CONFIG_FEATURE_SORT_UNIQUE
|
||||
//#define BB_FEATURE_SORT_UNIQUE
|
||||
//
|
||||
// Enable command line editing in the shell.
|
||||
// Only relevant if a shell is enabled. On by default.
|
||||
#define CONFIG_FEATURE_COMMAND_EDITING
|
||||
#define BB_FEATURE_COMMAND_EDITING
|
||||
//
|
||||
// Enable tab completion in the shell. This is now working quite nicely.
|
||||
// This feature adds a bit over 4k. Only relevant if a shell is enabled.
|
||||
#define CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#define BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
//
|
||||
// Attempts to match usernames in a ~-prefixed path
|
||||
//#define CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//#define BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
//
|
||||
//Allow the shell to invoke all the compiled in BusyBox applets as if they
|
||||
//were shell builtins. Nice for staticly linking an emergency rescue shell,
|
||||
//among other things. Off by default.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
//#define BB_FEATURE_SH_STANDALONE_SHELL
|
||||
//
|
||||
//When this is enabled, busybox shell applets can be called using full path
|
||||
//names. This causes applets (i.e., most busybox commands) to override
|
||||
//real commands on the filesystem. For example, if you run run /bin/cat, it
|
||||
//will use BusyBox cat even if /bin/cat exists on the filesystem and is _not_
|
||||
//busybox. Some systems want this, others do not. Choose wisely. :-) This
|
||||
//only has meaning when CONFIG_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
//only has meaning when BB_FEATURE_SH_STANDALONE_SHELL is enabled.
|
||||
// Only relevant if a shell is enabled. Off by default.
|
||||
//#define CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//#define BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
//
|
||||
// Uncomment this option for a fancy shell prompt that includes the
|
||||
// current username and hostname. On systems that don't have usernames
|
||||
// or hostnames, this can look hideous.
|
||||
// Only relevant if a shell is enabled.
|
||||
//#define CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
//#define BB_FEATURE_SH_FANCY_PROMPT
|
||||
//
|
||||
// Uncomment this option to disable job control. Job control lets you
|
||||
// run jobs in the background (which completely useless for is all you
|
||||
// are doing is running scripts). Disabing this is bad for interactive
|
||||
// use, since when you hit ^C in an application, it will also kill the
|
||||
// shell. This adds about 2.5k on an x86 system.
|
||||
#define BB_FEATURE_ASH_JOB_CONTROL
|
||||
//
|
||||
//Turn on extra fbset options
|
||||
//#define CONFIG_FEATURE_FBSET_FANCY
|
||||
//#define BB_FEATURE_FBSET_FANCY
|
||||
//
|
||||
//Turn on fbset readmode support
|
||||
//#define CONFIG_FEATURE_FBSET_READMODE
|
||||
//#define BB_FEATURE_FBSET_READMODE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for post 2.1 kernels
|
||||
//#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
//#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
//
|
||||
// Support insmod/lsmod/rmmod for pre 2.1 kernels
|
||||
//#define CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
//#define BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
//
|
||||
// Support module version checking
|
||||
//#define CONFIG_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//#define BB_FEATURE_INSMOD_VERSION_CHECKING
|
||||
//
|
||||
// Support for uClinux memory usage optimization, which will load the image
|
||||
// directly into the kernel memory. This divides memory requrements by three.
|
||||
// If you are not running uClinux (i.e., your CPU has an MMU) leave this
|
||||
// disabled...
|
||||
//#define CONFIG_FEATURE_INSMOD_LOADINKMEM
|
||||
//#define BB_FEATURE_INSMOD_LOADINKMEM
|
||||
//
|
||||
// Support for Minix filesystem, version 2
|
||||
//#define CONFIG_FEATURE_MINIX2
|
||||
//#define BB_FEATURE_MINIX2
|
||||
//
|
||||
// Enable ifconfig status reporting output -- this feature adds 12k.
|
||||
#define CONFIG_FEATURE_IFCONFIG_STATUS
|
||||
// Enable ifconfig status reporting output -- this feature adds 7k.
|
||||
#define BB_FEATURE_IFCONFIG_STATUS
|
||||
//
|
||||
// Enable ifconfig slip-specific options "keepalive" and "outfill"
|
||||
//#define CONFIG_FEATURE_IFCONFIG_SLIP
|
||||
//#define BB_FEATURE_IFCONFIG_SLIP
|
||||
//
|
||||
// Enable ifconfig options "mem_start", "io_addr", and "irq".
|
||||
//#define CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
#define BB_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ
|
||||
//
|
||||
// Enable ifconfig option "hw". Currently works for only with "ether".
|
||||
#define CONFIG_FEATURE_IFCONFIG_HW
|
||||
#define BB_FEATURE_IFCONFIG_HW
|
||||
//
|
||||
// Allows "broadcast +" to set broadcast automatically based on hostaddr
|
||||
// and netmask, at a cost of about 100 bytes of code (i386).
|
||||
//#define BB_FEATURE_IFCONFIG_BROADCAST_PLUS
|
||||
//
|
||||
// Enable busybox --install [-s]
|
||||
// to create links (or symlinks) for all the commands that are
|
||||
// compiled into the binary. (needs /proc filesystem)
|
||||
#define CONFIG_FEATURE_INSTALLER
|
||||
//#define BB_FEATURE_INSTALLER
|
||||
//
|
||||
// Enable a nifty progress meter in wget (adds just under 2k)
|
||||
#define CONFIG_FEATURE_WGET_STATUSBAR
|
||||
#define BB_FEATURE_WGET_STATUSBAR
|
||||
//
|
||||
// Enable HTTP authentication in wget
|
||||
#define CONFIG_FEATURE_WGET_AUTHENTICATION
|
||||
//#define BB_FEATURE_WGET_AUTHENTICATION
|
||||
//
|
||||
// Clean up all memory before exiting -- usually not needed
|
||||
// as the OS can clean up... Don't enable this unless you
|
||||
// have a really good reason for cleaning things up manually.
|
||||
//#define CONFIG_FEATURE_CLEAN_UP
|
||||
//#define BB_FEATURE_CLEAN_UP
|
||||
//
|
||||
// Support for human readable output by ls, du, etc.(example 13k, 23M, 235G)
|
||||
#define CONFIG_FEATURE_HUMAN_READABLE
|
||||
#define BB_FEATURE_HUMAN_READABLE
|
||||
//
|
||||
// Support for the find -type option.
|
||||
#define CONFIG_FEATURE_FIND_TYPE
|
||||
#define BB_FEATURE_FIND_TYPE
|
||||
//
|
||||
// Support for the find -perm option.
|
||||
#define CONFIG_FEATURE_FIND_PERM
|
||||
#define BB_FEATURE_FIND_PERM
|
||||
//
|
||||
// Support for the find -mtine option.
|
||||
#define CONFIG_FEATURE_FIND_MTIME
|
||||
// Support for the find -mtime option.
|
||||
#define BB_FEATURE_FIND_MTIME
|
||||
//
|
||||
//// Support for the find -newer option.
|
||||
#define BB_FEATURE_FIND_NEWER
|
||||
//
|
||||
// Support for the -A -B and -C context flags in grep
|
||||
//#define CONFIG_FEATURE_GREP_CONTEXT
|
||||
//#define BB_FEATURE_GREP_CONTEXT
|
||||
//
|
||||
// Support for the EGREP applet (alias to the grep applet)
|
||||
//#define CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||
//#define BB_FEATURE_GREP_EGREP_ALIAS
|
||||
//
|
||||
// Tell tftp what commands that should be supported.
|
||||
#define CONFIG_FEATURE_TFTP_PUT
|
||||
#define CONFIG_FEATURE_TFTP_GET
|
||||
#define BB_FEATURE_TFTP_PUT
|
||||
#define BB_FEATURE_TFTP_GET
|
||||
//
|
||||
// features for vi
|
||||
#define CONFIG_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define CONFIG_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define CONFIG_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define CONFIG_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define CONFIG_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define CONFIG_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define CONFIG_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define CONFIG_FEATURE_VI_SET // :set
|
||||
#define CONFIG_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
#define BB_FEATURE_VI_COLON // ":" colon commands, no "ex" mode
|
||||
#define BB_FEATURE_VI_YANKMARK // Yank/Put commands and Mark cmds
|
||||
#define BB_FEATURE_VI_SEARCH // search and replace cmds
|
||||
#define BB_FEATURE_VI_USE_SIGNALS // catch signals
|
||||
#define BB_FEATURE_VI_DOT_CMD // remember previous cmd and "." cmd
|
||||
#define BB_FEATURE_VI_READONLY // vi -R and "view" mode
|
||||
#define BB_FEATURE_VI_SETOPTS // set-able options, ai ic showmatch
|
||||
#define BB_FEATURE_VI_SET // :set
|
||||
#define BB_FEATURE_VI_WIN_RESIZE // handle window resize
|
||||
//
|
||||
// Enable a if you system have setuped locale
|
||||
//#define CONFIG_LOCALE_SUPPORT
|
||||
//#define BB_LOCALE_SUPPORT
|
||||
//
|
||||
// Support for TELNET to pass TERM type to remote host. Adds 384 bytes.
|
||||
#define CONFIG_FEATURE_TELNET_TTYPE
|
||||
#define BB_FEATURE_TELNET_TTYPE
|
||||
//
|
||||
// Support for devfs.
|
||||
//#define BB_FEATURE_DEVFS
|
||||
//
|
||||
// End of Features List
|
||||
//
|
||||
@@ -395,75 +421,73 @@
|
||||
// mere mortals so leave this stuff alone.
|
||||
//
|
||||
#include <features.h>
|
||||
#if defined __UCLIBC__ && ! defined __UCLIBC_HAS_MMU__
|
||||
#undef CONFIG_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef CONFIG_ASH /* Uses fork() */
|
||||
#undef CONFIG_HUSH /* Uses fork() */
|
||||
#undef CONFIG_LASH /* Uses fork() */
|
||||
#undef CONFIG_INIT /* Uses fork() */
|
||||
#undef CONFIG_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef CONFIG_SYSLOGD /* Uses daemon() */
|
||||
#undef CONFIG_KLOGD /* Uses daemon() */
|
||||
#undef CONFIG_UPDATE /* Uses daemon() */
|
||||
#if defined(__uClinux__)
|
||||
#undef BB_RPM2CPIO /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_DPKG_DEB /* Uses gz_open(), which uses fork() */
|
||||
#undef BB_FEATURE_TAR_GZIP /* Uses fork() */
|
||||
#undef BB_UPDATE /* Uses daemon() */
|
||||
#endif
|
||||
#if defined CONFIG_ASH || defined CONFIG_HUSH || defined CONFIG_LASH || defined CONFIG_MSH
|
||||
#if defined CONFIG_FEATURE_COMMAND_EDITING
|
||||
#define CONFIG_CMDEDIT
|
||||
#if defined BB_ASH || defined BB_HUSH || defined BB_LASH || defined BB_MSH
|
||||
#if defined BB_FEATURE_COMMAND_EDITING
|
||||
#define BB_CMDEDIT
|
||||
#else
|
||||
#undef CONFIG_FEATURE_COMMAND_EDITING
|
||||
#undef CONFIG_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef CONFIG_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_COMMAND_EDITING
|
||||
#undef BB_FEATURE_COMMAND_TAB_COMPLETION
|
||||
#undef BB_FEATURE_COMMAND_USERNAME_COMPLETION
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
#else
|
||||
#undef CONFIG_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef CONFIG_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef CONFIG_FEATURE_SH_FANCY_PROMPT
|
||||
#undef BB_FEATURE_SH_APPLETS_ALWAYS_WIN
|
||||
#undef BB_FEATURE_SH_STANDALONE_SHELL
|
||||
#undef BB_FEATURE_SH_FANCY_PROMPT
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_KILLALL
|
||||
#ifndef CONFIG_KILL
|
||||
#define CONFIG_KILL
|
||||
#if (defined BB_ASH || defined BB_HUSH || defined BB_MSH) && ! defined BB_TEST
|
||||
#define BB_TEST
|
||||
#endif
|
||||
//
|
||||
#ifdef BB_KILLALL
|
||||
#ifndef BB_KILL
|
||||
#define BB_KILL
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifndef CONFIG_INIT
|
||||
#undef CONFIG_FEATURE_INITRD
|
||||
#ifndef BB_INIT
|
||||
#undef BB_FEATURE_LINUXRC
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_MOUNT && defined CONFIG_FEATURE_NFSMOUNT
|
||||
#define CONFIG_NFSMOUNT
|
||||
#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT
|
||||
#define BB_NFSMOUNT
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_FEATURE_AUTOWIDTH
|
||||
#ifndef CONFIG_FEATURE_USE_TERMIOS
|
||||
#define CONFIG_FEATURE_USE_TERMIOS
|
||||
#if defined BB_FEATURE_AUTOWIDTH
|
||||
#ifndef BB_FEATURE_USE_TERMIOS
|
||||
#define BB_FEATURE_USE_TERMIOS
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_INSMOD || defined CONFIG_LSMOD
|
||||
#if ! defined CONFIG_FEATURE_NEW_MODULE_INTERFACE && ! defined CONFIG_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define CONFIG_FEATURE_NEW_MODULE_INTERFACE
|
||||
#if defined BB_INSMOD || defined BB_LSMOD
|
||||
#if ! defined BB_FEATURE_NEW_MODULE_INTERFACE && ! defined BB_FEATURE_OLD_MODULE_INTERFACE
|
||||
#define BB_FEATURE_NEW_MODULE_INTERFACE
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_UNIX2DOS
|
||||
#define CONFIG_DOS2UNIX
|
||||
#ifdef BB_UNIX2DOS
|
||||
#define BB_DOS2UNIX
|
||||
#endif
|
||||
//
|
||||
#ifdef CONFIG_SYSLOGD
|
||||
#if defined CONFIG_FEATURE_IPC_SYSLOG
|
||||
#define CONFIG_LOGREAD
|
||||
#ifdef BB_SYSLOGD
|
||||
#if defined BB_FEATURE_IPC_SYSLOG
|
||||
#define BB_LOGREAD
|
||||
#endif
|
||||
#endif
|
||||
//
|
||||
#if defined CONFIG_ASH && defined CONFIG_FEATURE_SH_IS_ASH
|
||||
#if defined BB_ASH && defined BB_FEATURE_SH_IS_ASH
|
||||
# define shell_main ash_main
|
||||
#elif defined CONFIG_HUSH && defined CONFIG_FEATURE_SH_IS_HUSH
|
||||
#elif defined BB_HUSH && defined BB_FEATURE_SH_IS_HUSH
|
||||
# define shell_main hush_main
|
||||
#elif defined CONFIG_LASH && defined CONFIG_FEATURE_SH_IS_LASH
|
||||
#elif defined BB_LASH && defined BB_FEATURE_SH_IS_LASH
|
||||
# define shell_main lash_main
|
||||
#elif defined CONFIG_MSH && defined CONFIG_FEATURE_SH_IS_MSH
|
||||
#elif defined BB_MSH && defined BB_FEATURE_SH_IS_MSH
|
||||
# define shell_main msh_main
|
||||
#endif
|
||||
@@ -5,6 +5,6 @@ BusyBox is being developed and maintained by Erik Andersen
|
||||
<andersee@debian.org>.
|
||||
|
||||
If you have a problem with BusyBox, send email to the Debian bug tracking
|
||||
system that lives at <submit@bugs.lineo.com>
|
||||
system that lives at <submit@bugs.busybox.net>
|
||||
|
||||
Erik Andersen <andersee@debian.org>, Sun, 18 Jun 2000 21:52:00 -0600
|
||||
@@ -1,6 +1,149 @@
|
||||
busybox (1:0.60.5-2) unstable; urgency=low
|
||||
|
||||
* It turns out that for the .udeb, we don't want to disable
|
||||
BB_FEATURE_LINUXRC, we just want to kill the /linuxrc link.
|
||||
Thanks to Matt Kraai for tracking this one down. (closes: #161611)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Thu, 31 Oct 2002 02:25:01 -0700
|
||||
|
||||
busybox (1:0.60.5-1) unstable; urgency=low
|
||||
|
||||
* New version released. See Changelog for non-Debian specific details.
|
||||
* zcat no longer tries to delete source files (closes: #164968)
|
||||
* Eliminate /linuxrc from the .udeb (closes: #163890)
|
||||
* Fix description of the --install option (closes: #164178)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Sat, 26 Oct 2002 06:23:51 -0600
|
||||
|
||||
busybox (1:0.60.4-1.1) unstable; urgency=low
|
||||
|
||||
* NMU
|
||||
* Fix cp -a so it handles symlinks properly (closes: #163501)
|
||||
|
||||
-- Tollef Fog Heen <tfheen@debian.org> Sun, 6 Oct 2002 16:08:45 +0200
|
||||
|
||||
busybox (1:0.60.4-1) unstable; urgency=low
|
||||
|
||||
* New version released. See Changelog for non-Debian specific details.
|
||||
* enable uname for the debian-installer (closes: #158706)
|
||||
* enable losetup for the boot floppies (closes: #138060)
|
||||
* init behaves itself better consoles go missing (closes: #129626)
|
||||
* In 'free', buffers change as buffered data increases (closes: #148396)
|
||||
* Functions for debootstrap added to the .udeb (closes: #124388)
|
||||
* This bug is not reproducable (closes: #127522)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Wed, 18 Sep 2002 14:13:05 -0600
|
||||
|
||||
busybox (1:0.60.3-1) unstable; urgency=low
|
||||
|
||||
* New version released. See Changelog for non-Debian specific details.
|
||||
* makedevs no longer segfaults (closes: #123921)
|
||||
* wget no longer crashes (closes: #138943)
|
||||
* wget now checks the safe_fwrite return code (closes: #143179)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Sat, 27 Apr 2002 01:33:34 -0600
|
||||
|
||||
busybox (1:0.60.2-3) testing unstable; urgency=low
|
||||
|
||||
* Fix wc stdin handling (closes: #123387).
|
||||
* Fix wget to do just one DNS lookup (closes: #124068)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Sun, 16 Dec 2001 22:51:03 -0700
|
||||
|
||||
busybox (1:0.60.2-2) unstable; urgency=low
|
||||
|
||||
* Several small bugfixes (closes: #120353, #120369, #122638,
|
||||
* Reworked wc.c to fix the severe efficiency problems and make it
|
||||
smaller. This one is mainly for the boot-floppies (closes: #120441)
|
||||
* Enable hostname (closes: #120511)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Thu, 6 Dec 2001 00:06:33 -0700
|
||||
|
||||
busybox (1:0.60.2-1) unstable; urgency=low
|
||||
|
||||
* New version released. See Changelog for non-Debian specific details.
|
||||
* dpkg.c now uses an int for getopt (closes: #118975)
|
||||
* s390 console reboot msg is now appropriate (closes: #118859)
|
||||
* the manpage is no longer empty (closes: #117013)
|
||||
* no more .o files in the source tarball (closes: #112046)
|
||||
* the .udeb contents are exactly as Joey wants them (closes: #105352)
|
||||
* busybox ash is the default shell for the -static package,
|
||||
so it can cope with /etc/profile just fine (closes: #95745)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Tue, 20 Nov 2001 03:41:29 -0700
|
||||
|
||||
busybox (1:0.60.1-8) unstable; urgency=low
|
||||
|
||||
* Adjusted some apps for the debian installer's .udeb package.
|
||||
Enabled ifconfig, route.
|
||||
Disabled chgrp, clear, date, dd, du, gzip, halt, head, killall,
|
||||
loadkmap, logger, mkswap, more, poweroff, reset, sleep, sort,
|
||||
swapon, swapoff, touch, tty, uniq, uname, uptime, vi, wc, which,
|
||||
whoami, xargs, and yes.
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Thu, 18 Oct 2001 22:59:06 -0600
|
||||
|
||||
busybox (1:0.60.1-7) unstable; urgency=low
|
||||
|
||||
* Re-enable wget's status bar for today's dbootstrap change. (closes: #115717)
|
||||
* Enable initrd support (even if they are a bad idea). (closes: #114727)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Mon, 15 Oct 2001 20:45:57 -0600
|
||||
|
||||
busybox (1:0.60.1-6) unstable; urgency=low
|
||||
|
||||
* Re-enable wc, gzip, tty, and expr. (closes: #114906)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Wed, 10 Oct 2001 02:47:50 -0600
|
||||
|
||||
busybox (1:0.60.1-5) unstable; urgency=low
|
||||
|
||||
* Time to make this official. This enables several applets, such
|
||||
as ifconfig and route, and disables several others.
|
||||
* Revert ash to the version in the busybox stable branch. For the
|
||||
-3 non-release, I tried the one from busybox unstable (which lived
|
||||
up to its name). (closes: #112503)
|
||||
* Enable id, disable ash (closes: #114260, #113698)
|
||||
* Backport several bugfixes from unstable
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Fri, 5 Oct 2001 23:03:15 -0600
|
||||
|
||||
busybox (1:0.60.1-4) unstable; urgency=low
|
||||
|
||||
* Doh! With busybox ash, we need test and echo enabled...
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Wed, 26 Sep 2001 00:05:04 -0600
|
||||
|
||||
busybox (1:0.60.1-3) unstable; urgency=low
|
||||
|
||||
* This upload is to test whether disabling several applets, and
|
||||
enabling several others will help. Enabled is ifconfig, route,
|
||||
and ash. Disabled is basename, date, echo, env, expr, gzip,
|
||||
lsmod, and wc.
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Tue, 25 Sep 2001 17:45:16 -0600
|
||||
|
||||
busybox (1:0.60.1-2) unstable; urgency=low
|
||||
|
||||
* Disabled several applets to make busybox be a bit thinner, since the
|
||||
powerpc boot floppies are _very_ tight on space (closes: #112503)
|
||||
* Teach 'mount' about usbdevfs (closes: #111055)
|
||||
* Busybox supports full online help, but due to space constraints on
|
||||
the boot floppies, it will not be enabled. People can read the
|
||||
busybox documentation if they need full details. (closes: #111350)
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Sun, 23 Sep 2001 23:32:15 -0600
|
||||
|
||||
busybox (1:0.60.1-1) unstable; urgency=low
|
||||
|
||||
* New stable version released. See changelog for details.
|
||||
* Enabled 'ar' for the udeb
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Thu, 23 Aug 2001 15:44:14 -0600
|
||||
|
||||
busybox (1:0.60.0-1) unstable; urgency=low
|
||||
|
||||
* New version released. See changelog for details.
|
||||
* New stable version released. See changelog for details.
|
||||
|
||||
-- Erik Andersen <andersee@debian.org> Thu, 2 Aug 2001 12:12:37 -0600
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ Description: Tiny utilities for small and embedded systems.
|
||||
.
|
||||
This package installs the BusyBox binary but does not install symlinks
|
||||
for any of the supported utilities. You can use /bin/busybox --install
|
||||
to install BusyBox to the current directory (you do not want to do this
|
||||
in / on your Debian system!).
|
||||
to install BusyBox to the root directory (you do not want to do this
|
||||
to your your Debian system, except in dire emergencies!).
|
||||
|
||||
Package: busybox-static
|
||||
Architecture: any
|
||||
@@ -30,6 +30,7 @@ Depends: ${shlibs:Depends}
|
||||
Conflicts: busybox
|
||||
Replaces: busybox
|
||||
Section: shells
|
||||
Priority: extra
|
||||
Description: Standalone rescue shell with tons of builtin utilities.
|
||||
BusyBox combines tiny versions of many common UNIX utilities into a single
|
||||
small executable. It provides minimalist replacements for the most common
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
This package was debianized by Erik Andersen <andersee@debian.org> on
|
||||
Sun, 18 Jun 2000 23:31:02 -0600
|
||||
|
||||
It was downloaded from ftp://ftp.busybox.net/busybox
|
||||
HomePage is at: http://busybox.net/
|
||||
It was downloaded from ftp://ftp.lineo.com/pub/busybox
|
||||
HomePage is at: http://busybox.lineo.com/
|
||||
|
||||
Copyright: GPL
|
||||
@@ -28,8 +28,8 @@ debian/build-stamp-busybox:
|
||||
mkdir -p $(bbbd)
|
||||
cp Makefile $(bbbd)
|
||||
cp debian/Config.h-deb $(bbbd)/Config.h
|
||||
-(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" applet_source_list)
|
||||
(cd $(bbbd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
||||
-(cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" applet_source_list)
|
||||
(cd $(bbbd); $(MAKE) USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
||||
touch debian/build-stamp-busybox
|
||||
|
||||
install: build
|
||||
@@ -39,11 +39,11 @@ install: build
|
||||
dh_installdirs
|
||||
# Do not run 'make install', since we do not want all the symlinks.
|
||||
# This just installes the busybox binary...
|
||||
#(cd $(bbbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bb)" install)
|
||||
#(cd $(bbbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bb)" install)
|
||||
mkdir -p $(bb)/bin/
|
||||
cp $(bbbd)/busybox $(bb)/bin/busybox
|
||||
mkdir -p $(bb)/usr/share/doc/busybox/busybox.net
|
||||
cp $(bbbd)/docs/busybox.net/BusyBox.html $(bb)/usr/share/doc/busybox/busybox.net/
|
||||
mkdir -p $(bb)/usr/share/doc/busybox
|
||||
cp $(bbbd)/docs/BusyBox.html $(bb)/usr/share/doc/busybox/
|
||||
mkdir -p $(bb)/usr/share/man/man1
|
||||
cp $(bbbd)/docs/BusyBox.1 $(bb)/usr/share/man/man1/busybox.1
|
||||
|
||||
@@ -54,7 +54,7 @@ debian/build-stamp-busybox-static:
|
||||
mkdir -p $(bbsbd)
|
||||
cp Makefile $(bbsbd)
|
||||
cp debian/Config.h-static $(bbsbd)/Config.h
|
||||
(cd $(bbsbd); $(MAKE) DOSTATIC=true USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
||||
(cd $(bbsbd); $(MAKE) DOSTATIC=true USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
||||
touch debian/build-stamp-busybox-static
|
||||
|
||||
install-static: build
|
||||
@@ -64,11 +64,11 @@ install-static: build
|
||||
dh_installdirs
|
||||
# Do not run 'make install', since we do not want all the symlinks.
|
||||
# This just installes the busybox binary...
|
||||
#(cd $(bbsbd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bbs)" install)
|
||||
#(cd $(bbsbd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bbs)" install)
|
||||
mkdir -p $(bbs)/bin/
|
||||
cp $(bbsbd)/busybox $(bbs)/bin/busybox
|
||||
mkdir -p $(bbs)/usr/share/doc/busybox-static/busybox.net
|
||||
cp $(bbsbd)/docs/busybox.net/BusyBox.html $(bbs)/usr/share/doc/busybox-static/busybox.net/
|
||||
mkdir -p $(bbs)/usr/share/doc/busybox-static
|
||||
cp $(bbsbd)/docs/BusyBox.html $(bbs)/usr/share/doc/busybox-static/
|
||||
mkdir -p $(bbs)/usr/share/man/man1/
|
||||
cp $(bbsbd)/docs/BusyBox.1 $(bbs)/usr/share/man/man1/busybox.1
|
||||
|
||||
@@ -94,7 +94,7 @@ debian/build-stamp-busybox-udeb:
|
||||
mkdir -p $(bbubd)
|
||||
cp Makefile $(bbubd)
|
||||
cp debian/Config.h-udeb $(bbubd)/Config.h
|
||||
(cd $(bbubd); $(MAKE) USE_SYSTEM_PWD_GRP=false "CONFIG_SRC_DIR=../../")
|
||||
(cd $(bbubd); $(MAKE) USE_SYSTEM_PWD_GRP=false "BB_SRC_DIR=../../")
|
||||
touch debian/build-stamp-busybox-udeb
|
||||
|
||||
install-udeb: build
|
||||
@@ -102,7 +102,8 @@ install-udeb: build
|
||||
dh_testroot
|
||||
dh_clean -k
|
||||
dh_installdirs
|
||||
(cd $(bbubd); $(MAKE) "CONFIG_SRC_DIR=../../" "PREFIX=../../$(bbu)" install)
|
||||
(cd $(bbubd); $(MAKE) "BB_SRC_DIR=../../" "PREFIX=../../$(bbu)" install)
|
||||
rm -f $(bbu)/linuxrc
|
||||
mkdir -p $(bbu)/usr/share/man/man1/
|
||||
cp $(bbubd)/docs/BusyBox.1 $(bbu)/usr/share/man/man1/busybox.1
|
||||
|
||||
@@ -130,7 +131,7 @@ busybox: install
|
||||
dh_installdirs
|
||||
dh_installdocs -p$@ $(bbbd)/docs/BusyBox.txt \
|
||||
$(bbbd)/docs/BusyBox.html docs/style-guide.txt \
|
||||
docs/busybox.net AUTHORS README TODO
|
||||
AUTHORS README TODO
|
||||
rm -rf `find $(bb) -name CVS`
|
||||
rm -f `find $(bb) -name .cvsignore`
|
||||
dh_installchangelogs -p$@ Changelog
|
||||
@@ -152,7 +153,7 @@ busybox-static: do_static
|
||||
dh_installdirs
|
||||
dh_installdocs -p$@ $(bbsbd)/docs/BusyBox.txt \
|
||||
$(bbsbd)/docs/BusyBox.html docs/style-guide.txt \
|
||||
docs/busybox.net AUTHORS README TODO
|
||||
AUTHORS README TODO
|
||||
rm -rf `find $(bbs) -name CVS`
|
||||
rm -f `find $(bbs) -name .cvsignore`
|
||||
dh_installchangelogs -p$@ Changelog
|
||||
|
||||
@@ -1,270 +0,0 @@
|
||||
/* vi: set sw=4 ts=4: */
|
||||
/*
|
||||
* Mini start-stop-daemon implementation(s) for busybox
|
||||
*
|
||||
* Written by Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl>,
|
||||
* public domain.
|
||||
* Adapted for busybox David Kimdon <dwhedon@gordian.com>
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <signal.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
#include "pwd.h"
|
||||
|
||||
#include "busybox.h"
|
||||
|
||||
static int start = 0;
|
||||
static int stop = 0;
|
||||
static int fork_before_exec = 0;
|
||||
static int signal_nr = 15;
|
||||
static int user_id = -1;
|
||||
static const char *userspec = NULL;
|
||||
static const char *cmdname = NULL;
|
||||
static char *execname = NULL;
|
||||
static char *startas = NULL;
|
||||
|
||||
typedef struct pid_list {
|
||||
struct pid_list *next;
|
||||
int pid;
|
||||
} pid_list;
|
||||
|
||||
static pid_list *found = NULL;
|
||||
|
||||
static inline void
|
||||
push(int pid)
|
||||
{
|
||||
pid_list *p;
|
||||
|
||||
p = xmalloc(sizeof(*p));
|
||||
p->next = found;
|
||||
p->pid = pid;
|
||||
found = p;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
parse_options(int argc, char * const *argv)
|
||||
{
|
||||
|
||||
int c;
|
||||
|
||||
for (;;) {
|
||||
c = getopt (argc, argv, "a:n:s:u:x:KSb");
|
||||
if (c == EOF)
|
||||
break;
|
||||
switch (c) {
|
||||
case 'K':
|
||||
stop = 1;
|
||||
break;
|
||||
case 'S':
|
||||
start = 1;
|
||||
break;
|
||||
case 'a':
|
||||
startas = optarg;
|
||||
break;
|
||||
case 'n':
|
||||
cmdname = optarg;
|
||||
break;
|
||||
case 's':
|
||||
if (sscanf(optarg, "%d", &signal_nr) != 1)
|
||||
error_msg_and_die ("-s takes a numeric argument");
|
||||
break;
|
||||
case 'u':
|
||||
userspec = optarg;
|
||||
break;
|
||||
case 'x':
|
||||
execname = optarg;
|
||||
break;
|
||||
case 'b':
|
||||
fork_before_exec = 1;
|
||||
break;
|
||||
default:
|
||||
show_usage();
|
||||
}
|
||||
}
|
||||
|
||||
if (start == stop)
|
||||
error_msg_and_die ("need one of -S or -K");
|
||||
|
||||
if (!execname && !userspec)
|
||||
error_msg_and_die ("need at least one of -x or -u");
|
||||
|
||||
if (!startas)
|
||||
startas = execname;
|
||||
|
||||
if (start && !startas)
|
||||
error_msg_and_die ("-S needs -x or -a");
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
pid_is_exec(int pid, const char *exec)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
FILE *fp;
|
||||
|
||||
sprintf(buf, "/proc/%d/cmdline", pid);
|
||||
fp = fopen(buf, "r");
|
||||
if (fp && fgets (buf, sizeof (buf), fp) ) {
|
||||
if (strncmp (buf, exec, strlen(exec)) == 0)
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
pid_is_user(int pid, int uid)
|
||||
{
|
||||
struct stat sb;
|
||||
char buf[32];
|
||||
|
||||
sprintf(buf, "/proc/%d", pid);
|
||||
if (stat(buf, &sb) != 0)
|
||||
return 0;
|
||||
return (sb.st_uid == uid);
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
pid_is_cmd(int pid, const char *name)
|
||||
{
|
||||
char buf[32];
|
||||
FILE *f;
|
||||
int c;
|
||||
|
||||
sprintf(buf, "/proc/%d/stat", pid);
|
||||
f = fopen(buf, "r");
|
||||
if (!f)
|
||||
return 0;
|
||||
while ((c = getc(f)) != EOF && c != '(')
|
||||
;
|
||||
if (c != '(') {
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
/* this hopefully handles command names containing ')' */
|
||||
while ((c = getc(f)) != EOF && c == *name)
|
||||
name++;
|
||||
fclose(f);
|
||||
return (c == ')' && *name == '\0');
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
check(int pid)
|
||||
{
|
||||
if (execname && !pid_is_exec(pid, execname)) {
|
||||
return;
|
||||
}
|
||||
if (userspec && !pid_is_user(pid, user_id)) {
|
||||
return;
|
||||
}
|
||||
if (cmdname && !pid_is_cmd(pid, cmdname)) {
|
||||
return;
|
||||
}
|
||||
push(pid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void
|
||||
do_procfs(void)
|
||||
{
|
||||
DIR *procdir;
|
||||
struct dirent *entry;
|
||||
int foundany, pid;
|
||||
|
||||
procdir = opendir("/proc");
|
||||
if (!procdir)
|
||||
perror_msg_and_die ("opendir /proc");
|
||||
|
||||
foundany = 0;
|
||||
while ((entry = readdir(procdir)) != NULL) {
|
||||
if (sscanf(entry->d_name, "%d", &pid) != 1)
|
||||
continue;
|
||||
foundany++;
|
||||
check(pid);
|
||||
}
|
||||
closedir(procdir);
|
||||
if (!foundany)
|
||||
error_msg_and_die ("nothing in /proc - not mounted?");
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
do_stop(void)
|
||||
{
|
||||
char what[1024];
|
||||
pid_list *p;
|
||||
int killed = 0;
|
||||
|
||||
if (cmdname)
|
||||
strcpy(what, cmdname);
|
||||
else if (execname)
|
||||
strcpy(what, execname);
|
||||
else if (userspec)
|
||||
sprintf(what, "process(es) owned by `%s'", userspec);
|
||||
else
|
||||
error_msg_and_die ("internal error, please report");
|
||||
|
||||
if (!found) {
|
||||
printf("no %s found; none killed.\n", what);
|
||||
return;
|
||||
}
|
||||
for (p = found; p; p = p->next) {
|
||||
if (kill(p->pid, signal_nr) == 0) {
|
||||
p->pid = -p->pid;
|
||||
killed++;
|
||||
} else {
|
||||
perror_msg("warning: failed to kill %d:", p->pid);
|
||||
}
|
||||
}
|
||||
if (killed) {
|
||||
printf("stopped %s (pid", what);
|
||||
for (p = found; p; p = p->next)
|
||||
if(p->pid < 0)
|
||||
printf(" %d", -p->pid);
|
||||
printf(").\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
start_stop_daemon_main(int argc, char **argv)
|
||||
{
|
||||
parse_options(argc, argv);
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (userspec && sscanf(userspec, "%d", &user_id) != 1)
|
||||
user_id = my_getpwnam(userspec);
|
||||
|
||||
do_procfs();
|
||||
|
||||
if (stop) {
|
||||
do_stop();
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (found) {
|
||||
printf("%s already running.\n%d\n", execname ,found->pid);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
*--argv = startas;
|
||||
if (fork_before_exec) {
|
||||
if (daemon(0, 0) == -1)
|
||||
perror_msg_and_die ("unable to fork");
|
||||
}
|
||||
setsid();
|
||||
execv(startas, argv);
|
||||
perror_msg_and_die ("unable to start %s", startas);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "busybox.h"
|
||||
|
||||
extern const char mtab_file[]; /* Defined in utility.c */
|
||||
#ifdef CONFIG_FEATURE_HUMAN_READABLE
|
||||
#ifdef BB_FEATURE_HUMAN_READABLE
|
||||
static unsigned long df_disp_hr = KILOBYTE;
|
||||
#endif
|
||||
|
||||
@@ -61,7 +61,7 @@ static int do_df(char *device, const char *mount_point)
|
||||
if(device==NULL)
|
||||
return FALSE;
|
||||
}
|
||||
#ifdef CONFIG_FEATURE_HUMAN_READABLE
|
||||
#ifdef BB_FEATURE_HUMAN_READABLE
|
||||
printf("%-20s %9s ", device,
|
||||
make_human_readable_str(s.f_blocks, s.f_bsize, df_disp_hr));
|
||||
|
||||
@@ -92,13 +92,13 @@ extern int df_main(int argc, char **argv)
|
||||
char disp_units_hdr[80] = "1k-blocks"; /* default display is kilobytes */
|
||||
|
||||
while ((opt = getopt(argc, argv, "k"
|
||||
#ifdef CONFIG_FEATURE_HUMAN_READABLE
|
||||
#ifdef BB_FEATURE_HUMAN_READABLE
|
||||
"hm"
|
||||
#endif
|
||||
)) > 0)
|
||||
{
|
||||
switch (opt) {
|
||||
#ifdef CONFIG_FEATURE_HUMAN_READABLE
|
||||
#ifdef BB_FEATURE_HUMAN_READABLE
|
||||
case 'h':
|
||||
df_disp_hr = 0;
|
||||
strcpy(disp_units_hdr, " Size");
|
||||
@@ -1,125 +0,0 @@
|
||||
# BusyBox configuration option Help File
|
||||
#
|
||||
# Format of this file: description<nl>variable<nl>help text<nl><nl>.
|
||||
# The help texts may contain empty lines, but every non-empty line must
|
||||
# be indented two positions. Order of the help texts does not matter,
|
||||
# however, no variable should be documented twice: if it is, only the
|
||||
# first occurrence will be used. We try to keep the help texts of related
|
||||
# variables close together. Lines starting with `#' are ignored. To be
|
||||
# nice to menuconfig, limit your line length to 70 characters.
|
||||
#
|
||||
# Comments of the form "# Choice:" followed by a menu name are used
|
||||
# internally by the maintainers' consistency-checking tools.
|
||||
#
|
||||
# If you add a help text to this file, please try to be as gentle as
|
||||
# possible. Don't use unexplained acronyms and generally write for the
|
||||
# hypothetical ignorant but intelligent user who has just bought a PC,
|
||||
# removed Windows, installed Linux and is now compiling up BusyBox
|
||||
# for the first time. Tell them what to do if they're unsure.
|
||||
#
|
||||
# Mention all the relevant READMEs and HOWTOs in the help text.
|
||||
# Make them file URLs relative to the top level of the source tree so
|
||||
# that help browsers can turn them into hotlinks. All URLs ahould be
|
||||
# surrounded by <>.
|
||||
#
|
||||
# Repetitions are fine since the help texts are not meant to be read
|
||||
# in sequence. It is good style to include URLs pointing to more
|
||||
# detailed technical information, pictures of the hardware, etc.
|
||||
#
|
||||
# The most important thing to include in a help entry is *motivation*.
|
||||
# Explain why someone configuring BusyBox might want to select your
|
||||
# option.
|
||||
#
|
||||
|
||||
Show verbose applets usage message
|
||||
CONFIG_FEATURE_VERBOSE_USAGE
|
||||
All BusyBox applets will show more verbose help messages when
|
||||
busybox is invoked with --help. This will add lots of text to the
|
||||
busybox binary. In the default configuration, this will add about
|
||||
13k, but it can add much more depending on your configuration.
|
||||
|
||||
Enable automatic symlink creation for BusyBox built-in applets
|
||||
CONFIG_FEATURE_INSTALLER
|
||||
Enable 'busybox --install [-s]' support. This will allow you to use
|
||||
busybox at runtime to create hard links or symlinks for all the
|
||||
applets that are compiled into busybox. This feature requires the
|
||||
/proc filesystem.
|
||||
|
||||
Locale support
|
||||
CONFIG_LOCALE_SUPPORT
|
||||
Enable this if your system has locale support, and you would like
|
||||
busybox to support locale settings.
|
||||
|
||||
Enable devfs support
|
||||
CONFIG_FEATURE_DEVFS
|
||||
Enable if you want BusyBox to work with devfs.
|
||||
|
||||
Clean up all memory before exiting
|
||||
CONFIG_FEATURE_CLEAN_UP
|
||||
As a size optimization, busybox by default does not cleanup memory
|
||||
that is dynamically allocated or close files before exiting. This
|
||||
saves space and is usually not needed since the OS will clean up for
|
||||
us. Don't enable this unless you have a really good reason to clean
|
||||
things up manually.
|
||||
|
||||
Buffers allocation policy
|
||||
CONFIG_FEATURE_BUFFERS_USE_MALLOC
|
||||
There are 3 ways BusyBox can handle buffer allocations:
|
||||
- Use malloc. This costs code size for the call to xmalloc.
|
||||
- Put them on stack. For some very small machines with limited stack
|
||||
space, this can be deadly. For most folks, this works just fine.
|
||||
- Put them in BSS. This works beautifully for computers with a real
|
||||
MMU (and OS support), but wastes runtime RAM for uCLinux. This
|
||||
behavior was the only one available for BusyBox versions 0.48 and
|
||||
earlier.
|
||||
|
||||
Enable the ar applet
|
||||
CONFIG_AR
|
||||
ar is an archival utility program used to create, modify, and
|
||||
extract contents from archives. An archive is a single file holding
|
||||
a collection of other files in a structure that makes it possible to
|
||||
retrieve the original individual files (called archive members).
|
||||
The original files' contents, mode (permissions), timestamp, owner,
|
||||
and group are preserved in the archive, and can be restored on
|
||||
extraction.
|
||||
On an x86 system, the ar applet adds about XXX bytes.
|
||||
|
||||
Unless you have a specific application which requires ar, you should
|
||||
probably say N here.
|
||||
|
||||
Enable the bunzip2 applet
|
||||
CONFIG_BUNZIP2
|
||||
bunzip2 is an compression utility using the Burrows-Wheeler block
|
||||
sorting text compression algorithm, and Huffman coding. Compression
|
||||
is generally considerably better than that achieved by more
|
||||
conventional LZ77/LZ78-based compressors, and approaches the
|
||||
performance of the PPM family of statistical compressors.
|
||||
|
||||
The BusyBox bunzip2 applet is limited to de-compression only. On an
|
||||
x86 system, this applet adds about XXX bytes.
|
||||
|
||||
Unless you have a specific application which requires bunzip2, you
|
||||
should probably say N here.
|
||||
|
||||
# FIXME -- document the rest of the BusyBox config options....
|
||||
|
||||
Enable the run-parts applet
|
||||
CONFIG_RUN_PARTS
|
||||
run-parts is an utility designed to run all the scripts in a directory.
|
||||
|
||||
It is useful to set up a directory like cron.daily, where you need to
|
||||
execute all the scripts in that directory.
|
||||
|
||||
This implementation of run-parts doesn't accept long options, and
|
||||
some features (like report mode) aren't implemented.
|
||||
|
||||
Unless you know that run-parts is used in some of your scripts
|
||||
you can safely say N here.
|
||||
|
||||
# The following sets edit modes for GNU EMACS
|
||||
# Local Variables:
|
||||
# case-fold-search:nil
|
||||
# fill-prefix:" "
|
||||
# adaptive-fill:nil
|
||||
# fill-column:70
|
||||
# End:
|
||||
@@ -189,16 +189,12 @@ Example:
|
||||
|
||||
The purpose of this script is to automagically generate documentation
|
||||
for busybox using its usage.h as the original source for content.
|
||||
It used to be that same content has to be duplicated in 3 places in
|
||||
Currently, the same content has to be duplicated in 3 places in
|
||||
slightly different formats -- F<usage.h>, F<docs/busybox.pod>, and
|
||||
F<docs/busybox.sgml>. This was tedious and error-prone, so it was
|
||||
decided that F<usage.h> would contain all the text in a
|
||||
machine-readable form, and scripts could be used to transform this
|
||||
text into other forms if necessary.
|
||||
F<docs/busybox.sgml>. This is tedious, so Perl has come to the rescue.
|
||||
|
||||
F<autodocifier.pl> is one such script.
|
||||
It was based on a script by Erik Andersen <andersen@lineo.com>
|
||||
which was in turn based on a script by Mark Whitley <markw@lineo.com>
|
||||
This script was based on a script by Erik Andersen <andersee@debian.org>
|
||||
which was in turn based on a script by Mark Whitley <markw@codepoet.org>
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
@@ -255,20 +251,20 @@ a command. I<REQUIRED>
|
||||
=item B<full>
|
||||
|
||||
This should contain descriptions of each option. This will also
|
||||
be displayed along with the trivial help if CONFIG_FEATURE_TRIVIAL_HELP
|
||||
be displayed along with the trivial help if BB_FEATURE_TRIVIAL_HELP
|
||||
is disabled. I<REQUIRED>
|
||||
|
||||
=item B<notes>
|
||||
|
||||
This is documentation that is intended to go in the POD or SGML, but
|
||||
not be printed when a B<-h> is given to a command. To see an example
|
||||
of notes being used, see init_notes_usage in F<usage.h>. I<OPTIONAL>
|
||||
of notes being used, see init_notes_usage. I<OPTIONAL>
|
||||
|
||||
=item B<example>
|
||||
|
||||
This should be an example of how the command is actually used.
|
||||
This should be an example of how the command is acutally used.
|
||||
This will not be printed when a B<-h> is given to a command -- it
|
||||
will only be included in the POD or SGML documentation. I<OPTIONAL>
|
||||
is inteded only for the POD or SGML documentation. I<OPTIONAL>
|
||||
|
||||
=back
|
||||
|
||||
@@ -284,8 +280,8 @@ terms as Perl itself.
|
||||
|
||||
=head1 AUTHOR
|
||||
|
||||
John BEPPU <b@ax9.org>
|
||||
John BEPPU <beppu@codepoet.org>
|
||||
|
||||
=cut
|
||||
|
||||
# $Id: autodocifier.pl,v 1.23 2001/10/31 04:29:18 beppu Exp $
|
||||
# $Id: autodocifier.pl,v 1.22 2001/11/19 23:57:54 andersen Exp $
|
||||
@@ -1,2 +0,0 @@
|
||||
BusyBox.html
|
||||
busybox.tar.gz
|
||||
@@ -1,404 +0,0 @@
|
||||
%!PS-Adobe-2.0
|
||||
%%Title: busybox-growth.ps
|
||||
%%Creator: gnuplot 3.5 (pre 3.6) patchlevel beta 347
|
||||
%%CreationDate: Tue Apr 10 14:03:36 2001
|
||||
%%DocumentFonts: (atend)
|
||||
%%BoundingBox: 50 40 554 770
|
||||
%%Orientation: Landscape
|
||||
%%Pages: (atend)
|
||||
%%EndComments
|
||||
/gnudict 120 dict def
|
||||
gnudict begin
|
||||
/Color true def
|
||||
/Solid true def
|
||||
/gnulinewidth 5.000 def
|
||||
/userlinewidth gnulinewidth def
|
||||
/vshift -46 def
|
||||
/dl {10 mul} def
|
||||
/hpt_ 31.5 def
|
||||
/vpt_ 31.5 def
|
||||
/hpt hpt_ def
|
||||
/vpt vpt_ def
|
||||
/M {moveto} bind def
|
||||
/L {lineto} bind def
|
||||
/R {rmoveto} bind def
|
||||
/V {rlineto} bind def
|
||||
/vpt2 vpt 2 mul def
|
||||
/hpt2 hpt 2 mul def
|
||||
/Lshow { currentpoint stroke M
|
||||
0 vshift R show } def
|
||||
/Rshow { currentpoint stroke M
|
||||
dup stringwidth pop neg vshift R show } def
|
||||
/Cshow { currentpoint stroke M
|
||||
dup stringwidth pop -2 div vshift R show } def
|
||||
/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
|
||||
/hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def
|
||||
/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }
|
||||
{pop pop pop Solid {pop []} if 0 setdash} ifelse } def
|
||||
/BL { stroke gnulinewidth 2 mul setlinewidth } def
|
||||
/AL { stroke gnulinewidth 2 div setlinewidth } def
|
||||
/UL { gnulinewidth mul /userlinewidth exch def } def
|
||||
/PL { stroke userlinewidth setlinewidth } def
|
||||
/LTb { BL [] 0 0 0 DL } def
|
||||
/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def
|
||||
/LT0 { PL [] 1 0 0 DL } def
|
||||
/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
|
||||
/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def
|
||||
/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def
|
||||
/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def
|
||||
/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def
|
||||
/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def
|
||||
/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def
|
||||
/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def
|
||||
/Pnt { stroke [] 0 setdash
|
||||
gsave 1 setlinecap M 0 0 V stroke grestore } def
|
||||
/Dia { stroke [] 0 setdash 2 copy vpt add M
|
||||
hpt neg vpt neg V hpt vpt neg V
|
||||
hpt vpt V hpt neg vpt V closepath stroke
|
||||
Pnt } def
|
||||
/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V
|
||||
currentpoint stroke M
|
||||
hpt neg vpt neg R hpt2 0 V stroke
|
||||
} def
|
||||
/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
|
||||
0 vpt2 neg V hpt2 0 V 0 vpt2 V
|
||||
hpt2 neg 0 V closepath stroke
|
||||
Pnt } def
|
||||
/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M
|
||||
hpt2 vpt2 neg V currentpoint stroke M
|
||||
hpt2 neg 0 R hpt2 vpt2 V stroke } def
|
||||
/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M
|
||||
hpt neg vpt -1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt 1.62 mul V closepath stroke
|
||||
Pnt } def
|
||||
/Star { 2 copy Pls Crs } def
|
||||
/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M
|
||||
0 vpt2 neg V hpt2 0 V 0 vpt2 V
|
||||
hpt2 neg 0 V closepath fill } def
|
||||
/TriUF { stroke [] 0 setdash vpt 1.12 mul add M
|
||||
hpt neg vpt -1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt 1.62 mul V closepath fill } def
|
||||
/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
|
||||
hpt neg vpt 1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt -1.62 mul V closepath stroke
|
||||
Pnt } def
|
||||
/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M
|
||||
hpt neg vpt 1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt -1.62 mul V closepath fill} def
|
||||
/DiaF { stroke [] 0 setdash vpt add M
|
||||
hpt neg vpt neg V hpt vpt neg V
|
||||
hpt vpt V hpt neg vpt V closepath fill } def
|
||||
/Pent { stroke [] 0 setdash 2 copy gsave
|
||||
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
|
||||
closepath stroke grestore Pnt } def
|
||||
/PentF { stroke [] 0 setdash gsave
|
||||
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
|
||||
closepath fill grestore } def
|
||||
/Circle { stroke [] 0 setdash 2 copy
|
||||
hpt 0 360 arc stroke Pnt } def
|
||||
/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def
|
||||
/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450 arc } bind def
|
||||
/C1 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 90 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C2 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 90 180 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C3 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 180 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C4 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 180 270 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C5 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 90 arc
|
||||
2 copy moveto
|
||||
2 copy vpt 180 270 arc closepath fill
|
||||
vpt 0 360 arc } bind def
|
||||
/C6 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 90 270 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C7 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 270 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C8 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 270 360 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C9 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 270 450 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
|
||||
2 copy moveto
|
||||
2 copy vpt 90 180 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C11 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 180 arc closepath fill
|
||||
2 copy moveto
|
||||
2 copy vpt 270 360 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C12 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 180 360 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C13 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 0 90 arc closepath fill
|
||||
2 copy moveto
|
||||
2 copy vpt 180 360 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/C14 { BL [] 0 setdash 2 copy moveto
|
||||
2 copy vpt 90 360 arc closepath fill
|
||||
vpt 0 360 arc } bind def
|
||||
/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
|
||||
vpt 0 360 arc closepath } bind def
|
||||
/Rec { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
|
||||
neg 0 rlineto closepath } bind def
|
||||
/Square { dup Rec } bind def
|
||||
/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def
|
||||
/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def
|
||||
/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def
|
||||
/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
|
||||
/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def
|
||||
/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
|
||||
/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill
|
||||
exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
|
||||
/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def
|
||||
/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
|
||||
2 copy vpt Square fill
|
||||
Bsquare } bind def
|
||||
/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def
|
||||
/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def
|
||||
/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
|
||||
Bsquare } bind def
|
||||
/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
|
||||
Bsquare } bind def
|
||||
/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def
|
||||
/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
|
||||
2 copy vpt Square fill Bsquare } bind def
|
||||
/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
|
||||
2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
|
||||
/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def
|
||||
/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def
|
||||
/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def
|
||||
/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def
|
||||
/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def
|
||||
/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def
|
||||
/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def
|
||||
/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def
|
||||
/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def
|
||||
/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def
|
||||
/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def
|
||||
/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def
|
||||
/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def
|
||||
/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def
|
||||
/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def
|
||||
/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def
|
||||
/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def
|
||||
/DiaE { stroke [] 0 setdash vpt add M
|
||||
hpt neg vpt neg V hpt vpt neg V
|
||||
hpt vpt V hpt neg vpt V closepath stroke } def
|
||||
/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M
|
||||
0 vpt2 neg V hpt2 0 V 0 vpt2 V
|
||||
hpt2 neg 0 V closepath stroke } def
|
||||
/TriUE { stroke [] 0 setdash vpt 1.12 mul add M
|
||||
hpt neg vpt -1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt 1.62 mul V closepath stroke } def
|
||||
/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M
|
||||
hpt neg vpt 1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt -1.62 mul V closepath stroke } def
|
||||
/PentE { stroke [] 0 setdash gsave
|
||||
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
|
||||
closepath stroke grestore } def
|
||||
/CircE { stroke [] 0 setdash
|
||||
hpt 0 360 arc stroke } def
|
||||
/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def
|
||||
/DiaW { stroke [] 0 setdash vpt add M
|
||||
hpt neg vpt neg V hpt vpt neg V
|
||||
hpt vpt V hpt neg vpt V Opaque stroke } def
|
||||
/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M
|
||||
0 vpt2 neg V hpt2 0 V 0 vpt2 V
|
||||
hpt2 neg 0 V Opaque stroke } def
|
||||
/TriUW { stroke [] 0 setdash vpt 1.12 mul add M
|
||||
hpt neg vpt -1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt 1.62 mul V Opaque stroke } def
|
||||
/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M
|
||||
hpt neg vpt 1.62 mul V
|
||||
hpt 2 mul 0 V
|
||||
hpt neg vpt -1.62 mul V Opaque stroke } def
|
||||
/PentW { stroke [] 0 setdash gsave
|
||||
translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
|
||||
Opaque stroke grestore } def
|
||||
/CircW { stroke [] 0 setdash
|
||||
hpt 0 360 arc Opaque stroke } def
|
||||
/BoxFill { gsave Rec 1 setgray fill grestore } def
|
||||
end
|
||||
%%EndProlog
|
||||
%%Page: 1 1
|
||||
gnudict begin
|
||||
gsave
|
||||
50 50 translate
|
||||
0.100 0.100 scale
|
||||
90 rotate
|
||||
0 -5040 translate
|
||||
0 setgray
|
||||
newpath
|
||||
(Helvetica) findfont 140 scalefont setfont
|
||||
1.000 UL
|
||||
LTb
|
||||
560 420 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
476 420 M
|
||||
(0) Rshow
|
||||
560 1056 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(100) Rshow
|
||||
560 1692 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(200) Rshow
|
||||
560 2328 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(300) Rshow
|
||||
560 2964 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(400) Rshow
|
||||
560 3600 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(500) Rshow
|
||||
560 4236 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(600) Rshow
|
||||
560 4872 M
|
||||
63 0 V
|
||||
6409 0 R
|
||||
-63 0 V
|
||||
-6493 0 R
|
||||
(700) Rshow
|
||||
1531 420 M
|
||||
0 63 V
|
||||
0 4389 R
|
||||
0 -63 V
|
||||
0 -4529 R
|
||||
(400) Cshow
|
||||
2825 420 M
|
||||
0 63 V
|
||||
0 4389 R
|
||||
0 -63 V
|
||||
0 -4529 R
|
||||
(600) Cshow
|
||||
4120 420 M
|
||||
0 63 V
|
||||
0 4389 R
|
||||
0 -63 V
|
||||
0 -4529 R
|
||||
(800) Cshow
|
||||
5414 420 M
|
||||
0 63 V
|
||||
0 4389 R
|
||||
0 -63 V
|
||||
0 -4529 R
|
||||
(1000) Cshow
|
||||
6708 420 M
|
||||
0 63 V
|
||||
0 4389 R
|
||||
0 -63 V
|
||||
0 -4529 R
|
||||
(1200) Cshow
|
||||
1.000 UL
|
||||
LTb
|
||||
560 420 M
|
||||
6472 0 V
|
||||
0 4452 V
|
||||
-6472 0 V
|
||||
560 420 L
|
||||
0 2646 M
|
||||
currentpoint gsave translate 90 rotate 0 0 M
|
||||
(tar.gz size \(Kb\)) Cshow
|
||||
grestore
|
||||
3796 140 M
|
||||
(time \(days since Jan 1, 1998\)) Cshow
|
||||
1.000 UL
|
||||
LT0
|
||||
696 420 M
|
||||
0 593 V
|
||||
1255 0 V
|
||||
0 15 V
|
||||
214 0 V
|
||||
0 6 V
|
||||
958 0 V
|
||||
0 1 V
|
||||
-84 0 V
|
||||
0 37 V
|
||||
168 0 V
|
||||
0 262 V
|
||||
13 0 V
|
||||
0 56 V
|
||||
91 0 V
|
||||
0 33 V
|
||||
6 0 V
|
||||
0 1 V
|
||||
19 0 V
|
||||
0 11 V
|
||||
20 0 V
|
||||
0 13 V
|
||||
32 0 V
|
||||
0 104 V
|
||||
52 0 V
|
||||
0 27 V
|
||||
65 0 V
|
||||
0 15 V
|
||||
39 0 V
|
||||
0 126 V
|
||||
174 0 V
|
||||
0 103 V
|
||||
52 0 V
|
||||
0 49 V
|
||||
175 0 V
|
||||
0 56 V
|
||||
433 0 V
|
||||
0 661 V
|
||||
415 0 V
|
||||
0 857 V
|
||||
123 0 V
|
||||
0 -291 V
|
||||
498 0 V
|
||||
0 208 V
|
||||
505 0 V
|
||||
0 66 V
|
||||
291 0 V
|
||||
0 115 V
|
||||
311 0 V
|
||||
0 449 V
|
||||
162 0 V
|
||||
0 309 V
|
||||
stroke
|
||||
grestore
|
||||
end
|
||||
showpage
|
||||
%%Trailer
|
||||
%%DocumentFonts: Helvetica
|
||||
%%Pages: 1
|
||||
@@ -1,136 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>BusyBox Anonymous CVS Instructions</title>
|
||||
</HEAD>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
|
||||
|
||||
<H3>Accessing the Busybox CVS Repository</H3>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
|
||||
<TR>
|
||||
<td bgcolor="#000000">
|
||||
<FONT FACE="lucida, helvetica" COLOR="#ccccc0">
|
||||
<B>B u s y B o x</B>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<a href="/"><IMG SRC="images/busybox2.jpg" alt="BusyBox" border="0" width="360" height="230"></a><BR>
|
||||
|
||||
|
||||
</CENTER>
|
||||
|
||||
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="intro"> <BIG><B>
|
||||
Anonymous CVS
|
||||
</B></BIG></A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
|
||||
We allow anonymous (read-only) CVS access to everyone. The first command you
|
||||
need to run for anonymous CVS access is:
|
||||
<pre>
|
||||
cvs -d:pserver:anonymous@busybox.net:/var/cvs login</pre>
|
||||
<p>
|
||||
CVS will prompt you for a password. Just press the Enter key (there is no
|
||||
password for anonymous access). This step only needs to be done once, the first
|
||||
time you attempt to access CVS.
|
||||
<p>
|
||||
Once the login is complete, you can then check the list of available
|
||||
CVS modules by running the following command (all on one line):
|
||||
<pre>
|
||||
cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co -c </pre>
|
||||
|
||||
<p>
|
||||
If you wish, you can then check out a local copy of any of the
|
||||
available modules. The following is an example of how to grab
|
||||
a copy of busybox and tinylogin:
|
||||
<pre>
|
||||
cvs -z3 -d:pserver:anonymous@busybox.net:/var/cvs co -P busybox tinylogin</pre>
|
||||
This will create a directory called <b>busybox</b> and a directory called
|
||||
<b>tinylogin</b> in the current directory. These directories contain the
|
||||
latest and greatest source code for busybox and tinylogin.
|
||||
|
||||
<p>
|
||||
I usually create a ~/.cvsrc file with the following things in it, and I
|
||||
recommend you should use the same:
|
||||
<pre>
|
||||
-z3
|
||||
update -dP
|
||||
rdiff -u
|
||||
diff -ubBwpN
|
||||
checkout -P</pre>
|
||||
|
||||
<p>
|
||||
Once you've checked out a copy of the source tree, you can update your
|
||||
source tree at any time so it is in sync with the latest and greatest by
|
||||
running the command:
|
||||
<pre>
|
||||
cvs update</pre>
|
||||
|
||||
Because you've only been granted anonymous access to the tree, you won't be
|
||||
able to commit any changes. Changes can be submitted for inclusion by posting
|
||||
them to the appropriate <a href="http://busybox.net/mailman/listinfo">mailing list</a>.
|
||||
|
||||
|
||||
<!-- End of Table -->
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<HR>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD>
|
||||
<font size="-1" face="arial, helvetica, sans-serif">
|
||||
Mail all comments, insults, suggestions and bribes to
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a><BR>
|
||||
The Busybox logo is copyright 1999-2002, Erik Andersen.
|
||||
</font>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.vim.org"><img border=0 width=90 height=36
|
||||
src="images/written.in.vi.png"
|
||||
alt="This site created with the vi editor"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.gimp.org/"><img border=0 width=90 height=36
|
||||
src="images/gfx_by_gimp.png" alt="Graphics by GIMP"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.linuxtoday.com"><img width=90 height=36
|
||||
src="images/ltbutton2.png" alt="Linux Today"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<p><a href="http://slashdot.org"><img width=90 height=36
|
||||
src="images/sdsmall.png" alt="Slashdot"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://freshmeat.net"><img width=90 height=36
|
||||
src="images/fm.mini.png" alt="Freshmeat"></a>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<title>BusyBox CVS Read/Write Instructions</title>
|
||||
</HEAD>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
|
||||
|
||||
<H3>Accessing the Busybox CVS Repository</H3>
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
|
||||
<TR>
|
||||
<td bgcolor="#000000">
|
||||
<FONT FACE="lucida, helvetica" COLOR="#ccccc0">
|
||||
<B>B u s y B o x</B>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<a href="/"><IMG SRC="images/busybox2.jpg" alt="BusyBox" border="0" width="360" height="230"></a><BR>
|
||||
|
||||
|
||||
</CENTER>
|
||||
|
||||
<TABLE WIDTH="95%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="intro"> <BIG><B>
|
||||
CVS Read/Write Access
|
||||
</B></BIG></A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
|
||||
|
||||
If you want to be able to commit things to CVS, first contribute some
|
||||
stuff to show you are serious. Then, very nicely ask
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a> if he will set you up with
|
||||
an account. To access CVS, you will want to add the following to set up your environment:
|
||||
<pre>
|
||||
$ export CVS_RSH=/usr/bin/ssh
|
||||
$ export CVSROOT='username@cvs.busybox.net:/var/cvs'</pre>
|
||||
<br>
|
||||
It goes without saying you must change <em>username</em> to your own
|
||||
username...
|
||||
<p>
|
||||
|
||||
To obtain commit access, you will need to demonstrate you are
|
||||
serious by submitting a few good patches first. Then, you will need to
|
||||
select a user-name to use when committing stuff, and finally, you will
|
||||
need to send me the username you have selected, an ssh key, and the email
|
||||
address where you prefer email to be sent (I will forward any email sent
|
||||
to you, but not store it).
|
||||
|
||||
<p>
|
||||
Note that if you would prefer to keep your communications with me
|
||||
private, you can encrypt your email using my
|
||||
<a href="http://www.codepoet.org/~andersen/erik/gpg.asc">public key</a>.
|
||||
|
||||
|
||||
<!-- End of Table -->
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<HR>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD>
|
||||
<font size="-1" face="arial, helvetica, sans-serif">
|
||||
Mail all comments, insults, suggestions and bribes to
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a><BR>
|
||||
The Busybox logo is copyright 1999-2002, Erik Andersen.
|
||||
</font>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.vim.org"><img border=0 width=90 height=36
|
||||
src="images/written.in.vi.png"
|
||||
alt="This site created with the vi editor"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.gimp.org/"><img border=0 width=90 height=36
|
||||
src="images/gfx_by_gimp.png" alt="Graphics by GIMP"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.linuxtoday.com"><img width=90 height=36
|
||||
src="images/ltbutton2.png" alt="Linux Today"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<p><a href="http://slashdot.org"><img width=90 height=36
|
||||
src="images/sdsmall.png" alt="Slashdot"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://freshmeat.net"><img width=90 height=36
|
||||
src="images/fm.mini.png" alt="Freshmeat"></a>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 322 B |
|
Before Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 8.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 309 B |
|
Before Width: | Height: | Size: 807 B |
|
Before Width: | Height: | Size: 7.5 KiB |
|
Before Width: | Height: | Size: 3.9 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 307 B |
|
Before Width: | Height: | Size: 4.3 KiB |
@@ -1,424 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="generator" content=
|
||||
"HTML Tidy for Linux/x86 (vers 1st February 2002), see www.w3.org">
|
||||
|
||||
<title>BusyBox</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: #DEE2DE;
|
||||
color: #000000;
|
||||
}
|
||||
:link { color: #660000 }
|
||||
:visited { color: #660000 }
|
||||
:active { color: #660000 }
|
||||
div.c3 {text-align: center}
|
||||
td.c2 {font-family: arial, helvetica, sans-serif; font-size: 80%}
|
||||
td.c1 {font-family: lucida, helvetica; font-size: 248%}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
|
||||
<div class="c3">
|
||||
<table border="0" cellspacing="1" cellpadding="2">
|
||||
<tr>
|
||||
<td class="c1">BUSYBOX</td>
|
||||
</tr>
|
||||
</table>
|
||||
<a href="/"><img src="images/busybox1.png" alt="BusyBox"
|
||||
border="0" width="164" height="116"></a><br>
|
||||
<!-- Begin Introduction section -->
|
||||
|
||||
|
||||
<table width="95%" cellspacing="1" cellpadding="4" border=
|
||||
"1">
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name= "intro"><big>
|
||||
<b>The Swiss Army Knife of Embedded Linux</b>
|
||||
</big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
BusyBox combines tiny versions of many common UNIX
|
||||
utilities into a single small executable. It provides
|
||||
minimalist replacements for most of the utilities you
|
||||
usually find in fileutils, shellutils, findutils,
|
||||
textutils, grep, gzip, tar, etc. BusyBox provides a
|
||||
fairly complete POSIX environment for any small or
|
||||
embedded system. The utilities in BusyBox generally
|
||||
have fewer options than their full featured GNU
|
||||
cousins; however, the options that are included provide
|
||||
the expected functionality and behave very much like
|
||||
their GNU counterparts.
|
||||
|
||||
<p>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
|
||||
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.</p>
|
||||
|
||||
<p>BusyBox is maintained by <a href=
|
||||
"http://codepoet.org/andersen/erik/erik.html">Erik
|
||||
Andersen</a>, and licensed under the <a href=
|
||||
"http://www.gnu.org/copyleft/gpl.html">GNU GENERAL
|
||||
PUBLIC LICENSE</a>.</p>
|
||||
|
||||
<h3>Screenshot</h3>
|
||||
|
||||
<p>Because everybody loves screenshots, a screenshot of
|
||||
BusyBox is now available <a href=
|
||||
"screenshot.html">right here</a>.</p>
|
||||
|
||||
<h3>Mailing List Information</h3>
|
||||
BusyBox now has a <a href="/lists/busybox/">mailing
|
||||
list</a>!<br>
|
||||
To subscribe, go and visit <a href=
|
||||
"/mailman/listinfo/busybox">this page</a>.
|
||||
|
||||
<!-- Begin Latest News section -->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"news"><big><b>Latest News</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<ul>
|
||||
<li>
|
||||
<b>6 March 2002 -- busybox.net now has mirrors!</b>
|
||||
|
||||
<p>Busybox.net is now much more available, thanks to
|
||||
the fine folks at <a href= "http://i-netinnovations.com/">http://i-netinnovations.com/</a>
|
||||
who are providing hosting for busybox.net and
|
||||
uclibc.org. In addition, we now have two mirrors:
|
||||
<a href= "http://busybox.linuxmagic.com/">http://busybox.linuxmagic.com/</a>
|
||||
in Canada and
|
||||
<a href= "http://busybox.csservers.de/">http://busybox.csservers.de/</a>
|
||||
in Germany. I hope this makes things much more
|
||||
accessible for everyone!
|
||||
|
||||
|
||||
<li><b>Old News</b><br>
|
||||
For the old news, visit <a href="oldnews.html">the
|
||||
old news page</a>.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<!-- Begin Sponsors section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"sponsors"><big><b>Sponsors</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
Please visit our sponsors and thank them for their
|
||||
support! They have provided money for equipment and
|
||||
bandwidth. Next time you need help with a project,
|
||||
consider these fine companies!
|
||||
|
||||
|
||||
<ul>
|
||||
<li><a href=
|
||||
"http://opensource.se/">opensource.se</a><br>
|
||||
Embedded open source consulting in Europe.</li>
|
||||
|
||||
<li><a href= "http://i-netinnovations.com/">http://i-netinnovations.com/</a><br>
|
||||
Web hosting (they host busybox.net and uclibc.org).</li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.codepoet-consulting.com">Codepoet
|
||||
Consulting</a><br>
|
||||
Custom Linux, embedded Linux, BusyBox, and uClibc
|
||||
development.</li>
|
||||
</ul>
|
||||
Several individuals have also contributed. If you have
|
||||
already contributed and would like your name added
|
||||
here, just let me know. If you would like to be a
|
||||
BusyBox sponsor, email <a href=
|
||||
"mailto:andersen@codepoet.org">Erik</a>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Download section -->
|
||||
<p>
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"download"><big><b>Download</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<ul>
|
||||
<li>Source for the latest release can always be
|
||||
downloaded from <a href=
|
||||
"downloads">http://www.busybox.net/downloads</a>.</li>
|
||||
|
||||
<li>A new snapshot of the source is made daily and is
|
||||
available as a GNU gzipped tarball <a href=
|
||||
"downloads/snapshots/busybox-snapshot.tar.bz2">right here</a>.</li>
|
||||
|
||||
<li>BusyBox now has its own publically browsable <a
|
||||
href="/cgi-bin/cvsweb/busybox/">CVS tree</a>,
|
||||
anonymous <a href="cvs_anon.html">CVS access</a>, and
|
||||
for those that are actively contributing there is
|
||||
even <a href="cvs_write.html">CVS write
|
||||
access</a>.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Docs section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"docs"><big><b>Documentation</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
Current documentation for BusyBox includes:
|
||||
|
||||
<ul>
|
||||
<li><a href=
|
||||
"downloads/BusyBox.html">BusyBox.html</a>. This is a
|
||||
list of the all the available commands in BusyBox
|
||||
with complete usage information and examples of how
|
||||
to use each app. I have spent a <em>lot</em> of time
|
||||
updating these docs and trying to make them fairly
|
||||
comprehensive. If you find any errors (factual,
|
||||
grammatical, whatever) please let me know.</li>
|
||||
|
||||
<li><a href="downloads/README">README</a>. This is
|
||||
the README file included in the busybox source
|
||||
release.</li>
|
||||
|
||||
<li><a href=
|
||||
"http://bugs.busybox.net/db/pa/lbusybox.html">BusyBox
|
||||
Bugs</a>. Need to report a bug? Need to check if a
|
||||
bug has been filed?</li>
|
||||
|
||||
<li>If you need more help, the BusyBox <a href=
|
||||
"lists/busybox/">mailing list</a> is a good place to
|
||||
start.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Links section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"links"><big><b>Important Links</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<ul>
|
||||
<li><a href="http://perens.com/FreeSoftware/">Free
|
||||
Software from Bruce Perens</a><br>
|
||||
The original idea for BusyBox, and all versions up
|
||||
to 0.26 were written by <a href=
|
||||
"mailto:bruce@perens.com">Bruce Perens</a>. This is
|
||||
his BusyBox website.</li>
|
||||
|
||||
<li><a href=
|
||||
"http://freshmeat.net/projects/busybox/">Freshmeat
|
||||
AppIndex record for BusyBox</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://tinylogin.busybox.net/">TinyLogin</a> is a
|
||||
nice embedded tool for handling authentication,
|
||||
changing passwords, and similar tasks which nicely
|
||||
complements BusyBox.</li>
|
||||
|
||||
<li><a href="http://udhcp.busybox.net/">udhcp</a> is
|
||||
a tiny dhcp client and/or server which is ideal for
|
||||
embedded systems.</li>
|
||||
|
||||
<li><a href="http://www.uclibc.org/">uClibc</a> is a
|
||||
C library for embedded systems. You can actually
|
||||
statically link a "Hello World" application under x86
|
||||
that only takes 4k (as opposed to 200k under GNU
|
||||
libc). It can do dynamic linking too and works nicely
|
||||
with BusyBox to create very small embedded
|
||||
systems.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<!-- Begin Projects section -->
|
||||
<tr>
|
||||
<td bgcolor="#CCCCC0" align="center"><a name=
|
||||
"projects"><big><b>Products/Projects Using
|
||||
BusyBox</b></big></a></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td bgcolor="#EEEEE0">
|
||||
<p>I know of the following products and/or projects
|
||||
that use BusyBox -- listed in the order I happen to add
|
||||
them to the web page:</p>
|
||||
|
||||
<ul>
|
||||
<li><a href=
|
||||
"http://cvs.debian.org/boot-floppies/">Debian
|
||||
installer (boot floppies) project</a></li>
|
||||
|
||||
<li><a href="http://redhat.com/">Red Hat 7.2
|
||||
installer</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://distro.ibiblio.org/pub/Linux/distributions/slackware/source/rootdsks/">
|
||||
Slackware Installer</a></li>
|
||||
|
||||
<li><a href="http://www.linuxrouter.org/">Linux
|
||||
Router Project</a></li>
|
||||
|
||||
<li><a href="http://linux-embedded.org/">LEM</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.toms.net/rb/">tomsrtbt</a></li>
|
||||
|
||||
<li><a href="http://www.stormix.com/">Stormix
|
||||
Installer</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.emacinc.com/linux2_sbc.htm">EMAC Linux
|
||||
2.0 SBC</a></li>
|
||||
|
||||
<li><a href="http://www.trinux.org/">Trinux</a></li>
|
||||
|
||||
<li><a href="http://oddas.sourceforge.net/">ODDAS
|
||||
project</a></li>
|
||||
|
||||
<li><a href="http://www.kerbango.com/">The Kerbango
|
||||
Internet Radio</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.linuxmagic.com/vpn/">LinuxMagic VPN
|
||||
Firewall</a></li>
|
||||
|
||||
<li><a href="http://byld.sourceforge.net/">Build Your
|
||||
Linux Disk</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://homepages.ihug.co.nz/~ichi/baslinux.html">BasicLinux</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://ibiblio.org/pub/Linux/system/recovery">Zdisk</a></li>
|
||||
|
||||
<li><a href="http://www.adtran.com">AdTran -
|
||||
VPN/firewall VPN Linux Distribution</a></li>
|
||||
|
||||
<li><a href="http://mkcdrec.ota.be/">mkCDrec - make
|
||||
CD-ROM recovery</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://recycle.lbl.gov/~ldoolitt/bse/">Linux on
|
||||
nanoEngine</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.zelow.no/floppyfw/">Floppyfw</a></li>
|
||||
|
||||
<li><a href="http://midori.transmeta.com/">Midori
|
||||
Linux</a> - <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399,00.html">
|
||||
Article on Midori Linux</a> on <a href=
|
||||
"http://www.wired.com">Wired</a>. Quote from Erik at
|
||||
the top of <a href=
|
||||
"http://www.wired.com/news/technology/0,1282,42399-2,00.html">
|
||||
this page</a></li>
|
||||
|
||||
<li><a href="http://www.ltsp.org/">Linux Terminal
|
||||
Server Project</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.devil-linux.org/">Devil-Linux</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://dutnux.sourceforge.net/">DutNux</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.cachier.com/">Cachier</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.microwerks.net/~hugo/mindi/">Mindi</a></li>
|
||||
|
||||
<li><a href=
|
||||
"http://www.tzi.de/~pharao90/ttylinux">ttylinux</a></li>
|
||||
|
||||
<li><a href="http://www.coyotelinux.com/">Coyote Linux</a></li>
|
||||
|
||||
<li><a href="http://www.partimage.org/">Partition
|
||||
Image</a></li>
|
||||
|
||||
<li><a href="http://www.fli4l.de/">fli4l the on(e)-disk-router</a></li>
|
||||
|
||||
<li><a href="http://tuxscreen.net">Tuxscreen Linux
|
||||
Phone</a></li>
|
||||
|
||||
<li><a href="http://tinfoilhat.cultists.net/">Tinfoil
|
||||
Hat Linux</a></li>
|
||||
|
||||
<li><a href="http://zaurus.sourceforge.net/">Sharp Zaurus
|
||||
PDA</a></li>
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
<p>Do you use BusyBox? I'd love to know about it and
|
||||
I'd be happy to link to you. <!-- End of Table -->
|
||||
</p>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- Footer -->
|
||||
<hr>
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td class="c2">Mail all comments, insults, suggestions
|
||||
and bribes to <a href="mailto:andersen@codepoet.org">Erik
|
||||
Andersen</a><br>
|
||||
The Busybox logo is copyright 1999-2002, Erik
|
||||
Andersen.</td>
|
||||
|
||||
<td><a href="http://www.vim.org"><img border="0" width=
|
||||
"90" height="36" src="images/written.in.vi.png" alt=
|
||||
"This site created with the vi editor"></a></td>
|
||||
|
||||
<td><a href="http://www.gimp.org/"><img border="0" width=
|
||||
"90" height="36" src="images/gfx_by_gimp.png" alt=
|
||||
"Graphics by GIMP"></a></td>
|
||||
|
||||
<td><a href="http://www.linuxtoday.com"><img width="90"
|
||||
height="36" src="images/ltbutton2.png" alt="Linux Today">
|
||||
</a></td>
|
||||
|
||||
<td>
|
||||
<p><a href="http://slashdot.org"><img width="90"
|
||||
height="36" src="images/sdsmall.png" alt="Slashdot">
|
||||
</a></p>
|
||||
</td>
|
||||
|
||||
<td><a href="http://freshmeat.net"><img width="90"
|
||||
height="36" src="images/fm.mini.png" alt="Freshmeat">
|
||||
</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,701 +0,0 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>BusyBox</TITLE>
|
||||
</HEAD>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<basefont face="lucida, helvetica, arial" size="3">
|
||||
|
||||
|
||||
<CENTER>
|
||||
<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=2>
|
||||
<TR>
|
||||
<td bgcolor="#000000">
|
||||
<FONT FACE="lucida, helvetica" COLOR="#ccccc0">
|
||||
<B>B u s y B o x</B>
|
||||
</FONT>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
<a href="/"><IMG SRC="images/busybox2.jpg" alt="BusyBox" border="0" width="360" height="230"</a><BR>
|
||||
|
||||
|
||||
<TABLE WIDTH=95% CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
|
||||
<!-- Begin Older News section -->
|
||||
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="news">
|
||||
<BIG><B>
|
||||
Older BusyBox News</A>
|
||||
</B></BIG>
|
||||
</A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
|
||||
<ul>
|
||||
|
||||
<p> <li> <b>Take me back to the <a href="/">BusyBox</a> web site.</b>
|
||||
<hr>
|
||||
|
||||
|
||||
<li>
|
||||
<b>3 January 2002 -- Welcome to busybox.net!</b>
|
||||
|
||||
<p>Thanks to the generosity of a number of busybox
|
||||
users, we have been able to purchase busybox.net
|
||||
(which is where you are probably reading this).
|
||||
Right now, busybox.net and uclibc.org are both
|
||||
living on my home system (at the end of my DSL
|
||||
line). I apologize for the abrupt move off of
|
||||
busybox.lineo.com. Unfortunately, I no longer have
|
||||
the access needed to keep that system updated (for
|
||||
example, you might notice the daily snapshots there
|
||||
stopped some time ago).</p>
|
||||
|
||||
<p>Busybox.net is currently hosted on my home
|
||||
server, at the end of a DSL line. Unfortunately,
|
||||
the load on them is quite heavy. To address this,
|
||||
I'm trying to make arrangements to get busybox.net
|
||||
co-located directly at an ISP. To assist in the
|
||||
co-location effort, <a href=
|
||||
"http://www.codepoet.org/~markw">Mark Whitley</a>
|
||||
(author of busybox sed, cut, and grep) has donated
|
||||
his <a href=
|
||||
"http://www.netwinder.org/">NetWinder</a> computer
|
||||
for hosting busybox.net and uclibc.org. Once this
|
||||
system is co-located, the current speed problems
|
||||
should be completely eliminated. Hopefully, too,
|
||||
some of you will volunteer to set up some mirror
|
||||
sites, to help to distribute the load a bit.</p>
|
||||
|
||||
<p><!--
|
||||
<center>
|
||||
Click here to help support busybox.net!
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
<input type="hidden" name="business" value="andersen@codepoet.org">
|
||||
<input type="hidden" name="item_name" value="Support Busybox">
|
||||
<input type="hidden" name="image_url" value="https://codepoet-consulting.com/images/busybox2.jpg">
|
||||
<input type="hidden" name="no_shipping" value="1">
|
||||
<input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
|
||||
</form>
|
||||
</center>
|
||||
-->
|
||||
Since some people expressed concern over BusyBox
|
||||
donations, let me assure you that no one is getting
|
||||
rich here. All BusyBox and uClibc donations will be
|
||||
spent paying for bandwidth and needed hardware
|
||||
upgrades. For example, Mark's NetWinder currently
|
||||
has just 64Meg of memory. As demonstrated when
|
||||
google spidered the site the other day, 64 Megs in
|
||||
not enough, so I'm going to be ordering 256Megs of
|
||||
ram and a larger hard drive for the box today. So
|
||||
far, donations received have been sufficient to
|
||||
cover almost all expenses. In the future, we may
|
||||
have co-location fees to worry about, but for now
|
||||
we are ok. A <b>HUGE thank-you</b> goes out to
|
||||
everyone that has contributed!<br>
|
||||
-Erik</p>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<b>20 November 2001 -- BusyBox 0.60.2 released</b>
|
||||
|
||||
<p>We am very pleased to announce that the BusyBox
|
||||
0.60.2 (stable) is now released to the world. This
|
||||
one is primarily a bugfix release for the stable
|
||||
series, and it should take care of most everyone's
|
||||
needs till we can get the nice new stuff we have
|
||||
been working on in CVS ready to release (with the
|
||||
wonderful new buildsystem). The biggest change in
|
||||
this release (beyond bugfixes) is the fact that msh
|
||||
(the minix shell) has been re-worked by Vladimir N.
|
||||
Oleynik (vodz) and so it no longer crashes when
|
||||
told to do complex things with backticks.</p>
|
||||
|
||||
<p>This release has been tested on x86, ARM, and
|
||||
powerpc using glibc 2.2.4, libc5, and uClibc, so it
|
||||
should work with just about any Linux system you
|
||||
throw it at. See the <a href=
|
||||
"downloads/Changelog">changelog</a> for <small>most
|
||||
of</small> the details. The last release was
|
||||
<em>very</em> solid for people, and this one should
|
||||
be even better.</p>
|
||||
|
||||
<p>As usual BusyBox 0.60.2 can be downloaded from
|
||||
<a href=
|
||||
"downloads">http://www.busybox.net/downloads</a>.</p>
|
||||
|
||||
<p>Have Fun.<br>
|
||||
-Erik</p>
|
||||
</li>
|
||||
|
||||
<li> <b>18 November 2001 -- Help us buy busybox.net!</b>
|
||||
|
||||
<!-- Begin PayPal Logo -->
|
||||
<center>
|
||||
Click here to help buy busybox.net!
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
|
||||
<input type="hidden" name="cmd" value="_xclick">
|
||||
<input type="hidden" name="business" value="andersen@codepoet.org">
|
||||
<input type="hidden" name="item_name" value="Support Busybox/Buy busybox.net">
|
||||
<input type="hidden" name="image_url" value="https://busybox.net/images/busybox2.jpg">
|
||||
<input type="hidden" name="no_shipping" value="1">
|
||||
<input type="image" src="images/donate.png" border="0" name="submit" alt="Make donation using PayPal">
|
||||
</form>
|
||||
</center>
|
||||
<!-- End PayPal Logo -->
|
||||
|
||||
I've contacted the current owner of busybox.net and he is willing
|
||||
to sell the domain name -- for $250. He also owns busybox.org but
|
||||
will not part with it... I will then need to pay the registry fee
|
||||
for a couple of years and start paying for bandwidth, so this will
|
||||
initially cost about $300. I would like to host busybox.net on my
|
||||
home machine (codepoet.org) so I have full control over the system,
|
||||
but to do that would require that I increase the level of bandwidth
|
||||
I am paying for. Did you know that so far this month, there
|
||||
have been over 1.4 Gigabytes of busybox ftp downloads? I don't
|
||||
even <em>know</em> how much CVS bandwidth it requires. For the
|
||||
time being, Lineo has continued to graciously provide this
|
||||
bandwidth, despite the fact that I no longer work for them. If I
|
||||
start running this all on my home machine, paying for the needed bandwidth
|
||||
will start costing some money.
|
||||
<p>
|
||||
|
||||
I was going to pay it all myself, but my wife didn't like that
|
||||
idea at all (big surprise). It turns out <insert argument
|
||||
where she wins and I don't> she has better ideas
|
||||
about what we should spend our money on that don't involve
|
||||
busybox. She suggested I should ask for contributions on the
|
||||
mailing list and web page. So...
|
||||
<p>
|
||||
|
||||
I am hoping that if everyone could contribute a bit, we could pick
|
||||
up the busybox.net domain name and cover the bandwidth costs. I
|
||||
know that busybox is being used by a lot of companies as well as
|
||||
individuals -- hopefully people and companies that are willing to
|
||||
contribute back a bit. So if everyone could please help out, that
|
||||
would be wonderful!
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>23 August 2001 -- BusyBox 0.60.1 released</b>
|
||||
<br>
|
||||
|
||||
This is a relatively minor bug fixing release that fixes
|
||||
up the bugs that have shown up in the stable release in
|
||||
the last few weeks. Fortunately, nothing <em>too</em>
|
||||
serious has shown up. This release only fixes bugs -- no
|
||||
new features, no new applets. So without further ado,
|
||||
here it is. Come and get it.
|
||||
<p>
|
||||
The
|
||||
<a href="downloads/Changelog">changelog</a> has all
|
||||
the details. As usual BusyBox 0.60.1 can be downloaded from
|
||||
<a href="downloads">http://busybox.net/downloads</a>.
|
||||
<p>Have Fun!
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>2 August 2001 -- BusyBox 0.60.0 released</b>
|
||||
<br>
|
||||
I am very pleased to announce the immediate availability of
|
||||
BusyBox 0.60.0. I have personally tested this release with libc5, glibc,
|
||||
and <a href="http://uclibc.org/">uClibc</a> on
|
||||
x86, ARM, and powerpc using linux 2.2 and 2.4, and I know a number
|
||||
of people using it on everything from ia64 to m68k with great success.
|
||||
Everything seems to be working very nicely now, so getting a nice
|
||||
stable bug-free(tm) release out seems to be in order. This releases fixes
|
||||
a memory leak in syslogd, a number of bugs in the ash and msh shells, and
|
||||
cleans up a number of things.
|
||||
|
||||
<p>
|
||||
|
||||
Those wanting an easy way to test the 0.60.0 release with uClibc can
|
||||
use <a href="http://user-mode-linux.sourceforge.net/">User-Mode Linux</a>
|
||||
to give it a try by downloading and compiling
|
||||
<a href="ftp://busybox.net/buildroot.tar.gz">buildroot.tar.gz</a>.
|
||||
You don't have to be root or reboot your machine to run test this way.
|
||||
Preconfigured User-Mode Linux kernel source is also on busybox.net.
|
||||
<p>
|
||||
Another cool thing is the nifty <a href="downloads/tutorial/index.html">
|
||||
BusyBox Tutorial</a> contributed by K Computing. This requires
|
||||
a ShockWave plugin (or standalone viewer), so you may want to grab the
|
||||
the GPLed shockwave viewer from <a href="http://www.swift-tools.com/Flash/flash-0.4.10.tgz">here</a>
|
||||
to view the tutorial.
|
||||
<p>
|
||||
|
||||
Finally, In case you didn't notice anything odd about the
|
||||
version number of this release, let me point out that this release
|
||||
is <em>not</em> 0.53, because I bumped the version number up a
|
||||
bit. This reflects the fact that this release is intended to form
|
||||
a new stable BusyBox release series. If you need to rely on a
|
||||
stable version of BusyBox, you should plan on using the stable
|
||||
0.60.x series. If bugs show up then I will release 0.60.1, then
|
||||
0.60.2, etc... This is also intended to deal with the fact that
|
||||
the BusyBox build system will be getting a major overhaul for the
|
||||
next release and I don't want that to break products that people
|
||||
are shipping. To avoid that, the new build system will be
|
||||
released as part of a new BusyBox development series that will
|
||||
have some not-yet-decided-on odd version number. Once things
|
||||
stabilize and the new build system is working for everyone, then
|
||||
I will release that as a new stable release series.
|
||||
|
||||
<p>
|
||||
The
|
||||
<a href="downloads/Changelog">changelog</a> has all
|
||||
the details. As usual BusyBox 0.60.0 can be downloaded from
|
||||
<a href="downloads">http://busybox.net/downloads</a>.
|
||||
<p>Have Fun!
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>7 July 2001 -- BusyBox 0.52 released</b>
|
||||
<br>
|
||||
|
||||
I am very pleased to announce the immediate availability of
|
||||
BusyBox 0.52 (the "new-and-improved rock-solid release"). This
|
||||
release is the result of <em>many</em> hours of work and has tons
|
||||
of bugfixes, optimizations, and cleanups. This release adds
|
||||
several new applets, including several new shells (such as hush, msh,
|
||||
and ash).
|
||||
|
||||
<p>
|
||||
The
|
||||
<a href="downloads/Changelog">changelog</a> covers
|
||||
some of the more obvious details, but there are many many things that
|
||||
are not mentioned, but have been improved in subtle ways. As usual,
|
||||
BusyBox 0.52 can be downloaded from
|
||||
<a href="downloads">http://busybox.net/downloads</a>.
|
||||
<p>Have Fun!
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>10 April 2001 - Graph of Busybox Growth </b>
|
||||
<br>
|
||||
The illustrious Larry Doolittle has made a PostScript chart of the growth
|
||||
of the Busybox tarball size over time. It is available for downloading /
|
||||
viewing <a href= "busybox-growth.ps"> right here</a>.
|
||||
|
||||
<p> (Note that while the number of applets in Busybox has increased, you
|
||||
can still configure Busybox to be as small as you want by selectively
|
||||
turning off whichever applets you don't need.)
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>10 April 2001 -- BusyBox 0.51 released</b>
|
||||
<br>
|
||||
|
||||
BusyBox 0.51 (the "rock-solid release") is now out there. This
|
||||
release adds only 2 new applets: env and vi. The vi applet,
|
||||
contributed by Sterling Huxley, is very functional, and is only
|
||||
22k. This release fixes 3 critical bugs in the 0.50 release.
|
||||
There were 2 potential segfaults in lash (the busybox shell) in
|
||||
the 0.50 release which are now fixed. Another critical bug in
|
||||
0.50 which is now fixed: syslogd from 0.50 could potentially
|
||||
deadlock the init process and thereby break your entire system.
|
||||
<p>
|
||||
|
||||
There are a number of improvements in this release as well. For
|
||||
one thing, the wget applet is greatly improved. Dmitry Zakharov
|
||||
added FTP support, and Laurence Anderson make wget fully RFC
|
||||
compliant for HTTP 1.1. The mechanism for including utility
|
||||
functions in previous releases was clumsy and error prone. Now
|
||||
all utility functions are part of a new libbb library, which makes
|
||||
maintaining utility functions much simpler. And BusyBox now
|
||||
compiles on itanium systems (thanks to the Debian itanium porters
|
||||
for letting me use their system!).
|
||||
<p>
|
||||
You can read the
|
||||
<a href="downloads/Changelog">changelog</a> for
|
||||
complete details. BusyBox 0.51 can be downloaded from
|
||||
<a href="downloads">http://busybox.net/downloads</a>.
|
||||
<p>Have Fun!
|
||||
<p>
|
||||
|
||||
<li> <b>Busybox Boot-Floppy Image</b>
|
||||
|
||||
<p>Because you asked for it, we have made available a <a href=
|
||||
"downloads/busybox.floppy.img"> Busybox boot floppy
|
||||
image</a>. Here's how you use it:
|
||||
|
||||
<ol>
|
||||
|
||||
<li> <a href= "downloads/busybox.floppy.img">
|
||||
Download the image</a>
|
||||
|
||||
<li> dd it onto a floppy like so: <tt> dd if=busybox.floppy.img
|
||||
of=/dev/fd0 ; sync </tt>
|
||||
|
||||
<li> Pop it in a machine and boot up.
|
||||
|
||||
</ol>
|
||||
|
||||
<p> If you want to look at the contents of the initrd image, do this:
|
||||
|
||||
<pre>
|
||||
mount ./busybox.floppy.img /mnt -o loop -t msdos
|
||||
cp /mnt/initrd.gz /tmp
|
||||
umount /mnt
|
||||
gunzip /tmp/initrd.gz
|
||||
mount /tmp/initrd /mnt -o loop -t minix
|
||||
</pre>
|
||||
|
||||
|
||||
<li> <b>15 March 2001 -- BusyBox 0.50 released</b>
|
||||
<br>
|
||||
|
||||
This release adds several new applets including ifconfig, route, pivot_root, stty,
|
||||
and tftp, and also fixes tons of bugs. Tab completion in the
|
||||
shell is now working very well, and the shell's environment variable
|
||||
expansion was fixed. Tons of other things were fixed or made
|
||||
smaller. For a fairly complete overview, see the
|
||||
<a href="downloads/Changelog">changelog</a>.
|
||||
<p>
|
||||
lash (the busybox shell) is still with us, fixed up a bit so it
|
||||
now behaves itself quite nicely. It really is quite usable as
|
||||
long as you don't expect it to provide Bourne shell grammer.
|
||||
Standard things like pipes, redirects, command line editing, and
|
||||
environment variable expansion work great. But we have found that
|
||||
this shell, while very usable, does not provide an extensible
|
||||
framework for adding in full Bourne shell behavior. So the first order of
|
||||
business as we begin working on the next BusyBox release will be to merge in the new shell
|
||||
currently in progress at
|
||||
<a href="http://doolittle.faludi.com/~larry/parser.html">Larry Doolittle's website</a>.
|
||||
<p>
|
||||
|
||||
|
||||
<li> <b>27 January 2001 -- BusyBox 0.49 released</b>
|
||||
<br>
|
||||
|
||||
Several new applets, lots of bug fixes, cleanups, and many smaller
|
||||
things made nicer. Several cleanups and improvements to the shell.
|
||||
For a list of the most interesting changes
|
||||
you might want to look at the <a href="downloads/Changelog">changelog</a>.
|
||||
<p>
|
||||
Special thanks go out to Matt Kraai and Larry Doolittle for all their
|
||||
work on this release, and for keeping on top of things while I've been
|
||||
out of town.
|
||||
<p>
|
||||
<em>Special Note</em><br>
|
||||
|
||||
BusyBox 0.49 was supposed to have replaced lash, the BusyBox
|
||||
shell, with a new shell that understands full Bourne shell/Posix shell grammer.
|
||||
Well, that simply didn't happen in time for this release. A new
|
||||
shell that will eventually replace lash is already under
|
||||
construction. This new shell is being developed by Larry
|
||||
Doolittle, and could use all of our help. Please see the work in
|
||||
progress on <a href="http://doolittle.faludi.com/~larry/parser.html">Larry's website</a>
|
||||
and help out if you can. This shell will be included in the next
|
||||
release of BusyBox.
|
||||
<p>
|
||||
|
||||
<li> <b>13 December 2000 -- BusyBox 0.48 released</b>
|
||||
<br>
|
||||
|
||||
This release fixes lots and lots of bugs. This has had some very
|
||||
rigorous testing, and looks very, very clean. The usual tar
|
||||
update of course: tar no longer breaks hardlinks, tar -xzf is
|
||||
optionally supported, and the LRP folks will be pleased to know
|
||||
that 'tar -X' and 'tar --exclude' are both now in. Applets are
|
||||
now looked up using a binary search making lash (the busybox
|
||||
shell) much faster. For the new debian-installer (for Debian
|
||||
woody) a .udeb can now be generated.
|
||||
<p>
|
||||
The curious can get a list of some of the more interesting changes by reading
|
||||
the <a href="downloads/Changelog">changelog</a>.
|
||||
<p>
|
||||
Many thanks go out to the many many people that have contributed to
|
||||
this release, especially Matt Kraai, Larry Doolittle, and Kent Robotti.
|
||||
<p>
|
||||
<p> <li> <b>26 September 2000 -- BusyBox 0.47 released</b>
|
||||
<br>
|
||||
|
||||
This release fixes lots of bugs (including an ugly bug in 0.46
|
||||
syslogd that could fork-bomb your system). Added several new
|
||||
apps: rdate, wget, getopt, dos2unix, unix2dos, reset, unrpm,
|
||||
renice, xargs, and expr. syslogd now supports network logging.
|
||||
There are the usual tar updates. Most apps now use getopt for
|
||||
more correct option parsing.
|
||||
See the <a href="downloads/Changelog">changelog</a>
|
||||
for complete details.
|
||||
|
||||
|
||||
<p> <li> <b>11 July 2000 -- BusyBox 0.46 released</b>
|
||||
<br>
|
||||
|
||||
This release fixes several bugs (including a ugly bug in tar,
|
||||
and fixes for NFSv3 mount support). Added a dumpkmap to allow
|
||||
people to dump a binary keymaps for use with 'loadkmap', and a
|
||||
completely reworked 'grep' and 'sed' which should behave better.
|
||||
BusyBox shell can now also be used as a login shell.
|
||||
See the <a href="downloads/Changelog">changelog</a>
|
||||
for complete details.
|
||||
|
||||
|
||||
<p> <li> <b>21 June 2000 -- BusyBox 0.45 released</b>
|
||||
<br>
|
||||
|
||||
This release has been slow in coming, but is very solid at this
|
||||
point. BusyBox now supports libc5 as well as GNU libc. This
|
||||
release provides the following new apps: cut, tr, insmod, ar,
|
||||
mktemp, setkeycodes, md5sum, uuencode, uudecode, which, and
|
||||
telnet. There are bug fixes for just about every app as well (see
|
||||
the <a href="downloads/Changelog">changelog</a> for
|
||||
details).
|
||||
<p>
|
||||
Also, some exciting infrastructure news! Busybox now has its own
|
||||
<a href="lists/busybox/">mailing list</a>,
|
||||
publically browsable
|
||||
<a href="/cgi-bin/cvsweb/busybox/">CVS tree</a>,
|
||||
anonymous
|
||||
<a href="cvs_anon.html">CVS access</a>, and
|
||||
for those that are actively contributing there is even
|
||||
<a href="cvs_write.html">CVS write access</a>.
|
||||
I think this will be a huge help to the ongoing development of BusyBox.
|
||||
<p>
|
||||
Also, for the curious, there is no 0.44 release. Somehow 0.44 got announced
|
||||
a few weeks ago prior to its actually being released. To avoid any confusion
|
||||
we are just skipping 0.44.
|
||||
<p>
|
||||
Many thanks go out to the many people that have contributed to this release
|
||||
of BusyBox (esp. Pavel Roskin)!
|
||||
|
||||
|
||||
<p> <li> <b>19 April 2000 -- syslogd bugfix</b>
|
||||
<br>
|
||||
Turns out that there was still a bug in busybox syslogd.
|
||||
For example, with the following test app:
|
||||
<pre>
|
||||
#include <syslog.h>
|
||||
|
||||
int do_log(char* msg, int delay)
|
||||
{
|
||||
openlog("testlog", LOG_PID, LOG_DAEMON);
|
||||
while(1) {
|
||||
syslog(LOG_ERR, "%s: testing one, two, three\n", msg);
|
||||
sleep(delay);
|
||||
}
|
||||
closelog();
|
||||
return(0);
|
||||
};
|
||||
|
||||
int main(void)
|
||||
{
|
||||
if (fork()==0)
|
||||
do_log("A", 2);
|
||||
do_log("B", 3);
|
||||
}
|
||||
</pre>
|
||||
it should be logging stuff from both "A" and "B". As released in 0.43 only stuff
|
||||
from "A" would have been logged. This means that if init tries to log something
|
||||
while say ppp has the syslog open, init would block (which is bad, bad, bad).
|
||||
<p>
|
||||
Karl M. Hegbloom has created a fix for the problem.
|
||||
Thanks Karl!
|
||||
|
||||
|
||||
<p> <li> <b>18 April 2000 -- BusyBox 0.43 released (finally!)</b>
|
||||
<br>
|
||||
I have finally gotten everything into a state where I feel pretty
|
||||
good about things. This is definitely the most stable, solid release
|
||||
so far. A lot of bugs have been fixed, and the following new apps
|
||||
have been added: sh, basename, dirname, killall, uptime,
|
||||
freeramdisk, tr, echo, test, and usleep. Tar has been completely
|
||||
rewritten from scratch. Bss size has also been greatly reduced.
|
||||
More details are available in the
|
||||
<a href="downloads/Changelog">changelog</a>.
|
||||
Oh, and as a special bonus, I wrote some fairly comprehensive
|
||||
<em>documentation</em>, complete with examples and full usage information.
|
||||
|
||||
<p>
|
||||
Many thanks go out to the fine people that have helped by submitting patches
|
||||
and bug reports; particularly instrumental in helping for this release were
|
||||
Karl Hegbloom, Pavel Roskin, Friedrich Vedder, Emanuele Caratti,
|
||||
Bob Tinsley, Nicolas Pitre, Avery Pennarun, Arne Bernin, John Beppu, and Jim Gleason.
|
||||
There were others so if I somehow forgot to mention you, I'm very sorry.
|
||||
<p>
|
||||
|
||||
You can grab BusyBox 0.43 tarballs <a href="downloads">here</a>.
|
||||
|
||||
<p> <li> <b>9 April 2000 -- BusyBox 0.43 pre release</b>
|
||||
<br>
|
||||
Unfortunately, I have not yet finished all the things I want to
|
||||
do for BusyBox 0.43, so I am posting this pre-release for people
|
||||
to poke at. This contains my complete rewrite of tar, which now weighs in at
|
||||
5k (7k with all options turned on) and works for reading and writing
|
||||
tarballs (which it does correctly for everything I have been able to throw
|
||||
at it). Tar also (optionally) supports the "--exclude" option (mainly because
|
||||
the Linux Router Project folks asked for it). This also has a pre-release
|
||||
of the micro shell I have been writing. This pre-release should be stable
|
||||
enough for production use -- it just isn't a release since I have some structural
|
||||
changes I still want to make.
|
||||
<p>
|
||||
The pre-release can be found <a href="downloads">here</a>.
|
||||
Please let me know ASAP if you find <em>any</em> bugs.
|
||||
|
||||
<p> <li> <b>28 March 2000 -- Andersen Baby Boy release</b>
|
||||
<br>
|
||||
I am pleased to announce that on Tuesday March 28th at 5:48pm, weighing in at 7
|
||||
lbs. 12 oz, Micah Erik Andersen was born at LDS Hospital here in Salt Lake City.
|
||||
He was born in the emergency room less then 5 minutes after we arrived -- and
|
||||
it was such a relief that we even made it to the hospital at all. Despite the
|
||||
fact that I was driving at an amazingly unlawful speed and honking at everybody
|
||||
and thinking decidedly unkind thoughts about the people in our way, my wife
|
||||
(inconsiderate of my feelings and complete lack of medical training) was lying
|
||||
down in the back seat saying things like "I think I need to start pushing now"
|
||||
(which she then proceeded to do despite my best encouraging statements to the
|
||||
contrary).
|
||||
<p>
|
||||
Anyway, I'm glad to note that despite the much-faster-than-we-were-expecting
|
||||
labor, both Shaunalei and our new baby boy are doing wonderfully.
|
||||
<p>
|
||||
So now that I am done with my excuse for the slow release cycle...
|
||||
Progress on the next release of BusyBox has been slow but steady. I expect
|
||||
to have a release sometime during the first week of April. This release will
|
||||
include a number of important changes, including the addition of a shell, a
|
||||
re-write of tar (to accommodate the Linux Router Project), and syslogd can now
|
||||
accept multiple concurrent connections, fixing lots of unexpected blocking
|
||||
problems.
|
||||
|
||||
|
||||
<p> <li> <b>11 February 2000 -- BusyBox 0.42 released</b>
|
||||
<br>
|
||||
|
||||
This is the most solid BusyBox release so far. Many, many
|
||||
bugs have been fixed. See the
|
||||
<a href="downloads/Changelog">changelog</a> for details.
|
||||
|
||||
Of particular interest, init will now cleanly unmount
|
||||
filesystems on reboot, cp and mv have been rewritten and
|
||||
behave much better, and mount and umount no longer leak
|
||||
loop devices. Many thanks go out to Randolph Chung,
|
||||
Karl M. Hegbloom, Taketoshi Sano, and Pavel Roskin for
|
||||
their hard work on this release of BusyBox. Please pound
|
||||
on it and let me know if you find any bugs.
|
||||
|
||||
<p> <li> <b>19 January 2000 -- BusyBox 0.41 released</b>
|
||||
<br>
|
||||
|
||||
This release includes bugfixes to cp, mv, logger, true, false,
|
||||
mkdir, syslogd, and init. New apps include wc, hostid,
|
||||
logname, tty, whoami, and yes. New features include loop device
|
||||
support in mount and umount, and better TERM handling by init.
|
||||
The changelog can be found <a href="downloads/Changelog">here</a>.
|
||||
|
||||
<p> <li> <b>7 January 2000 -- BusyBox 0.40 released</b>
|
||||
<br>
|
||||
|
||||
This release includes bugfixes to init (now includes inittab support),
|
||||
syslogd, head, logger, du, grep, cp, mv, sed, dmesg, ls, kill, gunzip, and mknod.
|
||||
New apps include sort, uniq, lsmod, rmmod, fbset, and loadacm.
|
||||
In particular, this release fixes an important bug in tar which
|
||||
in some cases produced serious security problems.
|
||||
As always, the changelog can be found <a href="downloads/Changelog">here</a>.
|
||||
|
||||
<p> <li> <b>11 December 1999 -- BusyBox Website</b>
|
||||
<br>
|
||||
I have received permission from Bruce Perens (the original author of BusyBox)
|
||||
to set up this site as the new primary website for BusyBox. This website
|
||||
will always contain pointers to the latest and greatest, and will also
|
||||
contain the latest documentation on how to use BusyBox, what it can do,
|
||||
what arguments its apps support, etc.
|
||||
|
||||
<p> <li> <b>10 December 1999 -- BusyBox 0.39 released</b>
|
||||
<br>
|
||||
This release includes fixes to init, reboot, halt, kill, and ls, and contains
|
||||
the new apps ping, hostname, mkfifo, free, tail, du, tee, and head. A full
|
||||
changelog can be found <a href="downloads/Changelog">here</a>.
|
||||
<p> <li> <b>5 December 1999 -- BusyBox 0.38 released</b>
|
||||
<br>
|
||||
This release includes fixes to tar, cat, ls, dd, rm, umount, find, df,
|
||||
and make install, and includes new apps syslogd/klogd and logger.
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Begin Links section -->
|
||||
|
||||
<TR><TD BGCOLOR="#ccccc0" ALIGN=center>
|
||||
<A NAME="links">
|
||||
<BIG><B>
|
||||
Important Links</A>
|
||||
</B></BIG>
|
||||
</A>
|
||||
</TD></TR>
|
||||
<TR><TD BGCOLOR="#eeeee0">
|
||||
|
||||
<ul>
|
||||
|
||||
<li> <a href="/">Take me back to http://busybox.net/</a>.
|
||||
<p>
|
||||
|
||||
<li> <A HREF="http://perens.com/FreeSoftware/">
|
||||
Free Software from Bruce Perens</A><br>
|
||||
The original idea for BusyBox, and all versions up to 0.26 were written
|
||||
by <A HREF="mailto:bruce@perens.com">Bruce Perens</a>. This is his BusyBox website.
|
||||
<p>
|
||||
|
||||
<li> <A HREF="http://freshmeat.net/appindex/1999/04/11/923859921.html">
|
||||
Freshmeat AppIndex record for BusyBox</A>
|
||||
<p>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- End of Table -->
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
|
||||
|
||||
<!-- Footer -->
|
||||
<HR>
|
||||
<TABLE WIDTH="100%">
|
||||
<TR>
|
||||
<TD>
|
||||
<font size="-1" face="arial, helvetica, sans-serif">
|
||||
Mail all comments, insults, suggestions and bribes to
|
||||
<a href="mailto:andersen@codepoet.org">Erik Andersen</a><BR>
|
||||
The Busybox logo is copyright 1999-2002, Erik Andersen.
|
||||
</font>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.vim.org"><img border=0 width=88 height=32
|
||||
src="images/anim.written.in.vi.gif"
|
||||
alt="This site created with the vi editor"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.gimp.org/"><img border=0 width=88 height=38
|
||||
src="images/gfx_by_gimp.gif" alt="Graphics by GIMP"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://www.linuxtoday.com"><img width=90 height=36
|
||||
src="images/ltbutton2.jpg" alt="Linux Today"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<p><a href="http://slashdot.org"><img width=90 height=36
|
||||
src="images/sdsmall.gif" alt="Slashdot"></a>
|
||||
</TD>
|
||||
|
||||
<TD>
|
||||
<a href="http://freshmeat.net"><img width=90 height=36
|
||||
src="images/fm.mini.jpg" alt="Freshmeat"></a>
|
||||
</TD>
|
||||
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# go away
|
||||
User-agent: *
|
||||
Disallow: /cgi-bin
|
||||
@@ -1,55 +0,0 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title> Busybox Screenshot! </title>
|
||||
|
||||
<meta name="Author" content="Mark Whitley">
|
||||
<meta name="Description" content="A screenshot of Busybox">
|
||||
|
||||
</head>
|
||||
|
||||
<body text="#000000" alink="#660000" link="#660000" bgcolor="#dee2de" vlink="#660000">
|
||||
|
||||
<h1> Busybox Screenshot! </h1>
|
||||
|
||||
<TABLE WIDTH="80%" CELLSPACING=1 CELLPADDING=4 BORDER=1>
|
||||
<TR><TD BGCOLOR="#000000">
|
||||
|
||||
|
||||
<pre style="background-color: black; color: lightgreen; padding: 5px;
|
||||
font-family: monospace; font-size: smaller;" width="80%">
|
||||
|
||||
|
||||
$ ./busybox
|
||||
BusyBox v0.60.3-pre (2002.02.13-23:05+0000) multi-call binary
|
||||
|
||||
Usage: busybox [function] [arguments]...
|
||||
or: [function] [arguments]...
|
||||
|
||||
BusyBox is a multi-call binary that combines many common Unix
|
||||
utilities into a single executable. Most people will create a
|
||||
link to busybox for each function they wish to use, and BusyBox
|
||||
will act like whatever it was invoked as.
|
||||
|
||||
Currently defined functions:
|
||||
[, basename, busybox, cat, chgrp, chmod, chown, chroot, chvt,
|
||||
clear, cp, cut, date, dd, df, dirname, dmesg, du, echo, env, false,
|
||||
find, free, grep, gunzip, gzip, halt, head, id, init, kill, killall,
|
||||
klogd, linuxrc, ln, logger, ls, lsmod, mkdir, mknod, mkswap, modprobe,
|
||||
more, mount, msh, mv, pidof, poweroff, ps, pwd, reboot, reset,
|
||||
rm, rmdir, sed, sh, sleep, sort, swapoff, swapon, sync, syslogd,
|
||||
tail, tar, test, touch, true, tty, umount, uname, uniq, uptime,
|
||||
wc, which, whoami, xargs, yes, zcat
|
||||
|
||||
$ <blink>_</blink>
|
||||
|
||||
</pre>
|
||||
|
||||
</TD></TR>
|
||||
</TABLE>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||