Allow custom console=tty0 argument
The bootloader element now has variable DIB_BOOTLOADER_VIRTUAL_TERMINAL to customize or suppress the console=tty0 kernel argument. This is proposed to allow console=tty0 to be removed entirely as it is causing significant performance degredation in DPDK environments. Change-Id: Iba2ee5b8a6b4acdd236a770550dffd29c784ce11 Related: rhbz#2179366
This commit is contained in:
parent
1bb559b684
commit
d56dd56881
@ -17,3 +17,8 @@ Arguments
|
||||
* ``DIB_BOOTLOADER_SERIAL_CONSOLE`` sets the serial device to be
|
||||
used as a console. It defaults to ``hvc0`` for PowerPC,
|
||||
``ttyAMA0,115200`` for ARM64, otherwise ``ttyS0,115200``.
|
||||
|
||||
* ``DIB_BOOTLOADER_VIRTUAL_TERMINAL`` sets the virtual terminal be
|
||||
used as a console. It defaults to ``tty0``. When explicitly set
|
||||
to an empty string then no virtual terminal console kernel argument
|
||||
is added.
|
||||
|
@ -1,2 +1,9 @@
|
||||
export DIB_BOOTLOADER_DEFAULT_CMDLINE=${DIB_BOOTLOADER_DEFAULT_CMDLINE:-"nofb nomodeset gfxpayload=text"}
|
||||
export DIB_BOOTLOADER_SERIAL_CONSOLE=${DIB_BOOTLOADER_SERIAL_CONSOLE:-""}
|
||||
if [ ! -v DIB_BOOTLOADER_VIRTUAL_TERMINAL ]; then
|
||||
# DIB_BOOTLOADER_VIRTUAL_TERMINAL is unset
|
||||
export DIB_BOOTLOADER_VIRTUAL_TERMINAL=tty0
|
||||
else
|
||||
# DIB_BOOTLOADER_VIRTUAL_TERMINAL is set to empty string or other value
|
||||
export DIB_BOOTLOADER_VIRTUAL_TERMINAL=${DIB_BOOTLOADER_VIRTUAL_TERMINAL}
|
||||
fi
|
||||
|
@ -135,17 +135,23 @@ fi
|
||||
|
||||
|
||||
if [[ -n "${DIB_BOOTLOADER_SERIAL_CONSOLE}" ]]; then
|
||||
SERIAL_CONSOLE="${DIB_BOOTLOADER_SERIAL_CONSOLE}"
|
||||
SERIAL_CONSOLE="console=${DIB_BOOTLOADER_SERIAL_CONSOLE}"
|
||||
elif [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]]; then
|
||||
# Serial console on Power is hvc0
|
||||
SERIAL_CONSOLE="hvc0"
|
||||
SERIAL_CONSOLE="console=hvc0"
|
||||
elif [[ "arm64" =~ "$ARCH" ]]; then
|
||||
SERIAL_CONSOLE="ttyAMA0,115200"
|
||||
SERIAL_CONSOLE="console=ttyAMA0,115200"
|
||||
else
|
||||
SERIAL_CONSOLE="ttyS0,115200"
|
||||
SERIAL_CONSOLE="console=ttyS0,115200"
|
||||
fi
|
||||
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="console=tty0 console=${SERIAL_CONSOLE} no_timer_check"
|
||||
if [[ -n "${DIB_BOOTLOADER_VIRTUAL_TERMINAL}" ]]; then
|
||||
VIRTUAL_TERMINAL="console=${DIB_BOOTLOADER_VIRTUAL_TERMINAL}"
|
||||
else
|
||||
VIRTUAL_TERMINAL=""
|
||||
fi
|
||||
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="${VIRTUAL_TERMINAL} ${SERIAL_CONSOLE} no_timer_check"
|
||||
echo "GRUB_CMDLINE_LINUX_DEFAULT=\"${GRUB_CMDLINE_LINUX_DEFAULT} ${DIB_BOOTLOADER_DEFAULT_CMDLINE} ${BOOT_FS} ${BOOT_FIPS}\"" >>/etc/default/grub
|
||||
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >>/etc/default/grub
|
||||
|
||||
|
5
releasenotes/notes/tty0-d01980dce4ed7786.yaml
Normal file
5
releasenotes/notes/tty0-d01980dce4ed7786.yaml
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
The bootloader element now has variable DIB_BOOTLOADER_VIRTUAL_TERMINAL to
|
||||
customize or suppress the console=tty0 kernel argument.
|
Loading…
Reference in New Issue
Block a user