Skip to content

Commit 4232661

Browse files
committed
u-boot: embed armbian artifact version in CONFIG_LOCALVERSION
- we're hacking at it anyway, so why not use it to uniquely identify the exact build
1 parent 3f5d086 commit 4232661

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/functions/compilation/uboot.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ function patch_uboot_target() {
4545
# this receives version target uboot_name uboottempdir uboot_target_counter toolchain as variables.
4646
# also receives uboot_prefix, target_make, target_patchdir, target_files as input
4747
function compile_uboot_target() {
48+
: "${artifact_version:?artifact_version is not set}"
49+
4850
patch_uboot_target
4951

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

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

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

0 commit comments

Comments
 (0)