[uClibc] static compiling

Dave Dodge dododge at dododge.net
Thu Feb 19 00:52:20 UTC 2004


On Wed, Feb 18, 2004 at 11:29:24AM -0500, Bennett Todd wrote:
> 2004-02-18T03:14:31 Rob Landley:
> > If you need a mini-system to bring up the real system, use an
> > initrd. (2.8 is going to strip the early setup stuff out of
> > the kernel and make an initramfs _mandatory_.
> 
> Could you please be so kind as to expand on that bit? Is LILO,
> vmlinuz, and a root filesystem not going to suffice to boot 2.8?

What's likely to happen is that some of the very early initialization
stuff will be moved to userspace. This might include things like
firmware loading by drivers. You might need some userspace code to
bootstrap the /dev or hotplug stuff. Occasionally some kernel
developers suggest requiring that all drivers be modular and loaded
explicitly; if that ever happens then the drivers you'd normally
"compile in" to the kernel would have be loaded by early userspace.

In any case, this stuff will take place in initramfs, which is
intended to replace initrd but does not work exactly the same way.
Probably the biggest difference is that an initramfs can actually be
linked directly into the kernel image. This means that the boot loader
doesn't even know it's there, it just loads "the kernel" and the
kernel binary happens to have this array of bytes in it that can be
used to populate the initramfs in memory.

Some of this exists in 2.6 already, such as the linking/loading an
initramfs. But it's not fully functional -- any programs you put in
there won't be run. I think it still takes a 2-line patch to enable
execution in initramfs, though the -mm series might have that
already applied.

> Will 2.8 no longer be able to work with root= and ro/rw boot
> parameters to directly boot onto a hard disk partition?

It will probably still work as you expect, because any initramfs stuff
needed for the core kernel to come up will hopefully be automatically
put in place when you build the kernel. Your kernel image will have the
initramfs contents buried inside it.

But this is 2.7/2.8, so it all remains to be seen...

                                                  -Dave Dodge



More information about the uClibc mailing list