Commit Graph

83 Commits

Author SHA1 Message Date
Xi Ruoyao
3a0f4223db
uefi: grub-setup: Update fdisk example to match util-linux-2.39.1 2023-08-28 17:59:10 +08:00
Xi Ruoyao
9414365df7
grub-setup: Refer to LFS for basic knowledge about grub.cfg, and...
explain some directives not mentioned by LFS.
2023-08-21 11:12:37 +08:00
Xi Ruoyao
f7a24f8b53
efibootmgr: Tag 2023-08-21 10:06:22 +08:00
Xi Ruoyao
0f33c8ce76
efi/grub-setup: Missed version info update 2023-08-17 10:38:44 +08:00
Xi Ruoyao
31ef72a90f
efi/grub-setup: Another update attempt
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).
2023-08-17 10:36:02 +08:00
Xi Ruoyao
e282f70ebe
Revert "grub-setup: Simplify the command mounting ESP"
This reverts commit 082104373d.

It's sometimes problematic when trying to run grub-install in chroot.
2023-08-17 10:34:44 +08:00
Xi Ruoyao
082104373d
grub-setup: Simplify the command mounting ESP
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.
2023-08-16 21:47:13 +08:00
Xi Ruoyao
a9779b901a
Tag UEFI and dependencies 2023-08-16 21:36:01 +08:00
Xi Ruoyao
ddf89fff24
kernel-config: Separate toplevel menus with empty lines 2023-08-01 09:22:41 +08:00
Xi Ruoyao
bd141376d1
grub-efi: Use a <xref> to gcc page to avoid duplicating GCC info 2023-08-01 00:42:36 +08:00
Bruce Dubbs
cceadefd13 Merge branch 'trunk' of git.linuxfromscratch.org:blfs into trunk 2023-07-31 10:08:47 -05:00
Bruce Dubbs
dbcdcdf9af Fix md5sum for gcc in grub-efi 2023-07-31 10:08:36 -05:00
Xi Ruoyao
c41cafb3bc
kernel-config: Add color for hotkey
Align with recent LFS change.  Regenerate all kernel.xml files.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
14176436f0
kernel-config: Update the script
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.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
4e37f01a45
kernel-config: Do not include kernel version in every generated file
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.
2023-07-31 21:44:37 +08:00
Xi Ruoyao
10b89821d1
grub-setup: Add kernel configuration into index 2023-07-31 21:44:36 +08:00
Xi Ruoyao
6af847b8dd
uefi: Use new kernel config
Fix an issue causing kernel-config.py not to process indented "source"
directive in Kconfig for this.
2023-07-31 21:44:36 +08:00
Bruce Dubbs
ee763b6e4a s/firmwares/firmware/g 2023-07-15 17:17:59 -05:00
Xi Ruoyao
dbb689b756
grub-efi: Update to unifont-15.0.06 2023-07-03 06:26:04 +08:00
Xi Ruoyao
7befd97543
grub-setup: dosfstools is needed for creating FS on ESP 2023-07-02 16:45:28 +08:00
Xi Ruoyao
b9567b0433
postlfs: Remove non-exist User Notes link
Part of User Notes removal by
https://www.linuxfromscratch.org/~xry111/remove-nonexist-usernote.sh
2023-06-29 19:22:20 +08:00
Xi Ruoyao
cecc62c4db
grub-efi: Update GCC tarball info 2023-05-07 17:08:42 +08:00
Xi Ruoyao
d8255e5f60
efivar: Workaround build failure with GCC 13 2023-05-07 17:08:39 +08:00
Xi Ruoyao
0cef3a6752
grub-efi: Fix "blind mode" issue
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).
2023-03-17 22:56:23 +08:00
Xi Ruoyao
e2d95b97d5
uefi/grub-setup: Drop CONFIG_EFI_STUB
GRUB needs EFI stub to load the kernel on some other EFI platforms, but
not x86 (32-bit or 64-bit).
2023-03-12 21:15:21 +08:00
Xi Ruoyao
2266a90309
grub-setup: Adjust kernel config
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".
2023-03-10 19:33:18 +08:00
Xi Ruoyao
cffa49c5a8
grub efi setup: Set iocharset= like codepage= 2023-03-09 19:53:38 +08:00
Xi Ruoyao
7bb0d4f355
grub efi cfg: Ensure codepage 437 enabled and use it in /boot/efi mount option
Without the codepage support, vfat can fails to mount.
2023-03-09 19:34:16 +08:00
Xi Ruoyao
8e843925bb
grub-efi setup: Bump LFS and Linux kernel version info in example 2023-02-18 21:45:19 +08:00
Xi Ruoyao
c6c286b92a
tag grub-efi 2023-02-18 18:05:40 +08:00
Xi Ruoyao
6f87ba86ab
grub-efi: Add upstream fixes for unrecognized ext2/3/4 features 2023-02-18 18:04:26 +08:00
Xi Ruoyao
862e39214c
tag: efivar and efibootmgr 2023-02-18 17:44:33 +08:00
Xi Ruoyao
7cff22d210
grub-efi: Update unifont to 15.0.01 2023-02-15 15:15:52 +08:00
Xi Ruoyao
82db5c3b85
Revert "efivar: adapt for glibc-2.36"
This reverts commit d1a3a2f901.

