summaryrefslogtreecommitdiffstats
path: root/patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch')
-rw-r--r--patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch b/patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch
new file mode 100644
index 0000000..bb7bb9f
--- /dev/null
+++ b/patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch
@@ -0,0 +1,42 @@
1From 838abc7e5f43ea40a2cc05ebd6c7321b6d84b057 Mon Sep 17 00:00:00 2001
2From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
3Date: Fri, 20 Nov 2015 14:01:26 -0600
4Subject: [PATCH 103/124] init: do_mounts: recreate /dev/root
5
6Rootfs shows as is mounted in /dev/root, but this devices is not present in
7/dev directory.
8
9Signed-off-by: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com>
10---
11 init/do_mounts.c | 8 ++++++++
12 1 file changed, 8 insertions(+)
13
14diff --git a/init/do_mounts.c b/init/do_mounts.c
15index dea5de95c2dd..d74a346b2dfa 100644
16--- a/init/do_mounts.c
17+++ b/init/do_mounts.c
18@@ -549,6 +549,7 @@ void __init mount_root(void)
19 void __init prepare_namespace(void)
20 {
21 int is_floppy;
22+ int err;
23
24 if (root_delay) {
25 printk(KERN_INFO "Waiting %d sec before mounting root device...\n",
26@@ -602,6 +603,13 @@ void __init prepare_namespace(void)
27 devtmpfs_mount("dev");
28 sys_mount(".", "/", NULL, MS_MOVE, NULL);
29 sys_chroot(".");
30+#ifdef CONFIG_BLOCK
31+ /* recreate the /dev/root */
32+ err = create_dev("/dev/root", ROOT_DEV);
33+
34+ if (err < 0)
35+ pr_emerg("Failed to create /dev/root: %d\n", err);
36+#endif
37 }
38
39 static bool is_tmpfs;
40--
412.11.1
42