diff mbox series

[1/2] package/uboot-tools: Bump to version 2024.04

Message ID 20240807140441.3795948-1-lazzer@gmail.com
State Superseded
Headers show
Series [1/2] package/uboot-tools: Bump to version 2024.04 | expand

Commit Message

Mattias Walström Aug. 7, 2024, 2:04 p.m. UTC
Signed-off-by: Mattias Walström <lazzer@gmail.com>
---
 .../0001-drop-configh-from-tools.patch        | 20 ++++++++++++++++
 ...-tools-only-in-no-dot-config-targets.patch | 11 ++++-----
 package/uboot-tools/Config.in                 |  1 +
 package/uboot-tools/uboot-tools.hash          |  2 +-
 package/uboot-tools/uboot-tools.mk            | 23 +++++++++++++------
 5 files changed, 42 insertions(+), 15 deletions(-)

Comments

Thomas Petazzoni Aug. 7, 2024, 7:39 p.m. UTC | #1
Hello Mattias,

Thanks for this contribution!

On Wed,  7 Aug 2024 16:04:40 +0200
Mattias Walström <lazzer@gmail.com> wrote:

> Signed-off-by: Mattias Walström <lazzer@gmail.com>
> ---
>  .../0001-drop-configh-from-tools.patch        | 20 ++++++++++++++++
>  ...-tools-only-in-no-dot-config-targets.patch | 11 ++++-----
>  package/uboot-tools/Config.in                 |  1 +
>  package/uboot-tools/uboot-tools.hash          |  2 +-
>  package/uboot-tools/uboot-tools.mk            | 23 +++++++++++++------
>  5 files changed, 42 insertions(+), 15 deletions(-)

I think I'd like to merge this update, but I would like first to
understand what's going on with:

  https://patchwork.ozlabs.org/project/buildroot/patch/20240303171937.490553-1-fontaine.fabrice@gmail.com/

I haven't been able to reproduce the issue on my side with simple
builds, so I couldn't investigate. But this issue continues to occur in
the autobuilders:

  http://autobuild.buildroot.net/?reason=uboot-tools%

I'd like to understand the issue before applying the bump, because the
issue exists in our 2024.02.x maintenance branch, so we want to
understand if it can be fixed on this branch, independently or not from
the version bump.

Regarding your patch: can we make MKEFICAPSULE configurable in
host-uboot-tools, just like it is for target uboot-tools? This would
allow to not have host-gnutls as a mandatory dependency.

Thomas
Mattias Walström Aug. 8, 2024, 5:39 p.m. UTC | #2
On Wed, Aug 7, 2024 at 9:39 PM Thomas Petazzoni <
thomas.petazzoni@bootlin.com> wrote:

> Hello Mattias,
>
> Thanks for this contribution!
>
> On Wed,  7 Aug 2024 16:04:40 +0200
> Mattias Walström <lazzer@gmail.com> wrote:
>
> > Signed-off-by: Mattias Walström <lazzer@gmail.com>
> > ---
> >  .../0001-drop-configh-from-tools.patch        | 20 ++++++++++++++++
> >  ...-tools-only-in-no-dot-config-targets.patch | 11 ++++-----
> >  package/uboot-tools/Config.in                 |  1 +
> >  package/uboot-tools/uboot-tools.hash          |  2 +-
> >  package/uboot-tools/uboot-tools.mk            | 23 +++++++++++++------
> >  5 files changed, 42 insertions(+), 15 deletions(-)
>
> I think I'd like to merge this update, but I would like first to
> understand what's going on with:
>
>
> https://patchwork.ozlabs.org/project/buildroot/patch/20240303171937.490553-1-fontaine.fabrice@gmail.com/
>
> I haven't been able to reproduce the issue on my side with simple
> builds, so I couldn't investigate. But this issue continues to occur in
> the autobuilders:
>
>   http://autobuild.buildroot.net/?reason=uboot-tools%
>
> I'd like to understand the issue before applying the bump, because the
> issue exists in our 2024.02.x maintenance branch, so we want to
> understand if it can be fixed on this branch, independently or not from
> the version bump.

Ok, sounds reasonable.

>
>
Regarding your patch: can we make MKEFICAPSULE configurable in
> host-uboot-tools, just like it is for target uboot-tools? This would
> allow to not have host-gnutls as a mandatory dependency.
>
> I totally agree with you here. I will fix it.

> Thomas
> --
> Thomas Petazzoni, CTO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
diff mbox series

Patch

diff --git a/package/uboot-tools/0001-drop-configh-from-tools.patch b/package/uboot-tools/0001-drop-configh-from-tools.patch
index 59e5686ed0..fa35b993c1 100644
--- a/package/uboot-tools/0001-drop-configh-from-tools.patch
+++ b/package/uboot-tools/0001-drop-configh-from-tools.patch
@@ -44,6 +44,26 @@  index 86be16d..3c62ac4 100644
  /*
   * To build the utility with the static configuration
   * comment out the next line.
+diff --git a/tools/printinitialenv.c b/tools/printinitialenv.c
+index c58b234d..73266680 100644
+--- a/tools/printinitialenv.c
++++ b/tools/printinitialenv.c
+@@ -15,14 +15,6 @@
+ /* Pull in the current config to define the default environment */
+ #include <linux/kconfig.h>
+ 
+-#ifndef __ASSEMBLY__
+-#define __ASSEMBLY__ /* get only #defines from config.h */
+-#include <config.h>
+-#undef	__ASSEMBLY__
+-#else
+-#include <config.h>
+-#endif
+-
+ #define DEFAULT_ENV_INSTANCE_STATIC
+ #include <generated/environment.h>
+ #include <env_default.h>
+
 -- 
 2.9.4
 
