Use canonical source grub.cfg and document both install paths

This commit is contained in:
2026-04-18 01:09:29 +01:00
parent 1a1a606793
commit 355c2983ed
2 changed files with 3 additions and 11 deletions
+1 -10
View File
@@ -46,25 +46,16 @@ find_artifact() {
}
GRUB_EFI=""
GRUB_CFG=""
GRUB_CFG="${REPO_ROOT}/local/recipes/core/grub/grub.cfg"
GRUB_TARGET="${REPO_ROOT}/local/recipes/core/grub/target"
GRUB_EFI="$(find_artifact "${GRUB_TARGET}" "*/stage/usr/lib/boot/grub.efi")" || true
GRUB_CFG="$(find_artifact "${GRUB_TARGET}" "*/stage/usr/lib/boot/grub.cfg")" || true
# Fallback: search repo extracted packages
if [ -z "${GRUB_EFI}" ]; then
GRUB_EFI="$(find_artifact "${REPO_ROOT}/repo" "*/grub/*/usr/lib/boot/grub.efi")" || true
fi
if [ -z "${GRUB_CFG}" ]; then
GRUB_CFG="$(find_artifact "${REPO_ROOT}/repo" "*/grub/*/usr/lib/boot/grub.cfg")" || true
fi
if [ -z "${GRUB_CFG}" ] && [ -f "${REPO_ROOT}/local/recipes/core/grub/grub.cfg" ]; then
GRUB_CFG="${REPO_ROOT}/local/recipes/core/grub/grub.cfg"
fi
if [ -z "${GRUB_EFI}" ]; then
echo "ERROR: Cannot find grub.efi in recipe output." >&2
echo "Build GRUB first: make r.grub" >&2