From b204f62b5a625f8ebf809ce69067a77ba6b4dfd9 Mon Sep 17 00:00:00 2001
From: Punit Agrawal <punitagrawal@gmail.com>
Date: Sat, 23 May 2020 00:44:15 +0900
Subject: [PATCH] x86: grub-efi: Enable serial console

When running the installer images on x86 platform with EFI firmware, there is no output
on the serial console. This is a problem on headless servers or
"-nographic" VM that do not have a display attached.

Let's make it easier for more of our users to be able to install
debian by also enabling output on serial console.

--
Changes since v1:
* Simplified the patch to focus on serial enablement
* Setup serial port and terminal_input
* Use "--append" with terminal_output (and terminal_input)
---
 build/boot/x86/grub/grub-efi.cfg | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/build/boot/x86/grub/grub-efi.cfg b/build/boot/x86/grub/grub-efi.cfg
index c49274aa8..20ce37648 100644
--- a/build/boot/x86/grub/grub-efi.cfg
+++ b/build/boot/x86/grub/grub-efi.cfg
@@ -21,5 +21,10 @@ else
   set menu_color_highlight=white/blue
 fi
 
+# Setup the serial port
+serial --unit=0 --speed=9600
+terminal_input --append serial
+terminal_output --append serial
+
 insmod play
 play 960 440 1 0 4 440 1
-- 
2.26.0

