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 <agianson@gmail.com>
This commit is contained in:
Xi Ruoyao 2024-08-23 19:23:13 +08:00
parent db7bf1f8e9
commit 54c0a86cd0
No known key found for this signature in database
GPG Key ID: ACAAD20E19E710E3
4 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2024-08-23 Xi Ruoyao <xry111@xry111.site>
* 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 <xry111@xry111.site> 2024-07-12 Xi Ruoyao <xry111@xry111.site>
* In mountvirtfs, recreate /dev/fd correctly if it's already created * In mountvirtfs, recreate /dev/fd correctly if it's already created
by the initramfs. by the initramfs.

View File

@ -47,7 +47,7 @@ case "${1}" in
log_info_msg "Setting up Linux console..." log_info_msg "Setting up Linux console..."
# Figure out if a framebuffer console is used # 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 # Figure out the command to set the console into the
# desired mode # desired mode

View File

@ -40,6 +40,17 @@
appropriate for the entry or if needed the entire day's listitem. appropriate for the entry or if needed the entire day's listitem.
--> -->
<listitem>
<para>2024-08-23</para>
<itemizedlist>
<listitem>
<para>[xry111] - Update to lfs-bootscripts-20240823, to fix an
issue causing VT 2-6 not affected by the FONT= setting in
/etc/sysconfig/console.</para>
</listitem>
</itemizedlist>
</listitem>
<listitem> <listitem>
<para>2024-08-17</para> <para>2024-08-17</para>
<itemizedlist> <itemizedlist>

View File

@ -381,7 +381,7 @@
<!ENTITY less-fin-du "14 MB"> <!ENTITY less-fin-du "14 MB">
<!ENTITY less-fin-sbu "less than 0.1 SBU"> <!ENTITY less-fin-sbu "less than 0.1 SBU">
<!ENTITY lfs-bootscripts-version "20240717"> <!-- Scripts depend on this format --> <!ENTITY lfs-bootscripts-version "20240823"> <!-- Scripts depend on this format -->
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">