Current trunk (1075) lists some files and doesn't boot at all
Welcome to OpenBIOS v1.0 built on Nov 30 2012 19:55 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > boot cd:,\:tbxi >> Not a bootable ELF image No valid state has been set by load or init-program ok 0 > dir cd:9,\ 73728 2002-07-18 08:21:48 Desktop DB 0 2002-07-18 08:21:49 Desktop DF 0 2002-07-18 08:21:49 Finder 0 2002-07-18 08:21:49 OSXBoot! 0 2002-07-18 08:21:50 System 1778 2002-07-18 08:21:49 Where_have_all_my_files_gone? ok 0 > boot cd:9,\:tbxi No valid state has been set by load or init-program ok 0 >
After testing with this patch: http://lists.openbios.org/pipermail/openbios/2011-August/006618.html I have better results
Welcome to OpenBIOS v1.0 built on Nov 30 2012 20:00 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > boot cd:,\:tbxi >> Not a bootable ELF image No valid state has been set by load or init-program ok 0 > dir cd:9,\ 82 2002-07-24 17:47:43 ._Welcome to Mac OS X 6148 2002-07-31 23:59:42 .DS_Store 0 2002-07-31 23:59:37 .Trashes\ 0 2002-07-29 03:06:27 .vol\ 0 2002-07-30 10:00:25 Applications\ 0 2002-07-31 23:43:08 bin\ 5120 2002-07-31 23:59:40 Desktop DB 25410 2002-07-31 23:59:40 Desktop DF 0 2002-07-15 06:20:41 dev\ 11 2002-07-31 23:57:11 etc 0 2002-07-30 10:14:44 Library\ 11 2002-07-31 23:57:11 mach 3678188 2002-07-28 20:19:43 mach_kernel 0 2002-07-30 10:57:00 private\ 0 2002-07-31 23:41:16 sbin\ 0 2002-07-30 10:57:38 System\ 11 2002-07-31 23:58:55 tmp 0 2002-07-30 10:03:14 usr\ 11 2002-07-31 23:58:58 var 0 2002-07-29 03:06:27 Volumes\ 0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\ ok 0 > boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img Command (? for help): p /home/amade/emu/Mac OS 10.2 (Disc 1).img # type name length base ( size ) system /home/amade/emu/Mac OS 10.2 (Disc 1).img1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /home/amade/emu/Mac OS 10.2 (Disc 1).img2 Apple_Driver43 Macintosh 56 @ 64 ( 28.0k) Driver 4.3 /home/amade/emu/Mac OS 10.2 (Disc 1).img3 Apple_Driver43_CD Macintosh 140 @ 120 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img4 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img5 Apple_Driver_ATAPI Macintosh 56 @ 260 ( 28.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img6 Apple_Driver_ATAPI Macintosh 140 @ 316 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img7 Apple_Patches Patch Partition 512 @ 456 (256.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img8 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img9 Apple_HFS Mac_OS_X 1278432 @ 968 (624.2M) HFS /home/amade/emu/Mac OS 10.2 (Disc 1).img10 Apple_Free 45656 @ 1279400 ( 22.3M) Free space
Block size=2048, Number of Blocks=331264 DeviceType=0x1, DeviceId=0x1 Drivers- 1: @ 16 for 5, type=0x1 2: @ 30 for 25, type=0xffff 3: @ 65 for 5, type=0x701 4: @ 79 for 31, type=0xf8ff
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are 1. "boot cd:,\:tbxi" should do some kind of search through partitions 2. later in boot process it goes through partitions 0,1,2 seemingly from comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
Amadeusz
On Nov 30, 2012, at 4:09 PM, Amadeusz Sławiński wrote:
Current trunk (1075) lists some files and doesn't boot at all
0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\
ok 0 > boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are
- "boot cd:,\:tbxi" should do some kind of search through partitions
- later in boot process it goes through partitions 0,1,2 seemingly from
comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
Did you try out my patch I sent to the list today? It fixes the problems with dir cd:,\ not working. It also fixes boot cd:,\:tbxi.
Could you take the GSOC patch, and submit it as your own patch? You seem to have the best luck with it. Remember to add this line to the email: submitted-by: Amadeusz Sławiński amade@asmblr.net. The original author told me it is ok to use his patches.
On Fri, Nov 30, 2012 at 04:25:48PM -0500, Programmingkid wrote:
On Nov 30, 2012, at 4:09 PM, Amadeusz Sławiński wrote:
Current trunk (1075) lists some files and doesn't boot at all
0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\
ok 0 > boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are
- "boot cd:,\:tbxi" should do some kind of search through partitions
- later in boot process it goes through partitions 0,1,2 seemingly from
comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
Did you try out my patch I sent to the list today? It fixes the problems with dir cd:,\ not working. It also fixes boot cd:,\:tbxi.
Yes with your patch it seems to work correctly
Welcome to OpenBIOS v1.0 built on Nov 30 2012 21:37 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > dir cd:,\ 82 2002-07-24 17:47:43 ._Welcome to Mac OS X 6148 2002-07-31 23:59:42 .DS_Store 0 2002-07-31 23:59:37 .Trashes\ 0 2002-07-29 03:06:27 .vol\ 0 2002-07-30 10:00:25 Applications\ 0 2002-07-31 23:43:08 bin\ 5120 2002-07-31 23:59:40 Desktop DB 25410 2002-07-31 23:59:40 Desktop DF 0 2002-07-15 06:20:41 dev\ 11 2002-07-31 23:57:11 etc 0 2002-07-30 10:14:44 Library\ 11 2002-07-31 23:57:11 mach 3678188 2002-07-28 20:19:43 mach_kernel 0 2002-07-30 10:57:00 private\ 0 2002-07-31 23:41:16 sbin\ 0 2002-07-30 10:57:38 System\ 11 2002-07-31 23:58:55 tmp 0 2002-07-30 10:03:14 usr\ 11 2002-07-31 23:58:58 var 0 2002-07-29 03:06:27 Volumes\ 0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\ ok 0 > boot cd:,\:tbxi call-method slw_update_keymap: exception -21
Could you take the GSOC patch, and submit it as your own patch? You seem to have the best luck with it. Remember to add this line to the email: submitted-by: Amadeusz Sławiński amade@asmblr.net. The original author told me it is ok to use his patches.
I wonder if it can be done this way, can anyone else comment on this?
On Fri, Nov 30, 2012 at 9:47 PM, Amadeusz Sławiński amade@asmblr.net wrote:
On Fri, Nov 30, 2012 at 04:25:48PM -0500, Programmingkid wrote:
On Nov 30, 2012, at 4:09 PM, Amadeusz Sławiński wrote:
Current trunk (1075) lists some files and doesn't boot at all
0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\
ok 0 > boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are
- "boot cd:,\:tbxi" should do some kind of search through partitions
- later in boot process it goes through partitions 0,1,2 seemingly from
comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
Did you try out my patch I sent to the list today? It fixes the problems with dir cd:,\ not working. It also fixes boot cd:,\:tbxi.
Yes with your patch it seems to work correctly
Welcome to OpenBIOS v1.0 built on Nov 30 2012 21:37 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > dir cd:,\ 82 2002-07-24 17:47:43 ._Welcome to Mac OS X 6148 2002-07-31 23:59:42 .DS_Store 0 2002-07-31 23:59:37 .Trashes\ 0 2002-07-29 03:06:27 .vol\ 0 2002-07-30 10:00:25 Applications\ 0 2002-07-31 23:43:08 bin\ 5120 2002-07-31 23:59:40 Desktop DB 25410 2002-07-31 23:59:40 Desktop DF 0 2002-07-15 06:20:41 dev\ 11 2002-07-31 23:57:11 etc 0 2002-07-30 10:14:44 Library\ 11 2002-07-31 23:57:11 mach 3678188 2002-07-28 20:19:43 mach_kernel 0 2002-07-30 10:57:00 private\ 0 2002-07-31 23:41:16 sbin\ 0 2002-07-30 10:57:38 System\ 11 2002-07-31 23:58:55 tmp 0 2002-07-30 10:03:14 usr\ 11 2002-07-31 23:58:58 var 0 2002-07-29 03:06:27 Volumes\ 0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\ ok 0 > boot cd:,\:tbxi call-method slw_update_keymap: exception -21
Could you take the GSOC patch, and submit it as your own patch? You seem to have the best luck with it. Remember to add this line to the email: submitted-by: Amadeusz Sławiński amade@asmblr.net. The original author told me it is ok to use his patches.
I wonder if it can be done this way, can anyone else comment on this?
The original author must add the Signed-off-by: line. Then you could add for example Tested-by: tag.
-- OpenBIOS http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you
I tested how real machine (PowerMac G5) behaves
dir cd:,\ dir cd:9,\ should list files other (dir cd:1,\ etc) shouldn't work
boot cd:,\:tbxi boot cd:9,\:tbxi should try booting (the rest should also do nothing)
Amadeusz
On 01/12/12 14:09, Amadeusz Sławiński wrote:
I tested how real machine (PowerMac G5) behaves
dir cd:,\ dir cd:9,\ should list files other (dir cd:1,\ etc) shouldn't work
boot cd:,\:tbxi boot cd:9,\:tbxi should try booting (the rest should also do nothing)
Amadeusz
Oh so you have a real Mac at hand? That would be really useful to compare the output of verbose boot between your screenshots and the output on a real Mac. It may provide some insight into the partition numbering issues.
ATB,
Mark.
On Mon, Dec 03, 2012 at 08:34:53PM +0000, Mark Cave-Ayland wrote:
On 01/12/12 14:09, Amadeusz Sławiński wrote:
I tested how real machine (PowerMac G5) behaves
dir cd:,\ dir cd:9,\ should list files other (dir cd:1,\ etc) shouldn't work
boot cd:,\:tbxi boot cd:9,\:tbxi should try booting (the rest should also do nothing)
Amadeusz
Oh so you have a real Mac at hand? That would be really useful to compare the output of verbose boot between your screenshots and the output on a real Mac. It may provide some insight into the partition numbering issues.
ATB,
Mark.
Not entirely at hand, but I can have access if necessary. However what seems mostly targeted as boot target is G3 (-machine g3beige) in qemu, so there may be some differences (isn't G5 64bit?).
I tried booting Max OS X 10.2 using (boot cd:,\:tbxi) but iirc it didnt like CHRP,
I also found Mac OS X 10.4 Upgrade DVD, so we can test another version, it's boot messages on real hardware look a bit different from older versions (emulated), but I think it's caused by newer XNU.
Trying OS X 10.4 on current trunk (modified to use cd:,\:tbxi syntax) it stops similarly to others versions printing: call-method slw_update_keymap: exception -21
However in qemu with GSOC patched openbios it stops after printing "Mac OS X Loader"
DEBUG_CIF log from booting GSOC patched version: 0 > boot cd:,\:tbxi >> finddevice("/openprom") = 0xfff42964
getprop(0xfff42964, "model", 0x05663bb8, 255) = 15 0x05663bb8 4f 70 65 6e 46 69 72 6d 77 61 72 65 20 33 00 __ OpenFirmware 3. peer(0x00000000) = 0xfff427a4 getprop(0xfff427a4, "#address-cells", 0x0565becc, 4) = 4 0x0565becc 00 00 00 01 __ __ __ __ __ __ __ __ __ __ __ __ .... peer(0x00000000) = 0xfff427a4 getprop(0xfff427a4, "#size-cells", 0x0565bed0, 4) = 4 0x0565bed0 00 00 00 01 __ __ __ __ __ __ __ __ __ __ __ __ .... of_client_interface: interpret 0561656c interpret hex unselect-dev " /packages" find-device new-device " sl_words" device-name : open true ; : close ; 0 value outputLevel : slw_set_output_level dup 0= if 0 stdout ! then to outputLevel ; : slw_emit 2 outputLevel <= if emit else drop then ; : slw_cr 2 outputLevel <= if cr then ; 0 value keyboardIH 20 buffer: keyMap : slw_init_keymap to keyboardIH keyMap dup 20 0 fill ; : slw_update_keymap { ; dpth } depth -> dpth keyboardIH if " get-key-map" keyboardIH $call-method depth dpth - 1 = if 20 then 4 / 0 do dup i 4 * + l@ keyMap i 4 * + tuck l@ or swap l! loop drop then ; 0 value screenIH 0 value cursorAddr 0 value cursorX 0 value cursorY 0 value cursorW 0 value cursorH 0 value cursorFrames 0 value cursorPixelSize 0 value cursorStage 0 value cursorTime 0 value cursorDelay : slw_spin screenIH 0<> cursorAddr 0<> and if get-msecs dup cursorTime - cursorDelay >= if to cursorTime slw_update_keymap cursorStage 1+ cursorFrames mod dup to cursorStage handle_calls return: 00000000 1fc5afe0 finddevice("/options") = 0xfff42b0c finddevice("/chosen") = 0xfff42b84 of_client_interface: interpret 05612bcc interpret dev /chosen new-device " memory-map" device-name active-package device-end ([1] -- [2]) handle_calls return: 00000000 fff50128 getprop(0xfff42b84, "mmu", 0x0565bee8, 4) = 4 0x0565bee8 1f c5 a7 90 __ __ __ __ __ __ __ __ __ __ __ __ .ŧ. getprop(0xfff42b84, "memory", 0x0565beec, 4) = 4 0x0565beec 1f c5 ad a8 __ __ __ __ __ __ __ __ __ __ __ __ .ŭ¨ peer(0x00000000) = 0xfff427a4 of_client_interface: interpret 05616cb0 fff427a4 0000000a 0561295c interpret get-package-property if 0 0 then ([4] -- [3]) handle_calls return: 00000000 00000024 fff4f3fc getprop(0xfff42b84, "stdout", 0x0565bef0, 4) = 4 0x0565bef0 1f c5 ae a8 __ __ __ __ __ __ __ __ __ __ __ __ .٨ instance-to-package(0x1fc5aea8) = 0xfff4e538 getprop(0xfff42b84, "stdin", 0x0565bef4, 4) = 4 0x0565bef4 1f c5 af ac __ __ __ __ __ __ __ __ __ __ __ __ .ů¬ instance-to-package(0x1fc5afac) = 0xfff4e538 getprop(0xfff4e538, "name", 0x05663d08, 31) = 5 0x05663d08 63 68 2d 62 00 __ __ __ __ __ __ __ __ __ __ __ ch-b. open("keyboard") = 0x00000000 open("kbd") = 0x00000000 of_client_interface: call-method 05616c70 1fc5afe0 00000000 call-method slw_init_keymap ([3] -- [2]) handle_calls return: 00000000 fff4fbc0 of_client_interface: call-method 05616c80 1fc5afe0 call-method slw_update_keymap ([2] -- [1]) handle_calls return: 00000000 getprop(0xfff42b0c, "security-mode", 0x05663d28, 32) = -1 of_client_interface: call-method 05616c58 1fc5afe0 00000000 call-method slw_set_output_level ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b68 1fc5afe0 call-method slw_cr ([2] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b68 1fc5afe0 call-method slw_cr ([2] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 0000004d call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000061 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000063 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000020 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 0000004f call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000053 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000020 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000058 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000020 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 0000004c call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 0000006f call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000061 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000064 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000065 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b70 1fc5afe0 00000072 call-method slw_emit ([3] -- [1]) handle_calls return: 00000000 of_client_interface: call-method 05613b68 1fc5afe0 call-method slw_cr ([2] -- [1]) handle_calls return: 00000000 getprop(0xfff42b0c, "boot-image", 0x0565acc8, 255) = -1 claim(0x05000000, 4194304, 0) = 0x05000000 claim(0x05400000, 2097152, 0) = 0x05400000 claim(0x04000000, 16777216, 0) = 0x04000000 claim(0x00004000, 67092480, 0) = 0x00004000
On 03/12/12 23:18, Amadeusz Sławiński wrote:
Not entirely at hand, but I can have access if necessary. However what seems mostly targeted as boot target is G3 (-machine g3beige) in qemu, so there may be some differences (isn't G5 64bit?).
I tried booting Max OS X 10.2 using (boot cd:,\:tbxi) but iirc it didnt like CHRP,
I also found Mac OS X 10.4 Upgrade DVD, so we can test another version, it's boot messages on real hardware look a bit different from older versions (emulated), but I think it's caused by newer XNU.
Trying OS X 10.4 on current trunk (modified to use cd:,\:tbxi syntax) it stops similarly to others versions printing: call-method slw_update_keymap: exception -21
Right. I'd expect this to happen because get-key-map has not yet been implemented in trunk.
ATB,
Mark.
On 30/11/12 21:09, Amadeusz Sławiński wrote:
Current trunk (1075) lists some files and doesn't boot at all
Welcome to OpenBIOS v1.0 built on Nov 30 2012 19:55 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0> boot cd:,\:tbxi>> Not a bootable ELF image No valid state has been set by load or init-program ok 0> dir cd:9,\ 73728 2002-07-18 08:21:48 Desktop DB 0 2002-07-18 08:21:49 Desktop DF 0 2002-07-18 08:21:49 Finder 0 2002-07-18 08:21:49 OSXBoot! 0 2002-07-18 08:21:50 System 1778 2002-07-18 08:21:49 Where_have_all_my_files_gone? ok 0> boot cd:9,\:tbxi No valid state has been set by load or init-program ok 0>
After testing with this patch: http://lists.openbios.org/pipermail/openbios/2011-August/006618.html I have better results
Welcome to OpenBIOS v1.0 built on Nov 30 2012 20:00 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0> boot cd:,\:tbxi>> Not a bootable ELF image No valid state has been set by load or init-program ok 0> dir cd:9,\ 82 2002-07-24 17:47:43 ._Welcome to Mac OS X 6148 2002-07-31 23:59:42 .DS_Store 0 2002-07-31 23:59:37 .Trashes\ 0 2002-07-29 03:06:27 .vol\ 0 2002-07-30 10:00:25 Applications\ 0 2002-07-31 23:43:08 bin\ 5120 2002-07-31 23:59:40 Desktop DB 25410 2002-07-31 23:59:40 Desktop DF 0 2002-07-15 06:20:41 dev\ 11 2002-07-31 23:57:11 etc 0 2002-07-30 10:14:44 Library\ 11 2002-07-31 23:57:11 mach 3678188 2002-07-28 20:19:43 mach_kernel 0 2002-07-30 10:57:00 private\ 0 2002-07-31 23:41:16 sbin\ 0 2002-07-30 10:57:38 System\ 11 2002-07-31 23:58:55 tmp 0 2002-07-30 10:03:14 usr\ 11 2002-07-31 23:58:58 var 0 2002-07-29 03:06:27 Volumes\ 0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\ ok 0> boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img Command (? for help): p /home/amade/emu/Mac OS 10.2 (Disc 1).img # type name length base ( size ) system /home/amade/emu/Mac OS 10.2 (Disc 1).img1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /home/amade/emu/Mac OS 10.2 (Disc 1).img2 Apple_Driver43 Macintosh 56 @ 64 ( 28.0k) Driver 4.3 /home/amade/emu/Mac OS 10.2 (Disc 1).img3 Apple_Driver43_CD Macintosh 140 @ 120 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img4 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img5 Apple_Driver_ATAPI Macintosh 56 @ 260 ( 28.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img6 Apple_Driver_ATAPI Macintosh 140 @ 316 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img7 Apple_Patches Patch Partition 512 @ 456 (256.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img8 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img9 Apple_HFS Mac_OS_X 1278432 @ 968 (624.2M) HFS /home/amade/emu/Mac OS 10.2 (Disc 1).img10 Apple_Free 45656 @ 1279400 ( 22.3M) Free space
Block size=2048, Number of Blocks=331264 DeviceType=0x1, DeviceId=0x1 Drivers- 1: @ 16 for 5, type=0x1 2: @ 30 for 25, type=0xffff 3: @ 65 for 5, type=0x701 4: @ 79 for 31, type=0xf8ff
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are
- "boot cd:,\:tbxi" should do some kind of search through partitions
- later in boot process it goes through partitions 0,1,2 seemingly from
comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
The code to auto-search for partitions is present, but the criteria used to select the partition is not exactly known. The current choices are either based upon partition flags, e.g. is it bootable or filesystem type which is the approach the patch takes. If you could temporarily modify OpenBIOS to dump the partition flags for each of the above partitions, that may reveal a suitable combination of flags.
ATB,
Mark.
On Mon, Dec 03, 2012 at 08:22:36PM +0000, Mark Cave-Ayland wrote:
On 30/11/12 21:09, Amadeusz Sławiński wrote:
Current trunk (1075) lists some files and doesn't boot at all
Welcome to OpenBIOS v1.0 built on Nov 30 2012 19:55 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0> boot cd:,\:tbxi>> Not a bootable ELF image No valid state has been set by load or init-program ok 0> dir cd:9,\ 73728 2002-07-18 08:21:48 Desktop DB 0 2002-07-18 08:21:49 Desktop DF 0 2002-07-18 08:21:49 Finder 0 2002-07-18 08:21:49 OSXBoot! 0 2002-07-18 08:21:50 System 1778 2002-07-18 08:21:49 Where_have_all_my_files_gone? ok 0> boot cd:9,\:tbxi No valid state has been set by load or init-program ok 0>
After testing with this patch: http://lists.openbios.org/pipermail/openbios/2011-August/006618.html I have better results
Welcome to OpenBIOS v1.0 built on Nov 30 2012 20:00 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0> boot cd:,\:tbxi>> Not a bootable ELF image No valid state has been set by load or init-program ok 0> dir cd:9,\ 82 2002-07-24 17:47:43 ._Welcome to Mac OS X 6148 2002-07-31 23:59:42 .DS_Store 0 2002-07-31 23:59:37 .Trashes\ 0 2002-07-29 03:06:27 .vol\ 0 2002-07-30 10:00:25 Applications\ 0 2002-07-31 23:43:08 bin\ 5120 2002-07-31 23:59:40 Desktop DB 25410 2002-07-31 23:59:40 Desktop DF 0 2002-07-15 06:20:41 dev\ 11 2002-07-31 23:57:11 etc 0 2002-07-30 10:14:44 Library\ 11 2002-07-31 23:57:11 mach 3678188 2002-07-28 20:19:43 mach_kernel 0 2002-07-30 10:57:00 private\ 0 2002-07-31 23:41:16 sbin\ 0 2002-07-30 10:57:38 System\ 11 2002-07-31 23:58:55 tmp 0 2002-07-30 10:03:14 usr\ 11 2002-07-31 23:58:58 var 0 2002-07-29 03:06:27 Volumes\ 0 2002-07-30 11:07:00 Welcome to Mac OS X\ 0 2002-07-19 08:21:48 HFS+ Private Data\ ok 0> boot cd:9,\:tbxi call-method slw_update_keymap: exception -21
Here is also a listing of partitions on mine boot disk,
# mac-fdisk /home/amade/emu/Mac\ OS\ 10.2\ (Disc\ 1).img /home/amade/emu/Mac OS 10.2 (Disc 1).img Command (? for help): p /home/amade/emu/Mac OS 10.2 (Disc 1).img # type name length base ( size ) system /home/amade/emu/Mac OS 10.2 (Disc 1).img1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map /home/amade/emu/Mac OS 10.2 (Disc 1).img2 Apple_Driver43 Macintosh 56 @ 64 ( 28.0k) Driver 4.3 /home/amade/emu/Mac OS 10.2 (Disc 1).img3 Apple_Driver43_CD Macintosh 140 @ 120 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img4 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img5 Apple_Driver_ATAPI Macintosh 56 @ 260 ( 28.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img6 Apple_Driver_ATAPI Macintosh 140 @ 316 ( 70.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img7 Apple_Patches Patch Partition 512 @ 456 (256.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img8 Apple_Void 0 @ 0 ( 0.0k) Unknown /home/amade/emu/Mac OS 10.2 (Disc 1).img9 Apple_HFS Mac_OS_X 1278432 @ 968 (624.2M) HFS /home/amade/emu/Mac OS 10.2 (Disc 1).img10 Apple_Free 45656 @ 1279400 ( 22.3M) Free space
Block size=2048, Number of Blocks=331264 DeviceType=0x1, DeviceId=0x1 Drivers- 1: @ 16 for 5, type=0x1 2: @ 30 for 25, type=0xffff 3: @ 65 for 5, type=0x701 4: @ 79 for 31, type=0xf8ff
Command (? for help):
Two similar (to me) things which probably still need fixing in filesystem handling are
- "boot cd:,\:tbxi" should do some kind of search through partitions
- later in boot process it goes through partitions 0,1,2 seemingly from
comments on GSOC patches expecting some of them to be ignored (http://asmblr.net/scrot/2012-11-30-211915_1366x768_scrot.png) screenshot is from bios with gsoc patches
Also I wonder if "Still waiting for root device" problem which I have with gsoc patches, isn't caused by not going properly through partitions or even expecting them to be numbered differently (but those are just speculations)
The code to auto-search for partitions is present, but the criteria used to select the partition is not exactly known. The current choices are either based upon partition flags, e.g. is it bootable or filesystem type which is the approach the patch takes. If you could temporarily modify OpenBIOS to dump the partition flags for each of the above partitions, that may reveal a suitable combination of flags.
ATB,
Mark.
-- OpenBIOS http://openbios.org/ Mailinglist: http://lists.openbios.org/mailman/listinfo Free your System - May the Forth be with you
Code for reference (and in case I need to use it again :P)
printk("mac-parts: counted %d partitions\n", __be32_to_cpu(par.pmMapBlkCnt)); for (d = 1; d <= __be32_to_cpu(par.pmMapBlkCnt); d++) { SEEK( bs * d ); READ( &par, sizeof(par) );
printk("Partition: %d\n", d);
printk("pmSig: %x\n", __be16_to_cpu(par.pmSig)); printk("pmSigPad: %x\n", __be16_to_cpu(par.pmSigPad)); printk("pmMapBlkCnt: %x\n", __be32_to_cpu(par.pmMapBlkCnt)); printk("pmPyPartStart: %x\n", __be32_to_cpu(par.pmPyPartStart));
printk("pmPartBlkCnt: %x\n", __be32_to_cpu(par.pmPartBlkCnt)); printk("pmPartName: %s\n", par.pmPartName); printk("pmPartType: %s\n", par.pmPartType);
printk("pmLgDataStart: %x\n", __be32_to_cpu(par.pmLgDataStart)); printk("pmDataCnt: %x\n", __be32_to_cpu(par.pmDataCnt)); printk("pmPartStatus: %x\n", __be32_to_cpu(par.pmPartStatus)); printk("pmLgBootStart: %x\n", __be32_to_cpu(par.pmLgBootStart)); printk("pmBootSize: %x\n", __be32_to_cpu(par.pmBootSize)); printk("pmBootLoad: %x\n", __be32_to_cpu(par.pmBootLoad)); printk("pmBootLoad2: %x\n", __be32_to_cpu(par.pmBootLoad2)); printk("pmBootEntry: %x\n", __be32_to_cpu(par.pmBootEntry)); printk("pmBootEntry2: %x\n", __be32_to_cpu(par.pmBootEntry2)); printk("pmBootCksum: %x\n", __be32_to_cpu(par.pmBootCksum)); printk("pmPartType: %s\n", par.pmProcessor); printk("filler: %s\n", par.filler);
printk("\n"); }
Output Max OS X 10.2 disk 1:
mac-parts: counted 10 partitions Partition: 1 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1 pmPartBlkCnt: 3f pmPartName: Apple pmPartType: Apple_partition_map pmLgDataStart: 0 pmDataCnt: 3f pmPartStatus: 17 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 2 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 40 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver43 pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 7b04 pmPartType: filler: ptDR
Partition: 3 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 78 pmPartBlkCnt: 8c pmPartName: Macintosh pmPartType: Apple_Driver43_CD pmLgDataStart: 0 pmDataCnt: 8c pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: c400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 934b pmPartType: filler: CDrv
Partition: 4 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 5 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 104 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2600 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 70da pmPartType: filler: ptDR
Partition: 6 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 13c pmPartBlkCnt: 8c pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 8c pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: f200 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 8b46 pmPartType: filler: ATPI
Partition: 7 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1c8 pmPartBlkCnt: 200 pmPartName: Patch Partition pmPartType: Apple_Patches pmLgDataStart: 0 pmDataCnt: 200 pmPartStatus: 1 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 1 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 8 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 9 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 3c8 pmPartBlkCnt: 1381e0 pmPartName: Mac_OS_X pmPartType: Apple_HFS pmLgDataStart: 0 pmDataCnt: 1381e0 pmPartStatus: 4000007f pmLgBootStart: 3af0 pmBootSize: c1000 pmBootLoad: 1c00000 pmBootLoad2: 0 pmBootEntry: 1c00cb0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: powerpc filler:
Partition: 10 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1385a8 pmPartBlkCnt: b258 pmPartName: pmPartType: Apple_Free pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Output Mac OS X 10.0
mac-parts: counted 10 partitions Partition: 1 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1 pmPartBlkCnt: 3f pmPartName: Apple pmPartType: Apple_partition_map pmLgDataStart: 0 pmDataCnt: 3f pmPartStatus: 17 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 2 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 40 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver43 pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: eb19 pmPartType: filler: ptDR
Partition: 3 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 78 pmPartBlkCnt: 78 pmPartName: Macintosh pmPartType: Apple_Driver43_CD pmLgDataStart: 0 pmDataCnt: 78 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: c800 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: e9ad pmPartType: filler: CDrv
Partition: 4 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 5 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: f0 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2600 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 3cd4 pmPartType: filler: ptDR
Partition: 6 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 128 pmPartBlkCnt: 78 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 78 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: ea00 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: ce67 pmPartType: filler: ATPI
Partition: 7 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1a0 pmPartBlkCnt: 200 pmPartName: Patch Partition pmPartType: Apple_Patches pmLgDataStart: 0 pmDataCnt: 200 pmPartStatus: 1 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 4 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 8 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 9 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 3a0 pmPartBlkCnt: 11a788 pmPartName: Mac_OS_X pmPartType: Apple_HFS pmLgDataStart: 0 pmDataCnt: 11a788 pmPartStatus: 4000007f pmLgBootStart: 3af0 pmBootSize: b4000 pmBootLoad: 1c00000 pmBootLoad2: 0 pmBootEntry: 1c005b4 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: powerpc filler:
Partition: 10 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 11ab28 pmPartBlkCnt: 254d0 pmPartName: pmPartType: Apple_Free pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Also Mac OS X 10.4 Upgrade DVD:
mac-parts: counted 4 partitions Partition: 1 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: 4 pmPyPartStart: 1 pmPartBlkCnt: 3f pmPartName: Apple pmPartType: Apple_partition_map pmLgDataStart: 0 pmDataCnt: 3f pmPartStatus: 3 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 2 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: 4 pmPyPartStart: 40 pmPartBlkCnt: 8 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 4 pmPartStatus: 303 pmLgBootStart: 0 pmBootSize: 800 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: ffff pmPartType: filler: DMMY
Partition: 3 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: 4 pmPyPartStart: 48 pmPartBlkCnt: 546810 pmPartName: Mac_OS_X pmPartType: Apple_HFS pmLgDataStart: 0 pmDataCnt: 546810 pmPartStatus: 40000033 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler: goon
Partition: 4 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: 4 pmPyPartStart: 546858 pmPartBlkCnt: a pmPartName: pmPartType: Apple_Free pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
On 03/12/12 22:30, Amadeusz Sławiński wrote:
Code for reference (and in case I need to use it again :P)
printk("mac-parts: counted %d partitions\n", __be32_to_cpu(par.pmMapBlkCnt)); for (d = 1; d<= __be32_to_cpu(par.pmMapBlkCnt); d++) { SEEK( bs * d ); READ(&par, sizeof(par) );
printk("Partition: %d\n", d);
printk("pmSig: %x\n", __be16_to_cpu(par.pmSig)); printk("pmSigPad: %x\n", __be16_to_cpu(par.pmSigPad)); printk("pmMapBlkCnt: %x\n", __be32_to_cpu(par.pmMapBlkCnt)); printk("pmPyPartStart: %x\n", __be32_to_cpu(par.pmPyPartStart));
printk("pmPartBlkCnt: %x\n", __be32_to_cpu(par.pmPartBlkCnt)); printk("pmPartName: %s\n", par.pmPartName); printk("pmPartType: %s\n", par.pmPartType);
printk("pmLgDataStart: %x\n", __be32_to_cpu(par.pmLgDataStart)); printk("pmDataCnt: %x\n", __be32_to_cpu(par.pmDataCnt)); printk("pmPartStatus: %x\n", __be32_to_cpu(par.pmPartStatus)); printk("pmLgBootStart: %x\n", __be32_to_cpu(par.pmLgBootStart)); printk("pmBootSize: %x\n", __be32_to_cpu(par.pmBootSize)); printk("pmBootLoad: %x\n", __be32_to_cpu(par.pmBootLoad)); printk("pmBootLoad2: %x\n", __be32_to_cpu(par.pmBootLoad2)); printk("pmBootEntry: %x\n", __be32_to_cpu(par.pmBootEntry)); printk("pmBootEntry2: %x\n", __be32_to_cpu(par.pmBootEntry2)); printk("pmBootCksum: %x\n", __be32_to_cpu(par.pmBootCksum)); printk("pmPartType: %s\n", par.pmProcessor); printk("filler: %s\n", par.filler);
printk("\n"); }
Output Max OS X 10.2 disk 1:
mac-parts: counted 10 partitions Partition: 1 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1 pmPartBlkCnt: 3f pmPartName: Apple pmPartType: Apple_partition_map pmLgDataStart: 0 pmDataCnt: 3f pmPartStatus: 17 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 2 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 40 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver43 pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 7b04 pmPartType: filler: ptDR
Partition: 3 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 78 pmPartBlkCnt: 8c pmPartName: Macintosh pmPartType: Apple_Driver43_CD pmLgDataStart: 0 pmDataCnt: 8c pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: c400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 934b pmPartType: filler: CDrv
Partition: 4 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 5 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 104 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2600 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 70da pmPartType: filler: ptDR
Partition: 6 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 13c pmPartBlkCnt: 8c pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 8c pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: f200 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 8b46 pmPartType: filler: ATPI
Partition: 7 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1c8 pmPartBlkCnt: 200 pmPartName: Patch Partition pmPartType: Apple_Patches pmLgDataStart: 0 pmDataCnt: 200 pmPartStatus: 1 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 1 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 8 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 9 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 3c8 pmPartBlkCnt: 1381e0 pmPartName: Mac_OS_X pmPartType: Apple_HFS pmLgDataStart: 0 pmDataCnt: 1381e0 pmPartStatus: 4000007f pmLgBootStart: 3af0 pmBootSize: c1000 pmBootLoad: 1c00000 pmBootLoad2: 0 pmBootEntry: 1c00cb0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: powerpc filler:
Partition: 10 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1385a8 pmPartBlkCnt: b258 pmPartName: pmPartType: Apple_Free pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Output Mac OS X 10.0
mac-parts: counted 10 partitions Partition: 1 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1 pmPartBlkCnt: 3f pmPartName: Apple pmPartType: Apple_partition_map pmLgDataStart: 0 pmDataCnt: 3f pmPartStatus: 17 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 2 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 40 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver43 pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2400 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: eb19 pmPartType: filler: ptDR
Partition: 3 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 78 pmPartBlkCnt: 78 pmPartName: Macintosh pmPartType: Apple_Driver43_CD pmLgDataStart: 0 pmDataCnt: 78 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: c800 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: e9ad pmPartType: filler: CDrv
Partition: 4 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 5 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: f0 pmPartBlkCnt: 38 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 38 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: 2600 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 3cd4 pmPartType: filler: ptDR
Partition: 6 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 128 pmPartBlkCnt: 78 pmPartName: Macintosh pmPartType: Apple_Driver_ATAPI pmLgDataStart: 0 pmDataCnt: 78 pmPartStatus: 37f pmLgBootStart: 0 pmBootSize: ea00 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: ce67 pmPartType: filler: ATPI
Partition: 7 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 1a0 pmPartBlkCnt: 200 pmPartName: Patch Partition pmPartType: Apple_Patches pmLgDataStart: 0 pmDataCnt: 200 pmPartStatus: 1 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 4 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 8 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 0 pmPartBlkCnt: 0 pmPartName: pmPartType: Apple_Void pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Partition: 9 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 3a0 pmPartBlkCnt: 11a788 pmPartName: Mac_OS_X pmPartType: Apple_HFS pmLgDataStart: 0 pmDataCnt: 11a788 pmPartStatus: 4000007f pmLgBootStart: 3af0 pmBootSize: b4000 pmBootLoad: 1c00000 pmBootLoad2: 0 pmBootEntry: 1c005b4 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: powerpc filler:
Partition: 10 pmSig: 504d pmSigPad: 0 pmMapBlkCnt: a pmPyPartStart: 11ab28 pmPartBlkCnt: 254d0 pmPartName: pmPartType: Apple_Free pmLgDataStart: 0 pmDataCnt: 0 pmPartStatus: 0 pmLgBootStart: 0 pmBootSize: 0 pmBootLoad: 0 pmBootLoad2: 0 pmBootEntry: 0 pmBootEntry2: 0 pmBootCksum: 0 pmPartType: filler:
Thanks a lot for this - this is extremely useful!
Based upon this, it looks as if OS X 10.0 and OS X 10.2 should boot with the standard CHRP boot procedure since kPartitionAUXIsBootValid is set on both the OS partitions. However, I realise now that I broke this with my interpose refactoring in an attempt to accommodate Mac disk images I had that *didn't* set this flag. I see that I also misunderstood the direct partition boot, but this was because of an existing bug failing to match the partition because the pmType string "powerpc" was not checked in a case-insensitive manner as per the CHRP specification. Sigh.
The other interesting thing is that kPartitionAUXIsBootValid is not set on your OS 10.4 upgrade disk. If you try and boot from this directly from a reset, can Apple's Open Firmware actually boot it? Or does it have to be launched from OS X?
ATB,
Mark.
The other interesting thing is that kPartitionAUXIsBootValid is not set on your OS 10.4 upgrade disk. If you try and boot from this directly from a reset, can Apple's Open Firmware actually boot it? Or does it have to be launched from OS X?
I booted it by setting boot device in OS X and using open firmware (boot cd://:tbxi), in both cases it worked fine. Is this what it means booting from reset?
Amadeusz
On 04/12/12 23:30, Amadeusz Sławiński wrote:
I booted it by setting boot device in OS X and using open firmware (boot cd://:tbxi), in both cases it worked fine. Is this what it means booting from reset?
Yes - that's fine thanks. Time to now code up a patch for testing... :)
ATB,
Mark.
On 05/12/12 19:54, Mark Cave-Ayland wrote:
Yes - that's fine thanks. Time to now code up a patch for testing... :)
Okay - I now have a patch against trunk for mac-parts.c that boots all my PPC CD images here, and that I hope should also pick the right partition on all your OS X CDs for "dir cd:,". Can you please test and report back to the list?
Many thanks,
Mark.
On Wed, Dec 05, 2012 at 11:22:35PM +0000, Mark Cave-Ayland wrote:
On 05/12/12 19:54, Mark Cave-Ayland wrote:
Yes - that's fine thanks. Time to now code up a patch for testing... :)
Okay - I now have a patch against trunk for mac-parts.c that boots all my PPC CD images here, and that I hope should also pick the right partition on all your OS X CDs for "dir cd:,". Can you please test and report back to the list?
Many thanks,
Mark.
Great, it works!
The only thing is that seems like mine 10.0 and 10.2 cd's use those "wrapped" partitions, so it doesn't boot (boot cd:,\:tbxi) without patch http://lists.openbios.org/pipermail/openbios/2011-August/006618.html but it lists some file (dir cd:,), seems like the ones needed for booting are somewhere else. 10.4 works fine with or without "wrapped" partitions patch.
Amadeusz