Booting directly to JFFS2 question

David Woodhouse dwmw2 at infradead.org
Thu Jan 15 06:20:48 EST 2004


On Thu, 2004-01-15 at 12:01 -0800, James Ewing wrote:
> Hi David,

Please don't top-post. See http://www.infradead.org/~dwmw2/email.html

> It looks like JFFS2 uses a 2 byte magic number with a varying 2 byte block
> type. My guess is that I need to look for any of the permutations and return
> a pointer if found.

The magic will be 4-byte aligned, and you can also check the CRC to
avoid false positives.

> My next question is how to add the boot/startup code to do_mounts.c.
> Currently it finds the super_block and returns it to the routines for ext2,
> cramfs, etc.
> 
> What would the return to JFFS2 look like?

I'm not sure I understand -- what does the 'return to cramfs/ext3/etc.'
look like? 

You set up the partitions appropriately, and then the normal root mount
code mounts /dev/mtdblock1 as jffs2, surely?

-- 
dwmw2




More information about the linux-mtd mailing list