diff --git a/local/recipes/core/grub/recipe.toml b/local/recipes/core/grub/recipe.toml index b1ee400e..9cba1571 100644 --- a/local/recipes/core/grub/recipe.toml +++ b/local/recipes/core/grub/recipe.toml @@ -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 diff --git a/local/scripts/install-grub.sh b/local/scripts/install-grub.sh index 0d5f0e97..e483d5a2 100755 --- a/local/scripts/install-grub.sh +++ b/local/scripts/install-grub.sh @@ -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