Hey guys. I think I found a way to do NAND without going insane!
Let me tell the tale of the Zaurus, a device which I have grown to love and adore. The early models had an odd quirk: Everything (and I mean /everything/ was stored in a pseudo-volatile RAM ("Battery Backed Flash") which stored /home, while the / fs was stored as a RO/JFFS2 on NAND. it looked like this:
- 1.2M kernel
- 8M initrd? (some models had trash here)
- 32M / JFFS2 RO
- 32M /home JFFS2 RW
There's a reason Sharp chose the JFFS2 system: It understands "badblocks" -- these nice little markers that MTD devices tell you where there are bits that dont work. FAT doesn't understand that, and most OS's dont care because you can always just buffer around them on FAT. JFFS2 allows for... 12% of the device to be bad.
Later zaurii did something a little more powerful: They made all of the NAND available. On the C1000 I have, my partition table looks like this:
- 28M / - Angstrom JFFS2 (barebones)
- 100M / - Angstrom JFFS2 (GPE)
So, here's what I say we do. the Dingoo has SHITLOADS of space, no? the SD card has problems with corruption (Duh, they're SD cards!) NAND allows for some wonderful things to happen with corruption. SD cards have bad histories with corruption. Really bad histories. Fun fact: All an SD card is is a NAND behind a block-emulation layer without smarts; most NAND devices on the other hand have raw access to the NAND, and therefore can use /actual/ information that the NAND can give you!
I've had a Zaurus that's been reflashed and reflashed and reflashed again and again. I don't have to touch a thing In order for that to work, either. How? the IPL actually understands it.
So, two things:
* Use teh NAND
- Make use of ALL the NAND. really.
- Make the rootfs /JFFS2/ or /ROMFS/
- Add a partition for "user data" (/home/dingux/ anyone?) and one for Rootfs. We can even use one for zImages.
- make g_mass_storage available for the SD.
* Make it EASY to reflash.
- IPL is 8K. You can put a /lot/ in 8K.
- Z uses RESET+C+D or RESET+F+L (depending on version). Make shoulders+down+A or something "Flash from SD!"
- make there two files "rootfs.d" and "zImage.d" that has the root FS and kernel.