From 54c0a86cd0018e94b4db71caf36ca09f84154aa0 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 23 Aug 2024 19:23:13 +0800 Subject: [PATCH] bootscripts: console: Fix fb console detection If CONFIG_FB is not set but CONFIG_DRM_FBDEV_EMULATION is set to y, on a DRM-drived graphic card (anything from AMD/ATI, Intel, or NVIDIA in recent 20 years) we'd be using a fb console but without /sys/class/graphics/fb0. Then the script won't run setfont for VT 2-6. Check /sys/class/graphics/fbcon instead of /sys/class/graphics/fb0 to fix the issue. Closes: https://lists.linuxfromscratch.org/sympa/arc/lfs-support/2024-08/msg00001.html Reported-by: Alan Ianson --- bootscripts/ChangeLog | 6 ++++++ bootscripts/lfs/init.d/console | 2 +- chapter01/changelog.xml | 11 +++++++++++ packages.ent | 2 +- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 558230238..d3a7ed661 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,9 @@ +2024-08-23 Xi Ruoyao + * In console, detect FB console by checking /sys/class/graphics/fbcon + instead of fb0. The latter does not exist if CONFIG_FB=n, but + CONFIG_DRM_FBDEV_EMULATION=y can support a FB console without + CONFIG_FB. + 2024-07-12 Xi Ruoyao * In mountvirtfs, recreate /dev/fd correctly if it's already created by the initramfs. diff --git a/bootscripts/lfs/init.d/console b/bootscripts/lfs/init.d/console index a5338cc71..9409e4757 100644 --- a/bootscripts/lfs/init.d/console +++ b/bootscripts/lfs/init.d/console @@ -47,7 +47,7 @@ case "${1}" in log_info_msg "Setting up Linux console..." # Figure out if a framebuffer console is used - [ -d /sys/class/graphics/fb0 ] && use_fb=1 || use_fb=0 + [ -d /sys/class/graphics/fbcon ] && use_fb=1 || use_fb=0 # Figure out the command to set the console into the # desired mode diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index 4e420b168..7f58d2d3b 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -40,6 +40,17 @@ appropriate for the entry or if needed the entire day's listitem. --> + + 2024-08-23 + + + [xry111] - Update to lfs-bootscripts-20240823, to fix an + issue causing VT 2-6 not affected by the FONT= setting in + /etc/sysconfig/console. + + + + 2024-08-17 diff --git a/packages.ent b/packages.ent index d95e49225..86242dd7d 100644 --- a/packages.ent +++ b/packages.ent @@ -381,7 +381,7 @@ - +