I am working on an embedded Linux system (5.10.24), where there is a NAND FLASH as storage.
The NAND FLASH is partitioned into 4 parts, part 0 is used for u-boot, part 1 is used for kernel, part 2 is used as UBIFS, part 3 is another UBIFS partition.
So when Linux boots up, it shows there are
/dev/mtd0, /dev/mtd1, /dev/mtd2, /dev/mtd3.
Now I can read data of u-boot from
/dev/mtd0 (raw FLASH, no filesystem) through POSIX-C file operations.
Then I want to saved some data to NAND FLASH partition 0 by writing to
All the file reading/writing operations are done well, no error reported.
But when I reboot system back to u-boot, it complains that there are lots of errors like
spi nand read oob error ,ret= -74 , oob addr e0000, ooboffs 0, ooblen 64.
It seemed that NAND OOB has something wrong, why does this error happen and how to write data to raw NAND FLASH through