All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10
@ 2025-11-03 13:53 Kory Maincent via buildroot
  2025-11-03 21:02 ` Julien Olivain via buildroot
  2025-11-03 22:46 ` Fiona Klute via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Kory Maincent via buildroot @ 2025-11-03 13:53 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Kory Maincent, thomas.petazzoni

- The mkeficapsule tools need gnutls to build, and the config dependency
  to build the tool has changed
- CONFIG_FIT_SIGNATURE need to be defined to build fit_check_sign
- CONFIG_FIT_PRINT does not need to be defined anymore
- Remove patch 2 and reorder patch files
- Include linux/kconfig.h to include/config.h to allow IS_ENABLED macro
  to be used in c files

Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---

Change in v2:
- Add CONFIG_TOOLS_SHA256 and CONFIG_TOOLS_SHA1 option.
---
 ...x-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch} |  0
 ...-tools-only-in-no-dot-config-targets.patch | 44 -------------------
 package/uboot-tools/uboot-tools.hash          |  2 +-
 package/uboot-tools/uboot-tools.mk            | 21 +++++----
 4 files changed, 14 insertions(+), 53 deletions(-)
 rename package/uboot-tools/{0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch => 0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch} (100%)
 delete mode 100644 package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch

diff --git a/package/uboot-tools/0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch b/package/uboot-tools/0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
similarity index 100%
rename from package/uboot-tools/0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
rename to package/uboot-tools/0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
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
deleted file mode 100644
index 8557af499a..0000000000
--- a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 460646b3c4c1718860915c38586ee8d2fbda38e4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
-Date: Sun, 1 Feb 2015 21:53:47 +0100
-Subject: [PATCH] tools only in no dot config targets
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Revert upstream commit c7ad5cbb1ef2c33883f0fa7d0455095004fd306d:
-
-    Makefile: drop "tools-only" from no-dot-config-targets
-
-This indirectly pulls in a build-dependency on libssl-dev used for FIT
-image support, and possibly GPL/OpenSSL licensing incompatibility
-issues.
-
-Based on Debian patch from u-boot-tools:
-http://ftp.de.debian.org/debian/pool/main/u/u-boot/u-boot_2014.10+dfsg1-2.1.debian.tar.xz
-
-Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-[fabio: adapt it to 2016.09]
-Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
-[Fabrice: adapt it to 2021.04]
-Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
----
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-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
- 
- 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
- 
- config-targets := 0
- mixed-targets  := 0
--- 
-2.20.1
-
diff --git a/package/uboot-tools/uboot-tools.hash b/package/uboot-tools/uboot-tools.hash
index 5a48926ebe..7b71e2d948 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  b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a  u-boot-2025.10.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 1925047ccd..dcc9c08fd2 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 = 2025.10
 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+
@@ -15,14 +15,16 @@ UBOOT_TOOLS_INSTALL_STAGING = YES
 
 # u-boot 2020.01+ needs make 4.0+
 UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
-HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
+HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) host-gnutls
 
 define UBOOT_TOOLS_CONFIGURE_CMDS
 	mkdir -p $(@D)/include/config
+	echo "#include <linux/kconfig.h>" > $(@D)/include/config.h
 	touch $(@D)/include/config/auto.conf
 	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 "#define CONFIG_TOOLS_SHA256 1" >> $(@D)/include/generated/autoconf.h
+	echo "#define CONFIG_TOOLS_SHA1 1" >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),'#define CONFIG_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
 	mkdir -p $(@D)/include/asm
 	touch $(@D)/include/asm/linkage.h
 endef
@@ -44,7 +46,8 @@ 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)
@@ -109,10 +112,12 @@ endef
 
 define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
 	mkdir -p $(@D)/include/config
+	echo "#include <linux/kconfig.h>" > $(@D)/include/config.h
 	touch $(@D)/include/config/auto.conf
 	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 "#define CONFIG_TOOLS_SHA256 1" >> $(@D)/include/generated/autoconf.h
+	echo "#define CONFIG_TOOLS_SHA1 1" >> $(@D)/include/generated/autoconf.h
+	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),'#define CONFIG_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
 	mkdir -p $(@D)/include/asm
 	touch $(@D)/include/asm/linkage.h
 endef
