From 6cd13e5f773b86f1cdf33eb6e2dea2fbd8c39ba1 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Fri, 4 Nov 2022 10:12:42 -0500 Subject: [PATCH] package/swupdate: specify SWU_VER during build The swupdate build process uses SWU_VER as part of the build commandline for compiling objects to define the value for use in globals.h (see also Makefile.flags). This value is also used to communicate capabilities to lua handlers (see upstream 0f38ff186e76c55c8d00ccb53739a29bcca91445). When swupdate gets built, SWU_VER defaults to using `git describe` to determine the version. This, unfortunately, picks up the version of the Buildroot checkout and not the actual version of swupdate. Now, specify SWU_VER as part of the make options to override the calculated value so the proper version is reported. Signed-off-by: Vincent Fazio Signed-off-by: Thomas Petazzoni (cherry picked from commit 0b4a9930124f7fb4c7bfae281db900905006a2da) Signed-off-by: Peter Korsgaard --- package/swupdate/swupdate.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/swupdate/swupdate.mk b/package/swupdate/swupdate.mk index 065ae772ba..d29f817355 100644 --- a/package/swupdate/swupdate.mk +++ b/package/swupdate/swupdate.mk @@ -223,6 +223,7 @@ SWUPDATE_KCONFIG_FILE = $(call qstrip,$(BR2_PACKAGE_SWUPDATE_CONFIG)) SWUPDATE_KCONFIG_EDITORS = menuconfig xconfig gconfig nconfig SWUPDATE_MAKE_OPTS = \ + SWU_VER="$(SWUPDATE_VERSION) (Buildroot $(BR2_VERSION_FULL))" CROSS_COMPILE="$(TARGET_CROSS)" \ CONFIG_EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ CONFIG_EXTRA_LDFLAGS="$(TARGET_LDFLAGS)"