Use canonical source grub.cfg and document both install paths
This commit is contained in:
@@ -7,7 +7,8 @@
|
|||||||
# Output: /usr/lib/boot/grub.efi, /usr/lib/boot/grub.cfg
|
# Output: /usr/lib/boot/grub.efi, /usr/lib/boot/grub.cfg
|
||||||
#
|
#
|
||||||
# Build: make r.grub
|
# 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
|
# Requires: gcc, make, bison, flex, autoconf, automake on host
|
||||||
|
|
||||||
|
|||||||
@@ -46,25 +46,16 @@ find_artifact() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
GRUB_EFI=""
|
GRUB_EFI=""
|
||||||
GRUB_CFG=""
|
GRUB_CFG="${REPO_ROOT}/local/recipes/core/grub/grub.cfg"
|
||||||
|
|
||||||
GRUB_TARGET="${REPO_ROOT}/local/recipes/core/grub/target"
|
GRUB_TARGET="${REPO_ROOT}/local/recipes/core/grub/target"
|
||||||
GRUB_EFI="$(find_artifact "${GRUB_TARGET}" "*/stage/usr/lib/boot/grub.efi")" || true
|
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
|
# Fallback: search repo extracted packages
|
||||||
if [ -z "${GRUB_EFI}" ]; then
|
if [ -z "${GRUB_EFI}" ]; then
|
||||||
GRUB_EFI="$(find_artifact "${REPO_ROOT}/repo" "*/grub/*/usr/lib/boot/grub.efi")" || true
|
GRUB_EFI="$(find_artifact "${REPO_ROOT}/repo" "*/grub/*/usr/lib/boot/grub.efi")" || true
|
||||||
fi
|
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
|
if [ -z "${GRUB_EFI}" ]; then
|
||||||
echo "ERROR: Cannot find grub.efi in recipe output." >&2
|
echo "ERROR: Cannot find grub.efi in recipe output." >&2
|
||||||
echo "Build GRUB first: make r.grub" >&2
|
echo "Build GRUB first: make r.grub" >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user