Blame SOURCES/0033-launch-Factor-out-earlyprintk-from-the-command-line.patch

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