On Jan 25, 2018, at 4:52 PM, Mark Cave-Ayland mark.cave-ayland@ilande.co.uk wrote:
On 25/01/18 15:01, Jd Lyons via OpenBIOS wrote:
In an effort to figure out why qemu-system-ppc hangs at BootX when using some emulated and KVM CPU’s, I suppose it would be good to enter some breakpoints in the code. I found some BootX sources at: https://opensource.apple.com/tarballs/BootX/ Tho I’m not sure what versions correspond to which release of OS X? And it’s not clear how to build them, tho I haven’t tried yet. I found some info on BootX as well as some idea how to do what I’m looking to do: https://people.ffii.org/~zoobab/bh.udev.org/filez/apple/mac6100/BootX.pdf *There are few other useful debugging tech- niques. Setting "auto-boot?" to false will cause the system to enter the OpenFirmware User In- terface by default. Changing kFailToBoot to 0 in include.tproj/sl.h will alter BootX’s default be- havior on error, so that it will return to Open- Firmware. Finally, calling Enter(), will cause BootX to drop back into the OpenFirmware User **Interface. This can be used as a break point. The "dumpl" word will dump some memory, by en- tering the address, then the length, then "dumpl". By calling printf in BootX immediately before En- ter(), the address can be easily determined, and the variable can then be examined and altered from OpenFirmware. Finally typing the "go" command will resume BootX’s execution. * I noted when I boot from boot usb0/disk:3,\:tbxi while holding command+v BootX sends some info to the screen, seemingly via open firware, while displaying the “Apple Logo” boot graphic. The info show some of the boot process and what stage it’s loading” loading mach_kernel’ “ loading the .mkext” It would be nice to get this output going via Open Bios, if anyone has any idea how I might be able to do that?
Steve Troughton-Smith has previously custom built BootX from source in order to boot older versions of Rhapsody (see https://www.emaculation.com/forum/viewtopic.php?f=34&t=7047&start=13... and https://github.com/steventroughtonsmith/BootX for more information).
If the instructions in the forum post don't give enough detail then it might be worth a direct email?
ATB,
Mark.
Thanks Mark, I’ve tried Steve’s custom BootX to boot from the 10.1 cd, but it yields the same result with BootX just hanging, and no useful debug output.
I raised the issue with Steve last year, that BootX would hang with the emulated 970 CPU in qemu-system-ppc64, and he did reply that it maybe the issue he addressed in his custom bootx, tho my attempts didn’t yield any better results. His version of BootX isn’t valid for versions of the kernel beyond 10.1, so there e is no support for the G5.
The 604. G3, 7400, 7410 seem to be the only valid cpu choice that can boot a stock BootX/mach_kernel in qemu-system-ppc, I did use a custom kernel that had been modified to allow 10.4.8 to boot on the 604 cpu, and with that kernel, I was able to boot with these cpu’s as well as the 7448.
Yahboot/Linux PPC, seems to be unaffected by this issue. I’ve had no trouble installing and booting linux within qemu-syustem-ppc with any cpu I’ve tried, or added to Openbios.
I added a few more CPU’s to Openbios, tho with some odd results. With the same .elf on the x86 the 7450 and 7455 seem to hang Openbios, system never boots. Tho on ppc with kvm selecting these cpu’s yields booting, and openbios has no trouble with them, tho bootx just hangs. When I remove the kvm option openbios fails to boot, same as it does on these cpu’s on x86.
Haven’t figured that issue yet.