[openwrt/openwrt] armsr: use console=tty1 to make console more readily available

LEDE Commits lede-commits at lists.infradead.org
Sun Aug 25 04:15:36 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c099523d66a34dede910729fbacbda5dd45640ca

commit c099523d66a34dede910729fbacbda5dd45640ca
Author: Mark Mentovai <mark at mentovai.com>
AuthorDate: Fri Jun 28 13:14:59 2024 -0400

    armsr: use console=tty1 to make console more readily available
    
    Like x86, armsr is frequently virtualized, and is used for development
    and debugging. Kernel messages should be more readily apparent by
    default. This can be achieved by adding console=tty1 to the kernel
    command line, enabling the console on a (possibly virtual) display and
    keyboard, in addition to a serial port.
    
    This also enables failsafe on tty1. Failsafe mode operates on consoles
    known by the kernel, without regard to /etc/inittab.
    
    armsr's /etc/inittab is also updated to specify tty1 instead of tty0.
    tty1 is technically more correct: tty1 is the first virtual console,
    where tty0 reflects the current active virtual console (which is likely
    to be tty1).
    
    This configuration matches x86, which is another target commonly used
    for virtualization, development, and debugging in the same way. x86's
    kernel command line had specified console=tty0, although console=tty1 is
    more correct for the reasons given above. This also brings x86's kernel
    command line console= into agreement with its /etc/inittab, which
    already used tty1.
    
    Signed-off-by: Mark Mentovai <mark at mentovai.com>
    Link: https://github.com/openwrt/openwrt/pull/16213
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/armsr/base-files/etc/inittab | 2 +-
 target/linux/armsr/image/Makefile         | 1 +
 target/linux/x86/image/Makefile           | 2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/linux/armsr/base-files/etc/inittab b/target/linux/armsr/base-files/etc/inittab
index b3033a3ced..7ca0231a22 100644
--- a/target/linux/armsr/base-files/etc/inittab
+++ b/target/linux/armsr/base-files/etc/inittab
@@ -2,7 +2,7 @@
 ::shutdown:/etc/init.d/rcS K shutdown
 ttyAMA0::askfirst:/usr/libexec/login.sh
 @GRUB_SERIAL@::askfirst:/usr/libexec/login.sh
-tty0::askfirst:/usr/libexec/login.sh
+tty1::askfirst:/usr/libexec/login.sh
 hvc0::askfirst:/usr/libexec/login.sh
 ttymxc0::askfirst:/usr/libexec/login.sh
 ttymxc1::askfirst:/usr/libexec/login.sh
diff --git a/target/linux/armsr/image/Makefile b/target/linux/armsr/image/Makefile
index 7d04a2e8f6..66f027c732 100644
--- a/target/linux/armsr/image/Makefile
+++ b/target/linux/armsr/image/Makefile
@@ -12,6 +12,7 @@ GRUB_TERMINAL_CONFIG =
 GRUB_CONSOLE_CMDLINE = earlycon
 
 ifneq ($(CONFIG_GRUB_CONSOLE),)
+  GRUB_CONSOLE_CMDLINE += console=tty1
   GRUB_TERMINALS += console
 endif
 
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index 6e59f2e465..29bebeb748 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -12,7 +12,7 @@ GRUB_TERMINAL_CONFIG =
 GRUB_CONSOLE_CMDLINE =
 
 ifneq ($(CONFIG_GRUB_CONSOLE),)
-  GRUB_CONSOLE_CMDLINE += console=tty0
+  GRUB_CONSOLE_CMDLINE += console=tty1
   GRUB_TERMINALS += console
 endif
 




More information about the lede-commits mailing list