

Magenta - "It is fully binary compatible with iPhone OS 5.0" - mparlane
http://crna.cc/magenta.html

======
kvnn
This is the sort of person that I want to be engaged with:

* highly opinionated

* driven by personal interest

* not afraid to go down the worm hole and come up with little public recognition and enormous personal gain

This is the sort of project that makes me grin:

* highly engrossing project page

* mysterious motivations

* unknown implications

* legally ambiguous

I love this shit. Keep it up, Christina.

~~~
christina_b
I love you.

~~~
Cushman
HN needs more conversations like this.

Edit: Ooh, controversy. I'm quite sincere about this-- love to chat with
whoever disagrees.

------
cs702
I love it: hacking for the sake of hacking, just to have fun.

Christina's announcement reminds me a little bit of Linus Torvalds's 'this
won't amount to anything' post to comp.os.minix on August 25, 1991.[1]

I'm by no means suggesting or implying that Magenta will be as successful as
Linux or anything like that, just that the announcements posted by Christina
and Linus strike me as very similar in tone and attitude :-)

[1]
[https://groups.google.com/group/comp.os.minix/msg/b813d52cbc...](https://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044b?pli=1)

------
christina_b
By the way, the sources are up on <http://crna.cc/> now.

~~~
robot
Would it be super hard (and, illegal) to port upper iOS layers as binaries?

~~~
Xuzz
The legal route would to be to provide an installer that downloads e iOS
frameworks from Apple, so you aren't redistributing anything. However, it
would still be quite a bit of work: iOS has a not-insignificant layer of
drivers in the not-yet-recreated IOKit kernel framework (although some are
open source), and likely many other low-level layers that would need to be
recreated.

However, it's certainly possible, but as 'mparlane says, it would be a lot of
(difficult) work.

------
10dpd
"You may ask, why am I doing this? The answer is: no f'ing idea :)"

Love it.

~~~
shiven
No graphics. No problem. Great, open (source) system to test iOS internals and
hack at the lower level stuff.

Also, nice way to test exploits, proof of concept backdoors, virii, trojans
and the like without requiring major investment into the apple ecosystem.

Maybe, even the beginnings of a third option besides Android and iOS ?

Thanks!

~~~
geon
How could you test exploits, when the underlying os core is linux, not darwin,
and all higher level libraries are completely different implementations as
well?

~~~
tryke
Not to mention the complete lack of Sandboxing and Mandatory Code Signing?

------
robot
We can easily virtualize this and run it aside Android on Galaxy Nexus.

But that would be meaningful only if it was possible to run iOS apps:

" * Will it run iPhone OS apps? * No, because I'm not aiming to have
compatible high level frameworks. Just think about how much work is required
to have a 100% compatible implementation of UIKit or Celestial. HOWEVER, the
CoreOS part should be 100% (or 99%) compatible. Just not the higher level OS.
If you're just interested in this because it will "run iOS apps" please go
away. "

I wonder if it would be possible to port the binary ios stack.

~~~
dspillett
"I'm not aiming to have compatible high level frameworks" doesn't mean it
won't happen, just that it isn't one of her personal targets. The beauty of an
open release is that if others want it enough they can work on it.

Let her concentrate on the bit she finds interesting (the core) and that will
provide a nice stable platform for others to build the higher level stack on
top of if they wish.

Of course there are probably legal issues hidden in there somewhere, so care
will need to be taken especially if importing binaries rather than building
your own API compatible versions.

While this won't have anything like the scale of Linux, I don't think the
comparison some have made regarding the "shape" of the project is exaggerated.
She seems to have the right attitude to be the "benevolent dictator" over
something significantly wider than she could do alone.

------
zvrba
And this is announced just after the judge has decided APIs are not
copyrightable!

------
nitrogen
I look forward to seeing Phoronix fan the OS war flames by benchmarking Linux
running BSD binaries vs. BSD running Linux binaries.

More importantly, what planet do you come from, and is it accepting
immigrants?

------
flatline3
There are a number of past projects very similar to this one. The two I
remember off-hand:

\- <http://hcpnet.free.fr/applebsd.html> \-- NetBSD in-kernel COMPAT_MACH /
COMPAT_DARWIN support. This got to the point of being able to run XDarwin,
which is a pretty major step towards being able to run the WindowServer:
<http://hcpnet.free.fr/xdarwin.jpeg>

\- <https://github.com/shinh/maloader> \-- A user-space Mach-O binary loader.
The only goal was to be able to run Apple's binary toolchain on Linux, which
it is able to do.

It's very possible to implement the necessary kernel APIs to run Mac / iOS
Darwin binaries. Where you run into trouble is the _massive_ software stack
that sits on top of those OS APIs.

Without $10M or more to spend on development, it's simply not feasible to
produce full binary-compatible replacements for Apple's software frameworks.
The best you can hope for is to copy over Apple's software from a real
installation, and then run it atop your own kernel.

I love hacks like this, so god speed to christina_b. This is awesome.

To those of you telling the Christina to put her work on github to get
contributors, I don't think that is particularly helpful advice. The barrier
to entry on a project like this has nothing to do with the SCM being used.

~~~
kqa5
From your first example:

"This project is dead due to a lack of interest from users."

Do they really mean "lack of interest from other developers"?

They shouldn't be doing it for users, they should be doing it for themselves,
and to their credit, I think that's often why they do what they do. They have
more common sense than the usual. That's why their work is so good. (It's also
because they have more of a cathedral-like structure, and not just with
respect to the kernel.)