@@ -120,7 +125,7 @@ endef
 HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \
 	HOSTCFLAGS="$(HOST_CFLAGS)" \
 	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
-	CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
+	CONFIG_TOOLS_MKEFICAPSULE=y
 
 ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
 HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10
  2025-11-03 13:53 [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10 Kory Maincent via buildroot
@ 2025-11-03 21:02 ` Julien Olivain via buildroot
  2025-11-03 22:46 ` Fiona Klute via buildroot
  1 sibling, 0 replies; 5+ messages in thread
From: Julien Olivain via buildroot @ 2025-11-03 21:02 UTC (permalink / raw)
  To: Kory Maincent; +Cc: buildroot, thomas.petazzoni

On 03/11/2025 14:53, Kory Maincent via buildroot wrote:
> - The mkeficapsule tools need gnutls to build, and the config 
> dependency
>   to build the tool has changed
> - CONFIG_FIT_SIGNATURE need to be defined to build fit_check_sign
> - CONFIG_FIT_PRINT does not need to be defined anymore
> - Remove patch 2 and reorder patch files
> - Include linux/kconfig.h to include/config.h to allow IS_ENABLED macro
>   to be used in c files
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>

Applied to master, thanks.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10
  2025-11-03 13:53 [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10 Kory Maincent via buildroot
  2025-11-03 21:02 ` Julien Olivain via buildroot
@ 2025-11-03 22:46 ` Fiona Klute via buildroot
  2025-11-03 22:53   ` Thomas Petazzoni via buildroot
  1 sibling, 1 reply; 5+ messages in thread
From: Fiona Klute via buildroot @ 2025-11-03 22:46 UTC (permalink / raw)
  To: Kory Maincent, buildroot; +Cc: Julien Olivain, thomas.petazzoni

Hi Kory, Julien,

this patch unfortunately has the same issue I pointed out a few months 
back, in a patch that wanted to update uboot-tools to 2024.04 [1]: It 
breaks using any hash except those explicitly enabled in 
UBOOT_TOOLS_CONFIGURE_CMDS or HOST_UBOOT_TOOLS_CONFIGURE_CMDS (depending 
on host/target build) for building a FIT image. With the patch as is, 
any hash that isn't sha1 or sha256 will break.

Practical example that broke for me (excerpt to show the point):

         kernel {
             description = "Linux kernel";
             data = /incbin/("#BIN_DIR#/Image");
             type = "kernel";
             arch = "arm64";
             os = "linux";
             compression = "none";
             load = <0x40400000>;
             entry = <0x40400000>;
             hash-1 {
                 algo = "crc32";
             };
             hash-2 {
                 algo = "sha256";
             };
         };

You might rightly ask why I'm using both, but a) some examples in the 
U-Boot documentation do [2], and b) that's how I noticed the issue in 
the previous patch, so I kept it to notice similar issues. Point is, 
some people might want to use other hash algorithms.

Enabling CONFIG_TOOLS_CRC32 in autoconf.h the same way as 
CONFIG_TOOLS_SHA256 works, but U-Boot supports a few more hash 
algorithms that some people might want to use. Unless I missed 
something, the full list should be:

CONFIG_TOOLS_CRC16
CONFIG_TOOLS_CRC32
CONFIG_TOOLS_MD5
CONFIG_TOOLS_SHA1
CONFIG_TOOLS_SHA256
CONFIG_TOOLS_SHA384
CONFIG_TOOLS_SHA512

Question is: What's the best way to fix this?

I can send a simple patch that adds all the (currently available) hash 
algorithms to autoconf.h. But that feels kind of messy, plus there's the 
question what else may be broken (just unnoticed so far).

I see in the commit log that many years ago uboot-tools used KConfig and 
that was then ripped out in 2015 due to licensing concerns I don't quite 
understand (commit daf2c705a7252b662afe0100bfe1a3ebf75c1c2f, the 
licensing concern is stated without explanation in 
package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch). 
Interestingly the commit message for 
2ebf652589491ac2f8f3825afa5f75156c88b0a0 (2022) states it'd be better to 
switch (back) to KConfig. Unless someone can explain the license 
concern, I'm inclined to agree (but also with the statement it'd be a 
major change).

We could also add settings in Buildroot config, but that seems like it'd 
combine the worst of the other two options.

What do you think?

Best regards,
Fiona

[1] https://patchwork.ozlabs.org/comment/3566287/
[2] https://docs.u-boot.org/en/v2025.10/usage/fit/kernel_fdt.html

Am 03.11.25 um 14:53 schrieb Kory Maincent via buildroot:
> - The mkeficapsule tools need gnutls to build, and the config dependency
>    to build the tool has changed
> - CONFIG_FIT_SIGNATURE need to be defined to build fit_check_sign
> - CONFIG_FIT_PRINT does not need to be defined anymore
> - Remove patch 2 and reorder patch files
> - Include linux/kconfig.h to include/config.h to allow IS_ENABLED macro
>    to be used in c files
> 
> Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
> ---
> 
> Change in v2:
> - Add CONFIG_TOOLS_SHA256 and CONFIG_TOOLS_SHA1 option.
> ---
>   ...x-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch} |  0
>   ...-tools-only-in-no-dot-config-targets.patch | 44 -------------------
>   package/uboot-tools/uboot-tools.hash          |  2 +-
>   package/uboot-tools/uboot-tools.mk            | 21 +++++----
>   4 files changed, 14 insertions(+), 53 deletions(-)
>   rename package/uboot-tools/{0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch => 0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch} (100%)
>   delete mode 100644 package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
> 
> diff --git a/package/uboot-tools/0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch b/package/uboot-tools/0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
> similarity index 100%
> rename from package/uboot-tools/0003-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
> rename to package/uboot-tools/0002-tools-Makefile-fix-C-LD-FLAGS-with-CROSS_BUILD_TOOLS.patch
> 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
> deleted file mode 100644
> index 8557af499a..0000000000
> --- a/package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch
> +++ /dev/null
> @@ -1,44 +0,0 @@
> -From 460646b3c4c1718860915c38586ee8d2fbda38e4 Mon Sep 17 00:00:00 2001
> -From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
> -Date: Sun, 1 Feb 2015 21:53:47 +0100
> -Subject: [PATCH] tools only in no dot config targets
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -Revert upstream commit c7ad5cbb1ef2c33883f0fa7d0455095004fd306d:
> -
> -    Makefile: drop "tools-only" from no-dot-config-targets
> -
> -This indirectly pulls in a build-dependency on libssl-dev used for FIT
> -image support, and possibly GPL/OpenSSL licensing incompatibility
> -issues.
> -
> -Based on Debian patch from u-boot-tools:
> -http://ftp.de.debian.org/debian/pool/main/u/u-boot/u-boot_2014.10+dfsg1-2.1.debian.tar.xz
> -
> -Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
> -[fabio: adapt it to 2016.09]
> -Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> -[Fabrice: adapt it to 2021.04]
> -Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ----
> - Makefile | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -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
> -
> - 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
> -
> - config-targets := 0
> - mixed-targets  := 0
> ---
> -2.20.1
> -
> diff --git a/package/uboot-tools/uboot-tools.hash b/package/uboot-tools/uboot-tools.hash
> index 5a48926ebe..7b71e2d948 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  b4f032848e56cc8f213ad59f9132c084dbbb632bc29176d024e58220e0efdf4a  u-boot-2025.10.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 1925047ccd..dcc9c08fd2 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 = 2025.10
>   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+
> @@ -15,14 +15,16 @@ UBOOT_TOOLS_INSTALL_STAGING = YES
>   
>   # u-boot 2020.01+ needs make 4.0+
>   UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
> -HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY)
> +HOST_UBOOT_TOOLS_DEPENDENCIES = $(BR2_MAKE_HOST_DEPENDENCY) host-gnutls
>   
>   define UBOOT_TOOLS_CONFIGURE_CMDS
>   	mkdir -p $(@D)/include/config
> +	echo "#include <linux/kconfig.h>" > $(@D)/include/config.h
>   	touch $(@D)/include/config/auto.conf
>   	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 "#define CONFIG_TOOLS_SHA256 1" >> $(@D)/include/generated/autoconf.h
> +	echo "#define CONFIG_TOOLS_SHA1 1" >> $(@D)/include/generated/autoconf.h
> +	echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),'#define CONFIG_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
>   	mkdir -p $(@D)/include/asm
>   	touch $(@D)/include/asm/linkage.h
>   endef
> @@ -44,7 +46,8 @@ 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)
> @@ -109,10 +112,12 @@ endef
>   
>   define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
>   	mkdir -p $(@D)/include/config
> +	echo "#include <linux/kconfig.h>" > $(@D)/include/config.h
>   	touch $(@D)/include/config/auto.conf
>   	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 "#define CONFIG_TOOLS_SHA256 1" >> $(@D)/include/generated/autoconf.h
> +	echo "#define CONFIG_TOOLS_SHA1 1" >> $(@D)/include/generated/autoconf.h
> +	echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),'#define CONFIG_FIT_SIGNATURE 1') >> $(@D)/include/generated/autoconf.h
>   	mkdir -p $(@D)/include/asm
>   	touch $(@D)/include/asm/linkage.h
>   endef
> @@ -120,7 +125,7 @@ endef
>   HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \
>   	HOSTCFLAGS="$(HOST_CFLAGS)" \
>   	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
> -	CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
> +	CONFIG_TOOLS_MKEFICAPSULE=y
>   
>   ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
>   HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10
  2025-11-03 22:46 ` Fiona Klute via buildroot
@ 2025-11-03 22:53   ` Thomas Petazzoni via buildroot
  2025-11-04 21:43     ` Fiona Klute via buildroot
  0 siblings, 1 reply; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2025-11-03 22:53 UTC (permalink / raw)
  To: Fiona Klute; +Cc: Kory Maincent, buildroot, Julien Olivain

Hello,

On Mon, 3 Nov 2025 23:46:36 +0100
Fiona Klute <fiona.klute@gmx.de> wrote:

> You might rightly ask why I'm using both, but a) some examples in the 
> U-Boot documentation do [2], and b) that's how I noticed the issue in 
> the previous patch, so I kept it to notice similar issues. Point is, 
> some people might want to use other hash algorithms.
> 
> Enabling CONFIG_TOOLS_CRC32 in autoconf.h the same way as 
> CONFIG_TOOLS_SHA256 works, but U-Boot supports a few more hash 
> algorithms that some people might want to use. Unless I missed 
> something, the full list should be:
> 
> CONFIG_TOOLS_CRC16
> CONFIG_TOOLS_CRC32
> CONFIG_TOOLS_MD5
> CONFIG_TOOLS_SHA1
> CONFIG_TOOLS_SHA256
> CONFIG_TOOLS_SHA384
> CONFIG_TOOLS_SHA512
> 
> Question is: What's the best way to fix this?

If it's host-uboot-tools, just enabling support for everything.

> I can send a simple patch that adds all the (currently available) hash 
> algorithms to autoconf.h. But that feels kind of messy, plus there's the 
> question what else may be broken (just unnoticed so far).
> 
> I see in the commit log that many years ago uboot-tools used KConfig and 
> that was then ripped out in 2015 due to licensing concerns I don't quite 
> understand (commit daf2c705a7252b662afe0100bfe1a3ebf75c1c2f, the 
> licensing concern is stated without explanation in 
> package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch). 

The licensing concern *may* be out of date.

For some background, read
https://en.wikipedia.org/wiki/OpenSSL#Licensing. Basically, the OpenSSL
1.x license is incompatible with the GPL license, so you can't link
GPLv2 code (U-Boot code) with OpenSSL 1.x. However, the license of
OpenSSL was changed, and as of OpenSSL 3.x, it's released under Apache
2.0, which is compatible with the GPL. Since we're now using OpenSSL
3.x in Buildroot, I believe this licensing concern is moot.

> Interestingly the commit message for 
> 2ebf652589491ac2f8f3825afa5f75156c88b0a0 (2022) states it'd be better to 
> switch (back) to KConfig. Unless someone can explain the license 
> concern, I'm inclined to agree (but also with the statement it'd be a 
> major change).
> 
> We could also add settings in Buildroot config, but that seems like it'd 
> combine the worst of the other two options.

