[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

busybox bloat



The root disk is currently too bloated, on pmac and chrp its already
too large to fit on a 1.44MB floppy.  

looking at busybox there is plenty of bloat that can be removed, i was
able to bring /bin/busybox (current 0.61-1) down from 200792 bytes to
153088, a nearly 47k decrease.  

i have attached the Config.h diff below, some removals will break
debootstrap, basename, dirname and yes are all i think will affect it,
base/dirname can be trivially replaced using a simple shell
substitution, yes can be replaced with:

smallyes()
{
    while true ; do echo y ; done
}

i am attaching the .diff here so people can give thier comments on the
removals, so workarounds for anything i haven't considered can be
developed, or if absolutly necessary the utility added back.  

these changes will however make busybox less pleasent to work with, i
do not consider this relevant to boot-floppies, they need to be small
not comfortable, for the busybox.deb this may or may not be
undesireable, if this is a concern then these changes should be
applied to a new busybox-bf package which would be used for
boot-floppies instead of the normal .deb.

if i don't hear anything in several days i will submit this patch as a
bugreport to busybox.

--- Config.h-deb.orig	Sat Sep  1 23:23:36 2001
+++ Config.h-deb	Sat Sep  1 23:51:39 2001
@@ -10,30 +10,30 @@
 //#define BB_ADJTIMEX
 #define BB_AR
 //#define BB_ASH
-#define BB_BASENAME
+//#define BB_BASENAME
 #define BB_CAT
 #define BB_CHGRP
 #define BB_CHMOD
 #define BB_CHOWN
 #define BB_CHROOT
-#define BB_CHVT
+//#define BB_CHVT
 #define BB_CLEAR
 //#define BB_CMP
 #define BB_CP
 //#define BB_CPIO
 #define BB_CUT
-#define BB_DATE
+//#define BB_DATE
 //#define BB_DC
 #define BB_DD
 //#define BB_DEALLOCVT
 #define BB_DF
-#define BB_DIRNAME
+//#define BB_DIRNAME
 #define BB_DMESG
 //#define BB_DOS2UNIX
 //#define BB_DPKG
 //#define BB_DPKG_DEB
 //#define BB_DUTMP
-#define BB_DU
+//#define BB_DU
 //#define BB_DUMPKMAP
 #define BB_ECHO
 #define BB_ENV
@@ -41,7 +41,7 @@
 //#define BB_FBSET
 //#define BB_FDFLUSH
 #define BB_FIND
-#define BB_FREE
+//#define BB_FREE
 //#define BB_FREERAMDISK
 //#define BB_FSCK_MINIX
 //#define BB_GETOPT
@@ -53,7 +53,7 @@
 //#define BB_HOSTID
 //#define BB_HOSTNAME
 //#define BB_HUSH
-#define BB_ID
+//#define BB_ID
 //#define BB_IFCONFIG
 #define BB_INIT
 //#define BB_INSMOD
@@ -92,12 +92,12 @@
 #define BB_POWEROFF
 //#define BB_PRINTF
 #define BB_PS
-#define BB_PWD
+//#define BB_PWD
 //#define BB_RDATE
 //#define BB_READLINK
 #define BB_REBOOT
 //#define BB_RENICE
-#define BB_RESET
+//#define BB_RESET
 #define BB_RM
 #define BB_RMDIR
 //#define BB_RMMOD
@@ -115,30 +115,30 @@
 #define BB_TAR
 //#define BB_TEE
 //#define BB_TEST
-#define BB_TELNET
+//#define BB_TELNET
 //#define BB_TFTP
 #define BB_TOUCH
 #define BB_TR
 //#define BB_TRACEROUTE
 #define BB_TRUE_FALSE
-#define BB_TTY
+//#define BB_TTY
 //#define BB_UNIX2DOS
 //#define BB_UUENCODE
 //#define BB_UUDECODE
 #define BB_UMOUNT
-#define BB_UNIQ
+//#define BB_UNIQ
 #define BB_UNAME
 //#define BB_UPDATE
-#define BB_UPTIME
+//#define BB_UPTIME
 //#define BB_USLEEP
-#define BB_VI
+//#define BB_VI
 //#define BB_WATCHDOG
 #define BB_WC
 #define BB_WGET
 #define BB_WHICH
 #define BB_WHOAMI
-#define BB_XARGS
-#define BB_YES
+//#define BB_XARGS
+//#define BB_YES
 // End of Applications List
 //
 //
@@ -194,7 +194,7 @@
 #define BB_FEATURE_LS_TIMESTAMPS
 //
 // enable ls -p and -F
-#define BB_FEATURE_LS_FILETYPES
+//#define BB_FEATURE_LS_FILETYPES
 //
 // sort the file names
 #define BB_FEATURE_LS_SORTFILES
@@ -206,13 +206,13 @@
 #define BB_FEATURE_LS_FOLLOWLINKS
 //
 // Disable for a smaller (but less functional) ping
-#define BB_FEATURE_FANCY_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
+//#define BB_FEATURE_LINUXRC
 //
 //Have init enable core dumping for child processes (for debugging only) 
 //#define BB_FEATURE_INIT_COREDUMPS
@@ -221,14 +221,14 @@
 //#define BB_FEATURE_EXTRA_QUIET
 //
 // enable syslogd -R remotehost
-#define BB_FEATURE_REMOTE_LOG
+//#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
+//#define BB_FEATURE_FANCY_TAIL
 //
 // Enable support for loop devices in mount
 #define BB_FEATURE_MOUNT_LOOP
@@ -249,16 +249,16 @@
 #define BB_FEATURE_TAR_CREATE
 //
 // Enable support for "--exclude" and "-X" for excluding files
-#define BB_FEATURE_TAR_EXCLUDE
+//#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
+//#define BB_FEATURE_SORT_REVERSE
 //
 // Enable uniqe sort
-#define BB_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.
@@ -334,7 +334,7 @@
 #define BB_FEATURE_INSTALLER
 //
 // Enable a nifty progress meter in wget (adds just under 2k)
-#define BB_FEATURE_WGET_STATUSBAR
+//#define BB_FEATURE_WGET_STATUSBAR
 //
 // Enable HTTP authentication in wget
 #define BB_FEATURE_WGET_AUTHENTICATION


-- 
Ethan Benson
http://www.alaska.net/~erbenson/

Attachment: pgp2zrJjv8c6j.pgp
Description: PGP signature


Reply to: