Port-macppc archive

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

problem booting NetBSD under qemu-system-ppc emulation



Hello

I'm trying to get NetBSD to boot up under the qemu powerpc system emulator. One 
of the machines they emulate is the 'g3beige'. It will boot PPC linuxes 
including debian and openSuse. I'm having a bit of trouble getting it to boot 
NetBSD though. 

I am running qemu-0.12.2 on ubuntu 9.04 on an x86 box. 

Here is what I have tried. 

qemu-system-ppc -cdrom NetBSD-5.0.1/iso/macppccd-5.0.1.iso -boot d

result: 0 > prompt that says 'ok' no matter what I type. 

qemu-system-ppc -fda NetBSD-5.0.1/macppc/installation/floppy/boot1.fs

result: 0 > prompt that says 'ok' no matter what I type

The farthest I have gotten is by making a fake CD image and trying to boot it. 
It has a 'spinner' run for a while and quits. Here is the output:

>>NetBSD/macppc OpenFirmware Boot, Revision 1.11
>>(builds%b7.netbsd.org@localhost, Wed Jul 29 21:44:51 UTC 2009)
call-method dma-alloc: exception -21
9081188+353964=0x8ffb64
 start=0x100000
font-adr:interpret: exception -13 caught

(font-adr apparently being from NetBSD's ofwboot.elf)

The method for creating the fake CD image is as follows. It is roughly adapted 
from a post by Joerg Maier on debian-powerpc mailing list

(http://lists.debian.org/debian-powerpc/2005/10/msg00074.html)

He has made a fake-cd for booting linux-ppc on qemu. 
I take what he has done then try to modify it to boot NetBSD, 
as if the QEMU virtual machine was 'dual booting'. I know
that many people will dualboot linux/NetBSD on 'real hardware' macs using 
yaboot, so I thought it might be worth a shot on QEMU. 

The directory structure of the fake CD is as follows:

invictus/
invictus/etc
invictus/etc/maps
invictus/boot
invictus/boot/yaboot.conf
invictus/boot/ofwboot.elf
invictus/boot/ofboot.b
invictus/boot/netbsd
invictus/boot/yaboot
invictus/boot/vmlinux
invictus/boot/initrd.img

etc/maps (i have no idea what this does) is as follows :
# EXTN   XLate   CREATOR   TYPE     Comment
.b              Raw     'UNIX'    'tbxi'   "bootstrap"
yaboot          Raw     'UNIX'    'boot'   "bootstrap"
linux           Raw     'UNIX'    'boot'   "kernel"
vmlinux         Raw     'UNIX'    'boot'   "kernel"
.conf           Raw     'UNIX'    'conf'   "bootstrap"
root.bin        Raw     'UNIX'    'root'   "root_image"
*               Raw     'UNIX     'UNIX'   "unix"

yaboot.conf is as follows:
device=cd:
default=ofwboot.elf
timeout=100

image=/boot/vmlinux
        root=/dev/hda3
        label=linux
        read-only
        initrd=/boot/initrd.img

image=/boot/ofwboot.elf
        label=ofwboot.elf
        append=/boot/netbsd

#end yaboot.conf

ofwboot.elf is copied from NetBSD-5.0.1/macppc/installation/

ofboot.b is as follows:
<CHRP-BOOT>
<COMPATIBLE>
MacRISC
</COMPATIBLE>
<DESCRIPTION>
Invictus
</DESCRIPTION>
<BOOT-SCRIPT>
" screen" output
load-base release-load-area
boot cd:,\boot\yaboot
</BOOT-SCRIPT>
</CHRP-BOOT>

#end ofboot.b

netbsd is copied from NetBSD-5.0.1/macppc/binary/kernel/netbsd-GENERIC_MD.gz 
kernel, then ungzipped

yaboot is a yaboot binary, copied out of a debian-ppc install

(vmlinux and initrd.img are there just for linux testing. they are both copied 
from a debian-ppc QEMU virtual image created by Aurelien Jarno at  
http://blog.aurel32.net/?p=46 )


The commands to make the CD:

mkisofs -hfs -part -map invictus/etc/maps -no-desktop -hfs-volid 
"invictus_Boot_CD" -hfs-bless invictus/boot -r -o invictus.iso invictus

The commands to run the CD:

qemu-system-ppc -cdrom ./invictus.iso -boot d

Thanks for reading!



Home | Main Index | Thread Index | Old Index