Question about bootup
Milan Obuch
freebsd-ppc at dino.sk
Tue Mar 6 07:01:03 UTC 2012
On Mon, 5 Mar 2012 22:24:36 -0800
Rob Ballantyne <robballantyne3 at gmail.com> wrote:
> Hi All,
>
> I've been poking around trying to understand the boot up process of
> a ppc64 G5 machine.
>
Hi,
I think it is basically the same for G4 too :)
> I was slightly surprised to still find an Apple Partition map disk.
> I would have thought it was an ordinary fdisk (PC) partition setup.
>
This is most probably OpenFirmware (or implementation on machine in
question) dependency - at least on Apple's boxes ability to load kernel
from UFS filesystem in some newer version was removed.
> Let me see if I have it right:
>
> 1 - OpenFirmware (OFW) load Apple_Bootstrap/boot1.elf
Actually, there is Apple_Bootstrap/bootinfo.txt, a Forth wrapper script
which is loaded first and it loads boot1.elf.
> 2 - boot1.elf runs to gain enough to understand
> UFS filesystems and loads FreeBSD UFS partition /boot/loader
> 3 - loader loads /boot/kernel/kernel
>
> ... and we're off to the races.
>
> This strikes me as fairly simplistic so I'm sure there are more
> details. I'm curious about /boot/*.4th OpenFirmware forth code, for
> example. Is it involved in a substantial way?
>
I did not investigate here much, but as soon as /boot/kernel/loader is
called, it should work 'the usual way' as on any other platform, i.
e. /boot/*.4th files are used accordingly. Just a nit-pick, they have
no relation to OpenFirmware, all they have in common is they are
written in the same language. At least that's the way I understand it.
> The other thing I'm curious about is the Apple_Bootstrap partition.
> How is it written? I've discovered parteditor within the bsdinstall
> installer. I suspect that does it but it doesn't appear to let one
> write their own bootloader code image.
>
It is small partition in Apple's HFS format or whatever the acronym is
because it is the only format Apple's OpenFirmware understands now.
Basically, there are two files in it - bootinfo.txt and boot1.elf, in a
ppc directory. Both are already mentioned above.
> As I said mostly curiosity and trying to understand. If anyone has
> a few words of confirmation/advice I would be glad to hear them.
>
Well, I am not an expert, I am interested in this area too, trying to
understand, and be able to modify the boot process too. But as there
are some differences with what I already know, sometimes it is not
easy :)
Regards,
Milan
More information about the freebsd-ppc
mailing list