To me it doesn't make sense to add an option for each and every hash.
What should be made optional is the OpenSSL dependency. So for me it's
OK to have uboot-tools built by default without FIT signature support
(doesn't require OpenSSL), and an option to enable FIT signature
support (which needs OpenSSL, and that should enable every possible
hash supported by U-Boot).

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10
  2025-11-03 22:53   ` Thomas Petazzoni via buildroot
@ 2025-11-04 21:43     ` Fiona Klute via buildroot
  0 siblings, 0 replies; 5+ messages in thread
From: Fiona Klute via buildroot @ 2025-11-04 21:43 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Kory Maincent, buildroot, Julien Olivain

Hi Thomas, everyone!

Am 03.11.25 um 23:53 schrieb Thomas Petazzoni:
> Hello,
> 
> On Mon, 3 Nov 2025 23:46:36 +0100
> Fiona Klute <fiona.klute@gmx.de> wrote:
> 
>> You might rightly ask why I'm using both, but a) some examples in the
>> U-Boot documentation do [2], and b) that's how I noticed the issue in
>> the previous patch, so I kept it to notice similar issues. Point is,
>> some people might want to use other hash algorithms.
>>
>> Enabling CONFIG_TOOLS_CRC32 in autoconf.h the same way as
>> CONFIG_TOOLS_SHA256 works, but U-Boot supports a few more hash
>> algorithms that some people might want to use. Unless I missed
>> something, the full list should be:
>>
>> CONFIG_TOOLS_CRC16
>> CONFIG_TOOLS_CRC32
>> CONFIG_TOOLS_MD5
>> CONFIG_TOOLS_SHA1
>> CONFIG_TOOLS_SHA256
>> CONFIG_TOOLS_SHA384
>> CONFIG_TOOLS_SHA512
>>
>> Question is: What's the best way to fix this?
> 
> If it's host-uboot-tools, just enabling support for everything.

