Dingoonity.org

Dingux (Dingoo Linux) => Development => Topic started by: indrora on October 26, 2011, 07:30:12 pm

Title: Doing NAND and taking a leaf out of the Zaurus book
Post by: indrora on October 26, 2011, 07:30:12 pm
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:


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:


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.

Title: Re: Doing NAND and taking a leaf out of the Zaurus book
Post by: pcercuei on October 26, 2011, 07:55:43 pm
Note that I already have a dingoo on which the whole OpenDingux is installed on the NAND (no SD card is required). However it requires a new bootloader which is not yet stable enough, so it will probably see light someday, but not anytime soon.
Title: Re: Doing NAND and taking a leaf out of the Zaurus book
Post by: indrora on October 28, 2011, 01:03:32 am
Note that I already have a dingoo on which the whole OpenDingux is installed on the NAND (no SD card is required). However it requires a new bootloader which is not yet stable enough, so it will probably see light someday, but not anytime soon.

Title: Re: Doing NAND and taking a leaf out of the Zaurus book
Post by: jagotu on October 28, 2011, 10:26:35 am
Look here: http://dingoowiki.com/index.php?title=Dingux:OpenDingux