NAND flash mounting problem
doodiexx at gmail.com
Wed Feb 28 11:24:31 EST 2007
> > According to the second table in
> > http://www.linux-mtd.infradead.org/faq/nand.html#L_nand_bootloader
> > It should be 85 19 03 20 ...
> I had a look inside flash_eraseall, and it seems like it converts
> the 16-bit magic values to target_endian, which is by default the CPU's
> native endian. So 0x1985 becomes 0x19, 0x85 and 0x2003 becomes 0x20,
> 0x03 on a big endian CPU. The values you read are therefore correct as
> far as I can tell, but of course, I could be missing something...
In include/mtd/jffs2-user.h, cpu_to_je16 swaps bytes if target_endian
is not equal to __BYTE_ORDER. But this is always false since it's
value is set to __BYTE_ORDER in flash_eraseall. Does that make sense ?
> It's a bit strange that you don't get any error messages from the
> kernel before the mount fails though. Enabling MTD debugging might help
> of course. Btw, did you check dmesg? If the loglevel is set too low,
> you might not see the error messages on the console.
I thought I checked that, but now I see a message in dmesg when I try to mount:
jffs2_get_sb(): dev_name "/dev/mtd1"
jffs2_get_sb(): path_lookup() returned 0, inode 93db1254
mtd debug level is at max (3), jffs2 debug is also set to max (2), but
that's all I see.
I've read somewhere that mount complains if the magic number were
wrong, but I don't see that either.
Anyone, any ideas ?
More information about the linux-mtd