Who are these "users" we need interest from? How do we measure interest? Among
OS's NetBSD's user base (non-corporate) is very small.

This developer chose the Linux kernel not to please users by making the
"popular choice" or because it is necessarily the easiest to work with. As the
blurb says, it's a matter of driver support.

Yes, Godspeed.

~~~
flatline3
In the case of the NetBSD project, users and developers were the same people,
and there wasn't much interest.

When looking for people with the necessary skills to contribute, you'll find
that the majority qualified individuals are Mac OS X kernel/systems engineers,
who already have Apple hardware, and don't have any particular need to support
an alternative clone of their existing target platform.

This was certainly the case with the NetBSD project. When it was contemporary,
I kept tabs on it, but never bothered to contribute -- Mac OS X worked fine
for me.

Revisiting the problem space now, my development time would be better spent
working on the open source alternatives (such as Android), rather than
attempting to clone Apple's stack. It's just too big. Personally I work with
Android on OMAP4 hardware.

------
kqa5
An open source smartphone OS that

\- you can compile yourself easily

\- which has a real command line and

\- is not controlled by some company.

This would be most welcome.

Palm-sized "UNIX". A true opens source "UNIX phone". No company-controlled
virtual machines or high level GUI frameworks. Lower complexity, less bloat,
same communication functionality.

------
RandallBrown
I'm a little confused as to what this actually is. It's a version of linux
that can run apps compiled for the iPhone?

~~~
kvnn
Actually, so am I. Lets go through it together:

1) "Implementation of Darwin" [1]

2) "On top of the Linux kernel" [2]

3) "Binary compatible with iOS 5.0" [3]

4) "The final goal is probably recreating the iPhone OS 1.0 stack" [4]

\--------

[1] "Darwin forms the core set of components upon which Mac OS X and iOS are
based"

<http://en.wikipedia.org/wiki/Darwin_(operating_system)>

[2] "The main component of most computer operating systems"

<http://en.wikipedia.org/wiki/Kernel_(computing)>

[3] "In computing, a computer that can run the same binary code intended to be
run on another computer is said to be binary-compatible"

<http://en.wikipedia.org/wiki/Binary_code_compatibility>

[4] "Initial OS release".

