build: fix IGNORE_UPDATES bootstrap placement
Ensure missing kernel/u-boot/ATF sources are fetched once even when IGNORE_UPDATES=yes, before compilation starts.
This commit is contained in:
parent
33771550cf
commit
f0226ed24e
|
|
@ -563,6 +563,26 @@ if [[ ${IGNORE_UPDATES} != yes ]]; then
|
||||||
BUILD_HOST_TOOLS
|
BUILD_HOST_TOOLS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# IGNORE_UPDATES=yes: prefer local trees, but bootstrap missing sources to avoid hard failures.
|
||||||
|
if [[ ${IGNORE_UPDATES} == yes ]]; then
|
||||||
|
# Kernel: if the tree isn't populated, it will be missing the top-level Makefile.
|
||||||
|
if [[ $BUILD_OPT =~ kernel|image && ! -f "${LINUXSOURCEDIR}/Makefile" ]]; then
|
||||||
|
display_alert "Kernel sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
||||||
|
fetch_from_repo "$KERNELSOURCE" "$KERNELDIR" "$KERNELBRANCH" "yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# U-Boot/ATF are required for u-boot/image builds; fetch once if missing.
|
||||||
|
if [[ $BOARDFAMILY != "cix" && $BUILD_OPT =~ u-boot|image && ! -f "${BOOTSOURCEDIR}/Makefile" ]]; then
|
||||||
|
display_alert "U-Boot sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
||||||
|
fetch_from_repo "$BOOTSOURCE" "$BOOTDIR" "$BOOTBRANCH" "yes"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -n ${ATFSOURCE} && $BUILD_OPT =~ u-boot|image && ! -f "${EXTER}/cache/sources/${ATFSOURCEDIR}/Makefile" ]]; then
|
||||||
|
display_alert "ATF sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
||||||
|
fetch_from_repo "$ATFSOURCE" "${EXTER}/cache/sources/$ATFDIR" "$ATFBRANCH" "yes"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
for option in $(tr ',' ' ' <<< "$CLEAN_LEVEL"); do
|
for option in $(tr ',' ' ' <<< "$CLEAN_LEVEL"); do
|
||||||
[[ $option != sources ]] && cleaning "$option"
|
[[ $option != sources ]] && cleaning "$option"
|
||||||
done
|
done
|
||||||
|
|
@ -585,27 +605,6 @@ if [[ $BUILD_OPT == u-boot || $BUILD_OPT == image ]]; then
|
||||||
display_alert "File name" "${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb" "info"
|
display_alert "File name" "${CHOSEN_UBOOT}_${REVISION}_${ARCH}.deb" "info"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
|
||||||
|
|
||||||
# IGNORE_UPDATES=yes: prefer local trees, but bootstrap missing sources to avoid hard failures.
|
|
||||||
# Kernel: if the tree isn't populated, it will be missing the top-level Makefile.
|
|
||||||
if [[ $BUILD_OPT =~ kernel|image && ! -f "${LINUXSOURCEDIR}/Makefile" ]]; then
|
|
||||||
display_alert "Kernel sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
|
||||||
fetch_from_repo "$KERNELSOURCE" "$KERNELDIR" "$KERNELBRANCH" "yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# U-Boot/ATF are required for image builds; fetch once if missing.
|
|
||||||
if [[ $BOARDFAMILY != "cix" && $BUILD_OPT =~ u-boot|image && ! -f "${BOOTSOURCEDIR}/Makefile" ]]; then
|
|
||||||
display_alert "U-Boot sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
|
||||||
fetch_from_repo "$BOOTSOURCE" "$BOOTDIR" "$BOOTBRANCH" "yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -n ${ATFSOURCE} && $BUILD_OPT =~ u-boot|image && ! -f "${EXTER}/cache/sources/${ATFSOURCEDIR}/Makefile" ]]; then
|
|
||||||
display_alert "ATF sources missing; downloading once" "(IGNORE_UPDATES=yes)" "wrn"
|
|
||||||
fetch_from_repo "$ATFSOURCE" "${EXTER}/cache/sources/$ATFDIR" "$ATFBRANCH" "yes"
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Compile kernel if packed .deb does not exist or use the one from Orange Pi
|
# Compile kernel if packed .deb does not exist or use the one from Orange Pi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue