[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBM Maple platform: Booting yaboot



On Wed, 2005-10-12 at 16:04 +0200, jfaslist wrote:
> Hi,
> I am using the IBM Maple reference platftorm (dual ppc64 IBM 970FX CPU).
> http://www.970eval.com/
> This board is using a firmware called PIBS that has OpenFirmware 
> extension (builds an OF tree and provides call-backs for yaboot).


> On our final platform we will need to be able to boot from the SCSI bus. 
> So I have written a scsi driver for the PIBS firmware as this wasn't 
> supported.

One assumes this conforms to IEEE1275 1994.

> Does it mean the yaboot I need to load and run is /usr/lib/yaboo/yaboot? 
> This is an ELF32 ppc which seems OK.

Not entirely - when you run ybin it grabs the binary
from /usr/lib/yaboot/yaboot, runs addnote on it and will in this case
place assume it goes onto a PReP Boot partition (0x41) which is likely
to be the first primary partition on the disk.

See:

http://playground.sun.com/1275/bindings/prep/prepd0_3.ps

> My problem is that I need to implement in my firmware scsi driver a 
> layer that undertands linux ext3 partitions,  so that I can reach these 
> files.  I don't mind doing it if this is the right approach but prefer 
> to check first.

Can't you use a PReP Boot partition?  In an ideal world ext2-files would
be a common OF package but sadly that's not the case.

> In short I would do the following to boot the scsi hard disk:
> 
> -fetch the MBR (partition table) from the hard disk at offset 0x1be. 

Handled by OF disk-label package

> The 
> table points to the linux ext3 partitions /boot(/dev/sda1)  and / 
> (/dev/sda2)

If you have a PReP partition here first before the ext3 boot and / then
it should just work.

> -locate the /boot partition and load the /boot/etc/yaboot.conf file.

Yaboot scans the partition table and will open /etc/yaboot.conf on each
device so yes this will happen.

> -read that file and load the file that is referenced in the install 
> entry (like install=/usr/lib/yaboot/yaboot).

No - yaboot is already loaded at this point - yaboot.conf is used by
both ybin (the installer of yaboot) and yaboot.  I think you are just
confused by the early entries which are directed at ybin which yaboot
ignores.

> -yaboot will load  the linix kernel and initrd and I am done.

Now yaboot reads the conf file and has kernel/initrd target and will
boot a default (or top entry) or one that you select.

> Does it seem correct?
> Also I am not sure if I need to use the file "ofboot". In fact I don't 
> understand what is it for?

Don't worry about ofboot, it's basically a CHRP script and not relevant
for PReP booting.

If you are on #ppc64 on freenode feel free to grab me (nasrat) to
discuss in more depth.

Paul