build: allow specifying flow-control to grub on serial console
authorPhilip Prindeville <philipp@redfish-solutions.com>
Tue, 7 Feb 2017 03:33:36 +0000 (20:33 -0700)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Dec 2017 13:59:27 +0000 (14:59 +0100)
On the more sophisticated (i.e. deeper FIFO) serial controllers,
flow-control might be needed to avoid dropping output.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
(cherry picked from commit 7fe5963be023fd59a11652ecfb065d3405a91c48)

config/Config-images.in
target/linux/x86/image/Makefile

index f59a33613d1270934ddaa3063f58f9c1c2e7e6b4..95752f737ad013a296afb5e7b28278a16b73b27d 100644 (file)
@@ -203,6 +203,11 @@ menu "Target Images"
                default 38400 if TARGET_x86_generic
                default 115200
 
+       config GRUB_FLOWCONTROL
+               bool "Use RTE/CTS on serial console"
+               depends on GRUB_SERIAL != ""
+               default n
+
        config GRUB_BOOTOPTS
                string "Extra kernel boot options"
                depends on GRUB_IMAGES
index f34788d67b4610c2078eb3a1adb363500a3f6c74..ca5d0123c718f34d776ecd230ab84e83c63dde3d 100644 (file)
@@ -32,8 +32,8 @@ endif
 GRUB_SERIAL:=$(call qstrip,$(CONFIG_GRUB_SERIAL))
 
 ifneq ($(GRUB_SERIAL),)
-  GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_GRUB_BAUDRATE)n8
-  GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 --rtscts=off
+  GRUB_CONSOLE_CMDLINE += console=$(GRUB_SERIAL),$(CONFIG_GRUB_BAUDRATE)n8$(if $(CONFIG_GRUB_FLOWCONTROL),r,)
+  GRUB_SERIAL_CONFIG := serial --unit=0 --speed=$(CONFIG_GRUB_BAUDRATE) --word=8 --parity=no --stop=1 --rtscts=$(if $(CONFIG_GRUB_FLOWCONTROL),on,off)
   GRUB_TERMINALS += serial
 endif