Fwd: Re: [klibc] klibc and what's the next step?
Bernhard Fischer
rep.nop at aon.at
Mon Jul 3 11:30:45 UTC 2006
On Mon, Jul 03, 2006 at 11:52:24AM +0200, Denis Vlasenko wrote:
>Just FYI: kernel folks are talking about small userspace
>which will start before root fs is mounted, and they are
>mentioning busybox:
The sum of on-disk bytes for their versions are 33848 Bytes.
Busybox with the belowmentioned featureset (against glibc, so it's
bigger than it needs to be and would be if using klibc) looks
approximately like:
$ size busybox
text data bss dec hex filename
21345 644 8336 30325 7675 busybox
$ ls -l busybox
-rwxr-xr-x 1 bernhard users 23488 Jul 3 13:25 busybox
Currently defined functions:
busybox, cat, chroot, dd, false, halt, insmod, ln, mkdir, mkfifo,
mknod, mount, pivot_root, poweroff, ps, reboot, rm, sleep, switch_root,
true, umount, uname
Wouldn't they need switch_root instead of pivot_root for 2.6?
I did not look what 'nuke' is ment to do but set 'rm' instead. This can
of course be fixed/added.
>---------- Forwarded Message ----------
>Subject: Re: [klibc] klibc and what's the next step?
>Date: Sunday 02 July 2006 02:50
>From: "H. Peter Anvin" <hpa at zytor.com>
>To: Theodore Tso <tytso at mit.edu>, "H. Peter Anvin" <hpa at zytor.com>, Linus Torvalds <torvalds at osdl.org>, Jeff Bailey <jbailey at ubuntu.com>, Michael Tokarev <mjt at tls.msk.ru>, Roman Zippel <zippel at linux-m68k.org>, klibc at zytor.com, linux-kernel at vger.kernel.org, Pavel Machek <pavel at ucw.cz>
>
>Theodore Tso wrote:
>>
>> Well, I wouldn't be one of those folks. In fact, how big is dash and
>> some select set of shell utilities? If they aren't that big, it might
>> make sense to include them all the time so that a simple command-line
>> option on boot is all that's necessary in order to break into a
>> pre-kinit interactive shell. That would make the resulting system
>> more debuggable by definition. Then all we will would have to do is
>> make sure the distro's use the kernel-supplied kinit solution, instead
>> of rolling their own non-standard version.
>>
>
>Shared binaries, x86-64 (i386 is about 20-25% smaller):
>
>-rwxrwxr-x 1 hpa hpa 58544 Jul 1 11:41 usr/dash/sh.shared*
>-rwxrwxr-x 1 hpa hpa 2760 Jul 1 11:41 cat*
>-rwxrwxr-x 1 hpa hpa 888 Jul 1 11:41 chroot*
>-rwxrwxr-x 1 hpa hpa 4000 Jul 1 11:41 dd*
>-rwxrwxr-x 1 hpa hpa 680 Jul 1 11:41 false*
>-rwxrwxr-x 3 hpa hpa 1072 Jul 1 11:41 halt*
>-rwxrwxr-x 1 hpa hpa 1664 Jul 1 11:41 insmod*
>-rwxrwxr-x 1 hpa hpa 1336 Jul 1 11:41 ln*
>-rwxrwxr-x 1 hpa hpa 5000 Jul 1 11:41 minips*
>-rwxrwxr-x 1 hpa hpa 1984 Jul 1 11:41 mkdir*
>-rwxrwxr-x 1 hpa hpa 1704 Jul 1 11:41 mkfifo*
>-rwxrwxr-x 1 hpa hpa 1712 Jul 1 11:41 mknod*
>-rwxrwxr-x 1 hpa hpa 2184 Jul 1 11:41 mount
>-rwxrwxr-x 1 hpa hpa 1320 Jul 1 11:41 nuke*
>-rwxrwxr-x 1 hpa hpa 856 Jul 1 11:41 pivot_root*
>-rwxrwxr-x 3 hpa hpa 1072 Jul 1 11:41 poweroff*
>-rwxrwxr-x 3 hpa hpa 1072 Jul 1 11:41 reboot*
>-rwxrwxr-x 1 hpa hpa 864 Jul 1 11:41 sleep*
>-rwxrwxr-x 1 hpa hpa 672 Jul 1 11:41 true*
>-rwxrwxr-x 1 hpa hpa 1056 Jul 1 11:41 umount*
>-rwxrwxr-x 1 hpa hpa 1952 Jul 1 11:41 uname*
>-rw-rw-r-- 2 hpa hpa 71016 Jul 1 11:40
>usr/klibc/klibc-Yy9wepARlc-x17pdZDwU1YCOiMQ.so
>-rwxrwxr-x 1 hpa hpa 35664 Jul 1 17:48 usr/kinit/kinit.shared*
>
>... totalling about 193K if you include everything. For comparison,
>static kinit by itself is 67K (which includes ipconfig, nfsroot, etc.)
>For an "include everything" variant, it would probably make more sense
>to port busybox, and/or add more tools as dash builtins.
>
>All of these are uncompressed sizes.
>
> -hpa
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo at vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>-------------------------------------------------------
>_______________________________________________
>busybox mailing list
>busybox at busybox.net
>http://busybox.net/cgi-bin/mailman/listinfo/busybox
>
More information about the busybox
mailing list