Skip to content

Commit

Permalink
u-boot: embed armbian artifact version in CONFIG_LOCALVERSION
Browse files Browse the repository at this point in the history
- we're hacking at it anyway, so why not use it to uniquely identify the exact build
  • Loading branch information
rpardini committed Jul 7, 2024
1 parent 3f5d086 commit 4232661
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/functions/compilation/uboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ function patch_uboot_target() {
# this receives version target uboot_name uboottempdir uboot_target_counter toolchain as variables.
# also receives uboot_prefix, target_make, target_patchdir, target_files as input
function compile_uboot_target() {
: "${artifact_version:?artifact_version is not set}"

patch_uboot_target

if [[ $CREATE_PATCHES == yes ]]; then
Expand Down Expand Up @@ -78,7 +80,7 @@ function compile_uboot_target() {
pipetty make "${CTHREADS}" "${BOOTCONFIG}" "CROSS_COMPILE=\"${CCACHE} ${UBOOT_COMPILER}\""

# armbian specifics u-boot settings
[[ -f .config ]] && sed -i 's/CONFIG_LOCALVERSION=""/CONFIG_LOCALVERSION="-armbian"/g' .config
[[ -f .config ]] && sed -i "s/CONFIG_LOCALVERSION=\"\"/CONFIG_LOCALVERSION=\"-armbian-${artifact_version}\"/g" .config
[[ -f .config ]] && sed -i 's/CONFIG_LOCALVERSION_AUTO=.*/# CONFIG_LOCALVERSION_AUTO is not set/g' .config

# for modern (? 2018-2019?) kernel and non spi targets
Expand Down

0 comments on commit 4232661

Please sign in to comment.