IDEA: Linux kernel and pcbios compatibility...

Joshua Wise joshua at joshuawise.com
Thu Dec 18 20:27:00 CET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 18 December 2003 7:36 pm, Eric W. Biederman wrote:
> 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.

The way I implement my bootloader on ARM is like this:

1) First stage assembly loader sets up serial and DRAM.
2) First stage loader probes RAM, and sets up tagged list.
3) First stage jumps into zImage of special LAB (Linux As Bootldr) kernel. 
(currently just a 2.6.0 kernel from handhelds.org that has CONFIG_LAB 
defined.)
4) LAB kernel boots up until it gets ready to jump into init.
5) #ifdef'ed code takes over and calls a LAB main function which does all 
sorts of cool stuff including giving the user a CLI if requested (usually by 
holding the iPAQ's joypad down), or autobooting (running a predefined 
mkdir/mount/armboot sequence.)

Conceivably you could write a subapp for the CLI that does what you want, and 
put it in the autoboot script.

LAB for ARM's zImage is currently ~509kbytes for those who care. (We must keep 
it below 512KB.)

> There are a few nasty details to work out like how to handle
> services that are expected to work in vm86 mode.  But I'm
> not certain I care.
I've tinkered with writing an OS, but I still don't know too much about the 
x86 architecture, so I couldn't help there. Sorry.

> Other thoughts?
Check out my LAB code, see what you think. It's in handhelds.org anoncvs, 
module linux/kernel26. Relevant crap is in bootldr/, drivers/bootldr/, and 
arch/arm/boot/.

> After I come back from my christmas vacation I am going to have to try
> it and see how will it will actually work.
Take care, have a nice vacation.

> Eric
/joshua

- -- 
Joshua Wise | www.joshuawise.com
GPG Key     | 0xEA80E0B3
Quote       | <lilo> I akilled *@* by mistake
In memoriam | Whiskers the hamster, 2001 - Dec 15, 2003
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/4lTWPn9tWOqA4LMRAnd3AKCRojCaS1dGk7BHmp9RTxkCNjo/7QCfVAel
7kuNSdKY2Y5lg9QAdwGP5BQ=
=qD9C
-----END PGP SIGNATURE-----




More information about the coreboot mailing list