loading cramfs initrd at startup

Ben Dooks ben-linux at fluff.org
Fri Sep 19 13:51:27 EDT 2008

I am looking at a customer who's system loads an cramfs initrd
from /dev/mtdblock1 (NAND) via a hack that makes mtdblock map
out bad blocks so that the initrd loader does not see errors
during the load.

I was wondering if anyone had any comments about a better way
to do this without patching up drivers/mtd/mtdblock.c?

My initial thoughts are:

1) Add a configuration option to make mtdblock remove any defects
   from a specified parititon (fromalise the hack)

2) Add new block device, possibly named mtdcont which provides an
   read-only interface and a similar function to mtdblock but
   mapping out the defects.

3) Change the initrd loader to understand the block layout of the
   system and skip bad blocks during loading.

Ben (ben at fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

More information about the linux-mtd mailing list