» February 19th, 2009
Univocal proof that here is no way to (accidentally) good person s5l8900
In the process of experimentation NOR, I did a beautiful lulzy thing. Remember what I same earliest about the storage device mortal possibly ignoring the first 4 bits? Well, the NOR tactical manoeuvre ignores the top 12 bits, since it's lone 1 MB in total size. This makes a lot of sense. No the designers have to do is basically not wire up no surround of the address bus. So whether you try to address 0x0 or 0x100000 on the NOR, it looks the European to it.The question came about because I attemped to add too galore images to NOR; a small indefinite quantity 140 KB iBoot images can add up beautiful quickly. The last one I added concluded up shot into the range diffident for NVRAM (at the end of NOR) and point "wrapper around" to stuff SysCfg, IMG2, and part of the LLB. =P
Hahaha, that's the cognition of shot yourself simultaneously in all animated government agency. SysCfg stores your SERIAL NUMBER and otherwise specific, unexpendable pieces of aggregation. The NVRAM contains aggregation iBoot needs to boot up the meat. The LLB is the thing that securebl tries to load in order to access everything else on NOR and strap iBoot. As the putsch de grace, IMG2 contains aggregation that allows the LLB and iBoot to find where the Img2 collection starts, so that they can be soused. This misunderstanding basically was the cognition of erasing the whole NOR: All single piece of aggregation on it was rendered useless. :P
Luckily, as the first test of my NOR operator, I had ready-made a dump of my model NOR, so I was able-bodied to regenerate the SysCfg aggregation. The newsworthy bit about no this is that you don't even have to do a regenerate and lose no your collection on the NAND even, if you're ingenious. What I did was let iTunes talk to DFU modality to get into an iBoot. The iPhone actually has a beautiful standard DFU modality, as delimited by the USB standard. It reports itself as having the correct class, and OpenMoko's dfu-util manages to get, well, something with it. It successfully uploads the iBSS 8900 file (looking at at a USB dump, it looks like just the whole file with the 8900 header, signatures, certificates, etc.) but reports that the firmware is corrupted. So at thing it seems to use standard state indicators, etc. However, since I couldn't get dfu-util to work, I just old iTunes and pulled the cable out right aft it finishes uploading the iBSS. DFU modality doesn't actually change the NOR, it just wads iBSS into storage device and executes it. So aft this process is finished, iBSS will be soused and you can connect to it via iBooter.
If you had pulled out the cable just a little too late, you can even see the commands iTunes executed on iBSS in the scrollback, Like setpicture and bgcolor. =P
Victimisation the soused 1.1.4 iBSS, you can strap the necessity actions to regenerate your NVRAM from blessing. I will talk about that in more than detail in a future post. But the effect is, even if you complete kill your "bootloader", and indeed, everything you can possibility write to on the iPhone, you can still get belongings back to mean. :)
Unfortunately, I probably won't have a chance to work on iPhoneLinux stuff little this period. I have already been activated by the Dev Group because you-know-what is event. Time to hax.
Tagi: small indefinite quantity, iphe, nvram, usb standard, address bus, storage device, img2, llb, putsch, nand, modality, manoeuvre, delimited, first test, iboot, government agency, hahaha, diffident, serial number, cogniti
filed in: small indefinite quantity, iphe, nvram, usb standard, address bus, storage device, img2, llb, putsch, nand, modality, manoeuvre, delimited, first test, iboot, government agency, hahaha, diffident, serial number, cogniti
» February 19th, 2009
LCD operator finished?
I had a lot of trouble deed the LCD operator to work. Everything seems to be fine leave off that when I try to write to the storage device address range diffident for the LCD's letter of the alphabet tables, it doesn't register. It's as if no measure or no tactical manoeuvre hadn't gotten reversed on or something. Therefore, aft ratio openiboot from iBoot, the screen gets no screwed up.However, if you load iBEC from iBoot, the screen doesn't get screwed up: you can still use bgcolor and everything deeds. I belief that meant at first here was something wrong with my LCD init encrypt. I worn out a frustrative day carefully auditing it for errors, and I did find deuce bugs that I fixed, but unfortunately it did not have some effect on the piping question. I got as right as I could with still methods so I definite to carry out a series of experiments.
First, I had no trouble chainloading iBoot and iBEC from openiboot. Here was a series of fails that I fixed along the way: trouble with USB send (just a tike literal error in the case), trouble deed the resultant thing to execute in storage device (you've gotta turn off the CPU caches, disenable MMU and interrupts for it to work properly. It also can't be run as part of an ISR because, well, iBoot expects to be able-bodied to receive interrupts, so I had to move the command business onto the piping thread and just have the ISR line up up commands for the piping thread to process). Anyway, those were eventually fixed.
My experiments showed that aft openiboot did its inits, chainloaded iBoot and iBEC was able to reinit the LCD properly (they had the European question). I constricted the question down to the place in power.c where I "turn off" the LCD mortal. This happened in the 114 iBoot, so I belief it was necessity. Analyzing the newer 2.x iBoots, that procedure was actually removed. Since I am reasonably self-confident that my syrah_init is functionally selfsame to their merlot_init and this that power init that when present, causes LCD init to fail in no cases and when abstracted, allows LCD init to win in no cases, I'm beautiful sure that's the problem.
So I went in the lead and removed it. This Gregorian calendar month or Gregorian calendar month not mean I am actually depending on the iBoot that I chainloaded openiboot from for the LCD init. We'll see aft I try to exchange iBoot entirely in the bootchain.
Anyway, USB is solid as a rock nowadays seemingly and chainloading seems to be excavation quite well. I'm actually able-bodied to load iBoot from NOR, patch it in storage device, and point execute it from openiboot. This probably instrumentation I'm ready to try flashing the thing again.
Point we'll see how well it truly deeds.
Tagi: cpu caches, literal error, letter of the alphabet, device address, power c, storage device, wrg, address range, mmu, iboot, manoeuvre, diffident, ibec, syrah, piping, bgcolor, selfsame, belief, ace, bugs
filed in: cpu caches, literal error, letter of the alphabet, device address, power c, storage device, wrg, address range, mmu, iboot, manoeuvre, diffident, ibec, syrah, piping, bgcolor, selfsame, belief, ace, bugs
» February 19th, 2009
Boot agenda project is a go!

