From f375978572e5be4edb0e84fcbb7ae5dd06e93163 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Tue, 22 Mar 2016 09:43:50 +0000 Subject: [PATCH] launch: Factor out earlyprintk from the command line. Just code motion. In theory we could also add earlyprintk=ttyS0,115200 on x86, but I cannot get it to work. (cherry picked from commit b3e843e5b471b1e6e72901a98b3aa39820edaa6a) --- src/launch.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/launch.c b/src/launch.c index 229069f..40b4810 100644 --- a/src/launch.c +++ b/src/launch.c @@ -311,6 +311,12 @@ guestfs_impl_config (guestfs_h *g, #define SERIAL_CONSOLE "console=ttyS0" #endif +#if defined(__aarch64__) +#define EARLYPRINTK " earlyprintk=pl011,0x9000000" +#else +#define EARLYPRINTK "" +#endif + char * guestfs_int_appliance_command_line (guestfs_h *g, const char *appliance_dev, int flags) @@ -339,9 +345,10 @@ guestfs_int_appliance_command_line (guestfs_h *g, const char *appliance_dev, #ifdef __i386__ " noapic" /* workaround for RHBZ#857026 */ #endif - " " SERIAL_CONSOLE /* serial console */ + " " SERIAL_CONSOLE /* serial console */ + EARLYPRINTK /* get messages from early boot */ #ifdef __aarch64__ - " earlyprintk=pl011,0x9000000 ignore_loglevel" + " ignore_loglevel" /* This option turns off the EFI RTC device. QEMU VMs don't * currently provide EFI, and if the device is compiled in it * will try to call the EFI function GetTime unconditionally -- 1.8.3.1