diff --git a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
index 8557af499a..53ac866fb0 100644
--- a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
+++ b/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
@@ -30,15 +30,12 @@  diff --git a/Makefile b/Makefile
 index 6aa08964ff..fcec83d183 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -486,7 +486,7 @@ defaultenv_h := include/generated/defaultenv_autogenerated.h
+@@ -532,7 +532,7 @@
  
  no-dot-config-targets := clean clobber mrproper distclean \
  			 help %docs check% coccicheck \
--			 ubootversion backup tests check qcheck tcheck
-+			 ubootversion backup tests tools-only check qcheck tcheck
+-			 ubootversion backup tests check pcheck qcheck tcheck \
++			 ubootversion backup tools-only tests check pcheck qcheck tcheck \
+ 			 pylint pylint_err _pip pip pip_test pip_release
  
  config-targets := 0
- mixed-targets  := 0
--- 
-2.20.1
-
diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in
index e8bbf3a16e..c3b0341ecd 100644
--- a/package/uboot-tools/Config.in
+++ b/package/uboot-tools/Config.in
@@ -68,6 +68,7 @@  config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
 
 config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE
 	bool "mkeficapsule"
+	depends on BR2_PACKAGE_GNUTLS
 	help
 	  Install the mkeficapsule tool on the target system
 
diff --git a/package/uboot-tools/uboot-tools.hash b/package/uboot-tools/uboot-tools.hash
index 5a48926ebe..a8021fb696 100644
--- a/package/uboot-tools/uboot-tools.hash
+++ b/package/uboot-tools/uboot-tools.hash
@@ -1,3 +1,3 @@ 
 # Locally computed:
-sha256  312b7eeae44581d1362c3a3f02c28d806647756c82ba8c72241c7cdbe68ba77e  u-boot-2021.07.tar.bz2
+sha256  18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a  u-boot-2024.04.tar.bz2
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643  Licenses/gpl-2.0.txt
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index e9c7edb218..0f6b0972c9 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-UBOOT_TOOLS_VERSION = 2021.07
+UBOOT_TOOLS_VERSION = 2024.04
 UBOOT_TOOLS_SOURCE = u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2
 UBOOT_TOOLS_SITE = https://ftp.denx.de/pub/u-boot
 UBOOT_TOOLS_LICENSE = GPL-2.0+
@@ -23,6 +23,9 @@  define UBOOT_TOOLS_CONFIGURE_CMDS
 	mkdir -p $(@D)/include/generated
 	touch $(@D)/include/generated/autoconf.h
 	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),'#define CONFIG_FIT_PRINT 1') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT), '#define CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE 0x10000000') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT), '#define CONFIG_TOOLS_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT), '#define CONFIG_TOOLS_FIT_RSASSA_PSS 1') >> $(@D)/include/generated/autoconf.h
 	mkdir -p $(@D)/include/asm
 	touch $(@D)/include/asm/linkage.h
 endef
@@ -34,17 +37,18 @@  UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \
 	STRIP=$(TARGET_STRIP)
 
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),y)
-UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
+UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
 UBOOT_TOOLS_DEPENDENCIES += dtc
 endif
 
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y)
-UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_LIBCRYPTO=y CONFIG_TOOLS_FIT_SIGNATURE=y CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000
 UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf
 endif
 
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE),y)
-UBOOT_TOOLS_MAKE_OPTS += CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
+UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y
+UBOOT_TOOLS_DEPENDENCIES += gnutls
 endif
 
 ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
@@ -113,6 +117,10 @@  define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
 	mkdir -p $(@D)/include/generated
 	touch $(@D)/include/generated/autoconf.h
 	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),'#define CONFIG_FIT_PRINT 1') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#define CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE 0x10000000') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#define CONFIG_TOOLS_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#define CONFIG_TOOLS_FIT_RSASSA_PSS 1') >> $(@D)/include/generated/autoconf.h
+
 	mkdir -p $(@D)/include/asm
 	touch $(@D)/include/asm/linkage.h
 endef
@@ -120,15 +128,16 @@  endef
 HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \
 	HOSTCFLAGS="$(HOST_CFLAGS)" \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
-	CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
+	CONFIG_TOOLS_MKEFICAPSULE=y
 
+HOST_UBOOT_TOOLS_DEPENDENCIES += host-gnutls
 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
-HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
+HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_LIBCRYPTO=y CONFIG_TOOLS_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
 HOST_UBOOT_TOOLS_DEPENDENCIES += host-dtc
 endif
 
 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y)
-HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_FIT_SIGNATURE=y CONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000
 HOST_UBOOT_TOOLS_DEPENDENCIES += host-openssl
 define HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN
 	$(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(HOST_DIR)/bin/fit_check_sign