Hi Jon,
On 9/20/24 8:41 PM, Jon Mason via lists.openembedded.org wrote:
Currently, KERNEL_CONSOLE has a default value of "ttyS0". However, Arm
machines and those using virtio serial prefer to use "ttyAMA0" or "hvc0"
(or something else). These are usually defined by the machine config
file as SERIAL_CONSOLES, which has one or more entries. Take the first
one of those instead of ttyS0, but default back to ttyS0 if nothing is
set.
Also, use this variable in the efi wic file instead of "ttyS0".
This includes revisions suggested by Quentin Schulz.
Signed-off-by: Jon Mason <[email protected]>
---
meta/classes-recipe/image_types_wic.bbclass | 1 +
meta/conf/distro/include/default-distrovars.inc | 3 ++-
scripts/lib/wic/canned-wks/mkefidisk.wks | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes-recipe/image_types_wic.bbclass
b/meta/classes-recipe/image_types_wic.bbclass
index 86f40633ebcb..db598e874ad7 100644
--- a/meta/classes-recipe/image_types_wic.bbclass
+++ b/meta/classes-recipe/image_types_wic.bbclass
@@ -26,6 +26,7 @@ WICVARS ?= "\
INITRD \
INITRD_LIVE \
ISODIR \
+ KERNEL_CONSOLE \
KERNEL_IMAGETYPE \
MACHINE \
PSEUDO_IGNORE_PATHS \
diff --git a/meta/conf/distro/include/default-distrovars.inc
b/meta/conf/distro/include/default-distrovars.inc
index 7554081e8b1a..4d6ddc45b3de 100644
--- a/meta/conf/distro/include/default-distrovars.inc
+++ b/meta/conf/distro/include/default-distrovars.inc
@@ -1,7 +1,8 @@
QA_LOGFILE = "${TMPDIR}/qa.log"
OEINCLUDELOGS ?= "yes"
-KERNEL_CONSOLE ?= "ttyS0"
+# if SERIAL_CONSOLES is set, take the first device entry. Otherwise use ttyS0
as the default
+KERNEL_CONSOLE ?= "${@','.join(d.getVar('SERIAL_CONSOLES').split('
')[0].split(';')[::-1]) or 'ttyS0'}"
Here we removed ",115200" from the default value we used to have in the
bootloader section of the mkefidisk WKS, is this expected? Are there
possible side effects from that change?
Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#205108):
https://lists.openembedded.org/g/openembedded-core/message/205108
Mute This Topic: https://lists.openembedded.org/mt/108564893/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-