set bootargs nousb root=/dev/mmcblk0p2 vmalloc=56MB psplash=false mtdparts=nand:0x10000000@0(All)ro console=ttyS2,38400n8 The flash chip in the iPAQ 21x is a samsung_k9f2g08UXA. 256MB total normal space. 264MB including OOB (including ECC) It has 2084 byte pages + 64 bytes OOB data for each. 64 pages make an erase block. 2048 bytes/page == 'large page mode' 131072 pages total 2048 blocks total totalPages > 65536 ---> row_addr_cycles = 3 page_size = 2048 ---> col_addr_cycle = 2 Standard 'partitions' (in the divided'ed up flash chip sense) are: start size description 0x00000000 0x21000 Unknown, contains strings "HMIT" "IMBO" "OLSO" 0x00021000 0x10000 Marvell PXA 'OEM Boot Module' (OBM) Copy 1 0x00031000 0x0F000 OBM Copy 2 0x00040000 0x40000 Windows CE Ethernet Bootloader (for the Intel Zylonite Development Platform) 0x00080000 0x20000 IPL? Second stage of windows boot 0x000A0000 0x01000 ARGS table (used by win CE Ethernet bootloader) 0x000A1000 ??? 0x000B0000 ??? 0x001C0000 < 0xE1C0000 (225.75MB) The main windows block (DSK1) 0x0e380000 0x1900000 (25MB) The iPAQ File Store area. (IPQ1) 0xfc800000 0x380000 (3.5MB) ??? Remaining DSK1 is 0x0E0E0000 (224.875MB) total and takes < 0x??? (225.75MB) of actual flash IPQ1 is 0x018C0000 ( 24.750MB) total and takes 0x1900000 (25.000MB) of actual flash Was playing with IPL/2nd stage winCE bootloader. Put it back but windows now won't boot. The bootloaders are ok but it fails later. ARRRRRRRG. I forgot the OOB data. For every 2048 byte page there are 64 bytes of Out Of Band (OOB) data. The last 24 are/can be used by the PXAs NAND controller for hardware ECC. The rest can be used by OS (and are by winCE)... oops. Writing in linux has the HW ECC on but doesn't seem to end up with anything in the OOB blocks. Need a way of saving the flash backup /with/ the OOB data. Reg settings in linux: ofset windows linux u-boot after OBM NDCR 0 e185dfff e104dfff 8104dfff c104dfff NDTR0CS0 4 00161c3c 00141c1c 00131313 003f3f3f NDTR1CS0 c 0f3d00a2 0f3d00a2 0a290072 0ff000ff NDSR 14 00000d03 00000500 00000d03 NDPCR 18 00000000 00000000 00000000 NDBDR0 1C 00000000 00000000 00000000 NDBDR1 20 00000000 00000000 00000000 NDREDEL 24 00000000 00000000 NDDB 40 0000f601 e12fff1e 00000000 NDCB0 48 000d3000 000d3000 NDCB1 4C cbaa0000 00810000 NDCB2 50 00000000 00000000