diff options
| author | Adrian Calianu <adrian.calianu@enea.com> | 2017-09-27 10:37:36 +0200 |
|---|---|---|
| committer | Adrian Calianu <adrian.calianu@enea.com> | 2017-09-27 10:37:36 +0200 |
| commit | ad4d4e5cbad3ad875eaa59e0a919c014dfb6a39e (patch) | |
| tree | 9f4ec55e714e2be67dab4b775775b704af454f74 /patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch | |
| parent | 7579efbdb49529f36652b69d4630c6c43907f77b (diff) | |
| download | enea-kernel-cache-ad4d4e5cbad3ad875eaa59e0a919c014dfb6a39e.tar.gz | |
add guest features from yocto branch
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Diffstat (limited to 'patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch')
| -rw-r--r-- | patches/boot_time_opt_guest/0113-init-do_mounts-recreate-dev-root.patch | 42 |
1 files changed, 42 insertions, 0 deletions
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 @@ | |||
| 1 | From 179b7f41d5509f93cd297cc81c5d8da4a3123d9d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Miguel Bernal Marin <miguel.bernal.marin@linux.intel.com> | ||
| 3 | Date: Fri, 20 Nov 2015 14:01:26 -0600 | ||
| 4 | Subject: [PATCH 113/114] init: do_mounts: recreate /dev/root | ||
| 5 | |||
| 6 | Rootfs shows as is mounted in /dev/root, but this devices is not present in | ||
| 7 | /dev directory. | ||
| 8 | |||
| 9 | Signed-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 | |||
| 14 | diff --git a/init/do_mounts.c b/init/do_mounts.c | ||
| 15 | index 40725f0f5fb3..78b5b1dba8ca 100644 | ||
| 16 | --- a/init/do_mounts.c | ||
| 17 | +++ b/init/do_mounts.c | ||
| 18 | @@ -550,6 +550,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 | @@ -604,6 +605,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 | -- | ||
| 41 | 2.11.1 | ||
| 42 | |||
