Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 Mar 2012 07:50:45 +0100
From:      Milan Obuch <freebsd-ppc@dino.sk>
To:        Rob Ballantyne <robballantyne3@gmail.com>
Cc:        freebsd-ppc@freebsd.org
Subject:   Re: Question about bootup
Message-ID:  <20120306075045.5be555b9@zeta.dino.sk>
In-Reply-To: <CAKLrb5d=fos09L0fHY3Qdf4YRZ5FYBmHTV21iMzEybB65DpoSw@mail.gmail.com>
References:  <CAKLrb5d=fos09L0fHY3Qdf4YRZ5FYBmHTV21iMzEybB65DpoSw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 5 Mar 2012 22:24:36 -0800
Rob Ballantyne <robballantyne3@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120306075045.5be555b9>