It's no longer needed with Glibc-2.37.
2023-02-15 15:15:52 +08:00
Xi Ruoyao
5b6873f4d7
efi: remove reference to CONFIG_EFI_VARS
It's already removed since Linux 6.0.

Link: https://git.kernel.org/torvalds/c/ab17c0cd
Reported-by: Zhang Wen <zhw2101024@gmail.com>
2023-01-15 20:29:11 +08:00
Xi Ruoyao
e8d6204f6d
grub-setup: rewrite the description for CONFIG_EFI_STUB
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.
2022-12-18 23:34:20 +08:00
Pierre Labastie
3f2db3a638 Remove sect1info tags
They only contain a date tag that is nowhere used.
2022-11-29 08:58:07 +01:00
Xi Ruoyao
b804521827
grub UEFI setup: realign kernel configurations 2022-09-22 12:33:43 +08:00
Xi Ruoyao
34e3e2d1ca
grub UEFI setup: add CONFIG_DRM_FBDEV_EMULATION
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.
2022-09-22 12:11:00 +08:00
Pierre Labastie
c8391c3d85 Spelling and grammar fixes to grub-setup
From the file attached to
https://wiki.linuxfromscratch.org/blfs/ticket/17085
by D Bryant.
2022-09-20 05:45:30 +02:00
Xi Ruoyao
7027897a70
grub EFI setup: Add CONFIG_VFAT_FS=y/M
BugLink: https://wiki.linuxfromscratch.org/blfs/ticket/17085#comment:4
2022-09-19 11:41:09 +08:00
Xi Ruoyao
27329c077d
grub EFI setup: remove CONFIG_EFI_RUNTIME_MAP
BugLink: https://wiki.linuxfromscratch.org/blfs/ticket/17085
2022-09-19 11:36:04 +08:00
Xi Ruoyao
9c44927210
grub EFI setup: "CONFIG_SIMPLEDRM" should be CONFIG_DRM_SIMPLEDRM
Buglink: https://wiki.linuxfromscratch.org/blfs/ticket/17085
2022-09-19 11:15:21 +08:00
Julien Lepiller
b38aed5077 Fix typos 2022-08-28 20:38:50 +02:00
Xi Ruoyao
8013518eb2
grub-efi: housekeeping 2022-08-28 23:01:36 +08:00
Xi Ruoyao
1977aef403
grub-efi: simplify emergency disk layout
"--boot-directory=/mnt/rescue/grub" will create "/mnt/rescue/grub/grub",
which seems a little redundant.
2022-08-28 22:21:14 +08:00
Xi Ruoyao
6db606f552
grub-efi: add minimal configuration with --removable
It's needed for e.g. setting the boot process on a 32-bit LFS with
64-bit UEFI firmware.
2022-08-28 22:19:14 +08:00
Xi Ruoyao
6851adea69
grub-efi: demote efibootmgr from required to recommended
We'll add how to configure EFI boot w/o efibootmgr later...
2022-08-28 21:24:15 +08:00
Xi Ruoyao
4f464d8efd
efivar: mark it useless on 32-bit kernel 2022-08-28 21:23:56 +08:00
Xi Ruoyao
fae75b7d8a
grub-efi: force --target=x86_64-efi for emergency boot disk
Without it, grub will create a MBR boot disk if the system is not booted
with EFI.
2022-08-28 20:44:23 +08:00