1. Move kernel section before emergency boot disk section. The reason
is in the emergency boot disk section we already need to mount the
ESP, so we need VFAT and the related NLS configuration.
2. Add "codepage=437,iocharset=iso8859-1" mounting the ESP. I'm not
sure if grub-install will do things properly if a different NLS
setting is used. With some (broken IMO) kernel configuration a mount
command without explicit codepage and iocharset setting won't work at
all. And I don't like the idea to force the users to set
FAT_DEFAULT_CODEPAGE=437 or FAT_DEFAULT_IOCHARSET="iso8859-1" in
kernel configuration.
3. Use "mount --mkdir" instead of a separate "mkdir -pv" command
(again).
4. Wrap long commands at 80 characters.
5. The ESP entry in fstab is optional. Personally I prefer it in fstab
because I hate the Windoge behavior (hiding the ESP from the user).
6. Update kernel and LFS version in example grub.cfg file (again).
Add the fstab entry before mounting the partition, so we can omit device
node path and mount option. Also use --mkdir option so we don't need
mkdir -pv.
By the way bump the kernel version and LFS version in example grub.cfg.
1. Don't throw unspecified entries too early. Doing so caused various
rendering glitches. And we can now also check if an entry is
selected but it's parent not.
2. "menu"s in Kconfig can also have dependencies...
Some pre-existing .toml data files are found problematic after the
change, fix them and regenerate all rendered -kernel.xml files.
This is stupid and it will cause meaningless diffs in version control
(like this commit does :( ).
Remove the kernel version from the generated XML files. Add
kernel.version file into git to track the kernel version.
Move "insmod all_video" out of the "if loadfont" statement. It's enough
for the kernel to use EFI FB.
The "terminal_output gfxterm" statement has to be guarded by "if
loadfont", or it can garble the display if unicode.pf2 not available.
"gfxmode" seems no-use on EFI. According to upstream doc it's only
used for VGA BIOS Extension (as the name suggests, not available in EFI
environment).
With CONFIG_EXPERT disabled in LFS, CONFIG_FRAMEBUFFER_CONSOLE should be
forced to y. Update the menu to reflect this.
CONFIG_NLS is also forced to y with CONFIG_ACPI and CONFIG_PCI enabled
(both should be necessary for any x86 system produced in 21st century).
Don't encourage user to be too "advanced".
Avoid mistakenly using the terminology "EFI handover protocol". With
Linux 6.2 or newer we can enable EFI stub but disable EFI handover
protocol (CONFIG_EFI_HANDOVER_PROTOCOL=n). The help message of this
option also says the upstream GRUB does not use EFI handover protocol,
so it's only needed for some distros with a patched (old) GRUB.
Tested with mainline kernel and CONFIG_EFI_HANDOVER_PROTOCOL disabled.
It's needed for running Linux console on top of SimpleDRM.
Fixes#17112 at BLFS side. The issue is not limited to UEFI: if you
want to run the Linux console on any kernel modesetting driver, it's
needed. So we need to mention it in LFS as well.