bootloader: update recipe.toml for latest upstream Makefile format

Upstream bootloader Makefile uses BUILD=$(CURDIR) and auto-detects SOURCE.
Override BUILD to relative path so targets resolve correctly.
This commit is contained in:
2026-07-11 10:51:38 +03:00
parent 068a1ca63e
commit f2f6030dab
+11 -4
View File
@@ -4,15 +4,19 @@ path = "../../../local/sources/bootloader"
[build]
template = "custom"
script = """
OUTDIR="${COOKBOOK_BUILD}"
mkdir -pv "${COOKBOOK_STAGE}/usr/lib/boot"
function bootloader {
export TARGET="$1"
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}"
builddir="build/${target}"
"${COOKBOOK_MAKE}" -j "${COOKBOOK_MAKE_JOBS}" \
-C "${COOKBOOK_SOURCE}" \
TARGET="${target}" \
BUILD="${builddir}" \
"${builddir}/${src}"
cp -v "${COOKBOOK_SOURCE}/${builddir}/${src}" "${COOKBOOK_STAGE}/usr/lib/boot/${dst}"
}
ARCH="$(echo "${TARGET}" | cut -d - -f1)"
@@ -25,9 +29,12 @@ then
fi
# Build UEFI bootloader for supported architectures
# (non-fatal — UEFI deps may need updating)
if [ "${ARCH}" == "aarch64" -o "${ARCH}" == "x86_64" -o "${ARCH}" == "riscv64gc" ]
then
set +e
bootloader "${ARCH}-unknown-uefi" bootloader.efi bootloader.efi
bootloader "${ARCH}-unknown-uefi" bootloader-live.efi bootloader-live.efi
set -e
fi
"""