From caffb6eff0e33a80da630963f21346c21186da39 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 25 Sep 2000 21:28:07 +0000 Subject: Gratuitously changed the file "busybox.defs.h" to the more sensible and noticable "Config.h". -Erik --- Changelog | 38 +++--- Config.h | 330 ++++++++++++++++++++++++++++++++++++++++++++++ Config.h.Hurd | 327 ++++++++++++++++++++++++++++++++++++++++++++++ Makefile | 6 +- README | 2 +- TODO | 354 +------------------------------------------------- applets/busybox.mkll | 2 +- applets/busybox.sh | 2 +- busybox.def.h | 330 ---------------------------------------------- busybox.def.h.Hurd | 327 ---------------------------------------------- busybox.mkll | 2 +- busybox.sh | 2 +- busybox.spec | 2 +- examples/busybox.spec | 2 +- internal.h | 2 +- 15 files changed, 693 insertions(+), 1035 deletions(-) create mode 100644 Config.h create mode 100644 Config.h.Hurd delete mode 100644 busybox.def.h delete mode 100644 busybox.def.h.Hurd diff --git a/Changelog b/Changelog index a605a1c62..b374845ed 100644 --- a/Changelog +++ b/Changelog @@ -1,33 +1,39 @@ 0.47 - * Tons of bugfixes. * A bug in syslogd was fixed that allowed it to potentially fork-bomb your system. + * Renamed busybox.defs.h to the more sensible "Config.h" + * Improved portability between different libcs. + * Many apps ported to use getopt() + * Common handling of '--help' + * All usage messages centralized. + * Added a bunch of new commands: + * 'rdate' contributed by Sterling Huxley + * 'wget' contributed by Chip Rosenthal , + and Covad Communications + * 'getopt' from "Alfred M. Szmidt" + * dos2unix, unix2dos, reset, and unrpm.c (and lots of help + debugging) thanks to robotti@metconnect.com. + * 'renice' command, thanks to Dave Cinege + * 'xargs' (written by me) + * 'expr' contributed by Edward Betts , based + on GNY expr + * lsmod now uses the query_module syscall, rather then /proc (me) + * syslogd can now log messages to remote hosts -- patch thanks + to Gyepi Sam * chroot can now call the builtin shell - Pavel Roskin - * added 'renice' command, thanks to Dave Cinege * 'make install' now creates relative symlinks, and added a new 'make install-hardlinks' target to (tada) install hardlinks. - * syslogd can now log messages to remote hosts -- patch thanks - to Gyepi Sam * Rewrite of 'tail' to make it simpler, smaller, and more robust. It now weighs only 2.25k (3k when full featured). The code is cleaner too, thanks to Allen Soard * Add optional ls file sorting, thanks to a patch from Sterling Huxley - * Added 'rdate' command from Sterling Huxley - * Added 'wget' command, contributed by Chip Rosenthal , - and Covad Communications - * Added 'getopt' from "Alfred M. Szmidt" - * Added dos2unix, unix2dos, and unrpm.c thanks to robotti@metconnect.com. - * Added xargs (written by me) - * lsmod now uses the query_module syscall, rather then /proc (me) * Fixed chmod option parsing so things like 'chmod -r /tmp/file' - wouldn't work (since it thought -r was an option). Doh! + now work (previously it thought -r was an option). Doh! * Fixed tar handling of stdin and stdout - * Many apps ported to use getopt() - * All usage messages centralized. - * Common handling of '--help' - * Improved portability between different libcs. + * Preliminary support for GNU HURD. + * Tons of other bugfixes. -Erik Andersen diff --git a/Config.h b/Config.h new file mode 100644 index 000000000..a376deead --- /dev/null +++ b/Config.h @@ -0,0 +1,330 @@ +/* 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_AR +#define BB_BASENAME +#define BB_CAT +#define BB_CHMOD_CHOWN_CHGRP +#define BB_CHROOT +#define BB_CHVT +#define BB_CLEAR +#define BB_CP_MV +#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_DUTMP +#define BB_DU +#define BB_DUMPKMAP +#define BB_ECHO +#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_ID +#define BB_INIT +#define BB_INSMOD +#define BB_KILL +#define BB_KILLALL +#define BB_LENGTH +#define BB_LN +#define BB_LOADACM +#define BB_LOADFONT +#define BB_LOADKMAP +#define BB_LOGGER +#define BB_LOGNAME +#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_NC +#define BB_MORE +#define BB_MOUNT +#define BB_MT +#define BB_NSLOOKUP +#define BB_PING +#define BB_POWEROFF +#define BB_PRINTF +#define BB_PS +#define BB_PWD +#define BB_RDATE +#define BB_REBOOT +#define BB_RENICE +#define BB_RESET +#define BB_RM +#define BB_RMDIR +#define BB_RMMOD +#define BB_SED +#define BB_SETKEYCODES +#define BB_SH +#define BB_SLEEP +#define BB_SORT +#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_TOUCH +#define BB_TR +#define BB_TRUE_FALSE +#define BB_TTY +#define BB_UNRPM +#define BB_UPTIME +#define BB_USLEEP +#define BB_WC +#define BB_WGET +#define BB_WHICH +#define BB_WHOAMI +#define BB_UUENCODE +#define BB_UUDECODE +#define BB_UMOUNT +#define BB_UNIQ +#define BB_UNAME +#define BB_UNIX2DOS +#define BB_UPDATE +#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). +// +// +// +// Turn this on to use Erik's very cool devps, devmtab, etc kernel drivers, +// thereby eliminating the need for the /proc filesystem and thereby saving +// lots and lots memory for more important things. You can not use this and +// USE_PROCFS at the same time... 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/modules c 10 23 +// 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 +// +// enable features that use the /proc filesystem (apps that +// break without this will tell you on compile)... +// You can't use this and BB_FEATURE_USE_DEVPS_PATCH +// at the same time... +#define BB_FEATURE_USE_PROCFS +// +// This compiles out everything but the most +// trivial --help usage information (i.e. reduces binary size) +//#define BB_FEATURE_TRIVIAL_HELP +// +// Use termios to manipulate the screen ('more' is prettier with this on) +#define BB_FEATURE_USE_TERMIOS +// +// calculate terminal & column widths (for more and ls) +#define BB_FEATURE_AUTOWIDTH +// +// show username/groupnames (bypasses libc6 NSS) 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 (still a bit buggy) +#define BB_FEATURE_LS_SORTFILES +// +// enable ls -R +#define BB_FEATURE_LS_RECURSIVE +// +// enable ls -L +#define BB_FEATURE_LS_FOLLOWLINKS +// +// Change ping implementation -- simplified, featureless, but really small. +//#define BB_FEATURE_SIMPLE_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 +// +// Allow init to permenently chroot, and umount the old root fs +// just like an initrd does. Requires a kernel patch by Werner Almesberger. +// ftp://icaftp.epfl.ch/pub/people/almesber/misc/umount-root-*.tar.gz +//#define BB_FEATURE_INIT_CHROOT +// +//Make sure nothing is printed to the console on boot +#define BB_FEATURE_EXTRA_QUIET +// +//Should syslogd also provide klogd support? +#define BB_FEATURE_KLOGD +// +// enable syslogd -R remotehost +#define BB_FEATURE_REMOTE_LOG +// +//Simple tail implementation (2.34k vs 3k for the full one). +//Both provide 'tail -f' support (only one file at a time.) +#define BB_FEATURE_SIMPLE_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_MOUNT_MTAB_SUPPORT +// +// Enable support for mounting remote NFS volumes +#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" for excluding files +#define BB_FEATURE_TAR_EXCLUDE +// +// Enable support for s///p pattern matching +#define BB_FEATURE_SED_PATTERN_SPACE +// +//// Enable reverse sort +#define BB_FEATURE_SORT_REVERSE +// +// Enable command line editing in the shell +#define BB_FEATURE_SH_COMMAND_EDITING +// +//Allow the shell to invoke all the compiled in BusyBox commands as if they +//were shell builtins. Nice for staticly linking an emergency rescue shell +//among other thing. +#define BB_FEATURE_SH_STANDALONE_SHELL +// +// Enable tab completion in the shell (not yet +// working very well -- so don't turn this on) +//#define BB_FEATURE_SH_TAB_COMPLETION +// +//Turn on extra fbset options +//#define BB_FEATURE_FBSET_FANCY +// +//Turn on fbset readmode support +//#define BB_FEATURE_FBSET_READMODE +// +// You must enable one or both of these features +// Support installing modules from pre 2.1 kernels +//#define BB_FEATURE_INSMOD_OLD_KERNEL +// Support installing modules from kernel versions after 2.1.18 +#define BB_FEATURE_INSMOD_NEW_KERNEL +// +// Support module version checking +//#define BB_FEATURE_INSMOD_VERSION_CHECKING +// +// Support for Minix filesystem, version 2 +//#define BB_FEATURE_MINIX2 +// +// +// 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 +// +// 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 +// +// End of Features List +// +// +// +// +// +// +//--------------------------------------------------- +// Nothing beyond this point should ever be touched by +// mere mortals so leave this stuff alone. +// +#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT +#define BB_MTAB +#endif +// +#if defined BB_FEATURE_SH_COMMAND_EDITING && defined BB_SH +#define BB_CMDEDIT +#endif +// +#ifdef BB_KILLALL +#ifndef BB_KILL +#define BB_KILL +#endif +#endif +// +#ifdef BB_FEATURE_LINUXRC +#ifndef BB_INIT +#define BB_INIT +#endif +#define BB_LINUXRC +#endif +// +#ifdef BB_GZIP +#ifndef BB_GUNZIP +#define BB_GUNZIP +#endif +#endif +// +#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT +#define BB_NFSMOUNT +#endif +// +#if defined BB_FEATURE_SH_COMMAND_EDITING +#ifndef BB_FEATURE_USE_TERMIOS +#define BB_FEATURE_USE_TERMIOS +#endif +#endif +// +#if defined BB_FEATURE_AUTOWIDTH +#ifndef BB_FEATURE_USE_TERMIOS +#define BB_FEATURE_USE_TERMIOS +#endif +#endif +// +#if defined BB_INSMOD +#ifndef BB_FEATURE_INSMOD_OLD_KERNEL +#define BB_FEATURE_INSMOD_NEW_KERNEL +#endif +#endif diff --git a/Config.h.Hurd b/Config.h.Hurd new file mode 100644 index 000000000..60a5c6e21 --- /dev/null +++ b/Config.h.Hurd @@ -0,0 +1,327 @@ +/* vi: set sw=4 ts=4: */ + +// NOTE: This file only defines features usefull under the Hurd, +// To compile for the Hurd raname this to Config.h prior to make + +// 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_AR +#define BB_BASENAME +#define BB_CAT +#define BB_CHMOD_CHOWN_CHGRP +#define BB_CHROOT +//#define BB_CHVT /* not needed */ +#define BB_CLEAR +#define BB_CP_MV +#define BB_CUT +#define BB_DATE +#define BB_DC +#define BB_DD +//#define BB_DEALLOCVT /* inot needed */ +//#define BB_DF /* different implementation */ +#define BB_DIRNAME +//#define BB_DMESG /* doesnt compile, different implementation */ +#define BB_DUTMP +#define BB_DU +//#define BB_DUMPKMAP /* not needed */ +#define BB_ECHO +#define BB_EXPR +//#define BB_FBSET /* not needed, doesnt compile */ +//#define BB_FDFLUSH /* is this needed? */ +#define BB_FIND +//#define BB_FREE /* doesnt compile */ +#define BB_FREERAMDISK /* does hurd support ramdisks ? */ +#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_ID +//#define BB_INIT /* not needed?, doesnt compile */ +//#define BB_INSMOD /* not needed, doesnt compile */ +#define BB_KILL +#define BB_KILLALL +#define BB_LENGTH +#define BB_LN +//#define BB_LOADACM /* not needed, doesnt compile */ +//#define BB_LOADFONT /* not needed, doesnt compile */ +//#define BB_LOADKMAP /* not needed */ +#define BB_LOGGER +#define BB_LOGNAME +#define BB_LS +//#define BB_LSMOD /* not needed, doesnt compile */ +//#define BB_MAKEDEVS /* different implementation */ +#define BB_MD5SUM +#define BB_MKDIR +#define BB_MKFIFO +#define BB_MKFS_MINIX +#define BB_MKNOD +//#define BB_MKSWAP /* different impelementation (i think) */ +#define BB_MKTEMP +#define BB_NC +#define BB_MORE +//#define BB_MOUNT /* different implementation */ +#define BB_MT +#define BB_NSLOOKUP +//#define BB_PING /* doesnt compile, Hurd uses BSD style ip.h */ +//#define BB_POWEROFF /* different implementation i assume */ +#define BB_PRINTF +//#define BB_PS /* needs /proc */ +#define BB_PWD +#define BB_RDATE +//#define BB_REBOOT /* different implementation */ +#define BB_RENICE +#define BB_RESET +#define BB_RM +#define BB_RMDIR +//#define BB_RMMOD /* not needed, doesnt compile */ +#define BB_SED +//#define BB_SETKEYCODES /* is this needed ? */ +#define BB_SH +#define BB_SLEEP +#define BB_SORT +//#define BB_SWAPONOFF /* different implementation, doesnt compile */ +#define BB_SYNC +//#define BB_SYSLOGD /* doesnt compile */ +#define BB_TAIL +#define BB_TAR +#define BB_TEE +#define BB_TEST +#define BB_TELNET +#define BB_TOUCH +#define BB_TR +#define BB_TRUE_FALSE +#define BB_TTY +//#define BB_UPTIME /* doesnt compile */ +#define BB_USLEEP +#define BB_WC +#define BB_WGET +#define BB_WHICH +#define BB_WHOAMI +#define BB_UUENCODE +#define BB_UUDECODE +//#define BB_UMOUNT /* different implementation */ +#define BB_UNIQ +//#define BB_UNAME /* doesnt compile */ +//#define BB_UPDATE /* doesnt compile */ +#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). +// +// +// +// Turn this on to use Erik's very cool devps, devmtab, etc kernel drivers, +// thereby eliminating the need for the /proc filesystem and thereby saving +// lots and lots memory for more important things. You can not use this and +// USE_PROCFS at the same time... 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/modules c 10 23 +// 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 +// +// enable features that use the /proc filesystem (apps that +// break without this will tell you on compile)... +// You can't use this and BB_FEATURE_USE_DEVPS_PATCH +// at the same time... +#define BB_FEATURE_USE_PROCFS +// +// This compiles out everything but the most +// trivial --help usage information (i.e. reduces binary size) +//#define BB_FEATURE_TRIVIAL_HELP +// +// Use termios to manipulate the screen ('more' is prettier with this on) +#define BB_FEATURE_USE_TERMIOS +// +// calculate terminal & column widths (for more and ls) +#define BB_FEATURE_AUTOWIDTH +// +// show username/groupnames (bypasses libc6 NSS) 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 (still a bit buggy) +#define BB_FEATURE_LS_SORTFILES +// +// enable ls -R +#define BB_FEATURE_LS_RECURSIVE +// +// Change ping implementation -- simplified, featureless, but really small. +#define BB_FEATURE_SIMPLE_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 +// +// Allow init to permenently chroot, and umount the old root fs +// just like an initrd does. Requires a kernel patch by Werner Almesberger. +// ftp://icaftp.epfl.ch/pub/people/almesber/misc/umount-root-*.tar.gz +//#define BB_FEATURE_INIT_CHROOT +// +//Make sure nothing is printed to the console on boot +#define BB_FEATURE_EXTRA_QUIET +// +//Should syslogd also provide klogd support? +#define BB_FEATURE_KLOGD +// +// enable syslogd -R remotehost +#define BB_FEATURE_REMOTE_LOG +// +//Simple tail implementation (2.34k vs 3k for the full one). +//Both provide 'tail -f' support (only one file at a time.) +#define BB_FEATURE_SIMPLE_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_MOUNT_MTAB_SUPPORT +// +// Enable support for mounting remote NFS volumes +//#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" for excluding files +#define BB_FEATURE_TAR_EXCLUDE +// +// Enable support for s///p pattern matching +#define BB_FEATURE_SED_PATTERN_SPACE +// +//// Enable reverse sort +#define BB_FEATURE_SORT_REVERSE +// +// Enable command line editing in the shell +#define BB_FEATURE_SH_COMMAND_EDITING +// +//Allow the shell to invoke all the compiled in BusyBox commands as if they +//were shell builtins. Nice for staticly linking an emergency rescue shell +//among other thing. +#define BB_FEATURE_SH_STANDALONE_SHELL +// +// Enable tab completion in the shell (not yet +// working very well -- so don't turn this on) +//#define BB_FEATURE_SH_TAB_COMPLETION +// +//Turn on extra fbset options +//#define BB_FEATURE_FBSET_FANCY +// +//Turn on fbset readmode support +//#define BB_FEATURE_FBSET_READMODE +// +// You must enable one or both of these features +// Support installing modules from pre 2.1 kernels +//#define BB_FEATURE_INSMOD_OLD_KERNEL +// Support installing modules from kernel versions after 2.1.18 +#define BB_FEATURE_INSMOD_NEW_KERNEL +// +// Support module version checking +//#define BB_FEATURE_INSMOD_VERSION_CHECKING +// +// Support for Minix filesystem, version 2 +//#define BB_FEATURE_MINIX2 +// +// +// 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 +// +// 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 +// +// End of Features List +// +// +// +// +// +// +//--------------------------------------------------- +// Nothing beyond this point should ever be touched by +// mere mortals so leave this stuff alone. +// +#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT +#define BB_MTAB +#endif +// +#if defined BB_FEATURE_SH_COMMAND_EDITING && defined BB_SH +#define BB_CMDEDIT +#endif +// +#ifdef BB_KILLALL +#ifndef BB_KILL +#define BB_KILL +#endif +#endif +// +#ifdef BB_FEATURE_LINUXRC +#ifndef BB_INIT +#define BB_INIT +#endif +#define BB_LINUXRC +#endif +// +#ifdef BB_GZIP +#ifndef BB_GUNZIP +#define BB_GUNZIP +#endif +#endif +// +#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT +#define BB_NFSMOUNT +#endif +// +#if defined BB_FEATURE_SH_COMMAND_EDITING +#ifndef BB_FEATURE_USE_TERMIOS +#define BB_FEATURE_USE_TERMIOS +#endif +#endif +// +#if defined BB_FEATURE_AUTOWIDTH +#ifndef BB_FEATURE_USE_TERMIOS +#define BB_FEATURE_USE_TERMIOS +#endif +#endif +// +#if defined BB_INSMOD +#ifndef BB_FEATURE_INSMOD_OLD_KERNEL +#define BB_FEATURE_INSMOD_NEW_KERNEL +#endif +#endif diff --git a/Makefile b/Makefile index 15d13c58c..469539095 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ # PROG := busybox -VERSION := 0.47pre +VERSION := 0.47 BUILDTIME := $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z") export VERSION @@ -173,11 +173,11 @@ busybox: $(OBJECTS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBRARIES) $(STRIP) -busybox.links: busybox.def.h +busybox.links: Config.h - ./busybox.mkll | sort >$@ nfsmount.o cmdedit.o: %.o: %.h -$(OBJECTS): %.o: busybox.def.h internal.h %.c Makefile +$(OBJECTS): %.o: Config.h internal.h %.c Makefile utility.o: loop.h diff --git a/README b/README index 17e7722a6..8d1845ab3 100644 --- a/README +++ b/README @@ -20,7 +20,7 @@ it also makes an excellent environment for any small or embedded system. As of version 0.20 there is a version number. : ) Also as of version 0.20, BusyBox is now modularized to easily allow you to build only the components you need, thereby reducing binary size. To turn off unwanted Busybox components, -simply edit the file busybox.def.h and comment out the components you do not +simply edit the file "Config.h" and comment out the components you do not need using C++ style (//) comments. After the build is complete a busybox.links file is generated which is then diff --git a/TODO b/TODO index 6a4dfe39d..0756fd091 100644 --- a/TODO +++ b/TODO @@ -8,9 +8,8 @@ around to it some time. If you have any good ideas, please let me know. * Networking apps are probably going to be split out some time soon into a separate package (named perhaps netkit-tiny?). This would remove the - following items from BusyBox: hostid, hostname, nc, nslookup, telnet, - and ping. nfs mounting and syslogd (when it supports network logging) - will remain in BusyBox. + following items from BusyBox: hostid, hostname, nc, nslookup, telnet, and + ping. nfs mounting and syslogd (network logging) will remain in BusyBox. -Erik @@ -53,353 +52,6 @@ and then start with the biggest things and make them smaller... ----------------------- - - I think that the add_inode &c in utility.c needs to also stow the - st_dev field, and that du.c should NOT call `reset_inode_list' - because there can be hard links from inside one argv/ to inside - another argv/. du.c probably ought to have an -x switch like GNU du - does also... - + du.c probably ought to have an -x switch like GNU du does... ------------------------------------------------------------------ - -An interesting email listing some apps that use /proc. BusyBox -tries to avoid /proc as mush as is possible, so this stuff is -interesting (to me at least): - - -Date: Fri, 25 Feb 2000 08:23:12 +0000 (GMT) -From: Riley Williams -X-Sender: rhw@moo.cus.org.uk -To: almesber@lrc.di.epfl.ch -Cc: "Albert D. Cahalan" , - Linux Kernel -Subject: Re: What /proc should contain [was: /proc/driver/microcode] -In-Reply-To: <20000224165245.A29790@lrc.di.epfl.ch> -Message-ID: -Sender: owner-linux-kernel@vger.rutgers.edu -Precedence: bulk - -Hi there. - - >> Nope, most /proc access is does via programs written in C. - - > That varies a lot from file to file. E.g. I haven't seen any - > programs that are specificly designed to read /proc/atm/* yet, - > and I know of only one (fuser) that reads /proc/mounts, - > extracting only partial information (just to pick two examples - > that I'm quite familiar with). - -As a point of reference, here's a slightly tweaked analysis of the -programs on the system I'm reading your mail on. Basically, I ran the -following script... - - Q> #!/bin/bash - Q> function use() { - Q> for Z in $* ; do - Q> strings $Z | grep /proc | sed "s=^=$Z =" - Q> done - Q> } - Q> use /{,s}bin/* /usr/{,s}bin/* | sort -u | tee proc-usage - -...and then went through it removing comments and print format -strings. Replace /proc with /dev and you'd soon have an equivalent -list for that - although I can report that such is MUCH larger... - -There are three programs therein that refer to /proc/mounts ... - - /bin/mount - /bin/umount - /usr/bin/eject - -...and, as you stated, none that refer to /proc/atm on this system. -However, as this is a RedHat Linux 5.0 based system, that's not -necessarily an up to date reference thereto... - -Here's the list anyway... - -/bin/kill /proc/%d/cmdline -/bin/kill /proc/%d/stat - -/bin/mount /proc/devices -/bin/mount /proc/filesystems -/bin/mount /proc/mounts - -/bin/netstat /proc/net -/bin/netstat /proc/net/appletalk -/bin/netstat /proc/net/ax25 -/bin/netstat /proc/net/ax25_route -/bin/netstat /proc/net/dev -/bin/netstat /proc/net/ip_masquerade -/bin/netstat /proc/net/ipx -/bin/netstat /proc/net/ipx_route -/bin/netstat /proc/net/netstat -/bin/netstat /proc/net/nr -/bin/netstat /proc/net/nr_neigh -/bin/netstat /proc/net/nr_nodes -/bin/netstat /proc/net/raw -/bin/netstat /proc/net/route -/bin/netstat /proc/net/rt_cache -/bin/netstat /proc/net/snmp -/bin/netstat /proc/net/tcp -/bin/netstat /proc/net/udp -/bin/netstat /proc/net/unix - -/bin/umount /proc/devices -/bin/umount /proc/mounts - -/sbin/arp /proc/net/appletalk -/sbin/arp /proc/net/arp -/sbin/arp /proc/net/ax25 -/sbin/arp /proc/net/ipx -/sbin/arp /proc/net/nr -/sbin/arp /proc/net/unix - -/sbin/cardctl /proc/devices - -/sbin/cardmgr /proc/devices - -/sbin/fdisk /proc/ide/%s/media -/sbin/fdisk /proc/scsi/scsi - -/sbin/getty /proc/version - -/sbin/ifconfig /proc/net -/sbin/ifconfig /proc/net/appletalk -/sbin/ifconfig /proc/net/ax25 -/sbin/ifconfig /proc/net/dev -/sbin/ifconfig /proc/net/ipx -/sbin/ifconfig /proc/net/nr -/sbin/ifconfig /proc/net/unix - -/sbin/ifup /proc/sys/kernel/modprobe - -/sbin/ipchains /proc/net/ip_fwchains -/sbin/ipchains /proc/net/ip_fwnames -/sbin/ipchains /proc/net/ip_masquerade -/sbin/ipchains /proc/sys/net/ipv4/ip_forward - -/sbin/ipmaddr /proc/net/dev_mcast -/sbin/ipmaddr /proc/net/igmp -/sbin/ipmaddr /proc/net/igmp6 - -/sbin/iptunnel /proc/net/dev - -/sbin/killall5 /proc/%s/cmdline -/sbin/killall5 /proc/%s/exe -/sbin/killall5 /proc/%s/stat -/sbin/killall5 /proc/version - -/sbin/klogd /proc/kmsg - -/sbin/lsmod /proc/modules - -/sbin/modprobe /proc/modules - -/sbin/pidof /proc/%s/cmdline -/sbin/pidof /proc/%s/exe -/sbin/pidof /proc/%s/stat -/sbin/pidof /proc/version - -/sbin/probe /proc/pci - -/sbin/rarp /proc/net/ax25 -/sbin/rarp /proc/net/nr -/sbin/rarp /proc/net/rarp - -/sbin/rmmod /proc/modules - -/sbin/rmmod.static /proc/modules - -/sbin/route /proc/net/appletalk -/sbin/route /proc/net/ax25 -/sbin/route /proc/net/ax25_route -/sbin/route /proc/net/ipx -/sbin/route /proc/net/ipx_route -/sbin/route /proc/net/nr -/sbin/route /proc/net/nr_neigh -/sbin/route /proc/net/nr_nodes -/sbin/route /proc/net/route -/sbin/route /proc/net/rt_cache -/sbin/route /proc/net/unix - -/sbin/scsi_info /proc/scsi -/sbin/scsi_info /proc/scsi/%s -/sbin/scsi_info /proc/scsi/scsi - -/sbin/slattach /proc/net/ax25 -/sbin/slattach /proc/net/nr - -/sbin/swapoff /proc/swaps - -/sbin/swapon /proc/swaps - -/sbin/uugetty /proc/version - -/usr/bin/dig /proc/ -/usr/bin/dig /proc/interrupts -/usr/bin/dig /proc/meminfo -/usr/bin/dig /proc/rtc -/usr/bin/dig /proc/self/status -/usr/bin/dig /proc/stat - -/usr/bin/dnsquery /proc/ -/usr/bin/dnsquery /proc/interrupts -/usr/bin/dnsquery /proc/meminfo -/usr/bin/dnsquery /proc/rtc -/usr/bin/dnsquery /proc/self/status -/usr/bin/dnsquery /proc/stat - -/usr/bin/eject /proc/mounts - -/usr/bin/emacs /proc/loadavg - -/usr/bin/fetchmail /proc/net/dev - -/usr/bin/free /proc/meminfo - -/usr/bin/gmake /proc/loadavg - -/usr/bin/gpm-root /proc/loadavg -/usr/bin/gpm-root /proc/meminfo - -/usr/bin/host /proc/ -/usr/bin/host /proc/interrupts -/usr/bin/host /proc/meminfo -/usr/bin/host /proc/rtc -/usr/bin/host /proc/self/status -/usr/bin/host /proc/stat - -/usr/bin/hoststat /proc/loadavg - -/usr/bin/hwdiag /proc/cpuinfo -/usr/bin/hwdiag /proc/pci -/usr/bin/hwdiag /proc/scsi/scsi -/usr/bin/hwdiag /proc/version - -/usr/bin/lsdev /proc/dma -/usr/bin/lsdev /proc/interrupts -/usr/bin/lsdev /proc/ioports - -/usr/bin/mailq /proc/loadavg - -/usr/bin/make /proc/loadavg - -/usr/bin/mcookie /proc/loadavg -/usr/bin/mcookie /proc/stat - -/usr/bin/newaliases /proc/loadavg - -/usr/bin/nslookup /proc/ -/usr/bin/nslookup /proc/interrupts -/usr/bin/nslookup /proc/meminfo -/usr/bin/nslookup /proc/rtc -/usr/bin/nslookup /proc/self/status -/usr/bin/nslookup /proc/stat - -/usr/bin/nsupdate /proc/ -/usr/bin/nsupdate /proc/interrupts -/usr/bin/nsupdate /proc/meminfo -/usr/bin/nsupdate /proc/rtc -/usr/bin/nsupdate /proc/self/status -/usr/bin/nsupdate /proc/stat - -/usr/bin/pgp /proc/version -/usr/bin/pgpe /proc/version -/usr/bin/pgpk /proc/version -/usr/bin/pgps /proc/version -/usr/bin/pgpv /proc/version - -/usr/bin/procinfo /proc/cmdline -/usr/bin/procinfo /proc/devices -/usr/bin/procinfo /proc/dma -/usr/bin/procinfo /proc/filesystems -/usr/bin/procinfo /proc/interrupts -/usr/bin/procinfo /proc/loadavg -/usr/bin/procinfo /proc/meminfo -/usr/bin/procinfo /proc/modules -/usr/bin/procinfo /proc/stat -/usr/bin/procinfo /proc/uptime -/usr/bin/procinfo /proc/version - -/usr/bin/purgestat /proc/loadavg - -/usr/bin/screen /proc/loadavg - -/usr/bin/strace /proc/%d/stat - -/usr/bin/top /proc/cpuinfo -/usr/bin/top /proc/meminfo -/usr/bin/top /proc/stat - -/usr/bin/vmstat /proc/%s/stat -/usr/bin/vmstat /proc/meminfo -/usr/bin/vmstat /proc/stat - -/usr/sbin/atd /proc/loadavg - -/usr/sbin/dnskeygen /proc/ -/usr/sbin/dnskeygen /proc/interrupts -/usr/sbin/dnskeygen /proc/meminfo -/usr/sbin/dnskeygen /proc/rtc -/usr/sbin/dnskeygen /proc/self/status -/usr/sbin/dnskeygen /proc/stat - -/usr/sbin/fuser /proc/%d/stat -/usr/sbin/fuser /proc/net/%s -/usr/sbin/fuser /proc/net/unix - -/usr/sbin/in.identd /proc/net/tcp - -/usr/sbin/irpd /proc/ -/usr/sbin/irpd /proc/interrupts -/usr/sbin/irpd /proc/meminfo -/usr/sbin/irpd /proc/rtc -/usr/sbin/irpd /proc/self/status -/usr/sbin/irpd /proc/stat - -/usr/sbin/named /proc/ -/usr/sbin/named /proc/interrupts -/usr/sbin/named /proc/meminfo -/usr/sbin/named /proc/rtc -/usr/sbin/named /proc/self/status -/usr/sbin/named /proc/stat - -/usr/sbin/named-xfer /proc/ -/usr/sbin/named-xfer /proc/interrupts -/usr/sbin/named-xfer /proc/meminfo -/usr/sbin/named-xfer /proc/rtc -/usr/sbin/named-xfer /proc/self/status -/usr/sbin/named-xfer /proc/stat - -/usr/sbin/readprofile /proc/profile - -/usr/sbin/rwhod /proc/loadavg -/usr/sbin/rwhod /proc/uptime - -/usr/sbin/sendmail /proc/loadavg - -/usr/sbin/setconsole /proc/openprom/options -/usr/sbin/setconsole /proc/openprom/options/${console}-mode -/usr/sbin/setconsole /proc/openprom/options/input-device -/usr/sbin/setconsole /proc/openprom/options/output-device - -Best wishes from Riley. - - * Copyright (C) 1999, Memory Alpha Systems. - * All rights and wrongs reserved. - -+----------------------------------------------------------------------+ -| There is something frustrating about the quality and speed of Linux | -| development, ie., the quality is too high and the speed is too high, | -| in other words, I can implement this XXXX feature, but I bet someone | -| else has already done so and is just about to release their patch. | -+----------------------------------------------------------------------+ - * http://www.memalpha.cx/Linux/Kernel/ - - -- -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in -the body of a message to majordomo@vger.rutgers.edu -Please read the FAQ at http://www.tux.org/lkml/ - diff --git a/applets/busybox.mkll b/applets/busybox.mkll index c650febd6..d8ea7b395 100755 --- a/applets/busybox.mkll +++ b/applets/busybox.mkll @@ -1,7 +1,7 @@ #!/bin/sh # Make busybox links list file. -DF="busybox.def.h" +DF="Config.h" MF="busybox.c" LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\/BB_\1/gp;' | sort)" diff --git a/applets/busybox.sh b/applets/busybox.sh index 2b4521065..e01b88162 100755 --- a/applets/busybox.sh +++ b/applets/busybox.sh @@ -3,7 +3,7 @@ # I added in the extra "ls" so only source files that # actually exist will show up in the compile list. ls -1 ` \ - gcc -E -dM busybox.def.h | \ + gcc -E -dM Config.h | \ sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\/\1.c/gp;' \ | tr '[:upper:]' '[:lower:]' | sort ` 2>/dev/null | sed -e 's/\.c$/\.o/g' diff --git a/busybox.def.h b/busybox.def.h deleted file mode 100644 index a376deead..000000000 --- a/busybox.def.h +++ /dev/null @@ -1,330 +0,0 @@ -/* 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_AR -#define BB_BASENAME -#define BB_CAT -#define BB_CHMOD_CHOWN_CHGRP -#define BB_CHROOT -#define BB_CHVT -#define BB_CLEAR -#define BB_CP_MV -#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_DUTMP -#define BB_DU -#define BB_DUMPKMAP -#define BB_ECHO -#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_ID -#define BB_INIT -#define BB_INSMOD -#define BB_KILL -#define BB_KILLALL -#define BB_LENGTH -#define BB_LN -#define BB_LOADACM -#define BB_LOADFONT -#define BB_LOADKMAP -#define BB_LOGGER -#define BB_LOGNAME -#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_NC -#define BB_MORE -#define BB_MOUNT -#define BB_MT -#define BB_NSLOOKUP -#define BB_PING -#define BB_POWEROFF -#define BB_PRINTF -#define BB_PS -#define BB_PWD -#define BB_RDATE -#define BB_REBOOT -#define BB_RENICE -#define BB_RESET -#define BB_RM -#define BB_RMDIR -#define BB_RMMOD -#define BB_SED -#define BB_SETKEYCODES -#define BB_SH -#define BB_SLEEP -#define BB_SORT -#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_TOUCH -#define BB_TR -#define BB_TRUE_FALSE -#define BB_TTY -#define BB_UNRPM -#define BB_UPTIME -#define BB_USLEEP -#define BB_WC -#define BB_WGET -#define BB_WHICH -#define BB_WHOAMI -#define BB_UUENCODE -#define BB_UUDECODE -#define BB_UMOUNT -#define BB_UNIQ -#define BB_UNAME -#define BB_UNIX2DOS -#define BB_UPDATE -#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). -// -// -// -// Turn this on to use Erik's very cool devps, devmtab, etc kernel drivers, -// thereby eliminating the need for the /proc filesystem and thereby saving -// lots and lots memory for more important things. You can not use this and -// USE_PROCFS at the same time... 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/modules c 10 23 -// 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 -// -// enable features that use the /proc filesystem (apps that -// break without this will tell you on compile)... -// You can't use this and BB_FEATURE_USE_DEVPS_PATCH -// at the same time... -#define BB_FEATURE_USE_PROCFS -// -// This compiles out everything but the most -// trivial --help usage information (i.e. reduces binary size) -//#define BB_FEATURE_TRIVIAL_HELP -// -// Use termios to manipulate the screen ('more' is prettier with this on) -#define BB_FEATURE_USE_TERMIOS -// -// calculate terminal & column widths (for more and ls) -#define BB_FEATURE_AUTOWIDTH -// -// show username/groupnames (bypasses libc6 NSS) 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 (still a bit buggy) -#define BB_FEATURE_LS_SORTFILES -// -// enable ls -R -#define BB_FEATURE_LS_RECURSIVE -// -// enable ls -L -#define BB_FEATURE_LS_FOLLOWLINKS -// -// Change ping implementation -- simplified, featureless, but really small. -//#define BB_FEATURE_SIMPLE_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 -// -// Allow init to permenently chroot, and umount the old root fs -// just like an initrd does. Requires a kernel patch by Werner Almesberger. -// ftp://icaftp.epfl.ch/pub/people/almesber/misc/umount-root-*.tar.gz -//#define BB_FEATURE_INIT_CHROOT -// -//Make sure nothing is printed to the console on boot -#define BB_FEATURE_EXTRA_QUIET -// -//Should syslogd also provide klogd support? -#define BB_FEATURE_KLOGD -// -// enable syslogd -R remotehost -#define BB_FEATURE_REMOTE_LOG -// -//Simple tail implementation (2.34k vs 3k for the full one). -//Both provide 'tail -f' support (only one file at a time.) -#define BB_FEATURE_SIMPLE_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_MOUNT_MTAB_SUPPORT -// -// Enable support for mounting remote NFS volumes -#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" for excluding files -#define BB_FEATURE_TAR_EXCLUDE -// -// Enable support for s///p pattern matching -#define BB_FEATURE_SED_PATTERN_SPACE -// -//// Enable reverse sort -#define BB_FEATURE_SORT_REVERSE -// -// Enable command line editing in the shell -#define BB_FEATURE_SH_COMMAND_EDITING -// -//Allow the shell to invoke all the compiled in BusyBox commands as if they -//were shell builtins. Nice for staticly linking an emergency rescue shell -//among other thing. -#define BB_FEATURE_SH_STANDALONE_SHELL -// -// Enable tab completion in the shell (not yet -// working very well -- so don't turn this on) -//#define BB_FEATURE_SH_TAB_COMPLETION -// -//Turn on extra fbset options -//#define BB_FEATURE_FBSET_FANCY -// -//Turn on fbset readmode support -//#define BB_FEATURE_FBSET_READMODE -// -// You must enable one or both of these features -// Support installing modules from pre 2.1 kernels -//#define BB_FEATURE_INSMOD_OLD_KERNEL -// Support installing modules from kernel versions after 2.1.18 -#define BB_FEATURE_INSMOD_NEW_KERNEL -// -// Support module version checking -//#define BB_FEATURE_INSMOD_VERSION_CHECKING -// -// Support for Minix filesystem, version 2 -//#define BB_FEATURE_MINIX2 -// -// -// 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 -// -// 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 -// -// End of Features List -// -// -// -// -// -// -//--------------------------------------------------- -// Nothing beyond this point should ever be touched by -// mere mortals so leave this stuff alone. -// -#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT -#define BB_MTAB -#endif -// -#if defined BB_FEATURE_SH_COMMAND_EDITING && defined BB_SH -#define BB_CMDEDIT -#endif -// -#ifdef BB_KILLALL -#ifndef BB_KILL -#define BB_KILL -#endif -#endif -// -#ifdef BB_FEATURE_LINUXRC -#ifndef BB_INIT -#define BB_INIT -#endif -#define BB_LINUXRC -#endif -// -#ifdef BB_GZIP -#ifndef BB_GUNZIP -#define BB_GUNZIP -#endif -#endif -// -#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT -#define BB_NFSMOUNT -#endif -// -#if defined BB_FEATURE_SH_COMMAND_EDITING -#ifndef BB_FEATURE_USE_TERMIOS -#define BB_FEATURE_USE_TERMIOS -#endif -#endif -// -#if defined BB_FEATURE_AUTOWIDTH -#ifndef BB_FEATURE_USE_TERMIOS -#define BB_FEATURE_USE_TERMIOS -#endif -#endif -// -#if defined BB_INSMOD -#ifndef BB_FEATURE_INSMOD_OLD_KERNEL -#define BB_FEATURE_INSMOD_NEW_KERNEL -#endif -#endif diff --git a/busybox.def.h.Hurd b/busybox.def.h.Hurd deleted file mode 100644 index cfd687376..000000000 --- a/busybox.def.h.Hurd +++ /dev/null @@ -1,327 +0,0 @@ -/* vi: set sw=4 ts=4: */ - -// NOTE: This file only defines features usefull under the Hurd, -// To compile for the Hurd raname this to busybox.def.h prior to make - -// 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_AR -#define BB_BASENAME -#define BB_CAT -#define BB_CHMOD_CHOWN_CHGRP -#define BB_CHROOT -//#define BB_CHVT /* not needed */ -#define BB_CLEAR -#define BB_CP_MV -#define BB_CUT -#define BB_DATE -#define BB_DC -#define BB_DD -//#define BB_DEALLOCVT /* inot needed */ -//#define BB_DF /* different implementation */ -#define BB_DIRNAME -//#define BB_DMESG /* doesnt compile, different implementation */ -#define BB_DUTMP -#define BB_DU -//#define BB_DUMPKMAP /* not needed */ -#define BB_ECHO -#define BB_EXPR -//#define BB_FBSET /* not needed, doesnt compile */ -//#define BB_FDFLUSH /* is this needed? */ -#define BB_FIND -//#define BB_FREE /* doesnt compile */ -#define BB_FREERAMDISK /* does hurd support ramdisks ? */ -#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_ID -//#define BB_INIT /* not needed?, doesnt compile */ -//#define BB_INSMOD /* not needed, doesnt compile */ -#define BB_KILL -#define BB_KILLALL -#define BB_LENGTH -#define BB_LN -//#define BB_LOADACM /* not needed, doesnt compile */ -//#define BB_LOADFONT /* not needed, doesnt compile */ -//#define BB_LOADKMAP /* not needed */ -#define BB_LOGGER -#define BB_LOGNAME -#define BB_LS -//#define BB_LSMOD /* not needed, doesnt compile */ -//#define BB_MAKEDEVS /* different implementation */ -#define BB_MD5SUM -#define BB_MKDIR -#define BB_MKFIFO -#define BB_MKFS_MINIX -#define BB_MKNOD -//#define BB_MKSWAP /* different impelementation (i think) */ -#define BB_MKTEMP -#define BB_NC -#define BB_MORE -//#define BB_MOUNT /* different implementation */ -#define BB_MT -#define BB_NSLOOKUP -//#define BB_PING /* doesnt compile, Hurd uses BSD style ip.h */ -//#define BB_POWEROFF /* different implementation i assume */ -#define BB_PRINTF -//#define BB_PS /* needs /proc */ -#define BB_PWD -#define BB_RDATE -//#define BB_REBOOT /* different implementation */ -#define BB_RENICE -#define BB_RESET -#define BB_RM -#define BB_RMDIR -//#define BB_RMMOD /* not needed, doesnt compile */ -#define BB_SED -//#define BB_SETKEYCODES /* is this needed ? */ -#define BB_SH -#define BB_SLEEP -#define BB_SORT -//#define BB_SWAPONOFF /* different implementation, doesnt compile */ -#define BB_SYNC -//#define BB_SYSLOGD /* doesnt compile */ -#define BB_TAIL -#define BB_TAR -#define BB_TEE -#define BB_TEST -#define BB_TELNET -#define BB_TOUCH -#define BB_TR -#define BB_TRUE_FALSE -#define BB_TTY -//#define BB_UPTIME /* doesnt compile */ -#define BB_USLEEP -#define BB_WC -#define BB_WGET -#define BB_WHICH -#define BB_WHOAMI -#define BB_UUENCODE -#define BB_UUDECODE -//#define BB_UMOUNT /* different implementation */ -#define BB_UNIQ -//#define BB_UNAME /* doesnt compile */ -//#define BB_UPDATE /* doesnt compile */ -#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). -// -// -// -// Turn this on to use Erik's very cool devps, devmtab, etc kernel drivers, -// thereby eliminating the need for the /proc filesystem and thereby saving -// lots and lots memory for more important things. You can not use this and -// USE_PROCFS at the same time... 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/modules c 10 23 -// 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 -// -// enable features that use the /proc filesystem (apps that -// break without this will tell you on compile)... -// You can't use this and BB_FEATURE_USE_DEVPS_PATCH -// at the same time... -#define BB_FEATURE_USE_PROCFS -// -// This compiles out everything but the most -// trivial --help usage information (i.e. reduces binary size) -//#define BB_FEATURE_TRIVIAL_HELP -// -// Use termios to manipulate the screen ('more' is prettier with this on) -#define BB_FEATURE_USE_TERMIOS -// -// calculate terminal & column widths (for more and ls) -#define BB_FEATURE_AUTOWIDTH -// -// show username/groupnames (bypasses libc6 NSS) 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 (still a bit buggy) -#define BB_FEATURE_LS_SORTFILES -// -// enable ls -R -#define BB_FEATURE_LS_RECURSIVE -// -// Change ping implementation -- simplified, featureless, but really small. -#define BB_FEATURE_SIMPLE_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 -// -// Allow init to permenently chroot, and umount the old root fs -// just like an initrd does. Requires a kernel patch by Werner Almesberger. -// ftp://icaftp.epfl.ch/pub/people/almesber/misc/umount-root-*.tar.gz -//#define BB_FEATURE_INIT_CHROOT -// -//Make sure nothing is printed to the console on boot -#define BB_FEATURE_EXTRA_QUIET -// -//Should syslogd also provide klogd support? -#define BB_FEATURE_KLOGD -// -// enable syslogd -R remotehost -#define BB_FEATURE_REMOTE_LOG -// -//Simple tail implementation (2.34k vs 3k for the full one). -//Both provide 'tail -f' support (only one file at a time.) -#define BB_FEATURE_SIMPLE_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_MOUNT_MTAB_SUPPORT -// -// Enable support for mounting remote NFS volumes -//#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" for excluding files -#define BB_FEATURE_TAR_EXCLUDE -// -// Enable support for s///p pattern matching -#define BB_FEATURE_SED_PATTERN_SPACE -// -//// Enable reverse sort -#define BB_FEATURE_SORT_REVERSE -// -// Enable command line editing in the shell -#define BB_FEATURE_SH_COMMAND_EDITING -// -//Allow the shell to invoke all the compiled in BusyBox commands as if they -//were shell builtins. Nice for staticly linking an emergency rescue shell -//among other thing. -#define BB_FEATURE_SH_STANDALONE_SHELL -// -// Enable tab completion in the shell (not yet -// working very well -- so don't turn this on) -//#define BB_FEATURE_SH_TAB_COMPLETION -// -//Turn on extra fbset options -//#define BB_FEATURE_FBSET_FANCY -// -//Turn on fbset readmode support -//#define BB_FEATURE_FBSET_READMODE -// -// You must enable one or both of these features -// Support installing modules from pre 2.1 kernels -//#define BB_FEATURE_INSMOD_OLD_KERNEL -// Support installing modules from kernel versions after 2.1.18 -#define BB_FEATURE_INSMOD_NEW_KERNEL -// -// Support module version checking -//#define BB_FEATURE_INSMOD_VERSION_CHECKING -// -// Support for Minix filesystem, version 2 -//#define BB_FEATURE_MINIX2 -// -// -// 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 -// -// 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 -// -// End of Features List -// -// -// -// -// -// -//--------------------------------------------------- -// Nothing beyond this point should ever be touched by -// mere mortals so leave this stuff alone. -// -#ifdef BB_FEATURE_MOUNT_MTAB_SUPPORT -#define BB_MTAB -#endif -// -#if defined BB_FEATURE_SH_COMMAND_EDITING && defined BB_SH -#define BB_CMDEDIT -#endif -// -#ifdef BB_KILLALL -#ifndef BB_KILL -#define BB_KILL -#endif -#endif -// -#ifdef BB_FEATURE_LINUXRC -#ifndef BB_INIT -#define BB_INIT -#endif -#define BB_LINUXRC -#endif -// -#ifdef BB_GZIP -#ifndef BB_GUNZIP -#define BB_GUNZIP -#endif -#endif -// -#if defined BB_MOUNT && defined BB_FEATURE_NFSMOUNT -#define BB_NFSMOUNT -#endif -// -#if defined BB_FEATURE_SH_COMMAND_EDITING -#ifndef BB_FEATURE_USE_TERMIOS -#define BB_FEATURE_USE_TERMIOS -#endif -#endif -// -#if defined BB_FEATURE_AUTOWIDTH -#ifndef BB_FEATURE_USE_TERMIOS -#define BB_FEATURE_USE_TERMIOS -#endif -#endif -// -#if defined BB_INSMOD -#ifndef BB_FEATURE_INSMOD_OLD_KERNEL -#define BB_FEATURE_INSMOD_NEW_KERNEL -#endif -#endif diff --git a/busybox.mkll b/busybox.mkll index c650febd6..d8ea7b395 100755 --- a/busybox.mkll +++ b/busybox.mkll @@ -1,7 +1,7 @@ #!/bin/sh # Make busybox links list file. -DF="busybox.def.h" +DF="Config.h" MF="busybox.c" LIST="$(gcc -E -dM $DF | sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\/BB_\1/gp;' | sort)" diff --git a/busybox.sh b/busybox.sh index 2b4521065..e01b88162 100755 --- a/busybox.sh +++ b/busybox.sh @@ -3,7 +3,7 @@ # I added in the extra "ls" so only source files that # actually exist will show up in the compile list. ls -1 ` \ - gcc -E -dM busybox.def.h | \ + gcc -E -dM Config.h | \ sed -n -e '/^.*BB_FEATURE.*$/d;s/^#define.*\/\1.c/gp;' \ | tr '[:upper:]' '[:lower:]' | sort ` 2>/dev/null | sed -e 's/\.c$/\.o/g' diff --git a/busybox.spec b/busybox.spec index cb185a724..c11756b1e 100644 --- a/busybox.spec +++ b/busybox.spec @@ -1,5 +1,5 @@ Name: busybox -Version: 0.47pre +Version: 0.47 Release: 1 Group: System/Utilities Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. diff --git a/examples/busybox.spec b/examples/busybox.spec index cb185a724..c11756b1e 100644 --- a/examples/busybox.spec +++ b/examples/busybox.spec @@ -1,5 +1,5 @@ Name: busybox -Version: 0.47pre +Version: 0.47 Release: 1 Group: System/Utilities Summary: BusyBox is a tiny suite of Unix utilities in a multi-call binary. diff --git a/internal.h b/internal.h index f8dd12836..69f455435 100644 --- a/internal.h +++ b/internal.h @@ -24,7 +24,7 @@ #ifndef _BB_INTERNAL_H_ #define _BB_INTERNAL_H_ 1 -#include "busybox.def.h" +#include "Config.h" #ifdef DMALLOC #include "dmalloc.h" -- cgit v1.2.3