Booting yaboot from OpenBIOS boot prompt under Qemu-system-ppc emulator

Benjamin Henrion bh at udev.org
Thu Feb 11 22:02:44 EST 2010


On Wed, Feb 10, 2010 at 10:57 PM, Paul Nasrat <pnasrat at googlemail.com> wrote:
> On 10 February 2010 19:49, Benjamin Henrion <bh at udev.org> wrote:
>> On Wed, Feb 10, 2010 at 8:26 PM, Paul Nasrat <pnasrat at googlemail.com> wrote:
>>> On 10 February 2010 18:04, Benjamin Henrion <bh at udev.org> wrote:
>>>> Hi,
>>>>
>>>> I am trying to boot a systemrescuecd ISO file for PPC:
>>>>
>>>> http://sourceforge.net/projects/systemrescuecd/files/sysresccd-ppc/0.2.0/sysresccd-ppc-0.2.0.iso/download
>>>>
>>>> With Qemu:
>>>>
>>>> /usr/bin/qemu-system-ppc -boot d -m 256 -cdrom
>>>> /home/zoobab/soft/systemrescuecd/sysresccd-ppc-0.2.0.iso -net
>>>> nic,vlan=0 -net user,vlan=0 -localtime -nographic
>>>>
>>>> Then I have the OpenBIOS boot prompt.
>>>
>>> What version of Qemu and what OF emulator/implementation is it using?
>>
>> Here it is:
>>
>> root at buzek /home/zoobab/soft [4]# /usr/bin/qemu-system-ppc --version
>> QEMU PC emulator version 0.11.0 (qemu-kvm-0.11.0), Copyright (c)
>> 2003-2008 Fabrice Bellard
>> root at buzek /tmp [44]# /usr/bin/qemu-system-ppc -cdrom
>> /home/zoobab/soft/systemrescuecd/sysresccd-ppc-0.2.0.iso -nographic
>> -boot d
>>>> =============================================================
>>>> OpenBIOS 1.0 [Nov 30 2009 23:14]
>>>> Configuration device id QEMU version 1 machine id 2
>>>> CPUs: 1
>>>> Memory: 128M
>>>> UUID: 00000000-0000-0000-0000-000000000000
>>>> CPU type PowerPC,750
>> Welcome to OpenBIOS v1.0 built on Nov 30 2009 23:14
>>
>>>> File not found
>>>> *** Boot failure! No secondary bootloader specified ***
>>
>
> OK this looks like it's likely to be an issue with the firmware
> support of qemu and how that works with the iso
>
> isodebug sysresccd-ppc-0.2.0.iso
> ISO-9660 image created at Tue Jul 20 03:27:17 2004
>
> Cmdline: 'mkisofs 2.01a28 -J -r -netatalk -hfs -probe -map
> boot/map.hfs -part -no-desktop -hfs-volid SRC -hfs-bless ./boot -o
> ../cool.iso .'
> [pnasrat at leonidas ~]$
>
> So this is built as a hfs hybrid volume which will work on an
> OpenFirmware that boots like a mac.
>
> sudo mount -o loop,ro sysresccd-ppc-0.2.0.iso /mnt/
> ls /mnt/boot/
> boot.msg  initrd.img.gz  map.hfs  ofboot.b  System.map  vmlinux
> yaboot  yaboot.conf  yaboot.conf.orig
>
> That all looks good, ofboot.b is correct for a mac.
>
> However booting into the firmware I can't do
>
> 0 > pwd /pci at 80000000/pci-ata at 3/ata-1 at 0,5/cdrom at 1 ok
> 0 > .properties
> name                      "cdrom"
> device_type               "block"
> #address-cells            1
> #size-cells               0
> reg                       1
>  ok
>
> 0 > boot /pci at 80000000/pci-ata at 3/ata-1 at 0,5/cdrom at 1:,\boot\yaboot
>>> *** Boot failure! No secondary bootloader specified ***
>  ok
> 0 > see boot
> : boot
>  linefeed parse cr " platform-boot" $find if
>  execute then
>  2drop cr " Booting " type type cr "   ... not supported on this
> system." type cr
>  ;
>  ok
> 0 > see platform-boot
> primword platform-boot
>  ok
>
> Poking around there are some aliases setup: This seems to give a
> different error though:
>
> 0 > boot cd:,\boot\ofboot.b
>
>>> Can't read ELF image header
>>> File not found
>>> *** Boot failure! No secondary bootloader specified ***
>  ok
>
> So I think this is what you want:
> 0 > boot cd:,\boot\yaboot
>
> Hope that helps.

Thanks, it works fine, but now the kernel hangs at this stage:

http://www.zoobab.com/qemu-hangs-booting-sysrescuecd-for-ppc

I wonder why...

-- 
Benjamin Henrion <bhenrion at ffii.org>
FFII Brussels - +32-484-566109 - +32-2-4148403
"In July 2005, after several failed attempts to legalise software
patents in Europe, the patent establishment changed its strategy.
Instead of explicitly seeking to sanction the patentability of
software, they are now seeking to create a central European patent
court, which would establish and enforce patentability rules in their
favor, without any possibility of correction by competing courts or
democratically elected legislators."


More information about the Yaboot-users mailing list