lkml.org 
[lkml]   [2001]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Booting a modular kernel through a multiple streams file
On Wed Dec 19, 2001 at 09:27:29AM +0000, James A Sutherland wrote:
> What I was suggesting is that using an initfs (whether initrd, initramfs or
> something else) is a better approach than trying to get the bootloader
> grovelling around in the kernel innards - initramfs strengthens this
> argument, I think. Just put the modules into archives, and use initramfs to
> access them and a copy of insmod...

Here is a simple example... Take busybox, disable everything but
insmod and lash (the simplest of the busybox shells). Staticly
link vs uClibc -- the result is 61k (far less then the 440k from
glibc). Now make a root fs that contains just /bin/sh (the
busybox binary), /sbin/insmod (a symlink to /bin/sh), and then
fill up / of your root fs with all the modules you wish to load.
Add in a simple script as /linuxrc or /sbin/init with something
like:

#!/bin/sh
/sbin/insmod /foo.o

Now, gzip the result. With about 60k worth of modules, the final
initrd will compress to about 60k. Simple, easy, small, and all
in userspace,

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:14    [from the cache]
©2003-2011 Jasper Spaans