From bb66fc2a8b40d6c8ecd093cf1b358d4476ab1e1c Mon Sep 17 00:00:00 2001 From: Martin Michlmayr Date: Sun, 13 Jun 2010 17:23:14 +0100 Subject: hook-functions/init/scripts/local: add support for ubifs. MODULES=dep fails when / is ubifs. This patch adds support for something like root=ubi0:rootfs when ubi is modular. Quoting Martin: It essentially does three things: - adds the correct modules to the ramdisk (for MODULES=dep and MODULES=most) - reads ubi.mtd= from the command line - loads ubi with the ubi.mtd info and ignores the "Waiting for root" check I've successfully tested this with a kernel with modular ubi and with the following boot variants: console=ttyS0,115200 ubi.mtd=2 root=ubi0:rootfs rootfstype=ubifs console=ttyS0,115200 ubi.mtd=2 root=ubi0_0 rootfstype=ubifs With console=ttyS0,115200 ubi.mtd=2 root=/dev/ubi0_0 rootfstype=ubifs I get an error that it cannot mount root but I suspect this is an ubifs error and has nothing to do with i-t (since at this point I can manually mount it with -t ubifs ubi0_0 whereas the /dev/ variant doesn't work). Tested with MODULES=dep and MODULES=most as well as with a kernel that has ubifs built in. Closes: #582858 Thanks: Martin Michlmayr Signed-off-by: Martin Michlmayr Reviewed-by: Michael Prokop --- hook-functions | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'hook-functions') diff --git a/hook-functions b/hook-functions index 1a0e097..3ce081d 100644 --- a/hook-functions +++ b/hook-functions @@ -237,6 +237,10 @@ dep_add_modules() # most of the commands below only work with block devices. if [ "${FSTYPE}" = "ubifs" ]; then manual_add_modules "${FSTYPE}" + # add some modules required by ubifs on which it doesn's depend + manual_add_modules deflate + manual_add_modules zlib + manual_add_modules lzo return fi @@ -415,6 +419,11 @@ auto_add_modules() block) copy_modules_dir kernel/drivers/block ;; + ubi) + for x in deflate zlib lzo ubi ubifs; do + manual_add_modules "${x}" + done + ;; ieee1394) for x in ohci1394 sbp2; do manual_add_modules "${x}" @@ -447,6 +456,7 @@ auto_add_modules() auto_add_modules ata auto_add_modules i2o auto_add_modules dasd + auto_add_modules ubi auto_add_modules ieee1394 auto_add_modules firewire auto_add_modules mmc -- cgit v1.2.3