[http://en.wikipedia.org/wiki/IOS_version_history#iOS_1.x:_in...](http://en.wikipedia.org/wiki/IOS_version_history#iOS_1.x:_initial_OS_release)

------
zmanji
If this can run CoreFoundation, then can't anyone with the iOS SDK target this
platform with no modifications to the SDK?

~~~
Xuzz
Yep, that's how the binaries for it are currently built: with the iPhone SDK.
However, higher-level stuff hasn't been developed (e.g. graphics), and the
native iOS libraries would need emulation of additional lower-level services
(like IOKit for hardware interaction) to run.

------
tantalor
The "teaser",

<http://crna.cc/test2.png>

~~~
apaprocki
Liking the ANSI. Maybe someone here has a few iCE/ACiD contacts laying around
to make some serious art for it.

~~~
christina_b
I'm glad you like it.

------
bprater
What is Magenta -- in plain english? And what does binary compatible with iOS
5 mean?

~~~
masklinn
> What is Magenta -- in plain english?

Not sure what could be clearer than:

> Magenta is an implementation of Darwin/BSD on top of the Linux kernel.

> And what does binary compatible with iOS 5 mean?

<http://en.wikipedia.org/wiki/Binary_code_compatibility>

That Magenta will run programs compiled for iOS5 unmodified (if they don't use
APIs which haven't been reimplemented yet of course)

~~~
shalmanese
That's not clear at all.

This guy has basically built an OS from scratch that can run on iPhones and
supports iPhone apps without having to recompile them. Currently, only the
base layer has been built so graphics/sound etc do not work but the goal is to
emulate the entire iPhone OS.

It's based on the linux kernel and the Darwin OS which is the open source core
of the Mac OS X.

~~~
ericmoritz
Think of it as WINE project for iOS. He's building the libraries that iOS code
depends on just like WINE recreated all the Windows DLLs so that Windows
programs could run on Linux/OSX

~~~
gcr
She.

<http://crna.cc/>

------
sciurus
This makes me wonder how long until there is a project that tries to
reimplement the ios libraries, similar to what GNUstep is doing for Cocoa.

<http://www.gnustep.org/>

~~~
nglevin
It's not quite what you describe, but Ivan Vučica is currently working on a
GSoC project to implement a subset of UIKit with parts of Quartz and
CoreAnimation in GNUstep.

[http://www.google-
melange.com/gsoc/project/google/gsoc2012/i...](http://www.google-
melange.com/gsoc/project/google/gsoc2012/ivucica/11001)

"This proposal covers implementing a flexible animation API compatible with a
certain popular existing desktop and mobile platform, as well as adding APIs
compatible with a popular mobile platform. This will allow extremely user-
friendly interfaces, as well as allow development or porting of applications
that use CoreAnimation or UIKit API on platforms that don't yet support it."

------
SomeCallMeTim
It's a cute tech demo, but:

    
    
       * Will it run iPhone OS apps?
       	* No, because I'm not aiming to have compatible high level frameworks. Just think
       	  about how much work is required to have a 100% compatible implementation of UIKit
       	  or Celestial. HOWEVER, the CoreOS part should be 100% (or 99%) compatible. Just not
       	  the higher level OS. If you're just interested in this because it will "run iOS apps"
       	  please go away.
    

I think the submission title is deceptive -- by "fully binary compatible" the
developer means that it runs executables compiled for iOS.

~~~
batista
binary compatibillity is a standard and well defined term in programming, and
this is it.

It is not about having access to all iOS Cocoa Touch etc libraries, or running
iOS apps.

~~~
SomeCallMeTim
Really? You think this made #1 on the front page because people are excited
that you can run ls from Darwin on a non-iPhone ARM7 system that's really
running Linux? Which has its own ls?

No, people saw the headline and voted it up thinking that "binary
compatibility" with iPhone meant compatibility with iPhone 5.0, not just with
Darwin. I bet most didn't even read the article first.

Honestly, if there's not even an eventual goal to run iOS apps, I don't see
the point. Linux is there underneath already, and just about anything you
could compile for Darwin could be compiled for Linux. What iOS "binaries"
exist (other than apps) that would make such an environment useful?

I understand (from the FAQ) that the author doesn't even ATTEMPT to justify
the project's existence. That's FINE. Not slighting the developer. Sometimes
you climb a mountain Because It's There (TM).

But the excitement around it was generated because of a deception.

~~~
batista
> _Really? You think this made #1 on the front page because people are excited
> that you can run ls from Darwin on a non-iPhone ARM7 system that's really
> running Linux? Which has its own ls? No, people saw the headline and voted
> it up thinking that "binary compatibility" with iPhone meant compatibility
> with iPhone 5.0, not just with Darwin. I bet most didn't even read the
> article first_

Not that I agree with your explanation about why the article got upvotes, even
if this was the case, it doesn't matter.

There was ABSOLUTELY no deception. The title uses a well known technical term,
and uses it appropriately.

If _some_ people thought the title meant it can also run Cocoa Touch apps,
instead of merely be binary compatible with them, that's _their bloody
problem_.

This is Hacker News, they're supposed to know this kind of thing.

Should the title have been:

"Magenta - "It is fully binary compatible with iPhone OS 5.0, and by fully
binary compatible, I mean it in the actual LITERAL technical way and NOT that
iOS libraries are also implemented, which has nothing to do with 'binary
compatibility' you newbs!", to avoid "deception"?

~~~
SomeCallMeTim
Dude, I've done most of the CS sequence in college (majored in cognitive
science). I've been a professional programmer for 25 years. I do C/C++
development currently, and once upon a time created entire games in assembly
language.

I read HN, Communications of the ACM, and other technical sites and blogs to
keep up on the state of the art. I designed an SDK that was used in over a
hundred commercial products based entirely on its technical merits, and people
have been coming to me asking to pay to license my current (not yet public)
SDK, based on the merits of my last one.

I submit that since I was deceived by the statement, that it was deceptive.
Period.

And as Camillo pointed out, it's frequently applied to libraries. Correctly, I
might add, when those libraries are built into shared objects. The ABI [1]
needs to match, for example, for them to have binary compatibility.

A good example of such libraries would be the entire set of iOS libraries that
would be implied by saying "binary compatible with iPhone OS 5.0."

See [2] if you don't believe me. "Binary compatibility" refers to the ability
to run programs built for an OS, and not just the lowest levels of the OS, but
the whole thing.

A clear title would be "Magenta: Binary compatible with Darwin (the iOS 5
kernel)." A better title might have been "Magenta: Run Darwin (iOS) binaries
on top of Linux."

