The magic bitmask question - again

Fredrik Jönsson B (AL/EAB) fredrik.b.jonsson at
Mon Oct 31 10:52:32 EST 2005

> How do you define your partition layout?

mtd1: 00300000 00040000 "kernel"
mtd2: 07d00000 00040000 "jffs"

> Are you sure that the beginning of the first jffs2 partition 
> of MTD is not overlapping with your "keep-off" region? 

Yes, and studying the data on the partition confirms this.

> Eventually you could be trying to interpret parts of the 
> kernel image as jffs2 filesystem. In that case you will get 
> such messages.

That came to my mind, but this is unfortunately not the case, unless the scanning algorithm starts at wrong adress, i.e, at adress 0x0, and not the beginning of the /dev/mtd/2 (I'm using devfs) partition, at address 0x00300000. 

I just realized that this would be consistent with the output since the actual kernel spans four erase blocks after which the flash is empty up to the jffs partition. An inspection of the kernel partition confirms that the scan is starting from the 0x0 address.

The relevant bit of the command line for the kernel at boot is:
root=/dev/mtdblock/2 rootfstype=jffs2 mtdparts=USERFLASH:3072k(kernel),-(jffs)

I would have expected the jffs2 scan to start att the /dev/mtd/2 device when the file system is mounted at boot, but this is obviously not the case. However, if I boot from something else and mount the partition afterwards it works just fine, with no error output from the scan.

I'm not quite sure what I am missing here.


	/Fredrik Jönsson Norrström

More information about the linux-mtd mailing list