Skip to content

Commit

Permalink
More elegant solution to prevent kernel upgrades per certain board
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Aug 24, 2024
1 parent 9041c08 commit ec76e12
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/boards/orangepi5.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ BOOT_SCENARIO="spl-blobs"
BOOT_SUPPORT_SPI="yes"
BOOT_SPI_RKSPI_LOADER="yes"
IMAGE_PARTITION_TABLE="gpt"
KERNEL_UPGRADE_FREEZE="24.8.1"
declare -g UEFI_EDK2_BOARD_ID="orangepi-5" # This _only_ used for uefi-edk2-rk3588 extension

# @TODO: consider removing those, as the defaults in rockchip64_common have been bumped up
Expand Down
12 changes: 12 additions & 0 deletions lib/functions/bsp/armbian-bsp-cli-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit ec76e12

Please sign in to comment.