This commit is contained in:
Thomas Trepl 2024-12-05 10:32:10 +01:00
commit 4ce87c4cba
7 changed files with 108 additions and 31 deletions

View File

@ -135,6 +135,7 @@ set timeout=5
insmod part_gpt insmod part_gpt
insmod ext2 insmod ext2
set root=(hd0,2) set root=(hd0,2)
set gfxpayload=1024x768x32
menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" { menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro
@ -159,6 +160,14 @@ EOF</userinput></screen>
be needed with some rare configurations. be needed with some rare configurations.
</para> </para>
<para>
The <command>set gfxpayload=1024x768x32</command> command sets the
resolution and color depth of the VESA framebuffer to be passed to the
kernel. It's necessary for the kernel SimpleDRM driver to use the
VESA framebuffer. You can use a different resolution or color depth
value which better suits for your monitor.
</para>
<note><para>From <application>GRUB</application>'s perspective, the <note><para>From <application>GRUB</application>'s perspective, the
kernel files are relative to the partition used. If you kernel files are relative to the partition used. If you
used a separate /boot partition, remove /boot from the above used a separate /boot partition, remove /boot from the above

View File

@ -304,6 +304,71 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<parameter>
Display a user-friendly message when a kernel panic occurs
</parameter>
</term>
<listitem>
<para>This will make the kernel correctly display the message
in case a kernel panic happens and a running DRM driver
supports to do so. Without this, it would be more
difficult to diagnose a panic: if no DRM driver is running,
we'd be on the VGA console which can only hold 24 lines and
the relevent kernel message is often flushed away; if a DRM
driver is running, the display is often completely messed up
on panic. As of Linux-6.12, none of the dedicated drivers for
mainstream GPU models really supports this, but it's supported by
the <quote>Simple framebuffer driver</quote> which runs on the
VESA (or EFI) framebuffer before the dedicated GPU driver is
loaded. If the dedicated GPU driver is built as a module
(instead of a part of the kernel image) and no initramfs is
used, this functionality will work just fine before the root
file system is mounted and it's already enough for providing
information about most LFS configuration errors causing a
panic (for example, an incorrect <parameter>root=</parameter>
setting in <xref linkend='ch-bootable-grub'/>).</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>
Panic screen formatter
</parameter>
</term>
<listitem>
<para>Set this <literal>kmsg</literal> to make sure the last
kernel messages lines are displayed when a kernel panic happens.
The default, <literal>user</literal>, would make the kernel show
only a <quote>user friendly</quote> panic message which is not
helpful on diagnostic. The third choice,
<literal>qr_code</literal>, would make the kernel to compress
the last kernel message lines into a QR code and display it.
The QR code can hold more message lines than plain text and it
can be decoded with an external device (like a smart phone).
But it requires a Rust compiler that LFS does not provide.</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<parameter>
Mark VGA/VBE/EFI FB as generic system framebuffer
</parameter> and
<parameter>Simple framebuffer driver</parameter>
</term>
<listitem>
<para>These allow to use the VESA framebuffer (or the EFI
framebuffer if booting the LFS system via UEFI) as a DRM device.
The VESA framebuffer will be set up by GRUB (or the EFI
framebuffer will be set up by the UEFI firmware), so the DRM panic
handler can function before the GPU-specific DRM driver is
loaded.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<parameter> <parameter>
@ -314,8 +379,8 @@
<listitem> <listitem>
<para>These are needed to display the Linux console on a <para>These are needed to display the Linux console on a
GPU driven by a DRI (Direct Rendering Infrastructure) driver. GPU driven by a DRI (Direct Rendering Infrastructure) driver.
If <option>CONFIG_DRM</option> (Direct Rendering Manager) is As <option>CONFIG_DRM</option> (Direct Rendering Manager) is
enabled, you should enable these two options as well or you'll see enabled, we should enable these two options as well or we'll see
a blank screen once the DRI driver is loaded.</para> a blank screen once the DRI driver is loaded.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@ -1 +1 @@
6.10.7 6.12.1

View File

@ -13,7 +13,13 @@ STACKPROTECTOR_STRONG='*'
UEVENT_HELPER=' ' UEVENT_HELPER=' '
DEVTMPFS='*' DEVTMPFS='*'
DEVTMPFS_MOUNT='*' DEVTMPFS_MOUNT='*'
DRM=' *M' SYSFB_SIMPLEFB='*'
DRM='*'
DRM_PANIC='*'
DRM_PANIC_SCREEN='kmsg'
DRM_FBDEV_EMULATION='*'
DRM_SIMPLEDRM='*'
FRAMEBUFFER_CONSOLE='*'
NET='*' NET='*'
INET='*' INET='*'
IPV6='*' IPV6='*'
@ -30,11 +36,3 @@ revision='systemd'
[RT_GROUP_SCHED] [RT_GROUP_SCHED]
value = ' ' value = ' '
comment = 'This may cause some systemd features malfunction' comment = 'This may cause some systemd features malfunction'
[DRM_FBDEV_EMULATION]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'
[FRAMEBUFFER_CONSOLE]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'

