6.20. GRUB-2.06

The Make package contains a program for controlling the generation of executables and other non-source files of a package from source files.

Approximate build time: 0.8 SBU
Required disk space: 158 MB

6.20.1. Installation of GRUB

Prepare GRUB for compilation:

./configure --prefix=$LFS/tools               \
            --build=$(build-aux/config.guess) \
            --host=$(build-aux/config.guess)  \
            --target=$LFS_TGT                 \
            --program-prefix=$LFS_TGT-        \
            --with-platform=efi               \
            --disable-werror

The meaning of the new configure options:

--build=..., --host=..., and --target=$LFS_TGT

This allows the build to generate GRUB utilities running on the host system, but generating the bootloader files for $LFS_TGT. Then we can use the bootloader files to boot the temporary system on the target machine.

--program-prefix=$LFS_TGT-

This ensures that the installed programs have the target triplet prepended to their names.

--with-platform=efi

This ensures that the package is built with Extensible Firmware Interface (EFI) support. EFI is used by the firmware of LoongArch desktops and servers to interact with the bootloader.

--disable-werror

This allows the build to complete with warnings introduced by more recent Flex versions.

Compile the package:

make

Install the package:

make install

Details on this package are located in Section 8.59.2, “Contents of GRUB.”