Help regarding the second stage loader

Peter Grehan grehan at freebsd.org
Wed Apr 11 02:15:04 UTC 2007


Hi Vinay,

 > Ok, so if I understand it correctly, the
> code under sys/boot/powerpc need not always execute..
> is that right? What I mean is, suppose if we chose to
> boot with, say yaboot, then is it absolutely necessary
> to execute this second level loader as well _OR_ is
> this only required if we need some different type of
> image than what yaboot provides (for ex, in Linux-
> u-boot provides uImage, so if we need some other type
> of linux image, say zImage, then only this second
> loader is required). So, is the concept same here?

  I think that's right. If yaboot could load the FreeBSD ELF kernel at 
the correct address, and even better if it could drop down metadata in 
the same format as the FreeBSD loader, then no second-stage loader would 
be required.

  However, if not, then yaboot could be used to load the FreeBSD 
second-stage loader, which would then load the kernel. There may still 
be issues with this since the FreeBSD loader uses OpenFirmware for i/o 
and memory allocation, and needs to be loaded at the correct address.

> Also, is the code compiled by sys/boot/powerpc
> directory part of the final FreeBSD PPC kernel image?

  No, it's the standalone loader - the kernel is separate.

later,

Peter.


More information about the freebsd-ppc mailing list