Reason iPhone UNIX system?

This is a post I wrote a long time agone, when this diary was first planned. I definite to hold disconnected on notice it, because I thinking it'd be better to do many subject posts before coating philosophically. I think it is still suited, so as we work on reverse engine room the NAND FTL, here's many mental object for thought.

Porting UNIX system to the iPhone is an strenuous project. We bequeath be stressful to develop an intact set of style drivers for documented instrumentality and then seek to run a full-fledged operative organization on it. This thread speculates "10 life" or "3 time period" as the be of time it'd take to get UNIX system up and running on the iPhone. Perhaps this figure would be inaccurate on a x86 political program, or early platforms with instrumentality for which style drivers square measure already statute or for which at most corroboration is gettable, but we have no much hazard on the iPhone.

This comment on a O'Reilly Measuring system article astir NerveGas's iPhone Open Exercise Development book says, with perhaps a lowercase too large indefinite quantity round for my taste, that developers should not waste time on the iPhone, a open political program, and pay time statesman productively on OpenMoko or Automaton: truly open platforms. Orchard apple tree should frankincense be chastised for not fashioning the iPhone open. His point is well-taken though. Reverse engine room Apple's mark is ineffectual and ought to be inessential. Reason do I displease when I lavatory good develop on an open political program instead with no much worthless effort?

Finally, I have bald-faced agnosticism even from my comrade Dev Group members when I first talked astir this project. The iPhone already has a perfectly operable operative organization that we lavatory develop on. Reason does it take some other unmatchable? Sure, UNIX system power be cool, but what applied use would it have? How does it set the awful be of deed that would take to be put in?

So. Reason do I displease? Reason should we bother?

Part of the answer is that I don't opt which political program I hack on founded on how hackable it is. I opt it founded on how large indefinite quantity I like it. I don't ain an OpenMoko style; it simply doesn't look as refined as the iPhone, and support is nonexistent for it. It wouldn't make meaning to pay it to use it, solitary to pay it to hack on it. Time this Crataegus oxycantha work for early dwell, it's simply not the way a (relatively) privation building complex scholar does things. As for the Automaton, I'm not too positive astir how surprising it bequeath be from the videos I've seen and besides: It doesn't even be yet! In general, the statesman dwell use a style, the statesman hackers use it, and frankincense the statesman it is hacked on. Useableness frankly trumps hackability.

The early part of the answer is that iPhone UNIX system bequeath actually be of awful value. There bequeath be no statesman take to port applications period of play: The applications already run on the iPhone! Also, with a intimate gist, we lavatory do every kinds of things I've unwanted to do: doing transferred possession affine work with the wi-fi for natural event. Positive, psychological feature that we square measure gaining/will have gained astir the iPhone instrumentality bequeath be of dumfounding applied value to the alcoholic beverage iPhone residential area. We've always unwanted to be healthy to plug in the iPhone as a unsubdivided USB mass depot style. With USB and NAND FTL drivers, we lavatory actually utilise this ourselves.

Perhaps my least measurable point is how iPhone UNIX system bequeath regard the varied open platforms in physical process. The iPhone has revolutionized the way the grocery thinks astir waterborne applied science and present different waterborne platforms square measure in physical process: OpenMoko, Google's Automaton, and Waterborne Ubuntu (thinking the last is not targeted for phones). Every of these projects square measure founded on UNIX system, and "founded on UNIX system" instrumentation that, by account, they "use the UNIX system gist" and the UNIX system gist is exactly what we're porting. As long as the gist activity, the rest of the operative organization bequeath barely take to be untouched at every! (fine print: provided that the on the job constellation of the gist lavatory support every the features the userland requires).

Envisage OpenMoko on the iPhone. Automaton on the iPhone. Ubuntu Waterborne on the iPhone. Consumers bequeath have pick, and not many Linux-hippie high-flown choice-for-the-sake-of-choice pick: Every of these platforms have major physical property backside them and it is same opening they bequeath end up animate thing better than the iPhone's political program (have better UI, statesman exercise support, etc.). Also, envisage what it bequeath mean for the developers of these platforms: A preparation userbase of millions of users. If many an dwell lavatory already instal and try out unmatchable of these platforms, it'll be immoderate easier to pull users to pay the instrumentality, and developers to develop for the political program. Frankincense, I do not think we square measure harming the open platforms by underdeveloped on the iPhone. In info, if every goes well, we bequeath be allowing them to stamp down the Orchard apple tree iPhone.

Of course, I recognise the answer to every of this. "That sounds good, present show me the mark." It's measurable not to overpromise and underdeliver, so I bequeath be same people. What I have good aforementioned is the hope, the C. H. Best opening finish. But good having that as a theory is inviting sufficiency to set on the job on this project. However, to be trusty, my master copy circumstance (as expressed to the dev group) for on the job on iPhone UNIX system was "for Skillz.app", our tongue-in-cheek term for on the job on something merely to sharpen one's ability or to fulfill one's wonder. But honestly, what did you wait from a "linksman"? :)

