1 From eea9e1785e4c05c2a3444506aabafa0ae958538f Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Sat, 17 May 2014 03:35:02 +0200
4 Subject: [PATCH 4/5] try auto-mounting ubi0:rootfs in init/do_mounts.c
5 To: openwrt-devel@lists.openwrt.org
7 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
9 init/do_mounts.c | 26 +++++++++++++++++++++++++-
10 1 file changed, 25 insertions(+), 1 deletion(-)
12 diff --git a/init/do_mounts.c b/init/do_mounts.c
13 index 82f2288..faba9c6 100644
14 --- a/init/do_mounts.c
15 +++ b/init/do_mounts.c
16 @@ -432,7 +432,27 @@ retry:
22 +static int __init mount_ubi_rootfs(void)
24 + int flags = MS_SILENT;
28 + err = do_mount_root("ubi0:rootfs", "ubifs", flags, \
42 #ifdef CONFIG_ROOT_NFS
44 #define NFSROOT_TIMEOUT_MIN 5
45 @@ -526,6 +546,10 @@ void __init mount_root(void)
46 change_floppy("root floppy");
49 +#ifdef CONFIG_MTD_ROOTFS_ROOT_DEV
50 + if (!mount_ubi_rootfs())
54 create_dev("/dev/root", ROOT_DEV);
55 mount_block_root("/dev/root", root_mountflags);