Merge "first_stage_init: if console enabled allow for errors in module loading" am: 283e41de76
am: 9046f8d00a
Change-Id: I2f2005e211c8ecc768b72904ae92835181854f8d
diff --git a/init/first_stage_init.cpp b/init/first_stage_init.cpp
index fd2d766..ac44796 100644
--- a/init/first_stage_init.cpp
+++ b/init/first_stage_init.cpp
@@ -239,11 +239,16 @@
}
Modprobe m({"/lib/modules"});
- if (!m.LoadListedModules()) {
- LOG(FATAL) << "Failed to load kernel modules";
+ auto want_console = ALLOW_FIRST_STAGE_CONSOLE && FirstStageConsole(cmdline);
+ if (!m.LoadListedModules(!want_console)) {
+ if (want_console) {
+ LOG(ERROR) << "Failed to load kernel modules, starting console";
+ } else {
+ LOG(FATAL) << "Failed to load kernel modules";
+ }
}
- if (ALLOW_FIRST_STAGE_CONSOLE && FirstStageConsole(cmdline)) {
+ if (want_console) {
StartConsole();
}