From 81afa4f3002dd317ab20959fa430318c4cf35b82 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Fri, 16 Aug 2013 15:09:26 -0400 Subject: [PATCH] fix(boot): Enable serial console when booting via syslinux. Useful for qemu -nographic or any any other situation where serial is easier to get at than VGA. It may be possible that in some setups ttyS0 isn't appropriate but we can figure out a way to customize kernel options if/when that ever comes up. --- build_library/create_legacy_bootloader_templates.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/build_library/create_legacy_bootloader_templates.sh b/build_library/create_legacy_bootloader_templates.sh index 7f90302565..2dcc8c0770 100755 --- a/build_library/create_legacy_bootloader_templates.sh +++ b/build_library/create_legacy_bootloader_templates.sh @@ -97,7 +97,12 @@ EOF SYSLINUX_DIR="${FLAGS_to}/syslinux" sudo mkdir -p "${SYSLINUX_DIR}" + # Add ttyS0 as a secondary console, useful for qemu -nographic + # This leaves /dev/console mapped to tty0 (vga) which is reasonable default. + syslinux_args="console=ttyS0,115200n8 ${common_args}" + cat </dev/null +SERIAL 0 115200 PROMPT 0 TIMEOUT 0 DEFAULT boot_kernel @@ -119,14 +124,14 @@ EOF label boot_kernel menu label boot_kernel kernel vmlinuz-boot_kernel - append ${common_args} root=gptprio: + append ${syslinux_args} root=gptprio: EOF info "Emitted ${SYSLINUX_DIR}/boot_kernel.cfg" cat </dev/null label coreos.A menu label coreos.A kernel vmlinuz.A - append ${common_args} root=${ROOTA} + append ${syslinux_args} root=${ROOTA} EOF info "Emitted ${SYSLINUX_DIR}/root.A.cfg" @@ -134,7 +139,7 @@ EOF label coreos.B menu label coreos.B kernel vmlinuz.B - append ${common_args} root=${ROOTB} + append ${syslinux_args} root=${ROOTB} EOF info "Emitted ${SYSLINUX_DIR}/root.B.cfg"