Recover the kernel support for cmd line init=<init>
QCA kernel removed this support (from their comment). add back.
We need it to start /init specified by uboot.
Change-Id: I1e0f53457b1019306f2f9f2340b4b1ac75caf806
diff --git a/init/main.c b/init/main.c
index b570d34..984b941 100755
--- a/init/main.c
+++ b/init/main.c
@@ -859,11 +859,17 @@
}
/*
- * We disable the "init" processing command to workaround
- * the bootloader implementation
- * This needs to be removed in the long term as it removes
- * the opportunity to modify the boot program
+ * We try each of these until one succeeds.
+ *
+ * The Bourne shell can be used instead of init if we are
+ * trying to recover a really broken machine.
*/
+ if (execute_command) {
+ run_init_process(execute_command);
+ printk(KERN_WARNING "Failed to execute %s. Attempting "
+ "defaults...\n", execute_command);
+ }
+
run_init_process("/etc/preinit");
run_init_process("/sbin/init");
run_init_process("/etc/init");