Changeset 36183


Ignore:
Timestamp:
2013-04-03T12:00:50+02:00 (5 years ago)
Author:
blogic
Message:

[kernel] Patch for invoking (pre)init

http://patchwork.openwrt.org/patch/3485/

Signed-off-by: Michael Heimpold <mhei@…>

Location:
trunk/target/linux/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/generic/patches-3.8/921-use_preinit_as_init.patch

    r35055 r36183  
    1 --- a/init/main.c 
    2 +++ b/init/main.c 
    3 @@ -835,10 +835,7 @@ static int __ref kernel_init(void *unuse 
     1Index: linux-3.8.3/init/main.c 
     2=================================================================== 
     3--- linux-3.8.3.orig/init/main.c        2013-04-02 21:43:30.000000000 +0200 
     4+++ linux-3.8.3/init/main.c     2013-04-02 21:44:26.362130897 +0200 
     5@@ -835,7 +835,8 @@ 
    46                printk(KERN_WARNING "Failed to execute %s.  Attempting " 
    57                                        "defaults...\n", execute_command); 
    68        } 
    79-       if (!run_init_process("/sbin/init") || 
    8 -           !run_init_process("/etc/init") || 
    9 -           !run_init_process("/bin/init") || 
    10 -           !run_init_process("/bin/sh")) 
    11 +       if (!run_init_process("/etc/preinit")) 
    12                 return 0; 
    13   
    14         panic("No init found.  Try passing init= option to kernel. " 
     10+       if (!run_init_process("/etc/preinit") || 
     11+           !run_init_process("/sbin/init") || 
     12            !run_init_process("/etc/init") || 
     13            !run_init_process("/bin/init") || 
     14            !run_init_process("/bin/sh")) 
  • trunk/target/linux/generic/patches-3.9/921-use_preinit_as_init.patch

    r36008 r36183  
    1 --- a/init/main.c 
    2 +++ b/init/main.c 
    3 @@ -848,10 +848,7 @@ static int __ref kernel_init(void *unuse 
     1Index: linux-3.8.3/init/main.c 
     2=================================================================== 
     3--- linux-3.8.3.orig/init/main.c        2013-04-02 21:43:30.000000000 +0200 
     4+++ linux-3.8.3/init/main.c     2013-04-02 21:44:26.362130897 +0200 
     5@@ -835,7 +835,8 @@ 
    46                printk(KERN_WARNING "Failed to execute %s.  Attempting " 
    57                                        "defaults...\n", execute_command); 
    68        } 
    79-       if (!run_init_process("/sbin/init") || 
    8 -           !run_init_process("/etc/init") || 
    9 -           !run_init_process("/bin/init") || 
    10 -           !run_init_process("/bin/sh")) 
    11 +       if (!run_init_process("/etc/preinit")) 
    12                 return 0; 
    13   
    14         panic("No init found.  Try passing init= option to kernel. " 
     10+       if (!run_init_process("/etc/preinit") || 
     11+           !run_init_process("/sbin/init") || 
     12            !run_init_process("/etc/init") || 
     13            !run_init_process("/bin/init") || 
     14            !run_init_process("/bin/sh")) 
Note: See TracChangeset for help on using the changeset viewer.