More elegant solution to prevent kernel upgrades per certain board

This commit is contained in:
Igor Pecovnik
2024-08-24 17:15:24 +02:00
parent 9041c08979
commit ec76e1282e
2 changed files with 13 additions and 0 deletions

View File

@@ -208,6 +208,18 @@ function compile_armbian-bsp-cli() {
artifact_package_hook_helper_board_side_functions "postinst" board_side_bsp_cli_postinst_base "${postinst_functions[@]}" board_side_bsp_cli_postinst_finish
unset board_side_bsp_cli_postinst_base board_side_bsp_cli_postinst_update_uboot_bootscript board_side_bsp_cli_postinst_finish
### preventing upgrading stable kernels beyond version if defined
# if freeze variable is removed, upgrade becomes possible again
if [[ "${BETA}" != "yes" && -n "${KERNEL_UPGRADE_FREEZE}" ]]; then
cat <<- EOF >> "${destination}"/etc/apt/preferences.d/frozen-armbian
Package: linux-*-${BRANCH}-${LINUXFAMILY}
Pin: version ${KERNEL_UPGRADE_FREEZE}
Pin-Priority: 999
EOF
else
touch "${destination}"/etc/apt/preferences.d/frozen-armbian
fi
# add some summary to the image # @TODO: another?
fingerprint_image "${destination}/etc/armbian.txt"