summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--payloads/libpayload/Config.in8
-rw-r--r--payloads/libpayload/arch/i386/main.c5
-rw-r--r--payloads/libpayload/arch/powerpc/main.c5
3 files changed, 14 insertions, 4 deletions
diff --git a/payloads/libpayload/Config.in b/payloads/libpayload/Config.in
index 90a22ff523..65be223068 100644
--- a/payloads/libpayload/Config.in
+++ b/payloads/libpayload/Config.in
@@ -147,6 +147,14 @@ endmenu
menu "Console Options"
+config SKIP_CONSOLE_INIT
+ bool "Skip initializing the consoles at startup"
+ default n
+ help
+ Normally, libpayload will initialize console input/output on startup
+ before the payload itself gets control. This option disables that
+ behavior and leaves console initialization up to the payload.
+
config CBMEM_CONSOLE
bool "Send output to the in memory CBMEM console"
default y
diff --git a/payloads/libpayload/arch/i386/main.c b/payloads/libpayload/arch/i386/main.c
index 36cfb69bff..19ac6628eb 100644
--- a/payloads/libpayload/arch/i386/main.c
+++ b/payloads/libpayload/arch/i386/main.c
@@ -49,8 +49,9 @@ void start_main(void)
/* Gather system information. */
lib_get_sysinfo();
- /* Set up the consoles. */
- console_init();
+ /* Optionally set up the consoles. */
+ if (!CONFIG_SKIP_CONSOLE_INIT)
+ console_init();
/*
* Any other system init that has to happen before the
diff --git a/payloads/libpayload/arch/powerpc/main.c b/payloads/libpayload/arch/powerpc/main.c
index 378c6f387f..431cac460b 100644
--- a/payloads/libpayload/arch/powerpc/main.c
+++ b/payloads/libpayload/arch/powerpc/main.c
@@ -46,8 +46,9 @@ void start_main(void)
{
extern int main(int argc, char **argv);
- /* Set up the consoles. */
- console_init();
+ /* Optionally set up the consoles. */
+ if (!CONFIG_SKIP_CONSOLE_INIT)
+ console_init();
/* Gather system information. */
lib_get_sysinfo();