kernel-ark/drivers/mtd
Ville Herva c4e7fb3137 block2mtd.c: Make kernel boot command line arguments work (try 4)
Trying to pass kernel command line arguments to block2mtd at boot-time does
not work currently. block2mtd_setup() is called so early that kmalloc()
fails nevermind being able to do open_bdev_excl() (which requires rootfs to
be mounted. This patch only saves the option string at the early boot stage,
and parses them later when block2mtd_init() is called. If open_bdev_excl()
fails, open_by_devnum(name_to_dev_t()) is tried instead, which makes it
possible to initialize the driver before rootfs has been mounted. Also gets
rid of the superfluous parse_name() that only checks if name is longer than
80 chars and copies it to a string that is not kfreed.

With this patch, I can boot statically compiled block2mtd, and mount jffs2
as rootfs (without modules or initrd), with lilo config like this:

   root=/dev/mtdblock0
   append="rootfstype=jffs2 block2mtd.block2mtd=/dev/hdc2,65536"

(Note that rootfstype=jffs2 is required, since the kernel only tries
filesystems without "nodev" attribute by default, and jffs is "nodev").

Compared to first version of this patch, this one does not copy the
parameters to the global buffer if init has already been called, and the
global array is marked as __initdata.

Compared to the second version of this patch, module build is fixed.

Compared to the third version of this patch, statically compiled block2mtd
driver with no boot-time parameter no longer gives spurious error 'cannot
open device ""'

Signed-off-by: Ville Herva <vherva@vianova.fi>
Acked-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-07-15 13:39:10 +01:00
..
chips Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
devices block2mtd.c: Make kernel boot command line arguments work (try 4) 2006-07-15 13:39:10 +01:00
maps Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
nand [MTD NAND] Fix lookup error in nand_get_flash_type() 2006-07-15 13:26:18 +01:00
onenand [MTD] Rework the out of band handling completely 2006-05-29 15:06:51 +02:00
afs.c
cmdlinepart.c [PATCH] mtd cmdlinepart: allow zero offset value 2006-03-31 12:18:48 -08:00
ftl.c
inftlcore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
inftlmount.c [MTD] Rework the out of band handling completely 2006-05-29 15:06:51 +02:00
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild 2006-06-26 11:05:15 -07:00
Makefile
mtd_blkdevs.c [PATCH] sem2mutex: drivers/mtd/ 2006-03-31 12:18:48 -08:00
mtdblock_ro.c Make mtdblock_ro unconditionally readonly 2006-04-17 15:48:16 +01:00
mtdblock.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mtdchar.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mtdconcat.c [MTD] NAND Expose the new raw mode function and status info to userspace 2006-05-30 00:37:34 +02:00
mtdcore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
mtdpart.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
nftlcore.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
nftlmount.c [MTD] Rework the out of band handling completely 2006-05-29 15:06:51 +02:00
redboot.c [MTD] Fix build warnings in RedBoot MTD partition parser. 2006-05-16 17:31:15 +01:00
rfd_ftl.c [MTD] RFD FTL: Be noisier, and don't assume block without RFD magic are erased 2006-05-17 12:45:34 +01:00