Files
RedBear-OS/recipes/core/bootloader/recipe.toml
T
vasilito bbd0bd0ffd fix: GPT partition offset parsing in bootloader + remove invalid respawn field
Bootloader hardcoded RedoxFS partition offset at 2 MiB, which fails when
efi_partition_size > 1 (redbear-full, redbear-grub use 16 MiB, placing
RedoxFS at LBA 34816 = 17 MiB). Added GPT partition table parser that
scans for Linux filesystem GUID (0FC63DAF) to find the actual offset.

Also removed invalid 'respawn = true' from 31_debug_console.service in
redbear-full.toml — init's service format does not support this field.

Verified: all three ISOs boot in QEMU UEFI and reach login prompt.
2026-05-04 00:46:48 +01:00

35 lines
1.1 KiB
TOML

[source]
git = "https://gitlab.redox-os.org/redox-os/bootloader.git"
patches = ["redox.patch", "fix-uefi-alloc-panic.patch", "P0-gpt-partition-offset.patch"]
[build]
template = "custom"
script = """
OUTDIR="${COOKBOOK_BUILD}"
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
function bootloader {
export TARGET="$1"
src="$2"
dst="$3"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" -f "${COOKBOOK_SOURCE}/Makefile" -C "${OUTDIR}" "${OUTDIR}/${src}"
cp -v "${OUTDIR}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
}
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
# Build BIOS bootloader for supported architectures
if [ "${ARCH}" == "i586" -o "${ARCH}" == "i686" -o "${ARCH}" == "x86_64" ]
then
bootloader "x86-unknown-none" bootloader.bin bootloader.bios
bootloader "x86-unknown-none" bootloader-live.bin bootloader-live.bios
fi
# Build UEFI bootloader for supported architectures
if [ "${ARCH}" == "aarch64" -o "${ARCH}" == "x86_64" -o "${ARCH}" == "riscv64gc" ]
then
bootloader "${ARCH}-unknown-uefi" bootloader.efi bootloader.efi
bootloader "${ARCH}-unknown-uefi" bootloader-live.efi bootloader-live.efi
fi
"""