View File

@ -42,15 +42,18 @@
... [FW_LOADER_USER_HELPER] ... [FW_LOADER_USER_HELPER]
<emphasis role='blue'>F</emphasis>irmware Drivers ---&gt; <emphasis role='blue'>F</emphasis>irmware Drivers ---&gt;
[*] <emphasis role='blue'>E</emphasis>xport DMI identification via sysfs to userspace [DMIID] [*] <emphasis role='blue'>E</emphasis>xport DMI identification via sysfs to userspace [DMIID]
[*] M<emphasis role='blue'>a</emphasis>rk VGA/VBE/EFI FB as generic system framebuffer [SYSFB_SIMPLEFB]
<emphasis role='blue'>G</emphasis>raphics support ---&gt; <emphasis role='blue'>G</emphasis>raphics support ---&gt;
&lt; /*/M&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt; &lt;*&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt;
... [DRM] ... [DRM]
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>D</emphasis>isplay a user-friendly message when a kernel panic occurs
[ /*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver ... [DRM_PANIC]
(kmsg) <emphasis role='blue'>P</emphasis>anic screen formatter [DRM_PANIC_SCREEN]
[*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
... [DRM_FBDEV_EMULATION] ... [DRM_FBDEV_EMULATION]
&lt;*&gt; <emphasis role='blue'>S</emphasis>imple framebuffer driver [DRM_SIMPLEDRM]
<emphasis role='blue'>C</emphasis>onsole display driver support ---&gt; <emphasis role='blue'>C</emphasis>onsole display driver support ---&gt;
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]
[ /*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]
<emphasis role='blue'>F</emphasis>ile systems ---&gt; <emphasis role='blue'>F</emphasis>ile systems ---&gt;
[*] <emphasis role='blue'>I</emphasis>notify support for userspace [INOTIFY_USER] [*] <emphasis role='blue'>I</emphasis>notify support for userspace [INOTIFY_USER]

View File

@ -12,14 +12,12 @@ STACKPROTECTOR_STRONG='*'
UEVENT_HELPER=' ' UEVENT_HELPER=' '
DEVTMPFS='*' DEVTMPFS='*'
DEVTMPFS_MOUNT='*' DEVTMPFS_MOUNT='*'
DRM=' *M' SYSFB_SIMPLEFB='*'
DRM='*'
DRM_PANIC='*'
DRM_PANIC_SCREEN='kmsg'
DRM_FBDEV_EMULATION='*'
DRM_SIMPLEDRM='*'
FRAMEBUFFER_CONSOLE='*'
revision='sysv' revision='sysv'
[DRM_FBDEV_EMULATION]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'
[FRAMEBUFFER_CONSOLE]
value = ' *'
comment = 'If [DRM] is selected as * or M, this must be selected'

View File

@ -28,12 +28,16 @@
[*] M<emphasis role='blue'>a</emphasis>intain a devtmpfs filesystem to mount at /dev [DEVTMPFS] [*] M<emphasis role='blue'>a</emphasis>intain a devtmpfs filesystem to mount at /dev [DEVTMPFS]
[*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs [*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs
... [DEVTMPFS_MOUNT] ... [DEVTMPFS_MOUNT]
<emphasis role='blue'>F</emphasis>irmware Drivers ---&gt;
[*] M<emphasis role='blue'>a</emphasis>rk VGA/VBE/EFI FB as generic system framebuffer [SYSFB_SIMPLEFB]
<emphasis role='blue'>G</emphasis>raphics support ---&gt; <emphasis role='blue'>G</emphasis>raphics support ---&gt;
&lt; /*/M&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt; &lt;*&gt; <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) ---&gt;
... [DRM] ... [DRM]
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>D</emphasis>isplay a user-friendly message when a kernel panic occurs
[ /*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver ... [DRM_PANIC]
(kmsg) <emphasis role='blue'>P</emphasis>anic screen formatter [DRM_PANIC_SCREEN]
[*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
... [DRM_FBDEV_EMULATION] ... [DRM_FBDEV_EMULATION]
&lt;*&gt; <emphasis role='blue'>S</emphasis>imple framebuffer driver [DRM_SIMPLEDRM]
<emphasis role='blue'>C</emphasis>onsole display driver support ---&gt; <emphasis role='blue'>C</emphasis>onsole display driver support ---&gt;
# If [DRM] is selected as * or M, this must be selected: [*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]</screen>
[ /*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]</screen>