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
+2 -1
View File
@@ -7,7 +7,8 @@
# Output: /usr/lib/boot/grub.efi, /usr/lib/boot/grub.cfg
#
# Build: make r.grub
# Install into image: ./local/scripts/install-grub.sh build/x86_64/harddrive.img
# Install into image (Phase 1): ./local/scripts/install-grub.sh build/x86_64/harddrive.img
# Install into image (Phase 2): make all CONFIG_NAME=redbear-full-grub
#
# Requires: gcc, make, bison, flex, autoconf, automake on host
+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