On Jan 26, 2018, at 10:37 AM, Programmingkid programmingkidx@gmail.com wrote:
On Jan 26, 2018, at 3:32 AM, Jd Lyons lyons_dj@yahoo.com wrote:
On Jan 25, 2018, at 10:18 AM, Programmingkid programmingkidx@gmail.com wrote:
On Jan 25, 2018, at 10:01 AM, Jd Lyons lyons_dj@yahoo.com 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?
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.
Here is what is happening with the emulated 7448( failed boot ):
/home/jam/Tiger/qemu-install/bin/qemu-system-ppc -M mac99 -m 768 -cpu 7410 -hda '/home/jam/os9/Tiger.img' -bios '/home/jam/Documents/openbios-qemu.elf' -netdev user,id=mynet0 -device sungem,netdev=mynet0 -prom-env 'auto-boot?=false' -cpu 7448 -nographic
============================================================= OpenBIOS 1.1 [Jan 22 2018 11:12] Configuration device id QEMU version 1 machine id 1 CPUs: 1 Memory: 768M UUID: 00000000-0000-0000-0000-000000000000 CPU type PowerPC,MPC86xx
milliseconds isn't unique. Welcome to OpenBIOS v1.1 built on Jan 22 2018 11:12
0 > boot hd:10,\ppc\bootx >> switching to new context:
Mac OS X Loader depthbytes isn't unique. rowbytes isn't unique. FILL-RECTANGLE isn't unique. Opening partition [/pci@f2000000/mac-io@c/ata-3@20000/disk@0:10]... HFSInitPartition: 2fc5b254 Loading HFS+ file: [\com.apple.Boot.plist] from 2fc5b254. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 Reading HFS+ file: [\mach_kernel] from 2fc5b254. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 Loading HFS+ file: [\System\Library\Caches\com.apple.kernelcaches\kernelcache.D57A14F7] from 2fc5b254.
Call Kernel! FailToBoot: 6 ENTER
Here is a successful boot on a 7410:
/home/jam/Tiger/qemu-install/bin/qemu-system-ppc -M mac99 -m 768 -cpu 7410 -hda '/home/jam/os9/Tiger.img' -bios '/home/jam/Documents/openbios-qemu.elf' -netdev user,id=mynet0 -device sungem,netdev=mynet0 -prom-env 'auto-boot?=false' -cpu 7410 -nographic -prom-env 'boot-args= -v debug=0xffe kdp=2'
============================================================= OpenBIOS 1.1 [Jan 22 2018 11:12] Configuration device id QEMU version 1 machine id 1 CPUs: 1 Memory: 768M UUID: 00000000-0000-0000-0000-000000000000 CPU type PowerPC,74xx
milliseconds isn't unique. Welcome to OpenBIOS v1.1 built on Jan 22 2018 11:12
0 > boot hd:10,\ppc\bootx >> switching to new context:
Mac OS X Loader depthbytes isn't unique. rowbytes isn't unique. FILL-RECTANGLE isn't unique. Opening partition [/pci@f2000000/mac-io@c/ata-3@20000/disk@0:10]... HFSInitPartition: 2fc5b250 Loading HFS+ file: [\com.apple.Boot.plist] from 2fc5b250. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 Reading HFS+ file: [\mach_kernel] from 2fc5b250. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 Loading HFS+ file: [\System\Library\Caches\com.apple.kernelcaches\kernelcache.D57A14F7] from 2fc5b250.
Call Kernel! Trying to read invalid spr 1015 (0x3f7) at 00092744 kprintf initialized max_mem: 768 M version_variant = 0 version = Darwin Kernel Version 8.11.0: Wed Oct 10 18:26:00 PDT 2007; root:xnu-792.24.17~1/RELEASE_PPC
proc version = 800c1104 initialize_screen: b=00000000, w=00000000, h=00000000, r=00000000 initialize_screen: No video - forcing serial mode standard timeslicing quantum is 10000 us pmap_steal_memory: 00AAE000 - 00AAF000; size=00001000 pmap_steal_memory: 00AAF000 - 00BB2000; size=00103000 pmap_steal_memory: 00BB2000 - 00BB5000; size=00003000 pmap_steal_memory: 00BB5000 - 00CB5000; size=00100000 pmap_steal_memory: 00CB5000 - 014B0694; size=007FB694 vm_page_bootstrap: 190223 free pages mig_table_max_displ = 70
And here is a failed boot on an emulated 970:
qemu-system-ppc64 -M mac99 -m 768 -hda '/home/jam/os9/Tiger.img' -bios '/home/jam/Documents/openbios-qemu.elf' -netdev user,id=mynet0 -prom-env 'auto-boot?=false' -cpu 970 -nographic Warning: netdev mynet0 has no peer
============================================================= OpenBIOS 1.1 [Jan 22 2018 11:12] Configuration device id QEMU version 1 machine id 3 CPUs: 1 Memory: 768M UUID: 00000000-0000-0000-0000-000000000000 CPU type PowerPC,970
milliseconds isn't unique. Welcome to OpenBIOS v1.1 built on Jan 22 2018 11:12
0 > boot hd:10,\ppc\bootx >> switching to new context:
Mac OS X Loader depthbytes isn't unique. rowbytes isn't unique. FILL-RECTANGLE isn't unique. Opening partition [/pci@f0000000/mac-io@c/ata-3@20000/disk@0:10]... HFSInitPartition: 2fc5b250 Loading HFS+ file: [\com.apple.Boot.plist] from 2fc5b250. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 non-root file owner detected: 501 Reading HFS+ file: [\mach_kernel] from 2fc5b250. setting boot-uuid to: CF9C6A60-A576-362A-A46B-5CF31493B8F0 non-root file owner detected: 501 Reading HFS+ file: [\mach_kernel] from 2fc5b250. Reading HFS+ file: [\mach_kernel] from 2fc5b250. FileLoadDrivers: Loading from [/pci@f0000000/mac-io@c/ata-3@20000/disk@0:10,\System\Library\Extensions.mkext] Reading HFS+ file: [\System\Library\Extensions.mkext] from 2fc5b250. Reading HFS+ file: [\System\Library\Extensions.mkext] from 2fc5b250.
Call Kernel! Trying to write invalid spr 276 (0x114) at 00000000000afc14 Trying to read invalid spr 277 (0x115) at 00000000000afc18 Trying to read invalid spr 276 (0x114) at 00000000000afc1c Trying to write invalid spr 277 (0x115) at 00000000000afc38 Trying to write invalid spr 276 (0x114) at 00000000000afc3c Trying to read invalid spr 276 (0x114) at 00000000000afc40 Trying to write invalid spr 277 (0x115) at 00000000000afcec Trying to write invalid spr 276 (0x114) at 00000000000afcf0 Trying to read invalid spr 276 (0x114) at 00000000000afcf4 Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c Trying to write invalid spr 304 (0x130) at 0000000000003d28 Trying to read invalid spr 304 (0x130) at 0000000000003d4c
https://itsfoss.com/best-linux-screen-recorders/ 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. -- OpenBIOS http://openbios.org/ http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you