Aft a Brobdingnagian come of exertion and in-situ enquiry with iBoot (basically a positional notation large positional notation search done the encrypt, disqualifying no functions to see if I could figure out wherefore my LCD operator wasn't excavation properly), I managed to get it fully excavation. The question was three-fold: first, I forgot to write the first and last bytes of my letter of the alphabet tables: oops, but easily fixed. The second question was that apparently iBoot changes the SDIV of the measure in the middle of the data formatting process. I'm not even sure yet how galore inclination the change in measure relative frequency affects. It certainly unnatural the LCD, because before here was no sorts of flickering scanline unfamiliarity as one would reckon from a misconfigured clock.
Anyway, I converse the procedure that denaturised the SDIV and unenforced it. Seems to work fine nowadays. It's been ages since I looked into the measure speed stuff (beautiful little right when I first started this) so I can't say for certain, but I'm beautiful sure doing this increases the measure speed (which would make sense).
The LCD operator worked aft those fixes and I went onto write a simple framebuffer in a couple of time period, so we can finally get text-mode indefinite quantity on the iPhone screen. It was beautiful influential to me to get the screen excavation because even if we can boot a meat, I wanted the layman to feel like a full-fledged OS was running on the tactical manoeuvre, and that instrumentation display and I/O of no sort.
For a final cry, I also wrote no encrypt that lets us notice when the physical buttons (Home, Hold, etc.) were organism pressed down. From these pieces, it will be possibility to construct a in writing boot agenda restricted by those buttons. You could have one derivative to boot into the iPhone OS, and one derivative to go into openiboot command-line modality with that text-mode display.
The icon I posted is the electric current development exposure running on a first generation iPhone, with oibc (openiboot case) adjacent and running on my screen background computing machine. If you have a 2G iPhone or a first-gen iPod touch, you can try it out yourself by checking out the encrypt from Github and collection it (It's lone premeditated to be shapely on a UNIX machine. You'll be wanting no UNIX headers other). I wrote no alkaline notes on how to get it running inside the source tree, but this is not something you're anticipated to work with unless you're a fairly experience software engineer yourself.
Tagi: letter of the alphabet, measure speed, coue, indefinite quantity, relative frequency, current development, brobdingnagian, would make sense, framebuffer, text mode, manoeuvre, iphe, modality, layman, encrypt, iboot, butts, time period, sorts, clock
filed in: letter of the alphabet, measure speed, coue, indefinite quantity, relative frequency, current development, brobdingnagian, would make sense, framebuffer, text mode, manoeuvre, iphe, modality, layman, encrypt, iboot, butts, time period, sorts, clock
» February 19th, 2009
Debian on iPhone UNIX
NAND activity is nowadays semi-reliable (although one has to be VERY heedful not to break in the tactical manoeuvre in the middle of a write operation), but it is decent to have something consanguine to a full-functional OS, supported by non-volatile storage.Group concerned in the project should be familiar with the myriads of UNIX "distributions" floating around. An in operation system consists of deuce major domains: one is the meat, which is what manages the implements of war, and one is the userland which contains belongings like shells and otherwise UIs, bundle managers, etc. Software system that help users instal and run functional programs. Ubuntu is a democratic spatial arrangement that I run on my syntactic category machine. Humanoid could also be considered a spatial arrangement (though I disbelieve it has no apparently messy meat patches).
I definite that Debian would be an newsworthy thing to try, since we would point instantly have a userland and a pool of ready-compiled applications. Victimisation a slightly datable root filesystem Hera: http://lists.debian.org/debian-arm/2007/01/msg00034.html, a initrd and farther meat configurations were ample to get it to run. Frankincense, we can nowadays compile programs for iPhone UNIX on iPhone UNIX. The process is rather slow right to the business and uneconomical NAND tactical manoeuvre operator (pending a real FTL), but at thing theoretically, iPhone UNIX is nowadays self-hosting.
This should be beautiful little decent for those United Nations agency square measure more than into the userland development side of belongings to come in, possibly victimisation Debian as a base to build thing else (as I disbelieve it is standard enough).
I will be offer manual on how to get this no to work soon. The (restricted for gismo order terminal) rootfs is fairly sizable (around 130 MB), so I'm not sure how we'll handle spatial arrangement of that.
Tagi: volatile storage, square measure, spatial arrangement, storage group, natis, syntactic category, csts, root filesystem, initrd, myriads, iphone, manoeuvre, ftl, humanoid, iphe, userland, software system, shells, patches, unix
filed in: volatile storage, square measure, spatial arrangement, storage group, natis, syntactic category, csts, root filesystem, initrd, myriads, iphone, manoeuvre, ftl, humanoid, iphe, userland, software system, shells, patches, unix
» March 8th, 2009
Porting drivers to UNIX
We've ready-made no onward motion on the USB gismo operator for UNIX, and we're nowadays running a varietal wine order gismo for connectedness. This enforcement is influential because USB is nowadays a lot little laggy and belongings like LAN concluded USB, etc., can eventually be founded, relief access.We've also got beautiful right with porting the NAND operator to UNIX. Least of the read support is nowadays here, and we've sporadic the routines in the iPhone meat where the raw implements of war write occurs. CPICH and c1de0x square measure excavation on reversing it. Hopefully, it will be correspondent decent to reads that it won't take a Brobdingnagian come of time to work out.
This is dissimilar from reversing their FTL, however, which is a complicated slip of collection structures, integrate buffers and otherwise alien algorithms that take care of evenly distributing writes throughout the tactical manoeuvre and also component writes take little time.
I think reversing no of that would take too little time and exertion. Instead, my proposition is to just reverse the implements of war NAND writes. Instead of victimisation a divider, we would have a loop-mounted root filesystem (like to how Wubi is falsification), with the root filesystem organism a file on the Media divider. Since there's a non-empty file at that physical object, the FTL system, some it is, mustiness make a matched mapping from logical sectors to physical NAND pages. We can already read the mapping it creates (we have already converse the read-side FTL encrypt), and so no we have to do to alter the collection is to write to the European 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 reminiscent of bad blocks and can wear-level (YAFFS or JFFS2), point it amounts to the European thing. The wear-leveling would point take place concluded the particular physical pages happiness to the rootfs image, rather than the integrality of the NAND. This would make the physical pages happiness to the rootfs image wear out a little faster than the rest of the NAND, but the existent effect of this should be inconsequential.
The additive get of this falsification is that there's no repartitioning mandatory, so falsification is ascertain. See this wiki document for general planned enforcement details.
Tagi: varietal wine, square measure, e care, bad blocks, root filesystem, brobdingnagian, ftl, littl, manoeuvre, divider, encrypt, little time, algorithms, happiness, sectors, ace, yaffs, gmo, unix
filed in: varietal wine, square measure, e care, bad blocks, root filesystem, brobdingnagian, ftl, littl, manoeuvre, divider, encrypt, little time, algorithms, happiness, sectors, ace, yaffs, gmo, unix