[Linux-disciples] Compiling a custom kernel at bootup

Stephen R Laniel steve at laniels.org
Sat Jun 11 12:52:59 EDT 2005


Suppose I wanted the following to happen at bootup:

1) Boot to some kind of stub that provides merely the barest
bootstrapping for the steps that follow.

2) Examine all the hardware on my machine, down to the
detail that the kernel configurators like xconfig use.

3) Set the kernel-compile options appropriately and
automagically (though consulting the user or a conf file if
necessary).

4) Compile the kernel; compile some bits as modules if that
would be more efficient. (Though it doesn't seem as though
most modules are dynamically loaded or unloaded, so the
total memory usage is probably the same, right?)

5) Boot with that kernel. Proceed as normal.

Some questions:

a) Is this possible, given current tools?
b) Would it be hard for me to figure out how to make this
work?
c) Has this already been done?
d) How well does it perform? Compilation on my machine takes
quite a long time, but I'm sure there are ways to speed it
up -- e.g., precompiling everything into their respective .o
files, and only linking in step 4) rather than compiling.

Any thoughts? This is inchoate, but it seems like it'd be a
fun project for those of us who want to eke out that tiniest
last bit of performance.

-- 
Stephen R. Laniel
steve at laniels.org
+(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key


More information about the Linux-disciples mailing list