diff options
author | Ville Herva <vherva@vianova.fi> | 2006-07-14 00:31:16 +0300 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-07-15 13:39:10 +0100 |
commit | c4e7fb313771ac03dfdca26d30e8b721731c562b (patch) | |
tree | ce57227007ea980dcd37e5f7af3bc6b83a91a3bf /drivers/ieee1394/sbp2.c | |
parent | 9a909867d2eca7727d0d5884df96e791e3531f24 (diff) |
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>
Diffstat (limited to 'drivers/ieee1394/sbp2.c')
0 files changed, 0 insertions, 0 deletions