forked from Openwrt-EcoNet/openwrt
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.93 Removed upstreamed: backport-6.6/780-51-v6.15-r8169-don-t-scan-PHY-addresses-0.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.93&id=961ee132104b09e054308e53d8ab4a2386a21904 Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/19026 Signed-off-by: Nick Hainke <vincent@systemli.org>
48 lines
1.8 KiB
Diff
48 lines
1.8 KiB
Diff
From 0059efbd0f9c291795078fb4e50722641d525f38 Mon Sep 17 00:00:00 2001
|
|
From: Mathew McBride <matt@traverse.com.au>
|
|
Date: Thu, 16 Jan 2025 11:48:44 +1100
|
|
Subject: [PATCH] printk: always setup default (tty0 + stdout / SPCR) consoles
|
|
when no console= present
|
|
|
|
(This is a hack specific to OpenWrt's armsr target)
|
|
|
|
This change resolves a difference in behaviour between arm64 ACPI
|
|
and DT systems.
|
|
Our usecase is to ensure the system console is always present
|
|
regardless of display mode (serial port or screen).
|
|
|
|
Both ACPI and DT have mechanisms to setup a serial console from
|
|
information passed by firmware (SPCR and stdout-path respectively).
|
|
|
|
On ACPI systems, the SPCR table is parsed very early on in the kernel
|
|
boot which prevents the screen console (tty0) from appearing if it is
|
|
not explicitly set.
|
|
|
|
We would like to avoid specifying console= arguments as there are many
|
|
possible configurations on the serial side (like ttyS0, ttyAMA0, ttymxc0
|
|
etc.).
|
|
|
|
If the kernel does not consume the serial port in SPCR/stdout-path,
|
|
then the 'default' settings from the firmware (baud rate etc.) are lost.
|
|
|
|
If the system administrator explicitly specifies a console= argument,
|
|
then the old behaviour is returned.
|
|
|
|
Signed-off-by: Mathew McBride <matt@traverse.com.au>
|
|
Link: https://github.com/openwrt/openwrt/pull/17012#issuecomment-2591751115
|
|
---
|
|
kernel/printk/printk.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/kernel/printk/printk.c
|
|
+++ b/kernel/printk/printk.c
|
|
@@ -3515,7 +3515,7 @@ void register_console(struct console *ne
|
|
* Note that a console with tty binding will have CON_CONSDEV
|
|
* flag set and will be first in the list.
|
|
*/
|
|
- if (preferred_console < 0) {
|
|
+ if (!console_set_on_cmdline) {
|
|
if (hlist_empty(&console_list) || !console_first()->device ||
|
|
console_first()->flags & CON_BOOT) {
|
|
try_enable_default_console(newcon);
|