technosaurus wrote:a complete statically compiled busybox system rings in at ~1mb.
OTOH systemd provides at least an additional 1% functionality for only ... lets do the math:nevermind, that's too much mathCode: Select all
(Debian example: duplicate dependencies removed for brevity ... note the lack of a shell, and many other tools provided by busybox ... but that's OK, you can just roll your own in perl or slang) systemd : 13,458.0 kB |- libc6 : 10,291.0 kB | |- libgcc1 : 129.0 kB | | |- multiarch-support : 216.0 kB | | |- gcc-4.9-base : 218.0 kB |- libgcrypt20 : 1,033.0 kB | |- libgpg-error0 : 444.0 kB |- liblzma5 : 309.0 kB |- acl : 258.0 kB | |- libattr1 : 30.0 kB |- adduser : 1,066.0 kB | |- debconf : 614.0 kB | |- passwd : 2,132.0 kB | | |- debianutils : 147.0 kB | | | |- sensible-utils : 110.0 kB | | |- libpam-modules : 852.0 kB | | | |- libdb5.3 : 1,812.0 kB | | | |- libpam-modules-bin : 248.0 kB | | |- libsemanage1 : 245.0 kB | | |- libsemanage-common : 65.0 kB | | |- libsepol1 : 339.0 kB | | |- libustr-1.0-1 : 287.0 kB | |- perl-base : 4,643.0 kB | |- dpkg : 7,195.0 kB | |- libbz2-1.0 : 114.0 kB | |- tar : 2,619.0 kB | |- zlib1g : 179.0 kB |- initscripts : 165.0 kB | |- coreutils : 14,249.0 kB | |- lsb-base : 72.0 kB | |- sysvinit-utils : 147.0 kB | |- startpar : 95.0 kB |- libacl1 : 80.0 kB |- libaudit1 : 157.0 kB | |- libaudit-common : 49.0 kB |- libblkid1 : 326.0 kB | |- libuuid1 : 89.0 kB |- libcap2 : 61.0 kB |- libcap2-bin : 110.0 kB |- libcryptsetup4 | |- libdevmapper1.02.1 : 330.0 kB | | |- dmsetup : 123.0 kB |- libkmod2 : 134.0 kB |- libpam0g : 248.0 kB | |- libselinux1 : 213.0 kB | |- libpcre3 : 672.0 kB |- libsystemd0 : 181.0 kB |- mount : 357.0 kB | |- libmount1 : 357.0 kB | |- libsmartcols1 : 209.0 kB |- sysv-rc OR file-rc : 141.0 kB | ******* |- insserv : 183.0 kB |- udev : 5,924.0 kB | |- libudev1 : 98.0 kB | |- procps : 670.0 kB | | |- libncursesw5 : 388.0 kB | | |- libprocps3 : 132.0 kB |- util-linux : 2,733.0 kB |- libncurses5 : 306.0 kB |- libslang2 : 1,543.0 kB |- libtinfo5 : 480.0 kB |- tzdata : 1,546.0 kB
... but definitely not something you would want in an initramfs
Code: Select all
cut -d: -f2 | sed -e s/,// -e s/kB/+/ -e 's/\.0//' -e '1i0' -e '$i\\np' | busybox dc
Note that several of those packages will require a Debian Policy compliant shell; dash provides that in ~190 kilobytes. Both dash and bash are "essential" on a Debian system, meaning that packages should not explicitly depend on them unless they have a versioned dependency.
I've heard of systemd being used in conjunction with busybox, insane as that is; I gather that you can turn off most but not all of the services.
Presumably the result would run at least 1-2 MB extra, besides requiring glibc.