On Jan 26, 2018, at 3:32 AM, Jd Lyons firstname.lastname@example.org wrote:
On Jan 25, 2018, at 10:18 AM, Programmingkid email@example.com wrote:
On Jan 25, 2018, at 10:01 AM, Jd Lyons firstname.lastname@example.org 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:
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:
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?
Have you tried adding "-prom-env boot-args=-v" to QEMU's arguments yet?
Yes, I usually use -prom-env 'boot-args=-v debug=0xffe kdp=2’.
On a real PPC Mac BootX seems to give some extra debug in fo with command+V, tho most of the time it goes by so fast that it’s unreadable. Booting from a slower drive like USB yield the kind of info I’m looking for, to be able to tell at what stage BootX is hanging.
Unfortunately, this debug info is no sent to the screen, or stdio in OpenBios, or I just haven’t figured out how to do that yet.
There is another way to see what boots sends to the screen. That is to record the output of the screen. I use to do this when I had to read the output from Mac OS X when it was booting. I used Quicktime X to record the screen. Since you are on Linux there may be other options. You could take the output of your computer and send it to a a DVD recorder, VCR, DVR, Camcorder, etc... You might even want to try aiming your camera phone at the screen and record what Bootx is displaying.
https://itsfoss.com/best-linux-screen-recorders/ This page list several programs that can record your screen on Linux. I just don't think it would help on a PowerPC Mac.