OS X 10.4/6


27 posts   Page 1 of 2   1, 2
by HAZZA24937 » Thu May 31, 2012 7:33 am
It should be possible to compile OS X with ARM11 support.
And I am wondering if anyone has already started to attempt it or even would like to do it?
I know I am interested, I think it would a little milestone in Hackintosh history. And it would make a neat OS for the R-Pi. what do you think?
Talk all about OS X on R-Pi's here if you like.
Posts: 13
Joined: Tue May 29, 2012 3:05 am
by felix123 » Thu May 31, 2012 8:03 am
Where are you getting the source code?
Posts: 153
Joined: Tue May 15, 2012 6:06 am
by AndrewS » Thu May 31, 2012 11:52 am
User avatar
Posts: 3626
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK
by ghans » Thu May 31, 2012 11:55 am
Really , where is the Source from ?

Are you talking about Darwin ???
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4626
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by HAZZA24937 » Fri Jun 01, 2012 10:01 am
I probably can't do it myself, I am a coding N00B!
However I would like to push people to try and do it because it looks very much possible.
http://elinux.org/Rpi_kernel_compilation#OS_X
^ I think this is about porting the Kernel for OS X top R-Pi... Not sure... LOL
But I am fairly sure you can get the source code for OS X anyway from Apple if you're a developer with them and you have paid your 100 dollars to apple this year for developing OS X and it's software.
Posts: 13
Joined: Tue May 29, 2012 3:05 am
by fodi » Fri Jun 01, 2012 10:32 am
HAZZA24937 wrote:I probably can't do it myself, I am a coding N00B!
However I would like to push people to try and do it because it looks very much possible.
http://elinux.org/Rpi_kernel_compilation#OS_X
^ I think this is about porting the Kernel for OS X top R-Pi... Not sure... LOL
But I am fairly sure you can get the source code for OS X anyway from Apple if you're a developer with them and you have paid your 100 dollars to apple this year for developing OS X and it's software.

this link actually explains how to compile the raspberry pi's linux kernel on an osx machine (not compiling osx kernel for the raspberry pi)
User avatar
Posts: 112
Joined: Wed Mar 14, 2012 9:03 pm
Location: Hungary
by felix123 » Fri Jun 01, 2012 10:44 am
HAZZA24937 wrote:But I am fairly sure you can get the source code for OS X anyway from Apple if you're a developer with them and you have paid your 100 dollars to apple this year for developing OS X and it's software.

Um yeah. Apple is totally going to let you see their source code for a hundred bucks. :roll:
The benefits of the Apple Developer program are here:
http://en.wikipedia.org/wiki/Apple_Developer
Posts: 153
Joined: Tue May 15, 2012 6:06 am
by HAZZA24937 » Fri Jun 01, 2012 12:32 pm
felix123 wrote:
HAZZA24937 wrote:But I am fairly sure you can get the source code for OS X anyway from Apple if you're a developer with them and you have paid your 100 dollars to apple this year for developing OS X and it's software.

Um yeah. Apple is totally going to let you see their source code for a hundred bucks. :roll:
The benefits of the Apple Developer program are here:
http://en.wikipedia.org/wiki/Apple_Developer


Dang.
Posts: 13
Joined: Tue May 29, 2012 3:05 am
by felix123 » Fri Jun 01, 2012 1:03 pm
If you're interested you can try porting Darwin. It's the opensource base for OSX. :D
Posts: 153
Joined: Tue May 15, 2012 6:06 am
by FrozenCanuck » Sat Jun 16, 2012 6:09 am
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by ghans » Sat Jun 16, 2012 9:01 pm
Er..
HAZZA24937 made it very clear in another thread that he wanted to port Mac OS and NOT Darwin or BSD.
*That* is impossible for him and many others to achieve.
But yes , FreeBSD is being actively ported to the Pi. And other BSDs will propably follow.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4626
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by FrozenCanuck » Sat Jun 16, 2012 9:58 pm
Perhaps I didn't make myself clear. My apologies.

If you follow the links I included you will see how OSX can be installed to run on PCs. This was formerly done by patching an OSX DVD however it was an unstable approach since it forbade Apple updates. By using Kabyl Bumby, Chamelion and Boot132 you can create a preinstallation partition with all of the necessary drivers and kexts installed before switching to the unpatched OSX retail DVD. The result is a more stable system which even allows most updates to be installed.

Now, what is needed here is not a recompiled OSX but ARM-friendly drivers and kexts that Kabyl Bumby, Chamelion and Boot132 can preinstall before actually installing OSX. I suggested BSD ARM drivers because the readily available source code has already been made for us. What is needed is for the source code to be recompiled inside a functioning Mac to be run on OSX which is built on top of BSD.

