Merge "bootloader: make serial console configurable"
This commit is contained in:
commit
5bc5f8aff3
@ -16,3 +16,7 @@ Arguments
|
||||
* ``DIB_BOOTLOADER_DEFAULT_CMDLINE`` sets parameters that are appended
|
||||
to the ``GRUB_CMDLINE_LINUX_DEFAULT`` values in ``grub.cfg``
|
||||
configuration. It defaults to ``nofb nomodeset vga=normal``.
|
||||
|
||||
* ``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``.
|
||||
|
@ -1 +1,2 @@
|
||||
export DIB_BOOTLOADER_DEFAULT_CMDLINE=${DIB_BOOTLOADER_DEFAULT_CMDLINE:-"nofb nomodeset vga=normal"}
|
||||
export DIB_BOOTLOADER_SERIAL_CONSOLE=${DIB_BOOTLOADER_SERIAL_CONSOLE:-""}
|
@ -174,8 +174,10 @@ function install_grub2 {
|
||||
echo 'GRUB_TERMINAL="serial console"' >>/etc/default/grub
|
||||
echo 'GRUB_GFXPAYLOAD_LINUX=auto' >>/etc/default/grub
|
||||
|
||||
# Serial console on Power is hvc0
|
||||
if [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]]; then
|
||||
if [[ -n "${DIB_BOOTLOADER_SERIAL_CONSOLE}" ]]; then
|
||||
SERIAL_CONSOLE="${DIB_BOOTLOADER_SERIAL_CONSOLE}"
|
||||
elif [[ "powerpc ppc64 ppc64le" =~ "$ARCH" ]]; then
|
||||
# Serial console on Power is hvc0
|
||||
SERIAL_CONSOLE="hvc0"
|
||||
elif [[ "arm64" =~ "$ARCH" ]]; then
|
||||
SERIAL_CONSOLE="ttyAMA0,115200"
|
||||
|
Loading…
Reference in New Issue
Block a user