Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions lib/functions/bsp/armbian-bsp-cli-deb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ function compile_armbian-bsp-cli() {
# Using bootscript, copy it to /usr/share/armbian

case "${bootscript_info[bootscript_src]}" in
*'.template')
display_alert "Rendering boot script template" "${bootscript_info[bootscript_file_fullpath]} -> ${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}" "info"
run_host_command_logged cat "${bootscript_info[bootscript_file_fullpath]}" |
render_bootscript_template > "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}"

if ! proof_rendered_bootscript_template "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}" ; then
exit_with_error "Render of bootscript template was not successful. Inspect '${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}' for unrendered variables."
fi
;;
*)
display_alert "Deploying boot script" "${bootscript_info[bootscript_file_fullpath]} -> ${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}" "info"
run_host_command_logged cp -pv "${bootscript_info[bootscript_file_fullpath]}" "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}"
;;
*'.template')
display_alert "Rendering boot script template" "${bootscript_info[bootscript_file_fullpath]} -> ${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}" "info"
run_host_command_logged cat "${bootscript_info[bootscript_file_fullpath]}" |
render_bootscript_template > "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}"

if ! proof_rendered_bootscript_template "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}"; then
exit_with_error "Render of bootscript template was not successful. Inspect '${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}' for unrendered variables."
fi
;;
*)
display_alert "Deploying boot script" "${bootscript_info[bootscript_file_fullpath]} -> ${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}" "info"
run_host_command_logged cp -pv "${bootscript_info[bootscript_file_fullpath]}" "${destination}/usr/share/armbian/${bootscript_info[bootscript_dst]}"
;;
esac

if [[ "${bootscript_info[has_bootenv]}" == "yes" ]]; then
Expand Down Expand Up @@ -233,7 +233,7 @@ function compile_armbian-bsp-cli() {
# if freeze variable is removed, upgrade becomes possible again
if [[ "${BETA}" != "yes" ]]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@igorpecovnik @rpardini Question about the existing logic around this code:

if [[ "${BETA}" != "yes" ]]; then
    for pin_variants in ...; do
        ...
    done
else
    touch "${destination}"/etc/apt/preferences.d/frozen-armbian
fi

Is this BETA check intentional here? The current behavior:

  • BETA=yes (nightly) → touch creates an empty frozen-armbian (no actual pinning)
  • BETA=no (stable) → freeze logic runs, pins are written
  • BETA unset (user-built) → freeze logic runs, but KERNEL_UPGRADE_FREEZE is typically empty so loop does nothing

The empty touch in the else branch for nightly builds seems like a no-op — dpkg-deb includes the 0-byte file, but it has no effect on apt.

Was this designed this way, or should the condition be something like [[ -n "${KERNEL_UPGRADE_FREEZE}" ]] instead of checking BETA?

Copy link
Member

@igorpecovnik igorpecovnik Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KERNEL_UPGRADE_FREEZE is a functionality that tells to which armbian version we allow upgrades. It is only used https://github.com/armbian/build/blob/main/config/boards/orangepi5pro.csc#L17 and also here we need to remove it as it is deprecated for sure. Not sure if we need this functionality at all ... I would say we drop this completly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then... Should I delete this code instead of clearing it? Or should I not touch it in this PR?

for pin_variants in $(echo $KERNEL_UPGRADE_FREEZE | sed "s/,/ /g"); do
extracted_pins=(${pin_variants//@/ })
IFS=' ' read -ra extracted_pins <<< "${pin_variants//@/ }"
if [[ "${BRANCH}-${LINUXFAMILY}" == "${extracted_pins[0]}" ]]; then
cat <<- EOF >> "${destination}"/etc/apt/preferences.d/frozen-armbian
Package: linux-*-${extracted_pins[0]}
Expand Down
2 changes: 1 addition & 1 deletion lib/functions/compilation/patch/patching.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ function userpatch_create() {

# If Git is configured, create proper patch and ask for a name
display_alert "Add / change patch name" "${patch_commit_message}" "wrn"
read -e -p "Patch Subject: " -i "${patch_commit_message}" patch_commit_message
read -r -e -p "Patch Subject: " -i "${patch_commit_message}" patch_commit_message
[[ -z "${patch_commit_message}" ]] && patch_commit_message="Patching something unknown and mysterious"
run_host_command_logged git "${common_git_params[@]}" commit -s -m "'${patch_commit_message}'"
run_host_command_logged git "${common_git_params[@]}" format-patch "${formatpatch_params[@]}" ">" "${patch}"
Expand Down