summaryrefslogtreecommitdiff
path: root/hook-functions
diff options
context:
space:
mode:
authorMartin Michlmayr <tbm@cyrius.com>2010-06-13 17:23:14 +0100
committerMichael Prokop <mika@debian.org>2010-06-16 16:48:06 +0200
commitbb66fc2a8b40d6c8ecd093cf1b358d4476ab1e1c (patch)
treeadb3f1eba8cec96f11666e6e25145909a87be388 /hook-functions
parent3054e3ed58dee5a70bcd462c71573d380f03bd7a (diff)
downloadinitramfs-tools-bb66fc2a8b40d6c8ecd093cf1b358d4476ab1e1c.tar.gz
initramfs-tools-bb66fc2a8b40d6c8ecd093cf1b358d4476ab1e1c.zip
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 <tbm@cyrius.com> Signed-off-by: Martin Michlmayr <tbm@cyrius.com> Reviewed-by: Michael Prokop <mika@debian.org>
Diffstat (limited to 'hook-functions')
-rw-r--r--hook-functions10
1 files changed, 10 insertions, 0 deletions
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