diff options
Diffstat (limited to 'meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-retry-root-mount.patch')
-rw-r--r-- | meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-retry-root-mount.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-retry-root-mount.patch b/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-retry-root-mount.patch deleted file mode 100644 index 8f34a0f3f4..0000000000 --- a/meta-moblin/packages/linux/linux-moblin-2.6.29.1/linux-2.6.29-retry-root-mount.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 0384d086e31092628596af98b1e33fad586cef0a Mon Sep 17 00:00:00 2001 | ||
2 | From: Arjan van de Ven <arjan@linux.intel.com> | ||
3 | Date: Sun, 20 Jul 2008 13:01:28 -0700 | ||
4 | Subject: [PATCH] fastboot: retry mounting the root fs if we can't find init | ||
5 | |||
6 | currently we wait until all device init is done before trying to mount | ||
7 | the root fs, and to consequently execute init. | ||
8 | |||
9 | In preparation for relaxing the first delay, this patch adds a retry | ||
10 | attempt in case /sbin/init is not found. Before retrying, the code | ||
11 | will wait for all device init to complete. | ||
12 | |||
13 | While this patch by itself doesn't gain boot time yet (it needs follow on | ||
14 | patches), the alternative already is to panic()... | ||
15 | |||
16 | Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> | ||
17 | --- | ||
18 | --- a/init/main.c 2009-01-07 18:29:11.000000000 -0800 | ||
19 | +++ b/init/main.c 2009-01-07 18:32:08.000000000 -0800 | ||
20 | @@ -837,6 +837,7 @@ static void run_init_process(char *init_ | ||
21 | */ | ||
22 | static noinline int init_post(void) | ||
23 | { | ||
24 | + int retry_count = 1; | ||
25 | /* need to finish all async __init code before freeing the memory */ | ||
26 | async_synchronize_full(); | ||
27 | free_initmem(); | ||
28 | @@ -859,6 +860,8 @@ static noinline int init_post(void) | ||
29 | ramdisk_execute_command); | ||
30 | } | ||
31 | |||
32 | +retry: | ||
33 | + | ||
34 | /* | ||
35 | * We try each of these until one succeeds. | ||
36 | * | ||
37 | @@ -871,6 +874,23 @@ static noinline int init_post(void) | ||
38 | "defaults...\n", execute_command); | ||
39 | } | ||
40 | run_init_process("/sbin/init"); | ||
41 | + | ||
42 | + if (retry_count > 0) { | ||
43 | + retry_count--; | ||
44 | + /* | ||
45 | + * We haven't found init yet... potentially because the device | ||
46 | + * is still being probed. We need to | ||
47 | + * - flush keventd and friends | ||
48 | + * - wait for the known devices to complete their probing | ||
49 | + * - try to mount the root fs again | ||
50 | + */ | ||
51 | + flush_scheduled_work(); | ||
52 | + while (driver_probe_done() != 0) | ||
53 | + msleep(100); | ||
54 | + prepare_namespace(); | ||
55 | + goto retry; | ||
56 | + } | ||
57 | + | ||
58 | run_init_process("/etc/init"); | ||
59 | run_init_process("/bin/init"); | ||
60 | run_init_process("/bin/sh"); | ||
61 | |||