Re: Make ipconfig.c work as a loadable module.
From: Russell King <hidden>
Date: 2003-03-07 09:32:06
Also in:
lkml
On Fri, Mar 07, 2003 at 01:29:05AM +0000, Chris Dukes wrote:
If IBM can fit a kernel and a ramdisk containing all the utilities you describe and more in smaller than 5M of file for tftp, one would think that it could be done on Linux.
Wow. 5MB eh? We currently do NFS-root in 690K.
quoted
ipconfig.c does more than just configure networking. It's a far smaller solution to NFS-root than any userspace implementation could ever hope to be.That's nice. Would you mind explaining to us where that would be a benefit? Aside from dead header space in elf executables, I'm at a loss as to how a usermode implementation must be significantly larger than kernel code.
If you're suggesting above that "5MB isn't significantly larger than
the size Linux can do this" then I think I've just proven you wrong.
Lets see - building an ramdisk to mount a root filesystem out of existing
binaries would require from my exisitng systems probably something like:
text data bss dec hex filename
1093047 21224 15560 1129831 113d67 /lib/libc.so.6
515890 22320 16640 554850 87762 /bin/sh
58540 2436 9776 70752 11460 /lib/libresolv.so.2
53685 1476 5488 60649 ece9 /bin/mount
45511 672 432 46615 b617 /bin/sed
42830 624 40 43494 a9e6 /sbin/pump
10783 500 104 11387 2c7b /lib/libtermcap.so.2
8765 444 28 9237 2415 /lib/libdl.so.2
pump isn't really suitable for the task, but I don't have dhcpcd around.
dhcpcd is even larger than pump however.
That's getting on for 2MB vs:
2620 2012 0 4632 1218 fs/nfs/nfsroot.o
8016 380 80 8476 211c net/ipv4/ipconfig.o
about 13K.
Which version is overly bloated?
Which version is huge?
Which version is compact?
Even the klibc ipconfig version is significantly larger than the in-kernel
version - and klibc and its binaries are written to be small.
Note: I *do* agree that ipconfig.c needs to die before 2.6 but I do not
agree that today is the right day.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html