I don't own a Mac, but the good people at the OSx86 forum just might be willing to help in the construction of an "Apple Pi".
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by FrozenCanuck » Sun Jun 17, 2012 9:47 am
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by ghans » Mon Jun 18, 2012 6:36 am
This is NOT going to work.
The whole of Mac OS is x86 , propably many little x86 ASM parts included.
Just if you port the Kernel (XNU or whatever) and take drivers from BSD , Hackintosh etc. etc. you're not getting Quartz, Cocoa or Aqua to work on a Pi. What is the use of Mac OS if i can't use the Finder ?
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4626
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by ghans » Mon Jun 18, 2012 6:39 am
Well I heard there are some swanky modes of virtualisation/translation available with the Linux kernel , Qemu and comrades.
Might help here.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4626
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by tufty » Mon Jun 18, 2012 7:19 am
FrozenCanuck wrote:Perhaps I didn't make myself clear. My apologies.

No, you made yourself perfectly clear.

FrozenCanuck wrote:If you follow the links I included you will see how OSX can be installed to run on PCs.

Yes, we know all about hackintosh. However, the Raspberry Pi is not a 'PC'. A 'PC', in this sense, is a computer which has an Intel processor, a BIOS or EFI booting mechanism, and a very standardised way of accessing peripherals. The Pi has a ARM processor which uses a completely different instruction set, no BIOS, no EFI, and a very nonstandard way of accessing peripherals.

There is no way that you're going to get OSX running "on the metal". You can [url=http://www.raspberrypi.org/phpBB3/viewtopic.php?f=62&t=6014]do it using Qemu, but the performance is - umm - of debatable usefulness (3 hours to boot).

FrozenCanuck wrote:Now, what is needed here is not a recompiled OSX but ARM-friendly drivers and kexts that Kabyl Bumby, Chamelion and Boot132 can preinstall before actually installing OSX. I suggested BSD ARM drivers because the readily available source code has already been made for us. What is needed is for the source code to be recompiled inside a functioning Mac to be run on OSX which is built on top of BSD.

OK. This is so full of wrong it doesn't even qualify as wrong.

1 - You're not going to be able install OSX from a retail DVD, no matter what tools you use, for the reasons above. The hardware is totally incompatible with the software, and no amount of driver fiddling is ever going to make that problem go away.
2 - Drivers aren't "ARM-friendly". Drivers are written to slot between a for a specific piece of hardware and a specific kernel. They may well, given a decent engineering base, compile under pretty much any architecture.
3 - Even given platform agnostic drivers, you can't just "drop in" drivers under OSX, Windows, Linux or any other platform. They have to be written to work under a specific kernel, using the tools and APIs available for that kernel. Drivers for OSX are written using IOKit, an OSX specific driver framework which uses a cut-down version of C++. BSD, Linux et al drivers do not simply "compile and install" under OSX (or vice versa, or any combination thereof), no matter what machine you're compiling them on.
4 - OSX is not based on BSD. It has its own more-or-less microkernel (xnu) upon which is built a BSD-like userland which uses code pulled from FreeBSD.

The very best you can manage is porting and compiling xnu and userland to the Pi platform, and getting a Darwin system. That's a pretty major undertaking, as you'd have to do a lot of driver work. And it wouldn't get you OSX.

Simon
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by FrozenCanuck » Mon Jun 18, 2012 11:18 am
Okay, so I'm wrong. What do you suggest?

Give up?

Quit?

Nothing was ever gained by not trying.

I'm not a programmer by any means and yes, I don't quite understand how a person can get OSX to work on a PC. But if Hackintosh proves anything, it is that if you want something bad enough, you have to work hard at it and make a heaping truck-load of mistakes in the process.

Here are the opensource portions of OSX, iOS and Developer Tools in their many incarnations:

http://www.opensource.apple.com/

You can flap your gums all day griping about how utterly hopeless this is, or you can make yourself usefull. Your choice...
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by tufty » Mon Jun 18, 2012 12:21 pm
FrozenCanuck wrote:Okay, so I'm wrong. What do you suggest?

Give up?

Yes.
FrozenCanuck wrote:Quit?

Yes.

