Generating a NAND Image
Is there a way to get a complete image off of a NAND part? I have a partition describing the complete chip, but I need the OOB data inline with the rest of the data. We need to send the data off to have it pre-burned in the flash chips.
Thanks,
Earl
Quoted 5 lines · Earl Manning
Is there a way to get a complete image off of a NAND part? I have a partition describing the complete chip, but I need the OOB data inline with the rest of the data. We need to send the data off to have it pre-burned in the flash chips.
mtd/util/nanddump.c
The only missing thing there is the userspace supllied ECC function. See nandwrite.c for an example. If you don't have it, you will read without ECC and you will get tons of kernel warnings.
P.S.
Could you provide a patch please, if it works ? :):)
Signature · 5 lines
Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: [email protected]
Quoted 10 lines · Thomas Gleixner
Quoted 4 lines · Earl Manning
Is there a way to get a complete image off of a NAND part? I have a partition describing the complete chip, but I need the OOB data inline with the rest of the data. We need to send the data off to have it pre-burned in the flash chips.
mtd/util/nanddump.c
The only missing thing there is the userspace supllied ECC function. Seenandwrite.cfor an example. If you don't have it, you will read without ECC and you will get tons of kernel warnings.
The one problem with doing it this way is that you end up with the bad blocks in your image file too. THis will be a problem when you go to manufacturing because the manufacturing writer needs to skip over bad blocks it detects as it writes. Your image will then not fit any more and you'd be marking good blocks bad.
Rather, IMHO, - if you're using YAFFS- suck the structure off the NAND onto a host (eg. NFS copy the directory structure to the host) and use mkyaffsimage. Send them the myyaffsimage output file. I guess there's a JFFSx process to do the same thing.
Alternatively (useful to both YAFFS and JFFS2) hack nanddump.c to not write bad blocks to the dump file. This will definitely work for YAFFS, but I'm not 100% sure it will work for JFFS2.
... and submit a patch :-).
-- CHarles
Quoted 5 lines · Charles Manning
The one problem with doing it this way is that you end up with the bad blocks in your image file too. THis will be a problem when you go to manufacturing because the manufacturing writer needs to skip over bad blocks it detects as it writes. Your image will then not fit any more and you'd be marking good blocks bad.
True. Did not htink about that.
Quoted 4 lines
Rather, IMHO, - if you're using YAFFS- suck the structure off the NAND onto a host (eg. NFS copy the directory structure to the host) and use mkyaffsimage. Send them the myyaffsimage output file. I guess there's a JFFSx process to do the same thing.
There's no OOB generator yet, but that's a good idea for volunteers :)
Quoted 3 lines
Alternatively (useful to both YAFFS and JFFS2) hack
nanddump.cto not write bad blocks to the dump file. This will definitely work for YAFFS, but I'm not 100% sure it will work for JFFS2.
Sure, why not. JFFS2 does not rely on bad blocks. :)
Quoted 1 line
... and submit a patch :-).
:)
Signature · 5 lines
Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: [email protected]