From ad4d4e5cbad3ad875eaa59e0a919c014dfb6a39e Mon Sep 17 00:00:00 2001 From: Adrian Calianu Date: Wed, 27 Sep 2017 10:37:36 +0200 Subject: add guest features from yocto branch Signed-off-by: Adrian Calianu --- .../0113-init-do_mounts-recreate-dev-root.patch | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch (limited to 'patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch') diff --git a/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch b/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch new file mode 100644 index 0000000..047eddb --- /dev/null +++ b/patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch @@ -0,0 +1,42 @@ +From 179b7f41d5509f93cd297cc81c5d8da4a3123d9d Mon Sep 17 00:00:00 2001 +From: Miguel Bernal Marin +Date: Fri, 20 Nov 2015 14:01:26 -0600 +Subject: [PATCH 113/114] 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 40725f0f5fb3..78b5b1dba8ca 100644 +--- a/init/do_mounts.c ++++ b/init/do_mounts.c +@@ -550,6 +550,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", +@@ -604,6 +605,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