public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* The magic bitmask question - again
@ 2005-10-31 12:31 Fredrik Jönsson B (AL/EAB)
  2005-10-31 13:03 ` Artem B. Bityutskiy
  2005-10-31 13:15 ` David Jander
  0 siblings, 2 replies; 4+ messages in thread
From: Fredrik Jönsson B (AL/EAB) @ 2005-10-31 12:31 UTC (permalink / raw)
  To: linux-mtd


This may be a stupid question, but I still need to ask.

We have a system with a 128Mb NOR-flash of which 3Mb is used as a keep-off area for the kernel and the rest for a JFFS2 root file system. The system boots and mounts properly and everything seems fine, but during mounting a number of messages such as the one below are shown for each of the first four erase-blocks of the mtd partition.

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x4800 instead

Is this the expected behaviour? I've been fiddling with the padding option to mkfs.jffs2 in order to make the message go away without success. I've noted in the JFFS paper that four free flash sectors is "required" for garbage collection to work properly. Is it some sort of spare four sectors that mkfs.jffs2 creates for this purpose or what?

I've seen this question a number of times on the web, but have not seen it properly answered anywhere. 

Grateful for any help on the matter,

	/Fredrik Jönsson

^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: The magic bitmask question - again
@ 2005-10-31 15:52 Fredrik Jönsson B (AL/EAB)
  0 siblings, 0 replies; 4+ messages in thread
From: Fredrik Jönsson B (AL/EAB) @ 2005-10-31 15:52 UTC (permalink / raw)
  To: linux-mtd


> 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.

Regards,

	/Fredrik Jönsson Norrström

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-31 16:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-31 12:31 The magic bitmask question - again Fredrik Jönsson B (AL/EAB)
2005-10-31 13:03 ` Artem B. Bityutskiy
2005-10-31 13:15 ` David Jander
  -- strict thread matches above, loose matches on Subject: below --
2005-10-31 15:52 Fredrik Jönsson B (AL/EAB)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox