1

I have NAND flash memory dump, as a separate MTD partitions copied from NAND flash chip use built-in nanddump commands. I need to reflash some corrupted MTD partitions. In order to reflash partitions properly, should I use the partition dump that contain only the actual data, cleaned first from OOB data dummy chunks?

2 Answers 2

1

This depends very much on how exactly you plan to write the data back; some options would accept only "payload", others may need OOB too.

If you use U-Boot's nand write, it seems it accepts data without OOB but you need to erase target pages manually first.

3
  • I used U-boot built-in commands nand erase and nand write. Before flashing I used python script to process dump and separate the actual data from OOB data. The test was unsuccessful, when I tried write data, an error was shown Attempt to write non page aligned data. 13548080 bytes written: ERROR. Before this I tried also write raw partition dump (with OOB), but linux kernel didn't loaded, not sure what was wrong with my dump.
    – minto
    Sep 16, 2019 at 19:37
  • 1
    @minto maybe this will help e2e.ti.com/support/legacy_forums/embedded/linux/f/354/t/…
    – Igor Skochinsky
    Sep 16, 2019 at 21:53
  • Cleaned dump is 13548080 bytes in size. NAND device have Block size 16384, page size 512, OOB size 16 bytes. 13548080 bytes is incomplete 26462 pages. A complete 26462 pages is 26462 x 512 = 13548544 bytes. The difference is 464 bytes: so need I append these 464 bytes for the complete page?
    – minto
    Sep 18, 2019 at 18:36
1

It depends. For example Samsung XSR stores information about the blocks in spare area, thus you need to have to dump both data and spare.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.