Host-uboot-tools is where it's an issue for me personally, but if anyone 
is using target uboot-tools to build FIT images it'll affect that, too 
(and possibly other things that need hashes). A patch to that just 
enables them all would be simple enough.

>> I can send a simple patch that adds all the (currently available) hash
>> algorithms to autoconf.h. But that feels kind of messy, plus there's the
>> question what else may be broken (just unnoticed so far).
>>
>> I see in the commit log that many years ago uboot-tools used KConfig and
>> that was then ripped out in 2015 due to licensing concerns I don't quite
>> understand (commit daf2c705a7252b662afe0100bfe1a3ebf75c1c2f, the
>> licensing concern is stated without explanation in
>> package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch).
> 
> The licensing concern *may* be out of date.
> 
> For some background, read
> https://en.wikipedia.org/wiki/OpenSSL#Licensing. Basically, the OpenSSL
> 1.x license is incompatible with the GPL license, so you can't link
> GPLv2 code (U-Boot code) with OpenSSL 1.x. However, the license of
> OpenSSL was changed, and as of OpenSSL 3.x, it's released under Apache
> 2.0, which is compatible with the GPL. Since we're now using OpenSSL
> 3.x in Buildroot, I believe this licensing concern is moot.

Thank you, it makes a lot more sense now. :-)

