diff options
author | Adrian Calianu <adrian.calianu@enea.com> | 2017-05-22 08:43:50 +0200 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2017-05-23 14:58:35 +0200 |
commit | 16b0e3313f53566481c106ace9992e477f8efe9b (patch) | |
tree | 5ec03a62db7836d2fb59813cb0c912751556c378 /patches/boot_time_opt/0103-init-do_mounts-recreate-dev-root.patch | |
parent | 28da254d1c5ae012a6e064671aa14850c2a21a25 (diff) | |
download | enea-kernel-cache-16b0e3313f53566481c106ace9992e477f8efe9b.tar.gz |
patches: Boot time optimizations with ClearLinux patches
Signed-off-by: Adrian Calianu <adrian.calianu@enea.com>
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
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.patch | 42 |
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 @@ | |||
1 | From 838abc7e5f43ea40a2cc05ebd6c7321b6d84b057 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 103/124] 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 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 | -- | ||
41 | 2.11.1 | ||
42 | |||