"Eric W. Biederman" wrote:
>
>
> It occurs to me that we really have three stages of booting.
> stage1: Startup and turn on ram, branch to stage2. (It's in assembly)
> stage2: In C enable built in devices, and setup tables describing
> the hardware, branch to stage3.
> stage3: A kernel or a firmware bootloader.
>
Yea, for DoC + SiS630:
stage1 -> ipl.S
stage2 -> LinuxBIOS
stage3 -> Linux Kernel
>
> stage2 can be compressed. It can be relocated. It is where we
> start doing interesting things because we are in C and we do have
> memory turned on. Any interesting failsafe booting logic probably
> belongs here.
>
I am a litte bit confused with your mail about -fPIC -static,
can you make it more specific ??
> stage3 is the payload. The kernel or the firmware bootloader,
> and definentily should be compressed. stage3 should be shared
> between multiple hardware architectures.
>
> Though for stage3 we probably have:
> stage3/1 Do hardware initialization that stage3/2 doesn't yet
> know how to do, it's machine independant so somtimes
> it takes a while to get the latest drivers.
> stage3/2 The actual kernel of firmware bootloader.
>
> An interesting question is can we do partitions on the flash
> devices so we can safely update (at least stage3) indepenently
> of the others.
>
Gerenally speaking, this can be done. But most flash device have
different "erase region" size which makes a "uniform interface"
very diffcult.
Ollie
> Eric