Just code motion.
In theory we could also add earlyprintk=ttyS0,115200 on x86, but I
cannot get it to work.
---
src/launch.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/launch.c b/src/launch.c
index 074ac6f..886041a 100644
--- a/src/launch.c
+++ b/src/launch.c
@@ -303,6 +303,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)
@@ -331,9 +337,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
--
2.7.4