diff mbox series

[isar-cip-core] Use u-boot-config instead of tools

Message ID 20210201123330.20610-1-Quirin.Gylstorff@siemens.com (mailing list archive)
State New
Headers show
Series [isar-cip-core] Use u-boot-config instead of tools | expand

Commit Message

Quirin Gylstorff Feb. 1, 2021, 12:33 p.m. UTC
From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

Swupdate requires libubootenv0.1 and u-boot-config to access the u-boot
environment. u-boot-config adds the configuration files.

Add the flag `USE_U_BOOT_CONFIG` to deactivate the addition of
'u-boot-${MACHINE}-config.' If the image uses an upstream u-boot binary
(e.g. [1]) remove the package by setting `USE_U_BOOT_CONFIG` to `false`.

[1]: https://packages.debian.org/buster/u-boot-omap

Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 classes/swupdate-config.bbclass   | 8 +++++---
 recipes-core/swupdate/swupdate.bb | 2 --
 2 files changed, 5 insertions(+), 5 deletions(-)

Comments

Jan Kiszka Feb. 1, 2021, 4:14 p.m. UTC | #1
On 01.02.21 13:33, Quirin Gylstorff wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> Swupdate requires libubootenv0.1 and u-boot-config to access the u-boot
> environment. u-boot-config adds the configuration files.
> 
> Add the flag `USE_U_BOOT_CONFIG` to deactivate the addition of
> 'u-boot-${MACHINE}-config.' If the image uses an upstream u-boot binary
> (e.g. [1]) remove the package by setting `USE_U_BOOT_CONFIG` to `false`.
> 
> [1]: https://packages.debian.org/buster/u-boot-omap
> 
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  classes/swupdate-config.bbclass   | 8 +++++---
>  recipes-core/swupdate/swupdate.bb | 2 --
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
> index dd0317f..9909113 100644
> --- a/classes/swupdate-config.bbclass
> +++ b/classes/swupdate-config.bbclass
> @@ -45,10 +45,13 @@ 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"
> -KFEATURE_u-boot[DEBIAN_DEPENDS] = "libubootenv-tool, u-boot-tools"
> -KFEATURE_u-boot[DEPENDS] = "${U_BOOT}"
> +KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \
> +                                          if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \
> +                                          else 'libubootenv0.1'}"
> +KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv"
>  KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet"
>  
>  SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua"
> @@ -73,4 +76,3 @@ python do_check_bootloader () {
>          bb.warn("swupdate: BOOTLOADER set to incompatible value: " + bootloader)
>  }
>  addtask check_bootloader before do_fetch
> -
> diff --git a/recipes-core/swupdate/swupdate.bb b/recipes-core/swupdate/swupdate.bb
> index b4d64fe..526c72f 100644
> --- a/recipes-core/swupdate/swupdate.bb
> +++ b/recipes-core/swupdate/swupdate.bb
> @@ -24,8 +24,6 @@ SRC_URI += "file://debian \
>              file://${DEFCONFIG} \
>              file://${PN}.cfg"
>  
> -DEPENDS += "libubootenv"
> -
>  DEBIAN_DEPENDS = "${shlibs:Depends}, ${misc:Depends}"
>  
>  inherit dpkg
> 
> 
> 

Applied, thanks.

Jan
diff mbox series

Patch

diff --git a/classes/swupdate-config.bbclass b/classes/swupdate-config.bbclass
index dd0317f..9909113 100644
--- a/classes/swupdate-config.bbclass
+++ b/classes/swupdate-config.bbclass
@@ -45,10 +45,13 @@  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"
-KFEATURE_u-boot[DEBIAN_DEPENDS] = "libubootenv-tool, u-boot-tools"
-KFEATURE_u-boot[DEPENDS] = "${U_BOOT}"
+KFEATURE_u-boot[DEBIAN_DEPENDS] = "${@ 'libubootenv0.1, u-boot-${MACHINE}-config' \
+                                          if d.getVar("USE_U_BOOT_CONFIG", True) == "true" \
+                                          else 'libubootenv0.1'}"
+KFEATURE_u-boot[DEPENDS] = "${U_BOOT} libubootenv"
 KFEATURE_u-boot[KCONFIG_SNIPPETS] = "file://swupdate_defconfig_u-boot.snippet"
 
 SWUPDATE_LUASCRIPT ?= "swupdate_handlers.lua"
@@ -73,4 +76,3 @@  python do_check_bootloader () {
         bb.warn("swupdate: BOOTLOADER set to incompatible value: " + bootloader)
 }
 addtask check_bootloader before do_fetch
-
diff --git a/recipes-core/swupdate/swupdate.bb b/recipes-core/swupdate/swupdate.bb
index b4d64fe..526c72f 100644
--- a/recipes-core/swupdate/swupdate.bb
+++ b/recipes-core/swupdate/swupdate.bb
@@ -24,8 +24,6 @@  SRC_URI += "file://debian \
             file://${DEFCONFIG} \
             file://${PN}.cfg"
 
-DEPENDS += "libubootenv"
-
 DEBIAN_DEPENDS = "${shlibs:Depends}, ${misc:Depends}"
 
 inherit dpkg