From 16b0e3313f53566481c106ace9992e477f8efe9b Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Mon, 22 May 2017 08:43:50 +0200 Subject: patches: Boot time optimizations with ClearLinux patches Signed-off-by: Adrian Calianu Signed-off-by: Adrian Dudau --- .../0103-init-do_mounts-recreate-dev-root.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch (limited to 'patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch') 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 @@ +From 838abc7e5f43ea40a2cc05ebd6c7321b6d84b057 Mon Sep 17 00:00:00 2001 +From: Miguel Bernal Marin +Date: Fri, 20 Nov 2015 14:01:26 -0600 +Subject: [PATCH 103/124] init: do_mounts: recreate /dev/root + +Rootfs shows as is mounted in /dev/root, but this devices is not present in +/dev directory. + +Signed-off-by: Miguel Bernal Marin +--- + init/do_mounts.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/init/do_mounts.c b/init/do_mounts.c +index dea5de95c2dd..d74a346b2dfa 100644 +--- a/init/do_mounts.c ++++ b/init/do_mounts.c +@@ -549,6 +549,7 @@ void __init mount_root(void) + void __init prepare_namespace(void) + { + int is_floppy; ++ int err; + + if (root_delay) { + printk(KERN_INFO "Waiting %d sec before mounting root device...\n", +@@ -602,6 +603,13 @@ void __init prepare_namespace(void) + devtmpfs_mount("dev"); + sys_mount(".", "/", NULL, MS_MOVE, NULL); + sys_chroot("."); ++#ifdef CONFIG_BLOCK ++ /* recreate the /dev/root */ ++ err = create_dev("/dev/root", ROOT_DEV); ++ ++ if (err < 0) ++ pr_emerg("Failed to create /dev/root: %d\n", err); ++#endif + } + + static bool is_tmpfs; +-- +2.11.1 + -- cgit v1.2.3-54-g00ecf