Hi,
I have replaced the nand in my machine (due to too many bad blocks) and have compiled a custom spin of OpenPLI so that I can recover my box.
According to this spansion document, it should be a drop in replacement
http://www.spansion....34ML01G1_AN.pdf
Its not a drop in replacement and I had to tweak the buildscript (why????), I am able to build a fully working image by tweaking the vu inc file (conf/machine/include/vuxxo.inc) like so
#MKUBIFS_ARGS = "-m 2048 -e 126976 -c 4096 -F"
#UBINIZE_ARGS = "-m 2048 -p 128KiB"
MKUBIFS_ARGS = "-m 2048 -e 520192 -c 228 "
UBINIZE_ARGS = "-m 2048 -p 512KiB -s 2048 "
I've manged to dump the following from the box with some luck and am creating the new images based on this info
mtdinfo
mtd0
Name: rootfs
Type: nand
Eraseblock size: 524288 bytes, 512.0 KiB
Amount of eraseblocks: 228 (119537664 bytes, 114.0 MiB)
Minimum input/output unit size: 2048 bytes
Sub-page size: 2048 bytes
OOB size: 64 bytes
Character device major/minor: 90:0
Bad blocks are allowed: true
Device is writable: true
Default UBI VID header offset: 2048
Default UBI data offset: 4096
Default UBI LEB size: 520192 bytes, 508.0 KiB
Maximum UBI volumes count: 128
root@vuuno:/sys/devices/virtual/mtd/mtd0# ubinfo -a
UBI version: 1
Count of UBI devices: 1
UBI control device major/minor: 10:59
Present UBI devices: ubi0
ubi0
Volumes count: 1
Logical eraseblock size: 520192 bytes, 508.0 KiB
Total amount of logical eraseblocks: 228 (118603776 bytes, 113.1 MiB)
Amount of available logical eraseblocks: 0 (0 bytes)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 5
Current maximum erase counter value: 3
Minimum input/output unit size: 2048 bytes
Character device major/minor: 253:0
Present volumes: 0
Volume ID: 0 (on ubi0)
Type: dynamic
Alignment: 1
Size: 219 LEBs (113922048 bytes, 108.6 MiB)
State: OK
Name: rootfs
Character device major/minor: 253:1
The default values dont work for me, even though this replacement nand SHOULD have been a drop in replacement for the old nand (which is EOL). What I'm finding is the image compiles fine, mkubfs makes the image. The machine FULLY boots, but after booting up the nand is corrupted by some process (the nand resize perhaps?). I dont know how to proceed from here
brcmnand_handle_false_read_ecc_unc_errors: Uncorrectable error at offset 3bee000
I've attached a full log of the boot captured from the serial port and would REALLY appreciate it if someone who understands nand layout can tell me what's wrong. There are two logs, one that shows me flashing (without issue) and one of the boot showing the machine boots and then something bombs out and corrupts the nand. I have to flash with USB again to recover to allow box to boot