It’s still early days, but this has the potential to put more fuel on the Apple rumour mill fire than anything else in recent times. A BA thesis by Dutch student Tristan Schaap details how, during his internship at Apple’s Platform Technologies Group, he ported Darwin to a certain ARMv5 developer board. A few blog articles later, and the headline has already turned into ‘Mac OS X ported to ARM’. So, what have I been running on my iPhone and iPad all these years?
Tristan Schaap is a student at the Delft University of Technology in Delft, The Netherlands. The TU Delft is a well-respected technical university founded in 1842. Apparently, there’s close ties between Apple and the TU Delft, as Schaap was accepted as an intern at Apple.
Not just any intern, though – he was accepted into the Platform Technologies Group, a subdivision of the Core OS department responsible for embedded platforms in use by Apple. I’m not sure how intern-happy Apple is, but judging by the company’s focus on secrecy, I highly doubt they accept just anyone. This is further exemplified by the fact that after his internship, Schaap joined Apple as an employee.
His project as intern was pretty intriguing: it was his job to port Darwin, Mac OS X’s foundation, to an ARMv5te processor. More specifically, Marvell’s MV88F6281, a processor containing Marvell’s custom Sheeva core. His first goal was to get Darwin up and running in single-user mode; his second goal was to get it up and running in multi-user mode.
Schaap wrote a BA thesis about his undoubtedly awesome and gratifying experience working as an intern at the very core of Apple’s software division – I’m pretty sure several of you would die for such an opportunity. The thesis has been embargoed since 2010, when it was written (most likely at Apple’s request). However, the TU Delft finally published it recently, so now we can take a peek at just what Schaap was working on at Apple.
And here is where the internet goes wrong. Headlines about Apple working on porting Mac OS X to iPad-style ARM processors roll of the tongue nicely and fuel rumour fires quite well, but they’re wholly misleading and have little to nothing to do with either reality or with what Schaap has accomplished as an intern.
First and foremost, Mac OS X (large parts of it anyway, and most certainly Darwin) has been running on ARM for a long time, at least since the launch of the original iPhone, but most likely since years before that. Schaap even mentions this quite clearly in his thesis.
Second, Schaap wasn’t porting what people typically see as Mac OS X, but ‘only’ the lower levels we know as Darwin. That’s not to belittle the work Schaap has done, but just to make sure we understand what he’s been working on. Schaap is quite clear that he is porting Darwin, and not Mac OS X.
Third, he wasn’t porting it to ARM in general, but more specifically to ARMv5 – heck, to a specific ARMv5 core, even. This is troublesome for less technology-inclined people to understand, but ARM is not as (relatively) unified and compatible as, say, x86 or PowerPC is. ARM processors from different vendors, or even from the same vendor, generally aren’t particularly compatible. This is part of the reason why it takes many smartphone makers so long to port new Android versions to specific devices.
And lastly, technically speaking, Schaap wasn’t doing a port from scratch. He clearly explains some ARMv5 code was already in Darwin, but that it was neglected and incomplete. His project was more to get that code up and running and complete it. if you look at the release history of Darwin on ARM (roughly analogous to iOS releases), you can see why; the first iPhone ran an ARMv6 core, so ARMv6 code (and later) in Darwin is fully working and up-to-date. There has never been an ARMv5 iPhone (let alone an iPad) and as such, Apple never had much of an incentive to do much with that code.
It’s pretty obvious to anyone that Apple already has Mac OS X running on ARM, and there are probably several ARM-powered MacBooks, and maybe even iMacs, shuffling around the Cupertino campus. It would appear – but this is speculation – that Schaap’s project as an intern was more to allow him to demonstrate his skills and learn valuable things about working at Apple than it was about “porting Mac OS X to ARM”. Why would Apple leave such a valuable and sensitive task to an intern who has to write a public report about it?
In any case, Schaap’s thesis provides interesting insight into Darwin development at Apple, and that is reason enough in and of itself to read it.
Just wondering, since I’ve read that parts of the BSD userspace need to be installed when jailbreaking.
(And also, wouldn’t Apple’s wireless routers use Darwin?)
The iOS kernel is Darwin/xnu, but presumably maintained separately from the version shipped with OS X.
As for the userland, Cydia seems to mostly install GNU utilities.. I’m not really sure why the jailbreak community opted against using the source made available by Apple.
IMHO, that would have been preferable.. but it was enough of an environment for me to port over some OpenBSD stuff.
Still.. from my iPod Touch 4G (5.0.1).
$ uname -a
Darwin iPod 11.0.0 Darwin Kernel Version 11.0.0: Tue Nov 1 20:33:58 PDT 2011; root:xnu-1878.4.46~1/RELEASE_ARM_S5L8930X iPod4,1 arm N81AP Darwin
$
Edited 2012-02-08 01:52 UTC
Sure, it doesn’t have menu bars, etc. But the iPhone is MacOS ported to the arm processor. SMH.
Have something against interns do you? 😉
“‘Mac OS X ported to ARM’. So, what have I been running on my iPhone and iPad all these years?”
My guess would be you’ve been running iOS on your iPhone and iPad, not OS X.
It’s strange you’re modded down, because you are right.
Quite simple, you can’t grab an OS X dvd and install its contents on an iPhone, nor can your run iOS on a Mac.
Both are related, but iOS is a modified mini OS X.
Read the whole post again, not just what you quoted. Thom was pointing out that this guy ported Darwin, not OS/X, and iOS uses Darwin just like OS X is, so clearly a Darwin ARM port is not a new thing.
http://forums.appleinsider.com/showpost.php?p=2039414&postcount=26
Just doing a quick google it seems to be used in quite a few embedded solutions
Edited 2012-02-07 16:11 UTC
Having worked on some of the after affect bugs on an OS that had recently been ported (at the time, not recently) to a 64 bit architecture I can say what he did was still a ton and a half of work.
I wouldn’t be surprised if there is a move to ARM within the next 5 years – ARM has already announced ARMv8 which it jointly developed with nVidia under the name ‘Project Denver’ so I wouldn’t be surprised if we ended up seeing sometime in the future, when ARMv8 is ready that Apple makes the switch to 64bit ARM.
Apple’s become pretty cozy with Intel in the past few years, but I’m sure that you’re right. Maybe Apple will always use Intel chips for it’s higher-end computers, but I’m sure how they remember how uncomfortable it was to get chained to the comparatively-stagnant PPC platform.
Intel is far from stagnant, though, and ARM is many years behind in performance. Switching to ARM right now would be like switching to Atom, i.e. relaunching the Air as a netbook. It does not quite make sense.
Here are some recent benchmarks on Linux, with Tegra 2 being not quite half as fast as a Core Duo (from 2006):
http://www.phoronix.com/scan.php?page=article&item=compulab_trimsli…
Great resource. I didn’t mean to imply that Intel was stagnant, just that Apple, and other vendors, are obviously heavily invested in ARM on mobile, and that Apple in particular knows what it’s like to end up with all its eggs in the wrong basket. Right now there’s a clear division with ARM in the battery-efficiency column and Intel in the performance column, but that’s likely to shift over time.
And the shift could certainly be that Intel makes big inroads into efficiency and erases ARM’s advantage there.
Edited 2012-02-07 17:47 UTC
Intel has been claiming for many years that it is capable of reaching ARM efficiency and has consistently failed.
Their technological advance (2 years ?) is not sufficient. Actually, it is both what makes it very sucessful and a very isolated company.
In a world of SOCs, either Intel must do the whole platform optimising every single block to their “special” fabs (with different settings for power or performance), or they licence the Atom or whatever x86 to TSMC or GloFo and have no advantage anymore. A x86 has no magic appeal for phones, consoles, GPS nav, USB keys, tablets, set-top boxes, digital cameras… All these gadgets where the CPU core must cost less than 20$.
I know that the huge success of ARM is also related to the fact that, being a fabless company, they are considered as a fair and neutral player by Nvidia, TI, Qualcomm, Marvell, Freescale, Samsung… Having too close ties with one of these vendors would actually be very negative for ARM. There are hundreds of niche markets looking for bespoke devices.
When x86 will be relegated to very-high performance servers and everything else will use SOCs, Intel may need to open their fabs and licence their technology to attract fabless companies and OEMs like Apple looking for multiple sources.
Actually, this is how AMD got its x86 licence thanks to IBM…
(Sorry, I realize the rant above is quite muddy)
But you’re comparing this generation of ARMv7 to Intel but skip what ARMv8 bring to the table for both 32bit and 64bit computing specifically when it comes to performance. Right now it would be suicide for them to adopt ARM but I could see in the future ARMv8 laptops, desktops, workstations etc. centred around very efficient multicore CPU’s with software taking advantage through a combination of Grand Central, GPU offloading for things like video encoding/decoding. In 5 years time a lot can happen.
Edit: And the benchmarks btw say more about how optimised the software is rather than whether or not ARM lacks raw performance when all things remain constant.
Edited 2012-02-08 01:01 UTC
So, we can expect a port of Darwin to PandaBoard or Genesi Cortex?
Apple has recently filed for international trademark protections of “macroscalar,” its name for various patented optimizations for efficiently executing code on a processor – does anyone know much about this and care to comment?
http://www.patentlyapple.com/patently-apple/2012/02/apples-macrosca…
more info here
http://www.appleinsider.com/articles/12/02/06/apple_trademarks_its_…
i may be totally wrong and i suspect i am, but looking at the patents i thought that they applied more to Apple Grand Central Dispatch concept introduced with Snow leopard, the idea of generalising computer power, be it a CPU, GPU or any other specialist chip/processor and to send the appropriate instructions to it, so for example some complex image or video processing could be sent to the GPU instead of the CPU?
Completely beside the point, but a _BA_ thesis? I hardly believe such a thesis would be accepted by any Department of Humanities in any university. You certainly meant BSc?
I attended Illinois Wesleyan University, which only issues BAs, but has strong Biology and Computer Science programs. It can happen.
In Europe (on the continent, at least!) you need to actually write and defend a thesis to obtain a bachelor’s degree.
It can be quite intense, too. My Italian friend’s research kinda blew up right before her defense; she had to re-perform a large number of chemistry experiments in just a couple weeks (and rewrite her entire thesis!).
So, it’s not just “plush” humanities which write theses!
I kinda doubt strictly either is typically issued by Dutch universities – the classifications across countries & educational systems don’t map quite as neatly as we like to pretend, many people (Thom possibly included, certainly me) don’t really “feel” the differences.
Just because it had been done before doesn’t mean the intern didn’t also port the code.