From 22b63ae779121c6f7ced06e6a5f39ee4be0ce0af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Fri, 7 Jun 2024 12:59:21 +0200 Subject: [PATCH] Set tty0 in cmdline as the default preferred console (#3402) The preferred console (which is used for printing the systemd boot log) is the last one specified in the cmdline boot arguments. Make sure it is always tty0, i.e. the first graphical console. In some places tty1 was used - change it to tty0 which is commonly used, and in HAOS points to tty1 anyway. The only exception is the Yellow, which doesn't have an HDMI port, so the serial console is used as the preferred one instead. For ASUS Tinker, use a versioned cmdline.txt file instead of in-place generating it in the post-build hook. --- buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt | 2 +- buildroot-external/board/asus/hassos-hook.sh | 3 +-- buildroot-external/board/asus/tinker/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-c2/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-c4/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-m1/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt | 1 + buildroot-external/board/hardkernel/odroid-n2/cmdline.txt | 2 +- buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt | 2 +- buildroot-external/board/khadas/vim3/cmdline.txt | 2 +- buildroot-external/board/nabucasa/green/cmdline.txt | 1 + buildroot-external/board/pc/generic-x86-64/cmdline.txt | 2 +- buildroot-external/board/pc/ova/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt | 2 +- buildroot-external/board/raspberrypi/yellow/cmdline.txt | 2 +- 16 files changed, 16 insertions(+), 13 deletions(-) create mode 100644 buildroot-external/board/asus/tinker/cmdline.txt diff --git a/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt b/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt index d2ae94d79..f51360b13 100644 --- a/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt +++ b/buildroot-external/board/arm-uefi/generic-aarch64/cmdline.txt @@ -1 +1 @@ -console=tty1 console=ttyS0 +console=ttyS0 console=tty0 diff --git a/buildroot-external/board/asus/hassos-hook.sh b/buildroot-external/board/asus/hassos-hook.sh index 0ef27ce43..879117928 100755 --- a/buildroot-external/board/asus/hassos-hook.sh +++ b/buildroot-external/board/asus/hassos-hook.sh @@ -13,8 +13,7 @@ function hassos_pre_image() { mkdir -p "${BOOT_DATA}/overlays" cp "${BINARIES_DIR}"/*.dtbo "${BOOT_DATA}/overlays/" cp "${BOARD_DIR}/boot-env.txt" "${BOOT_DATA}/haos-config.txt" - - echo "console=tty1" > "${BOOT_DATA}/cmdline.txt" + cp "${BOARD_DIR}/cmdline.txt" "${BOOT_DATA}/cmdline.txt" # SPL create_spl_image diff --git a/buildroot-external/board/asus/tinker/cmdline.txt b/buildroot-external/board/asus/tinker/cmdline.txt new file mode 100644 index 000000000..235f637c5 --- /dev/null +++ b/buildroot-external/board/asus/tinker/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt b/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt index b4cd5464a..d1b58e1ee 100644 --- a/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-c2/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt b/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt index b4cd5464a..d1b58e1ee 100644 --- a/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-c4/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt b/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt index e69de29bb..235f637c5 100644 --- a/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-m1/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt b/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt index e69de29bb..235f637c5 100644 --- a/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-m1s/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt b/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt index b4cd5464a..d1b58e1ee 100644 --- a/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-n2/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt b/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt index cd2045ff0..decfc024a 100644 --- a/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt +++ b/buildroot-external/board/hardkernel/odroid-xu4/cmdline.txt @@ -1 +1 @@ -console=tty1 console=ttySAC2,115200 +console=ttySAC2,115200 console=tty0 diff --git a/buildroot-external/board/khadas/vim3/cmdline.txt b/buildroot-external/board/khadas/vim3/cmdline.txt index b4cd5464a..d1b58e1ee 100644 --- a/buildroot-external/board/khadas/vim3/cmdline.txt +++ b/buildroot-external/board/khadas/vim3/cmdline.txt @@ -1 +1 @@ -console=tty0 console=ttyAML0,115200n8 +console=ttyAML0,115200n8 console=tty0 diff --git a/buildroot-external/board/nabucasa/green/cmdline.txt b/buildroot-external/board/nabucasa/green/cmdline.txt index e69de29bb..235f637c5 100644 --- a/buildroot-external/board/nabucasa/green/cmdline.txt +++ b/buildroot-external/board/nabucasa/green/cmdline.txt @@ -0,0 +1 @@ +console=tty0 diff --git a/buildroot-external/board/pc/generic-x86-64/cmdline.txt b/buildroot-external/board/pc/generic-x86-64/cmdline.txt index 04415e630..235f637c5 100644 --- a/buildroot-external/board/pc/generic-x86-64/cmdline.txt +++ b/buildroot-external/board/pc/generic-x86-64/cmdline.txt @@ -1 +1 @@ -console=tty1 +console=tty0 diff --git a/buildroot-external/board/pc/ova/cmdline.txt b/buildroot-external/board/pc/ova/cmdline.txt index 333f840e6..f51360b13 100644 --- a/buildroot-external/board/pc/ova/cmdline.txt +++ b/buildroot-external/board/pc/ova/cmdline.txt @@ -1 +1 @@ -console=ttyS0 console=tty1 +console=ttyS0 console=tty0 diff --git a/buildroot-external/board/raspberrypi/cmdline.txt b/buildroot-external/board/raspberrypi/cmdline.txt index e1e26dabc..669314f90 100644 --- a/buildroot-external/board/raspberrypi/cmdline.txt +++ b/buildroot-external/board/raspberrypi/cmdline.txt @@ -1 +1 @@ -dwc_otg.lpm_enable=0 console=tty1 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u +dwc_otg.lpm_enable=0 console=tty0 usb-storage.quirks=174c:55aa:u,2109:0715:u,152d:0578:u,152d:0579:u,152d:1561:u,174c:0829:u,14b0:0206:u,174c:225c:u,7825:a2a4:u,152d:0562:u,125f:a88a:u diff --git a/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt b/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt index 36b9721f6..112bcaf92 100644 --- a/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt +++ b/buildroot-external/board/raspberrypi/rpi5-64/cmdline.txt @@ -1 +1 @@ -zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty1 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rauc.slot=A +zram.enabled=1 zram.num_devices=3 rootwait cgroup_enable=memory fsck.repair=yes console=tty0 root=PARTUUID=8d3d53e3-6d49-4c38-8349-aff6859e82fd rootfstype=squashfs ro rauc.slot=A diff --git a/buildroot-external/board/raspberrypi/yellow/cmdline.txt b/buildroot-external/board/raspberrypi/yellow/cmdline.txt index 5216a4c10..3b610ebdb 100644 --- a/buildroot-external/board/raspberrypi/yellow/cmdline.txt +++ b/buildroot-external/board/raspberrypi/yellow/cmdline.txt @@ -1 +1 @@ -dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA2,115200n8 +dwc_otg.lpm_enable=0 console=tty0 console=ttyAMA2,115200n8