Since the previous commit, we've ensured the kernel displaying via DRM
even in the early stage. Now enable DRM_PANIC so the kernel will
correctly show the last lines of the kernel messages in case a panic
happens.
Tested with an incorrect root= line in 3 configurations:
- A QEMU VM booted via BIOS
- A real machine booted via BIOS
- A real machine booted via UEFI
And in all configurations the panic message is correctly dumped.
In 1024x768 we can get 48 lines (twice of 24 lines in VGA console).
Currently on a LFS system booted via legacy BIOS (intead of UEFI), the
users can make two different configurations:
1. The DRM driver for the GPU is built as a module. Then before the
module is loaded (i.e. the root fs is properly mounted) the kernel
messages are displayed via the VGA console.
2. The DRM driver for the GPU is built into the kernel image. Then the
kernel messages are displayed via the DRM-emulated framebuffer
console since a very early stage (before the root fs is properly
mounted).
When the system is booted via UEFI, we use SimpleDRM on the EFI
framebuffer for displaying kernel messages, thus it's always the case 2.
Both are not good for diagnostic in case the root fs cannot be mounted
properly (it's very frequent on lfs-support):
- With 1 the VGA console can only fit 80x24 characters, so the relevent
information is often flushed away.
- With 2 the panic message is often displayed improperly when a DRM
driver is running.
The "DRM panic" feature introduced since Linux 6.11 (but it'll only
become usable for LFS since Linux 6.12) can fix the case 2, while case
1 just cannot be fixed. So start to make LFS booted via legacy BIOS
to use method 2 now, then we can enable DRM panic and fix this
long-standing issue.
The incompatibilty between systemd and CONFIG_AUDIT has been fixed since
Linux kernel 3.14, thus there is no reason to disable it on LFS. And we
are referring to pam_loginuid.so from /etc/pam.d in BLFS, which is
completely useless if CONFIG_AUDIT is disabled.
Link: https://github.com/systemd/systemd/commit/db999e0f923c
In Linux 6.6 DRM_FBDEV_EMULATION no longer depends on FB, so we no
longer need to select FB (tested in a QEMU VM).
But if DRM is selected, we must select both DRM_FBDEV_EMULATION and
FRAMEBUFFER_CONSOLE or we'll see only blank screen. And now
FRAMEBUFFER_CONSOLE is not selected by default, be warned!!
Import kernel-config infrastructure from BLFS and use it for kernel
configuration. Note that kernel-config.py is slightly different from
BLFS: we need role="nodump" for <screen> here.