ppc@

i have been interested in running kernel builds on
qemu ... but then hit a roadblock.

the OpenBSD macppc installXX.iso images would not boot
on the qemu included in ports (qemu-4.0.1).

a search revealed the sad state of affairs:
https://marc.info/?l=openbsd-tech&m=153450839802519

sharing here some information about 6.6-current. as it
is not all bad news :-)


6.6 and 6.6-current can run on qemu. i have been able
to make an installation to a RAW disk image on an amd64
host.


1) the commandline

$ qemu-system-ppc -M mac99 -cpu g4 -net none -usb \
-device usb-kbd -boot d -cdrom install66.iso

qemu documentation mentions
https://wiki.qemu.org/Documentation/Platforms/PowerPC

-M mac99,via=pmu
-M mac99,via=pmu-adb
-M mac99,via=cuda (default)

i could never get "via=pmu" to work

"via=pmu-adb" does not like to work unless "-nographic"
is used ... but this mixes the console with the tons
of error log from qemu (about the INTR). needs the
same coaxing of the kernel to work. in this case we
"disable 61" or ohci as there seems to be a conflict.

"via=cuda" (== -M mac99, with to extra strings) work
with the GUI but requires mapping USB devices. and some
extra work via "boot -c" 

the extra work requires us to disable "adb" ... so

boot -c
find adb
disable 103
quit

there are errors showing up for "gem" so "-net none"
i'm still reading up on the tun/tap/bridge interface
if it is usable.


2) RAMDISK vs GENERIC
RAMDISK image can fully boot ... but GENERIC reports a
stack smash! quite early during device probing. keyboard
not usable in the kernel debugger.

the clang kernels i made ... doesn't even show the
OpenBSD version string. goes to ddb. keyboard seems to be
usable.


3) booting and blessing
the firmware used by qemu does not seem to know MSDOS
partitions ... so it can not find ofwboot ... even the
normal OpenBSD/macppc install (1MB MSDOS part + OpenBSD
part) will not boot!

the installXX.iso is blessed with an HFS partition
courtesy of mkhybrid ... so the ISOs boot up properly.

to run my kernel builds ... i had to steal some code
from distrib/macppc/iso/Makefile and create my own ISO,
and modify bsd.tbxi to allow my bsd.gdb (that is now
on the ISO image) to run. if i need a rootdisk i issue
a "boot -c -a". 


may you find these info useful.



yorosiku ~

Reply via email to