I am using the IPNC RDK 3.9.1 and trying to run from NAND, but every now and then after I flash the filesystem, it fails to mount on startup. For example, currently the filesystem is 189 MiB on my Ubuntu host, when I ubinize it, the resulting file is 101248 KiB, which suggests that the filesystem is being compressed somehow. After I write it to a 208 MiB NAND partition, when it tries to mount, it fails write at PEB 791, which at a PEB size of 128 KiB, just happens to match the size of the ubinized file.
[ 1.207155] 8 ofpart partitions found on MTD device 8000000.nand
[ 1.213190] Creating 8 MTD partitions on "8000000.nand":
[ 1.218558] 0x000000000000-0x000000020000 : "NAND.SPL"
[ 1.226324] 0x000000020000-0x000000420000 : "NAND.u-boot"
[ 1.234410] 0x000000420000-0x000000440000 : "NAND.u-boot-env"
[ 1.241474] 0x000000440000-0x000000a40000 : "NAND.kernel"
[ 1.250268] 0x000000a40000-0x00000d240000 : "NAND.file-system"
[ 1.327504] 0x00000d240000-0x00000d280000 : "NAND.u-boot-spl-os"
[ 1.334902] 0x00000d280000-0x00000de80000 : "NAND.data"
[ 1.345724] 0x00000de80000-0x000010000000 : "NAND.reserved"
[ 1.364721] ubi0: attaching mtd4
[ 1.646141] ubi0 warning: scan_peb: valid VID header but corrupted EC header at PEB 791
To me that suggests a bug either in ubinize, when the filesystem gets compressed, or when it is supposed to get uncompressed. Is that when it is written to flash (I'm using nandwrite from uboot) or by the driver when it gets mounted? Any ideas?