>> Interestingly the commit message for
>> 2ebf652589491ac2f8f3825afa5f75156c88b0a0 (2022) states it'd be better to
>> switch (back) to KConfig. Unless someone can explain the license
>> concern, I'm inclined to agree (but also with the statement it'd be a
>> major change).
>>
>> We could also add settings in Buildroot config, but that seems like it'd
>> combine the worst of the other two options.
> 
> To me it doesn't make sense to add an option for each and every hash.
> What should be made optional is the OpenSSL dependency. So for me it's
> OK to have uboot-tools built by default without FIT signature support
> (doesn't require OpenSSL), and an option to enable FIT signature
> support (which needs OpenSSL, and that should enable every possible
> hash supported by U-Boot).

This isn't actually about signatures, at least not primarily, it's about 
checksums for images (kernel, initramfs, DTB, …) in the FIT image. They 
are needed for unsigned images, too, but do not need OpenSSL. So the 
"FIT support" option would be the one to use to enable/disable the 
hashes, if we want to make them optional (right now SHA-1 and SHA-256 
are enabled unconditionally).

Best regards,
Fiona

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-11-04 21:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 13:53 [Buildroot] [PATCH v2] package/uboot-tools: Bump to version 2025.10 Kory Maincent via buildroot
2025-11-03 21:02 ` Julien Olivain via buildroot
2025-11-03 22:46 ` Fiona Klute via buildroot
2025-11-03 22:53   ` Thomas Petazzoni via buildroot
2025-11-04 21:43     ` Fiona Klute via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.