issue with eraseall
I am using the MTD stuff with a Samsung NAND chip and all is going well, except that I had to change a line in the eraseall program. As it turns out the clean marker written by the eraseall program puts sizeof( struct jffs2_unknown_node ) [12 bytes] into the totlen element. When jffs2 tries to mount the now blank partition, the cleanmarker check fails because the value is not 8.
In my implementation I just changed the value written by eraseall to be 8.
The offending pieces of code are:
util/eraseall.c:84 fs/jffs2/wbuf.c:671-675
Is there a better place to post this information?
Thanks,
Earl Manning
Quoted 5 lines · Earl Manning
In my implementation I just changed the value written by eraseall to be 8. The offending pieces of code are:
util/eraseall.c:84 fs/jffs2/wbuf.c:671-675
I don't see a piece of offending code there
util/eraseall.c: 106 ...
// format for JFFS2
if (!jffs2)
continue;
// write cleanmarker
---> if (isNAND) {
struct mtd_oob_buf oob;
oob.ptr = (unsigned char *) &cleanmarker;
oob.start = erase.start;
---> oob.start += meminfo.oobsize == 16 ? 8 : 6;
---> oob.length = meminfo.oobsize == 16 ? 8 : 2;
if (ioctl (fd, MEMWRITEOOB, &oob) != 0) {
fprintf(stderr, "\n%s: %s: MTD writeoob failure: %s\n", exe_name,
mtd_device, strerror(errno));
continue;
}
} else {
This is for NOR !
}Signature · 5 lines
Thomas ________________________________________________________________________ linutronix - competence in embedded & realtime linux http://www.linutronix.de mail: [email protected]