[1] <https://en.wikipedia.org/wiki/Application_binary_interface>

[2] <https://en.wikipedia.org/wiki/Binary_code_compatibility>

------
duaneb
How do you deal with mach/whatever calls inside the darwin userland? Do you
just replace them with equivalent linux/bsd calls?

------
tomrod
Cool. So what does this mean it can do? Run iPhone OS apps?

~~~
SomeCallMeTim
No.

I tried to post that running iPhone apps wasn't even a design goal, but got
downvoted. [1]

[1] <http://news.ycombinator.com/item?id=4087395>

------
ajasmin
Does it use some of the open source Darwin code from Apple?

~~~
christina_b
Yes, but the code is under APSL so I'm not violating any copyrights. I'm fully
complying with the APSL license.

------
shuri
very cool

------
qqyy
Would it be possible to have a Linux kernel with all it's up-to-the-minute
hardware support together with a BSD userland maybe via DarwinPorts?[1]

For users who prefer a BSD userland to the one GNU offers, this would be
magnificent.

1\. e.g. Debian is doing the reverse: FreeBSD kernel and GNU userland.

------
sounds
Is anyone else theorizing about Apple's response?

whois crna.cc: WhoisGuard protected. WhoisGuard is in L.A; a subpoena and
"Christina" could find the ICS logo on her site and a DMCA takedown notice for
distributing "tools used to violate copyright."

crna.cc says "Will it run iPhone OS apps? * No". But Apple is already suing
Samsung for the Galaxy Tab, Nexus S, and Epic 4G [1] [2], so unless nobody is
interested in taking this idea to completion, Apple could be an enormous
target for cloners.

To me, it's obvious: unlike hardware, where there are still effective barriers
to competition, software like iOS is inherently vulnerable to cloning,
copying, and being replaced.

[1] [http://arstechnica.com/apple/2011/04/bad-touchwiz-apple-
sues...](http://arstechnica.com/apple/2011/04/bad-touchwiz-apple-sues-samsung-
for-patent-violations/)

[2] [http://arstechnica.com/apple/2012/05/apple-samsung-walk-
away...](http://arstechnica.com/apple/2012/05/apple-samsung-walk-away-from-
the-negotiating-table/)

~~~
christina_b
This does not violate anyone's copyrights.

~~~
sounds
I don't have to take a position on that to theorize that Apple can use the
DMCA to take it down, citing 17 U.S.C. Sec. 1201 (a). [1] [2]

Nevertheless I think you're right, it doesn't violate anyone's copyrights.

[1] <http://chillingeffects.org/anticircumvention/faq.cgi#QID91>

[2] [http://en.wikipedia.org/wiki/Anti-
circumvention#Distribution...](http://en.wikipedia.org/wiki/Anti-
circumvention#Distribution_of_Circumvention_Tools)

~~~
anextio
Then why haven't they taken down GNUStep and Chameleon?

Oh right, because APIs are not copyrightable or patentable and it's absolutely
meaningless to attempt to assert ownership over such things.

The reason why you're the only one "theorizing" about what Apple will do is
because most other people here recognize how patents and copyrights work and
why there is a dispute between Apple and Samsung.

~~~
fpgeek
I suspect you know far less than you think you do about how patents and
copyrights actually work. Otherwise you should realize how amazingly silly and
oblivious it is to claim that the _attempt_ to assert ownership over such
things as APIs is meaningless. It is wrong (on that we agree), but we have
ample evidence that even the attempt is far from meaningless:

<http://news.ycombinator.com/item?id=4050490>

