Booting from u-boot

Rafal Jaworowski raj at semihalf.com
Fri Jun 2 12:46:25 PDT 2006


Peter Grehan wrote:
>> I was thinking of writing an openfirmware emulator code
>> that will map the information given by u-boot to the format
>> expected by the freebsd openfirmware code. In other words,
>> implement the 'openfirmware' function in the kernel itself
>> and use it.
> 
>  That is an interesting approach, though you may end up doing
> just as much work in writing the emulation code as if you
> removed the dependency on openfirmware in the kernel.
> 

I would agree with what Peter says - and it's not particularly difficult 
to divorce the kernel from OF and bind it to something else instead. I 
did this sort of thing while doing a FreeBSD port to an MCP750 
CompactPCI board which had Motorola's PPCBug firmware.

One of the things you could also consider would be not booting the 
kernel directly off U-Boot but getting the 3rd stage loader(8) run 
first, so you could pass the kernel env in the native way (that's what I 
did on the PPCBug) and generally have the kernel in the form it normally 
is produced with buildkernel (and not prepend it with U-Boot header 
etc.). Having said that I'd be actually very interested in your making 
the FreeBSD kernel compliant with U-Boot and be able to run it directly.

>> Has anyone done this before?
> 
>  Not to my knowledge.
> 

We ported U-Boot to many h/w platforms and know it pretty well, also 
brought FreeBSD to this compactPCI board, so might help you somehow.

What device are you using?

Rafal


More information about the freebsd-ppc mailing list