We have already successful statesman change of location with openiboot than many an dwell have awaited would ever dematerialize. Reverse engine room drivers is a punishing process, but unmatchable that doesn't expect the hazard of discovery a transferred possession invulnerability: It good happens slowly and steadily, rather than unpredictably. Presumably aft the drivers square measure in place, the UNIX system gist bequeath "good work" without too many an early changes, since it is intentional to be relatively movable, so we ought not to have many an problems. Aft the gist activity, I supernatural virtue sufficiency developers bequeath metamorphose concerned and a metropolis userland lavatory be mature without too large indefinite quantity trouble. The userland work is large indefinite quantity inferior bad from a time-investment point of view.
 
 

NAND filesystem present legible!

Amazingly sufficiency, the FTL_Read stuff from last time unit was beautiful large indefinite quantity correct! Aft that, it was relatively superficial to port period of play the HFS+ mark I've already statute (which was in everlasting C... finally that [evaluate] design final result has been innocent =P).

As you lavatory see in the screenshot below, with the intelligence Rotter rewrite, you lavatory search the filesystem from openiboot!


Succeeding on the identify is to port openiboot period of play to the iPod touch and iPhone 3G. It's probably good a problem of golf shot in several numbers game for the GPIO ports, but we'll see.

Aft that, I bequeath utilise poorlad's bootmenu (which everyone seems to like).

Aft that, well... We have beautiful large indefinite quantity every the inclination present, so we'll start looking for at the UNIX system gist. If you're a UNIX system gist effigy UN agency would be voluntary to help (preferrably you have feel porting UNIX system to new ARM platforms), wish leave a report present. I lavatory do least of the rowdy work, but it'd be metropolis if individual lavatory show me how to set up the source manoeuver properly for the new port.
 
 

Porting drivers to UNIX system

We've successful many change of location on the USB contraption wood for UNIX system, and we're present running a nonproprietary series contraption for abstraction. This exploit is measurable because USB is present a bunch inferior laggy and things like local area network period of play USB, etc., lavatory eventually be based, modification access.

We've also got beautiful immoderate with porting the NAND wood to UNIX system. Least of the read support is present there, and we've obscure the routines in the iPhone gist where the raw instrumentality write occurs. CPICH and c1de0x square measure on the job on reversing it. Hopefully, it bequeath be similar sufficiency to reads that it won't take a Brobdingnagian be of time to work out.

This is several from reversing their FTL, however, which is a complicated peck of collection structures, change buffers and early strange algorithms that take care of evenly distributing writes throughout the style and also fashioning writes take inferior time.

I think reversing every of that would take too large indefinite quantity time and deed. Instead, my offering is to good reverse the instrumentality NAND writes. Instead of exploitation a partition off, we would have a loop-mounted root filesystem (like to how Wubi is setup), with the root filesystem animate thing a smoothen on the Media partition off. Since there's a non-empty smoothen at that object, the FTL organization, some it is, mustiness make a one-to-one chromosome mapping from sensible sectors to forceful NAND pages. We lavatory already read the chromosome mapping it creates (we have already turned the read-side FTL mark), and so every we have to do to change the collection is to write to the equivalent pages we would've read from. Of course, this instrumentation that wear-leveling and bad block manipulation is not performed. However, if we use a filesystem that's conscious of bad blocks and lavatory wear-level (YAFFS or JFFS2), then it amounts to the equivalent thing. The wear-leveling would then take place period of play the special forceful pages belonging to the rootfs representation, rather than the totality of the NAND. This would make the forceful pages belonging to the rootfs representation wear out a lowercase faster than the rest of the NAND, but the actualised validness of this should be inconsequential.

The additive help of this setup is that there's no repartitioning requisite, so setup is master. See this wiki document for taxon planned exploit details.
 
 

Page2RSS Monitored Page: Hack the iPhone - Send has unmoved

The Page http://www.hacktheiphone.com/74/iphone_information_74_1.html is monitored for updates. There square measure no changes sensed since 09/10/07 17:44:28.
 
 

Flush Agenda Creative activity

I think the C. H. Best way to appendage this is for anyone concerned to pass on a offering via e-mail to me astir the flush agenda. Then, I lavatory put up the pictures on the diary for dwell to report and have an message astir. We lavatory then figure out which unmatchable to use or maybe many alignment of proposals or in whatever case, figure it out in a cooperative residential area style process.

I don't really have an message on what the logotype should look like, whether it should be cartoony or not. I solitary think it should look good. =P

There square measure same many subject constraints on the flush agenda. I'm voluntary to figure out some subject solvent there needs be in order to get things to expose properly. Unmatchable thing to keep in mind is that distance on the NOR is at a nonsignificant value, and raw element collection is dearly-won but procedurally generated stuff like gradients square measure opening. The solitary cardinal electric current agenda options square measure the iPhone OS and the openiboot housing, but eventually a UNIX system derivative bequeath be added. I lavatory try vitality as well, but again, you'd have to have an view of how it lavatory be through with without exploitation up a bunch of NOR space.

But yeah, make us pretty!

Many change of location on the NAND: Thanks to a Brobdingnagian be of letter of the alphabet oink work by CPICH, the NAND project is disconnected the ground. We already have sufficiency to get the specific drive geometries, and I've statute and tested the DMA routines that square measure warm the heart of the difficulty present. Hopefully, we lavatory floor the raw NAND soon and take a glint at what genial of wear destruction collection structures we're treatment with.