Seeing as there are people who want work on Max OS X (ppc) support and to speed up their work, so they won't redundantly search for stuff which needs to get implemented and so they can spend time on implementing it further.
There was some work done already during GSOC 2011, which didn't get applied (due to not being finished? / missing signed-offs).
Anyway some time ago I tried to apply those patches and got Mac OS X to start booting, you can see description and some screenshots at this address: http://www.emaculation.com/forum/viewtopic.php?f=1&t=7047
Links to those patches with my comments here: I tried them with latest tree, mixing some current stuff from mailing list (mainly trying some filesystem things).
http://lists.openbios.org/pipermail/openbios/2011-August/006653.html dummy get-key-map
http://lists.openbios.org/pipermail/openbios/2011-August/006615.html http://lists.openbios.org/pipermail/openbios/2011-August/006616.html http://lists.openbios.org/pipermail/openbios/2011-August/006618.html file-system / partitioning stuff - may need some changes due to recent patches
http://lists.openbios.org/pipermail/openbios/2011-August/006617.html after "Call kernel!" it stops drawing to screen
http://lists.openbios.org/pipermail/openbios/2011-August/006619.html local forth variables, I tested new implementation (from few days ago) and it also works
http://lists.openbios.org/pipermail/openbios/2011-August/006620.html I think I stumbled upon it not booting without this one, but currently can't reproduce
http://lists.openbios.org/pipermail/openbios/2011-August/006651.html 0 > boot cd:\:tbxi >> openbios panic: Unexpected exception fff26500
http://lists.openbios.org/pipermail/openbios/2011-August/006623.html for drawing apple logo (from my tests it seems badly positioned but it may just want some other -g option to qemu)
https://lists.nongnu.org/archive/html/qemu-devel/2011-08/msg01418.html I can confirm that it stops after "COLOR video console at 0x80000000 (800x600x32) without this
I will certainly test any new patches that appear ;)
Amadeusz
On Nov 15, 2012, at 4:44 PM, Amadeusz Sławiński wrote:
Seeing as there are people who want work on Max OS X (ppc) support and to speed up their work, so they won't redundantly search for stuff which needs to get implemented and so they can spend time on implementing it further.
There was some work done already during GSOC 2011, which didn't get applied (due to not being finished? / missing signed-offs).
I so wish these patches were committed. It would have saved me so much time. I do already know about them and work with them. I've even talked to the guy who made them. He became sick of waiting around forever. A feeling I know too well.
Anyway some time ago I tried to apply those patches and got Mac OS X to start booting, you can see description and some screenshots at this address: http://www.emaculation.com/forum/viewtopic.php?f=1&t=7047
Thank you for uploading the images. They give me hope. I was wondering what operating system you where using. It looks like NeXtStep.
Links to those patches with my comments here: I tried them with latest tree, mixing some current stuff from mailing list (mainly trying some filesystem things).
http://lists.openbios.org/pipermail/openbios/2011-August/006653.html dummy get-key-map
http://lists.openbios.org/pipermail/openbios/2011-August/006615.html http://lists.openbios.org/pipermail/openbios/2011-August/006616.html http://lists.openbios.org/pipermail/openbios/2011-August/006618.html file-system / partitioning stuff - may need some changes due to recent patches
http://lists.openbios.org/pipermail/openbios/2011-August/006617.html after "Call kernel!" it stops drawing to screen
http://lists.openbios.org/pipermail/openbios/2011-August/006619.html local forth variables, I tested new implementation (from few days ago) and it also works
http://lists.openbios.org/pipermail/openbios/2011-August/006620.html I think I stumbled upon it not booting without this one, but currently can't reproduce
http://lists.openbios.org/pipermail/openbios/2011-August/006651.html 0 > boot cd:\:tbxi >> openbios panic: Unexpected exception fff26500
http://lists.openbios.org/pipermail/openbios/2011-August/006623.html for drawing apple logo (from my tests it seems badly positioned but it may just want some other -g option to qemu)
https://lists.nongnu.org/archive/html/qemu-devel/2011-08/msg01418.html I can confirm that it stops after "COLOR video console at 0x80000000 (800x600x32) without this
Thank you for all your help. I will continue to work with these patches.
I will certainly test any new patches that appear ;)
Could you test this one?
This patch adds an feature to OpenBIOS that automatically selects the correct partition to use. You can see this code in action when you use these commands: "dir cd:," and "boot cd:,\:tbxi".
signed-off-by: John Arbuckle programmingkidx@gmail.com
--- packages/mac-parts.c | 69 +++++++++++++++++++++++++++++++------------------ 1 files changed, 44 insertions(+), 25 deletions(-)
diff --git a/packages/mac-parts.c b/packages/mac-parts.c index 18e4aa3..956ae58 100644 --- a/packages/mac-parts.c +++ b/packages/mac-parts.c @@ -108,7 +108,6 @@ macparts_open( macparts_info_t *di ) }
DPRINTF("parstr: %s argstr: %s parnum: %d\n", parstr, argstr, parnum); - DPRINTF("want_bootcode %d\n", want_bootcode); DPRINTF("macparts_open %d\n", parnum);
@@ -136,12 +135,10 @@ macparts_open( macparts_info_t *di ) if (__be16_to_cpu(par.pmSig) != DESC_PART_SIGNATURE) goto out;
- /* - * Implement partition selection as per the PowerPC Microprocessor CHRP bindings - */ - - if (str == NULL || parnum == 0) { - /* According to the spec, partition 0 as well as no arguments means the whole disk */ + + // Partition 0 means the whole disk + if (parnum == 0) + { offs = (long long)0; size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
@@ -155,36 +152,37 @@ macparts_open( macparts_info_t *di )
ret = -1; goto out; - - } else if (parnum == -1 && strlen(argstr)) { - + } + + // if no partition, but a file was specified - example: boot cd:,\:tbxi + else if (parnum == -1 && strlen(argstr)) + { DPRINTF("mac-parts: counted %d partitions\n", __be32_to_cpu(par.pmMapBlkCnt));
/* No partition was explicitly requested, but an argstr was passed in. So let's find a suitable partition... */ - for (parnum = 1; parnum <= __be32_to_cpu(par.pmMapBlkCnt); parnum++) { + for (parnum = 1; parnum <= __be32_to_cpu(par.pmMapBlkCnt); parnum++) + { SEEK( bs * parnum ); READ( &par, sizeof(par) ); - if( __be16_to_cpu(par.pmSig) != DESC_PART_SIGNATURE || - !__be32_to_cpu(par.pmPartBlkCnt) ) - break; - DPRINTF("found partition type: %s with status %x\n", par.pmPartType, __be32_to_cpu(par.pmPartStatus));
- /* If we have a valid, allocated and readable partition... */ - if( (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsValid) && - (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsAllocated) && - (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsReadable) ) { + // If an Apple_HFS or Apple_HFSX partition was found + if(strcmp(par.pmPartType, "Apple_HFS") == 0 || strcmp(par.pmPartType, "Apple_HFSX") == 0) + { offs = (long long)__be32_to_cpu(par.pmPyPartStart) * bs; size = (long long)__be32_to_cpu(par.pmPartBlkCnt) * bs;
/* If the filename was set to %BOOT, we actually want the bootcode */ - if (want_bootcode && (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsBootValid)) { + if (want_bootcode && (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsBootValid)) + { offs += (long long)__be32_to_cpu(par.pmLgBootStart) * bs; size = (long long)__be32_to_cpu(par.pmBootSize); - goto found; - } else { + } + + else + { /* Otherwise we were passed a filename and path. So let's choose the first partition with a valid filesystem */ DPUSH( offs ); @@ -197,9 +195,30 @@ macparts_open( macparts_info_t *di ) } } } - - } else { - /* Another partition was explicitly requested */ + } + + // if no partition and no file was selected - example: "dir cd:," + else if (parnum == -1) + { + // search for the first partition of type Apple_HFS or Apple_HFSX + for(parnum = 1; parnum <= __be32_to_cpu(par.pmMapBlkCnt); parnum++) + { + SEEK( bs * parnum ); + READ( &par, sizeof(par) ); + DPRINTF("found partition type: %s with status %x\n", par.pmPartType, __be32_to_cpu(par.pmPartStatus)); + if(strcmp(par.pmPartType, "Apple_HFS") == 0 || strcmp(par.pmPartType, "Apple_HFSX") == 0) + { + offs = (long long)__be32_to_cpu(par.pmPyPartStart) * bs; + size = (long long)__be32_to_cpu(par.pmPartBlkCnt) * bs; + goto found; + break; + } + } + } + + // Another partition was explicitly requested + else + { SEEK( bs * parnum ); READ( &par, sizeof(par) );
On 15/11/12 22:31, Programmingkid wrote:
[CC to Andreas, Alex, Blue and Stefan]
On Nov 15, 2012, at 4:44 PM, Amadeusz Sławiński wrote:
Seeing as there are people who want work on Max OS X (ppc) support and to speed up their work, so they won't redundantly search for stuff which needs to get implemented and so they can spend time on implementing it further.
There was some work done already during GSOC 2011, which didn't get applied (due to not being finished? / missing signed-offs).
I so wish these patches were committed. It would have saved me so much time. I do already know about them and work with them. I've even talked to the guy who made them. He became sick of waiting around forever. A feeling I know too well.
No - that is not correct. In order to have a patch applied to OpenBIOS, we require a Signed-off-by line as a declaration that the patch is the author's own work (and hence doesn't rely on any material that could be commercial copyright).
Despite a request from Andreas for this on the list, the patches were never resubmitted with the SOB. I even sent a personal email to Natalia asking if they could be resubmitted with the SOB and received no response.
Unless someone else can correct me otherwise, my current understanding is that we cannot accept these patches in their current form. Notwithstanding that Apple seem to be living an extremely litigious lifestyle these days.
ATB,
Mark.
On Nov 15, 2012, at 5:58 PM, Mark Cave-Ayland wrote:
On 15/11/12 22:31, Programmingkid wrote:
[CC to Andreas, Alex, Blue and Stefan]
On Nov 15, 2012, at 4:44 PM, Amadeusz Sławiński wrote:
Seeing as there are people who want work on Max OS X (ppc) support and to speed up their work, so they won't redundantly search for stuff which needs to get implemented and so they can spend time on implementing it further.
There was some work done already during GSOC 2011, which didn't get applied (due to not being finished? / missing signed-offs).
I so wish these patches were committed. It would have saved me so much time. I do already know about them and work with them. I've even talked to the guy who made them. He became sick of waiting around forever. A feeling I know too well.
No - that is not correct. In order to have a patch applied to OpenBIOS, we require a Signed-off-by line as a declaration that the patch is the author's own work (and hence doesn't rely on any material that could be commercial copyright).
Despite a request from Andreas for this on the list, the patches were never resubmitted with the SOB. I even sent a personal email to Natalia asking if they could be resubmitted with the SOB and received no response.
Unless someone else can correct me otherwise, my current understanding is that we cannot accept these patches in their current form. Notwithstanding that Apple seem to be living an extremely litigious lifestyle these days.
I guess every body has their own story.
On Thu, Nov 15, 2012 at 05:31:45PM -0500, Programmingkid wrote:
On Nov 15, 2012, at 4:44 PM, Amadeusz Sławiński wrote:
Anyway some time ago I tried to apply those patches and got Mac OS X to start booting, you can see description and some screenshots at this address: http://www.emaculation.com/forum/viewtopic.php?f=1&t=7047
Thank you for uploading the images. They give me hope. I was wondering what operating system you where using. It looks like NeXtStep.
linux, with windowmaker window manager
I will certainly test any new patches that appear ;)
Could you test this one?
This patch adds an feature to OpenBIOS that automatically selects the correct partition to use. You can see this code in action when you use these commands: "dir cd:," and "boot cd:,\:tbxi".
Welcome to OpenBIOS v1.0 built on Nov 16 2012 11:38 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > dir cd:,\ 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:,\:tbxi No valid state has been set by load or init-program ok 0 >
It is not seeing some files, it should have mach_kernel in this listing.
However when I also add checking for correct partition signature (http://lists.openbios.org/pipermail/openbios/2011-August/006618.html) it seems to work
Welcome to OpenBIOS v1.0 built on Nov 16 2012 11:51 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 {:interpret: exception -13 caught EXIT
On Nov 16, 2012, at 6:59 AM, Amadeusz Sławiński wrote:
I will certainly test any new patches that appear ;)
Could you test this one?
This patch adds an feature to OpenBIOS that automatically selects the correct partition to use. You can see this code in action when you use these commands: "dir cd:," and "boot cd:,\:tbxi".
Welcome to OpenBIOS v1.0 built on Nov 16 2012 11:38 Trying hd:,\:tbxi... Trying hd:,\ppc\bootinfo.txt... No valid state has been set by load or init-program
0 > dir cd:,\ 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:,\:tbxi No valid state has been set by load or init-program ok 0 >
It is not seeing some files, it should have mach_kernel in this listing.
However when I also add checking for correct partition signature (http://lists.openbios.org/pipermail/openbios/2011-August/006618.html) it seems to work
I am betting you are using the HFS+ file system with a HFS wrapper. This is a case I didn't test. Thanks for catching this bug. Could you send me a patch? Let me know if you need help with making a patch file.
On Nov 16, 2012, at 11:39 AM, Programmingkid wrote:
It is not seeing some files, it should have mach_kernel in this listing.
However when I also add checking for correct partition signature (http://lists.openbios.org/pipermail/openbios/2011-August/006618.html) it seems to work
I am betting you are using the HFS+ file system with a HFS wrapper. This is a case I didn't test. Thanks for catching this bug. Could you send me a patch? Let me know if you need help with making a patch file.
Never mind on the patch. I didn't see that the link you sent me was for a patch to another file. These patches can remain separate.