IDEA: Linux kernel and pcbios compatibility...

Eric W. Biederman ebiederman at lnxi.com
Fri Dec 19 13:11:00 CET 2003


Stefan Reinauer <stepan at suse.de> writes:

> * Eric W. Biederman <ebiederman at lnxi.com> [031219 01:36]:
> > 
> > Brainstorming earlier today I think I have found a way to use
> > an linux kernel for the boot loader and to implement pcbios
> > compatibility without too much cost.   The idea is to use
> > a uclinux kernel.  And implement a ``user space'' aplication
> > that is a user space shim that makes kernel calls.
> 
> What functionality is it exactly that we need the uclinux 
> kernel for? We won't do any scheduling, and we won't need source code
> drivers if we implement a pcbios "emulation" 
> What I liked most about the LinuxBIOS2 approach is that 
> code was only introduced in the tree when it was specifically needed.
> 
> Since I had my hands at the Alpha bootloader Milo, everything that uses
> a Linux kernel for it's operations kind of scares me...

So this is for the bootloader, the payload and it will be optional.
This will not go into the linuxBIOS tree, this is an alternative to
etherboot.   

I might do a kernel port to a weird hardware configuration but I will
not hack up the kernel in the way Milo does.  I have worked on it
and I have the scars as well.  Anything that borrows the kernel
drivers is asking for trouble.   But look at etherboot.  It also
has a dependency on linux drivers.  But because etherboot actually
ports the drivers, and then ports the bug fixes it works there
is not a nightmare of a maintenance issue there.  So I think using
the kernel whole will be ok.

The observation has been that any sufficiently general firmware
bootloader tends to become an OS, so why not use a real OS.

So the things I actually care about are: booting over myrinet,
booting over inifinband, booting over quadrics, booting over a pair of
bonded nics.  Having a good tg3 driver.   Getting Lustre as my root
filesystem.  Unless size issues kill it again I am going to use the
linux kernel as my bootloader to do this.

So except for the case where someone plugs in a card with an option
rom all the pcbios emulation would do would be to make system
calls to the linux kernel.   The biggest modification I would have
to make would be to change the load address of the kernel, and
not the let the kernel use all of RAM, but instead live in a small
fixed area.

I guess the other problem I see with doing a pcbios emulation layer
is I don't know if there it is there is an API to get the kernel
drivers to stop.

If I can't have my cake and eat it too, I won't have pcbios
compatibility.  Oh, well.


Eric



More information about the coreboot mailing list