9.2. Limine 11.4.1 binary release
Install Limine's bootloader payloads and build its host control utility from the binary-release snapshot.
Input assumption: limine-5be26a73d7b7.tar.gz is already present in /sources from the chapter 4 source staging step.
Source URL: https://github.com/Limine-Bootloader/Limine/commit/5be26a73d7b7b4d4477d18be94e1d16e615adf56
Source note: this is the upstream v11.4.1-binary snapshot. Unlike the full limine-11.4.1.tar.xz source release, it already contains the Limine boot payloads, so this section does not need nasm, mtools, or Limine's autotools configure path.
Licenses:
- BSD 2-Clause
Dependencies:
- musl (libc)
- clang
- make
limine is a modern bootloader with UEFI and BIOS support. we need it to provide the boot payloads and host-side limine utility used to make the target system bootable.
Extract and Enter the Source Tree
cd /sources
rm -rf limine-5be26a73d7b7
tar -xf limine-5be26a73d7b7.tar.gz
cd limine-5be26a73d7b7
Clear Build Flags
Limine's binary-release Makefile is intentionally small and provides its own default CFLAGS. Clear inherited build variables before compiling the host utility so target-package flags do not leak into this build.
unset CFLAGS CPPFLAGS LDFLAGS LIBS
unset CFLAGS_FOR_TARGET CPPFLAGS_FOR_TARGET LDFLAGS_FOR_TARGET
unset NASMFLAGS_FOR_TARGET
Build the Limine Utility
make $LWI_MAKE_FLAGS CC=clang
Install Limine
Install the host utility, the license, and the boot payloads. The files in /system/share/limine are not installed to the EFI System Partition yet; later sections will copy the needed payloads into the chosen boot location.
install -Dm755 limine /system/binaries/limine
install -Dm644 LICENSE /system/documentation/limine/LICENSE
install -d /system/share/limine
for file in \
BOOTAA64.EFI \
BOOTIA32.EFI \
BOOTLOONGARCH64.EFI \
BOOTRISCV64.EFI \
BOOTX64.EFI \
limine-bios-cd.bin \
limine-bios-pxe.bin \
limine-bios.sys \
limine-uefi-cd.bin
do
install -m644 "$file" /system/share/limine/
done
Verify Limine
limine --version
test -f /system/share/limine/BOOTX64.EFI
test -f /system/share/limine/limine-bios.sys
The version command should report Limine 11.4.1.
BOOTX64.EFI on x86-64 UEFI systems, to the EFI System Partition.
Command Explanations
rm -rf limine-...andtar -xf: Recreate a clean Limine source tree.unset CFLAGS CPPFLAGS LDFLAGS LIBSand related variables: Clear target package flags that can confuse Limine's firmware-oriented build.make $LWI_MAKE_FLAGS CC=clang: Builds Limine with Clang and the shared make parallelism setting.install -Dm755 limine: Installs the Limine command-line tool.install -Dm644 LICENSE: Installs the license text into the documentation tree.install -d /system/share/limine: Creates the directory for Limine bootloader support files.for file in ...; do install -Dm644 ...; done: Installs BIOS and EFI bootloader payload files used by later boot setup.limine --versionandtest -f ...: Verify the command and required boot files were installed.