diff mbox series

[isar-cip-core,v4,1/2] swupdate-config: remove variable U_BOOT

Message ID 20210505082158.18899-2-Quirin.Gylstorff@siemens.com (mailing list archive)
State Handled Elsewhere
Headers show
Series swupdate-config: variables cleanup | expand

Commit Message

Quirin Gylstorff May 5, 2021, 8:21 a.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

The dependency to ${U_BOOT} is unnecessary for the
SWUPDATE build and the package deployment. The package
`u-boot-${MACHINE}-config` is requested for fw_env.config
from a custom u-boot build. SWUpdate uses fw_env.config
to read/write the u-boot environment.

If the Package `u-boot-${MACHINE}-config` is not activated during
the build, by setting `U_BOOT_CONFIG_PACKAGE` to '1',
then do not add `u-boot-${MACHINE}-config` to the
swupdate dependencies.

U-Boot build by Debian provides example configurations
for different boards with the package u-boot-tools.

If u-boot-tools are installed these examples can be found
at config /usr/share/doc/u-boot-tools/examples/.

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 classes/swupdate-config.bbclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index 9909113..5af4eba 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -45,13 +45,16 @@  KFEATURE_ubi[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_ubi.snippet"
 
 KFEATURE_DEPS[ubi] = "mtd"
 
-USE_U_BOOT_CONFIG ?= "true"
 KFEATURE_u-boot = ""
 KFEATURE_u-boot[BUILD_DEB_DEPENDS] = "libubootenv-dev"
+# we need u-boot-${MACHINE}-config for fw_env.config
+# only custom build u-boot provides this package
+# for u-boot provided by debian u-boot-tools provides
+# example configurations at /usr/share/doc/u-boot-tools/examples
 KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \
-                                          if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \
+                                          if d.getVar("U_BOOT_CONFIG_PACKAGE", True) == "1" \
                                           else 'libubootenv0.1'}"
-KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv"
+KFEATURE_u-boot[DEPENDS] = "libubootenv"
 KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet"
 
 SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua"