On 06/12/2016 05:38 PM, Mark Cave-Ayland wrote:
On 12/06/16 16:24, Cédric Le Goater wrote:
FYI, I had to specify the path of BootX to get running.
Oh great! Is this something that could be added to the list of paths OpenBIOS searches for an executable on boot? If you can suggest a suitable place in the ordering, the patch to add it is fairly trivial.
It is a pretty standard path :
-prom-env 'boot-device=hd:3,\System\Library\CoreServices\BootX'
Here are some traces below,
Cheers,
C.
============================================================= OpenBIOS 1.1 [Jun 9 2016 11:48] Configuration device id QEMU version 1 machine id 1 CPUs: 1 Memory: 1024M UUID: 00000000-0000-0000-0000-000000000000 CPU type PowerPC,G4
milliseconds isn't unique. Welcome to OpenBIOS v1.1 built on Jun 9 2016 11:48 Trying hd:,\:tbxi...
MAC-PARTS: macparts_probe 4552 ?= 4552 MAC-PARTS: macparts_open ',\:tbxi' MAC-PARTS: parstr: <NULL> argstr: \:tbxi parnum: -1 MAC-PARTS: want_bootcode 0 MAC-PARTS: macparts_open -1 MAC-PARTS: mac-parts: counted 4 partitions MAC-PARTS: found partition 1 type: Apple_partition_map with status 3 MAC-PARTS: found partition 2 type: Apple_Free with status 0 MAC-PARTS: found partition 3 type: Apple_HFS with status 40000033 MAC-PARTS: Located Apple OF fallback partition 3 MAC-PARTS: found partition 4 type: Apple_Free with status 0 MAC-PARTS: Selected partition 3 MAC-PARTS: mac-parts: about to probe for fs MAC-PARTS: mac-parts: done fs probe MAC-PARTS: mac-parts: filesystem found on partition 3 with ph fff51010 and args \:tbxi MAC-PARTS: macparts_seek 400: MAC-PARTS: macparts_seek parent offset 8008400: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 948a55c00: MAC-PARTS: macparts_seek parent offset 950a5dc00: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek d01000: MAC-PARTS: macparts_seek parent offset 8d09000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek ec9000: MAC-PARTS: macparts_seek parent offset 8ed1000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek eca000: MAC-PARTS: macparts_seek parent offset 8ed2000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a87e000: MAC-PARTS: macparts_seek parent offset 152886000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a87f000: MAC-PARTS: macparts_seek parent offset 152887000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a826000: MAC-PARTS: macparts_seek parent offset 15282e000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a827000: MAC-PARTS: macparts_seek parent offset 15282f000: MAC-PARTS: macparts_read search_files(): :tbxi MAC-PARTS: macparts_probe 4552 ?= 4552 MAC-PARTS: macparts_open ',\:tbxi' MAC-PARTS: parstr: <NULL> argstr: \:tbxi parnum: -1 MAC-PARTS: want_bootcode 0 MAC-PARTS: macparts_open -1 MAC-PARTS: mac-parts: counted 4 partitions MAC-PARTS: found partition 1 type: Apple_partition_map with status 3 MAC-PARTS: found partition 2 type: Apple_Free with status 0 MAC-PARTS: found partition 3 type: Apple_HFS with status 40000033 MAC-PARTS: Located Apple OF fallback partition 3 MAC-PARTS: found partition 4 type: Apple_Free with status 0 MAC-PARTS: Selected partition 3 MAC-PARTS: mac-parts: about to probe for fs MAC-PARTS: mac-parts: done fs probe MAC-PARTS: mac-parts: filesystem found on partition 3 with ph fff51010 and args \:tbxi MAC-PARTS: macparts_seek 400: MAC-PARTS: macparts_seek parent offset 8008400: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 948a55c00: MAC-PARTS: macparts_seek parent offset 950a5dc00: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek d01000: MAC-PARTS: macparts_seek parent offset 8d09000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek ec9000: MAC-PARTS: macparts_seek parent offset 8ed1000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek eca000: MAC-PARTS: macparts_seek parent offset 8ed2000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a87e000: MAC-PARTS: macparts_seek parent offset 152886000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a87f000: MAC-PARTS: macparts_seek parent offset 152887000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a826000: MAC-PARTS: macparts_seek parent offset 15282e000: MAC-PARTS: macparts_read MAC-PARTS: macparts_seek 14a827000:
Does installation of BootX bless "\System\Library\CoreServices\BootX" as the system folder at all? If not, then it won't be picked up by OpenBIOS. Perhaps on a real Mac the boot command containing the full path to BootX is updated in the NVRAM?
If BootX should always be used where it exists in preference to the blessed system folder, then possibly it should be added to the head of the boot list in arch/ppc/qemu/init.c line 980? Or would this break some boot scenarios?
the BootX file contains a bootloader text header :
<CHRP-BOOT> <COMPATIBLE> MacRISC MacRISC3 MacRISC4 </COMPATIBLE> <DESCRIPTION> Boot Loader for Mac OS X. </DESCRIPTION> <OS-BADGE-ICONS> 1010 00000000000000000000000000000000 000000000000000000000000F8000000 000000002B73732B0055735500F80000 00000000F5799DF6004F792B0000F800 0000000000F69D4E004F2B000000F800 000000000000559D2A55F500000000F8 000000000000F69D732B0000000000F8 000000000000004F96F50000000000F8 00000000000000799D4E0000000000F8 0000000000002AF8559D0000000000F8 00000000000079F6F59D4E00000000F8 00000000004E4F00005573000000F800 000000004F9D55F5004F9D4FF500F800 0000F800557A56F50055567A2BF80000 000000F8F8000000000000F8F8000000 0000000000F8F8F8F8F8F80000000000
0000000000F7F7F7F7F7F70000000000 000000F7F7F7F7F7F7F7F7F781000000 0000F7F7F99E9EF9F7809E80F7810000 00F7F7F7F8A4C856F77AA4F9F7F78100 00F7F7F7F756C879F77AF9F7F7F78100 F7F7F7F7F7F780C85580F8F7F7F7F781 F7F7F7F7F7F756C89EF9F7F7F7F7F781 F7F7F7F7F7F7F77AC1F8F7F7F7F7F781 F7F7F7F7F7F7F7A4C879F7F7F7F7F781 F7F7F7F7F7F7558180C8F7F7F7F7F781 F7F7F7F7F7F7A456F8C879F7F7F7F781 00F7F7F7F7797AF7F7809EF7F7F78100 00F7F7F77AC880F8F77AC87AF8F78100 000081F780A5FBF8F780FBA5F9810000 0000008181F7F7F7F7F7F78181000000 00000000008181818181810000000000
0000000000FFFFFFFFFFFF0000000000 000000FFFFFFFFFFFFFFFFFFFF000000 0000FFFFFFFFFFFFFFFFFFFFFFFF0000 00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 0000FFFFFFFFFFFFFFFFFFFFFFFF0000 000000FFFFFFFFFFFFFFFFFFFF000000 0000000000FFFFFFFFFFFF0000000000 </OS-BADGE-ICONS> <BOOT-SCRIPT> load-base begin dup 6 " </CHRP" $= if 6 + dup 6 " -BOOT>" $= if 8 + true else false then else 1+ false then until ( xcoff-base ) load-size over load-base - - ( xcoff-base xcoff-size ) load-base swap move init-program go </BOOT-SCRIPT> </CHRP-BOOT>
Then something that looks like a Mach-o ppc exe.
Is that something expected by OpenBIOS ?
C.