Fix GRUB bootloader lookup, eliminate duplicate recipe, harden recipe build
install-grub.sh now searches both recipes/core/bootloader/target and local/recipes/core/bootloader/target for the Redox bootloader artifact. The WIP grub recipe (recipes/wip/services/grub) is now a full directory symlink to local/recipes/core/grub instead of just recipe.toml, ensuring COOKBOOK_RECIPE resolves to a directory that contains grub.cfg. This also eliminates the duplicate recipe warning from the cookbook. The GRUB recipe now fails hard (exit 1) if grub.cfg is missing instead of just warning. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -131,9 +131,13 @@ symlink "../../local/recipes/core/ext4d" "recipes/core/ext4d"
|
||||
symlink "../../local/recipes/core/grub" "recipes/core/grub"
|
||||
|
||||
# Resolve WIP conflict: recipes/wip/services/grub also exists,
|
||||
# so redirect its recipe.toml to our local overlay
|
||||
if [ -d "recipes/wip/services/grub" ]; then
|
||||
symlink "../../../../local/recipes/core/grub/recipe.toml" "recipes/wip/services/grub/recipe.toml"
|
||||
# so redirect the entire directory to our local overlay to ensure
|
||||
# COOKBOOK_RECIPE resolves to a directory that contains grub.cfg
|
||||
if [ -d "recipes/wip/services/grub" ] && [ ! -L "recipes/wip/services/grub" ]; then
|
||||
rm -rf "recipes/wip/services/grub"
|
||||
fi
|
||||
if [ ! -e "recipes/wip/services/grub" ]; then
|
||||
symlink "../../../../local/recipes/core/grub" "recipes/wip/services/grub"
|
||||
fi
|
||||
|
||||
# Wayland additions
|
||||
|
||||
@@ -92,14 +92,20 @@ python3 "${FAT_TOOL}" ls "${IMAGE}" "${ESP_OFFSET}" /
|
||||
echo ""
|
||||
|
||||
REDBEAR_EFI=""
|
||||
for f in $(find "${REPO_ROOT}/local/recipes/core/bootloader/target" -path "*/stage/usr/lib/boot/bootloader.efi" 2>/dev/null); do
|
||||
REDBEAR_EFI="${f}"
|
||||
break
|
||||
done
|
||||
for f in $(find "${REPO_ROOT}/repo" -path "*/bootloader/*/usr/lib/boot/bootloader.efi" 2>/dev/null); do
|
||||
REDBEAR_EFI="${f}"
|
||||
break
|
||||
for search_path in \
|
||||
"${REPO_ROOT}/recipes/core/bootloader/target" \
|
||||
"${REPO_ROOT}/local/recipes/core/bootloader/target"; do
|
||||
for f in $(find "${search_path}" -path "*/stage/usr/lib/boot/bootloader.efi" 2>/dev/null); do
|
||||
REDBEAR_EFI="${f}"
|
||||
break 2
|
||||
done
|
||||
done
|
||||
if [ -z "${REDBEAR_EFI}" ]; then
|
||||
for f in $(find "${REPO_ROOT}/repo" -path "*/bootloader/*/usr/lib/boot/bootloader.efi" 2>/dev/null); do
|
||||
REDBEAR_EFI="${f}"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -z "${REDBEAR_EFI}" ]; then
|
||||
echo "ERROR: Cannot find Redox bootloader (bootloader.efi) in cookbook output." >&2
|
||||
|
||||
Reference in New Issue
Block a user