I am a programmer, I use OSX on a daily basis (and have been doing so since 2001), I have written drivers for OSX (and NeXTStep before it), I have built xnu on several occasions (it's painful), I do know how the hackintosh process works, I am aware of Apple's open source code, I am developing an OS that runs on the Pi, and I do know what I'm talking about. How much of the above applies to you?

Hackintosh proves nothing except that the current Intel version of Apple's hardware is close enough to a generic "beige box" PC, and Apple's OS is open enough, that it is possible to get OSX running on the aforementioned beige box.

there are things that are easy, there are things that are extremely difficult but technically feasible, and there are things that are completely impossible. Running OSX as an actual operating system on the Pi hardware is, sadly, completely impossible unless you manage to find the source to what makes OSX into OSX - i.e. everything above the BSD compatibility layer.

Now, if you were talking about "hackintoshing" an early version of iOS, you might be going somewhere possible, as I believe some of the earlier iPhones and iPod Touches used ARMv6 processors (the later stuff is all Cortex-A, and thus incompatible). It would be a pointless thing to do, IMO, but possible nonetheless.

Simon
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by ghans » Mon Jun 18, 2012 2:13 pm
Actually weren't some iPod touch based on Broadcom ARMv6 processors (SoCs) ?
Hackintoshing iOS would be really the next thing on my "not impossible enough" list.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org
Posts: 4626
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany
by jamesh » Mon Jun 18, 2012 2:41 pm
ghans wrote:Actually weren't some iPod touch based on Broadcom ARMv6 processors (SoCs) ?
Hackintoshing iOS would be really the next thing on my "not impossible enough" list.

ghans


There was an early Touch that did use the Videocore 3 GPU as a co-pro, but that didn't use a Brcm chip as the main CPU. AFAIK. Before my time.
Soon to be employed engineer - Hurrah! Volunteer at the Raspberry Pi Foundation, helper at PiAcademy September 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 11954
Joined: Sat Jul 30, 2011 7:41 pm
by FrozenCanuck » Mon Jun 18, 2012 9:49 pm
Consider this:

https://www.minibsd.org/

http://people.freebsd.org/~picobsd/old/picobsd.html

http://www.freebsd.org/doc/en_US.ISO8859-1/articles/nanobsd/index.html

Here are three very small distros - one of them being small enough to fit on a floppy disc.

If OSX can't be recompiled or patched to run on ARM, can one of these mini distros or something like them be made to run as the host system and upon booting autoload either Pear PC, Sheepshaver, or Mac-On-Linux?

Yes, its cheating because you are not experiencing 100% OSX by itself, but it is a place to start.
I will never go one day
Without thinking, “I wish I had an Apple Pi”.
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by tufty » Tue Jun 19, 2012 6:18 am
Yes, you can. No need for bsd to do it either, pearpc and sheepshaver run fine on linux.

Pearpc + osx 'works', but takes 3 hours to boot
sheepshaver only gets you 680x0 iirc, so no osx (and basilisk is easier to set up imo, but the same 68k issue applies)
mac-on-linux only works on powerpc linux, so that won't work.

I don't know if NeXTStep 3.3 680x0 could be run under sheepshaver or basilisk.

What you have to remember is that the processor on the Pi is around the same level of performance as the first generation Powerbook G3s, perhaps a little faster. Emulating an entirely different processor architecture is going to halve your performance, perhaps worse. You have little to no memory, relatively speaking, a dog-slow SD card interface, and a USB controller that's taking up 20% of your CPU time.

If you want a machine to run MacOS X at a reasonably acceptable level of performance, you are not going to get it for $35.
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by FrozenCanuck » Wed Jun 20, 2012 1:51 am
Fair enough. But can the Linux host be stripped down enough to reduce its footprint and resource drain. If it can be reduced and restricted to only doing these three things: booting the R-Pi, auto-login, and autostarting the emulation - could that improve emulation speed since there will be nothing else running?

Meanwhile, here is a site that shows some promise:

http://osvirtual.net/en/category/macos/

If you could get VM Ware Player running inside Linux you might stand a chance with NextStep found here:

http://osvirtual.net/en/category/rareexperimental/nextstepopenstep/
I will never go one day
Without thinking, “I wish I had an Apple Pi”.
Posts: 6
Joined: Thu Jun 14, 2012 8:59 pm
by tufty » Wed Jun 20, 2012 6:01 am
Yes, you can strip down linux, but it's not going to help much. Only memory footprint is going to make a significant difference.

Now, as for scaling back your expectations, yeah, emulation of an early pentium might allow openstep or nextstep/intel /now/. Bochs or qemu should do it. There's progress on a 68k next emulator, but it doesn't boot yet. I don't need another project at the moment, or I'd be working on it...

Simon
Posts: 1368
Joined: Sun Sep 11, 2011 2:32 pm
by AndrewS » Wed Jun 20, 2012 6:52 pm
FrozenCanuck: Rather than chasing dead-ends, maybe your obvious enthusiasm would be better spent on trying to theme Linux on your Raspi to look like OSX? http://gnome-look.org/content/show.php/ ... tent=56577
User avatar
Posts: 3626
Joined: Sun Apr 22, 2012 4:50 pm
Location: Cambridge, UK