[kernel] Patch for invoking (pre)init
authorJohn Crispin <john@openwrt.org>
Wed, 3 Apr 2013 10:00:50 +0000 (10:00 +0000)
committerJohn Crispin <john@openwrt.org>
Wed, 3 Apr 2013 10:00:50 +0000 (10:00 +0000)
http://patchwork.openwrt.org/patch/3485/

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
SVN-Revision: 36183

target/linux/generic/patches-3.8/921-use_preinit_as_init.patch
target/linux/generic/patches-3.9/921-use_preinit_as_init.patch

index 4cc3695684ed8a369761a62a246b1e7b55686d43..482e2525dfc97ad030b1254c050d157ea2d197f9 100644 (file)
@@ -1,14 +1,14 @@
---- a/init/main.c
-+++ b/init/main.c
-@@ -835,10 +835,7 @@ static int __ref kernel_init(void *unuse
+Index: linux-3.8.3/init/main.c
+===================================================================
+--- linux-3.8.3.orig/init/main.c       2013-04-02 21:43:30.000000000 +0200
++++ linux-3.8.3/init/main.c    2013-04-02 21:44:26.362130897 +0200
+@@ -835,7 +835,8 @@
                printk(KERN_WARNING "Failed to execute %s.  Attempting "
                                        "defaults...\n", execute_command);
        }
 -      if (!run_init_process("/sbin/init") ||
--          !run_init_process("/etc/init") ||
--          !run_init_process("/bin/init") ||
--          !run_init_process("/bin/sh"))
-+      if (!run_init_process("/etc/preinit"))
-               return 0;
-       panic("No init found.  Try passing init= option to kernel. "
++      if (!run_init_process("/etc/preinit") ||
++          !run_init_process("/sbin/init") ||
+           !run_init_process("/etc/init") ||
+           !run_init_process("/bin/init") ||
+           !run_init_process("/bin/sh"))
index 6004a7009d65b483ee002813733cd225b3159c2a..482e2525dfc97ad030b1254c050d157ea2d197f9 100644 (file)
@@ -1,14 +1,14 @@
---- a/init/main.c
-+++ b/init/main.c
-@@ -848,10 +848,7 @@ static int __ref kernel_init(void *unuse
+Index: linux-3.8.3/init/main.c
+===================================================================
+--- linux-3.8.3.orig/init/main.c       2013-04-02 21:43:30.000000000 +0200
++++ linux-3.8.3/init/main.c    2013-04-02 21:44:26.362130897 +0200
+@@ -835,7 +835,8 @@
                printk(KERN_WARNING "Failed to execute %s.  Attempting "
                                        "defaults...\n", execute_command);
        }
 -      if (!run_init_process("/sbin/init") ||
--          !run_init_process("/etc/init") ||
--          !run_init_process("/bin/init") ||
--          !run_init_process("/bin/sh"))
-+      if (!run_init_process("/etc/preinit"))
-               return 0;
-       panic("No init found.  Try passing init= option to kernel. "
++      if (!run_init_process("/etc/preinit") ||
++          !run_init_process("/sbin/init") ||
+           !run_init_process("/etc/init") ||
+           !run_init_process("/bin/init") ||
+           !run_init_process("/bin/sh"))