package/uboot-tools: bump to version 2024.04
PATCH v3 1/1 package/uboot-tools: bump to version 2024.04
--- .../0001-drop-configh-from-tools.patch | 20 +++++++++++ ...-tools-only-in-no-dot-config-targets.patch | 11 +++--- package/uboot-tools/Config.in | 3 ++ package/uboot-tools/Config.in.host | 9 +++++ package/uboot-tools/uboot-tools.hash | 2 +- package/uboot-tools/uboot-tools.mk | 36 ++++++++++++++----- 6 files changed, 64 insertions(+), 17 deletions(-)
package/uboot-tools/0001-drop-configh-from-tools.patch +20 -0
@@ -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
package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch +4 -7
@@ -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 -
package/uboot-tools/Config.in +3 -0
@@ -68,6 +68,9 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE bool "mkeficapsule" + depends on BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help Install the mkeficapsule tool on the target system
package/uboot-tools/Config.in.host +9 -0
@@ -39,6 +39,15 @@ config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT +config BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE + bool "mkeficapsule" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Install the mkeficapsule tool on the host system + + The mkeficapsule tool from Das U-Boot bootloader, which allows + generation of UEFI capsule binaries. + config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE bool "Environment image" help
package/uboot-tools/uboot-tools.hash +1 -1
@@ -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
package/uboot-tools/uboot-tools.mk +27 -9
@@ -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 util-linux endif ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
@@ -113,22 +117,30 @@ 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 HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOST_CFLAGS)" \ - HOSTLDFLAGS="$(HOST_LDFLAGS)" \ - CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y + HOSTLDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y +HOST_UBOOT_TOOLS_DEPENDENCIES += host-gnutls host-util-linux +endif 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
@@ -213,12 +225,18 @@ define HOST_UBOOT_TOOLS_BUILD_CMDS $(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT) endef +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +define HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE + $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule +endef +endif + define HOST_UBOOT_TOOLS_INSTALL_CMDS $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage - $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage $(HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN) + $(HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE) $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(HOST_DIR)/bin/fw_printenv ln -sf $(HOST_DIR)/bin/fw_printenv $(HOST_DIR)/bin/fw_setenv $(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE)
Signature · 6 lines
2.43.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Am 04.02.25 um 14:53 schrieb Mattias Walström:
Quoted 2 lines
Signed-off-by Mattias Walström <[email protected]>Tested-by Marcus Hoffmann <[email protected]>
Tested building env image and boot script on the host, booting using those (with U-Boot 2025.07), and fw_printenv/fw_setenv on the target.
Best regards,
Fiona
Quoted 197 lines
--- .../0001-drop-configh-from-tools.patch | 20 +++++++++++ ...-tools-only-in-no-dot-config-targets.patch | 11 +++--- package/uboot-tools/Config.in | 3 ++ package/uboot-tools/Config.in.host | 9 +++++ package/uboot-tools/uboot-tools.hash | 2 +- package/uboot-tools/uboot-tools.mk | 36 ++++++++++++++----- 6 files changed, 64 insertions(+), 17 deletions(-)package/uboot-tools/0001-drop-configh-from-tools.patch +20
-0@@ -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.4package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch +4
-7@@ -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 -package/uboot-tools/Config.in +3
-0@@ -68,6 +68,9 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE bool "mkeficapsule" + depends on BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help Install the mkeficapsule tool on the target systempackage/uboot-tools/Config.in.host +9
-0@@ -39,6 +39,15 @@ config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT +config BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE + bool "mkeficapsule" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Install the mkeficapsule tool on the host system + + The mkeficapsule tool from Das U-Boot bootloader, which allows + generation of UEFI capsule binaries. + config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE bool "Environment image" helppackage/uboot-tools/uboot-tools.hash +1
-1@@ -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.txtpackage/uboot-tools/uboot-tools.mk +26
-8@@ -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 util-linux endif ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)@@ -113,22 +117,30 @@ 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 HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOST_CFLAGS)" \ - HOSTLDFLAGS="$(HOST_LDFLAGS)" \ - CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y + HOSTLDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y +HOST_UBOOT_TOOLS_DEPENDENCIES += host-gnutls host-util-linux +endif 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@@ -213,12 +225,18 @@ define HOST_UBOOT_TOOLS_BUILD_CMDS $(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT) endef +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +define HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE + $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule +endef +endif +
package/uboot-tools/uboot-tools.mk define HOST_UBOOT_TOOLS_BUILD_CMDS · line 242
Quoted 10 lines
package/uboot-tools/uboot-tools.mk +1
-1define HOST_UBOOT_TOOLS_INSTALL_CMDS $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage - $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage $(HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN) + $(HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE) $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(HOST_DIR)/bin/fw_printenv ln -sf $(HOST_DIR)/bin/fw_printenv $(HOST_DIR)/bin/fw_setenv $(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE)
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi everyone,
unfortunately I found that this patch breaks building FIT images with mkimage, specifically hash nodes, which was not part of my previous tests. What I found so far:
1. Building a FIT image with hash nodes (e.g. for the kernel or device tree) fails with "Unsupported hash algorithm" errors, even for "sha256" as used in the U-Boot documentation examples.
2. The hash algorithms must be individually enabled in include/generated/autoconf.h. E.g. if I add
echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),'#define CONFIG_TOOLS_SHA256 1') >> $(@D)/include/generated/autoconf.h
to HOST_UBOOT_TOOLS_CONFIGURE_CMDS, I can use sha256. Same for any other hash algorithm used in my FIT image definition.
3. Normally U-Boot Kconfig would generate include/generated/autoconf.h with all the needed settings, but since commit daf2c705a7252b662afe0100bfe1a3ebf75c1c2f that has been patched out with package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch. The patch states it's to avoid a dependency on OpenSSL, but at least with FIT signature support enabled that dependency gets pulled in anyway.
I see multiple possible solutions here, not sure which would be preferable to the maintainers:
a) Enable the hash algorithms in include/generated/autoconf.h, like the workaround described above. This seems pretty fragile (it's easy to miss one), and who knows what other features that I don't use are broken because of missing options there.
b) Switch to using Kconfig, and let it generate include/generated/autoconf.h as intended upstream.
c) The host mkimage binary created by the U-Boot target build (output/build/uboot-2025.07/tools/mkimage) works perfectly fine. Maybe we could replace host-uboot-tools with an option to install host tools from the target uboot build? But that'd leave us still needing a solution for target uboot-tools.
Best regards,
Fiona
Am 10.07.25 um 18:55 schrieb Fiona Klute via buildroot:
Quoted 219 lines
Am 04.02.25 um 14:53 schrieb Mattias Walström:
Quoted 2 lines
Signed-off-by Mattias Walström <[email protected]>Tested-by Marcus Hoffmann <[email protected]>Tested-by Fiona Klute (WIWA) <[email protected]>Tested building env image and boot script on the host, booting using those (with U-Boot 2025.07), and fw_printenv/fw_setenv on the target.
Best regards,
FionaQuoted 208 lines
---
.../0001-drop-configh-from-tools.patch | 20 +++++++++++ ...-tools-only-in-no-dot-config-targets.patch | 11 +++--- package/uboot-tools/Config.in | 3 ++ package/uboot-tools/Config.in.host | 9 +++++ package/uboot-tools/uboot-tools.hash | 2 +- package/uboot-tools/uboot-tools.mk | 36 ++++++++++++++-----6 files changed, 64 insertions(+), 17 deletions(-)package/uboot-tools/0001-drop-configh-from-tools.patch +20
-0@@ -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.4package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch +0
-0@@ -30,15 +30,12 @@ diff --git a/Makefile b/Makefileindex
6aa08964ff..fcec83d183100644
--- 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 \
+ pylintpylint_err_pippippip_testpip_releaseconfig-targets := 0
- mixed-targets := 0
---
-2.20.1package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch +0
-1-package/uboot-tools/Config.in +0
-0@@ -68,6 +68,9 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGEconfig
BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULEbool "mkeficapsule"
+ depends onBR2_PACKAGE_GNUTLS
+ selectBR2_PACKAGE_UTIL_LINUX
+ selectBR2_PACKAGE_UTIL_LINUX_LIBUUID
help
Install the mkeficapsule tool on the target systempackage/uboot-tools/Config.in.host +0
-0@@ -39,6 +39,15 @@ config
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORTendif #BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORTpackage/uboot-tools/Config.in.host +9
-0+config BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE + bool "mkeficapsule" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Install the mkeficapsule tool on the host system + + The mkeficapsule tool from Das U-Boot bootloader, which allows + generation of UEFI capsule binaries. +config
BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE
bool "Environment image"
helppackage/uboot-tools/uboot-tools.hash +0
-1@@ -1,3 +1,3 @@ # Locally computed: -sha256312b7eeae44581d1362c3a3f02c28d806647756c82ba8c72241c7cdbe68ba77e u- boot-2021.07.tar.bz2 +sha256
18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a u- boot-2024.04.tar.bz2 sha2568177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643Licenses/gpl-2.0.txtpackage/uboot-tools/uboot-tools.mk +1
-1@@ -4,7 +4,7 @@ # ################################################################################ -UBOOT_TOOLS_VERSION = 2021.07 +UBOOT_TOOLS_VERSION = 2024.04
UBOOT_TOOLS_SOURCE= u-boot-$(UBOOT_TOOLS_VERSION).tar.bz2UBOOT_TOOLS_SITE= https://ftp.denx.de/pub/u-boot
UBOOT_TOOLS_LICENSE= GPL-2.0+package/uboot-tools/uboot-tools.mk +0
-0@@ -23,6 +23,9 @@ define UBOOT_TOOLS_CONFIGURE_CMDSmkdir -p $(@D)/include/generated
touch $(@D)/include/generated/autoconf.h
echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SUPPORT),'#defineCONFIG_FIT_PRINT1') >> $(@D)/include/generated/autoconf.h + echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),
'#defineCONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE0x10000000') >> $(@D)/include/generated/autoconf.h
+ echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),
'#defineCONFIG_TOOLS_FIT_SIGNATURE1') >> $(@D)/include/generated/autoconf.h
+ echo $(if $(BR2_PACKAGE_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),
'#defineCONFIG_TOOLS_FIT_RSASSA_PSS1') >> $(@D)/include/generated/autoconf.h
mkdir -p $(@D)/include/asm
touch $(@D)/include/asm/linkage.h
endefpackage/uboot-tools/uboot-tools.mk +1
-1@@ -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=yCONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+UBOOT_TOOLS_MAKE_OPTS +=CONFIG_TOOLS_LIBCRYPTO=yCONFIG_TOOLS_FIT_SIGNATURE=yCONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000UBOOT_TOOLS_DEPENDENCIES+= openssl host-pkgconf
endif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE),y)package/uboot-tools/uboot-tools.mk +2
-1-UBOOT_TOOLS_MAKE_OPTS += CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y +UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y +UBOOT_TOOLS_DEPENDENCIES += gnutls util-linuxendif
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)package/uboot-tools/uboot-tools.mk +0
-0@@ -113,22 +117,30 @@ define HOST_UBOOT_TOOLS_CONFIGURE_CMDSmkdir -p $(@D)/include/generated
touch $(@D)/include/generated/autoconf.h
echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),'#defineCONFIG_FIT_PRINT1') >> $(@D)/include/generated/autoconf.h + echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#defineCONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE0x10000000') >> $(@D)/include/generated/autoconf.h
+ echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#defineCONFIG_TOOLS_FIT_SIGNATURE1') >> $(@D)/include/generated/autoconf.h
+ echo $(if $(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT), '#defineCONFIG_TOOLS_FIT_RSASSA_PSS1') >> $(@D)/include/generated/autoconf.h
+
mkdir -p $(@D)/include/asm
touch $(@D)/include/asm/linkage.h
endef
HOST_UBOOT_TOOLS_MAKE_OPTS= HOSTCC="$(HOSTCC)" \
HOSTCFLAGS="$(HOST_CFLAGS)" \
- HOSTLDFLAGS="$(HOST_LDFLAGS)" \
-CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
+ HOSTLDFLAGS="$(HOST_LDFLAGS)"package/uboot-tools/uboot-tools.mk +5
-0+ +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y +HOST_UBOOT_TOOLS_DEPENDENCIES += host-gnutls host-util-linux +endififeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
package/uboot-tools/uboot-tools.mk +1
-1-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=yCONFIG_MKIMAGE_DTC_PATH=dtcHOST_UBOOT_TOOLS_DEPENDENCIES+= host-dtc
endif
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT),y) -HOST_UBOOT_TOOLS_MAKE_OPTS +=CONFIG_FIT_SIGNATURE=yCONFIG_FIT_SIGNATURE_MAX_SIZE=0x10000000
+HOST_UBOOT_TOOLS_MAKE_OPTS +=CONFIG_TOOLS_FIT_SIGNATURE=yCONFIG_TOOLS_FIT_SIGNATURE_MAX_SIZE=0x10000000HOST_UBOOT_TOOLS_DEPENDENCIES+= host-openssl
defineHOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN
$(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(HOST_DIR)/ bin/fit_check_signpackage/uboot-tools/uboot-tools.mk +0
-0@@ -213,12 +225,18 @@ define HOST_UBOOT_TOOLS_BUILD_CMDS $(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT)endef
package/uboot-tools/uboot-tools.mk +3
-0+ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +define HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE + $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule
package/uboot-tools/uboot-tools.mk +3
-0+endef +endif +define
HOST_UBOOT_TOOLS_INSTALL_CMDS
$(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage - $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/ mkeficapsule
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/ mkenvimage $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/ dumpimage $(HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN)
+ $(HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE)
Quoted 8 lines
Quoted 3 lines
$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(HOST_DIR)/ bin/fw_printenv ln -sf $(HOST_DIR)/bin/fw_printenv $(HOST_DIR)/bin/fw_setenv $(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE)
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Matthias, everyone,
two comments below in addition to hash algorithm issue I sent a mail about a few minutes ago.
Am 04.02.25 um 14:53 schrieb Mattias Walström:
Quoted 155 lines
Signed-off-by Mattias Walström <[email protected]>Tested-by Marcus Hoffmann <[email protected]>--- .../0001-drop-configh-from-tools.patch | 20 +++++++++++ ...-tools-only-in-no-dot-config-targets.patch | 11 +++--- package/uboot-tools/Config.in | 3 ++ package/uboot-tools/Config.in.host | 9 +++++ package/uboot-tools/uboot-tools.hash | 2 +- package/uboot-tools/uboot-tools.mk | 36 ++++++++++++++----- 6 files changed, 64 insertions(+), 17 deletions(-)package/uboot-tools/0001-drop-configh-from-tools.patch +20
-0@@ -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.4package/uboot-tools/0002-tools-only-in-no-dot-config-targets.patch +4
-7@@ -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 -package/uboot-tools/Config.in +3
-0@@ -68,6 +68,9 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE bool "mkeficapsule" + depends on BR2_PACKAGE_GNUTLS + select BR2_PACKAGE_UTIL_LINUX + select BR2_PACKAGE_UTIL_LINUX_LIBUUID help Install the mkeficapsule tool on the target systempackage/uboot-tools/Config.in.host +9
-0@@ -39,6 +39,15 @@ config BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT endif # BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT +config BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE + bool "mkeficapsule" + select BR2_PACKAGE_HOST_UTIL_LINUX + help + Install the mkeficapsule tool on the host system + + The mkeficapsule tool from Das U-Boot bootloader, which allows + generation of UEFI capsule binaries. + config BR2_PACKAGE_HOST_UBOOT_TOOLS_ENVIMAGE bool "Environment image" helppackage/uboot-tools/uboot-tools.hash +1
-1@@ -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.txtpackage/uboot-tools/uboot-tools.mk +8
-4@@ -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 util-linux endif ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
package/uboot-tools/uboot-tools.mk define HOST_UBOOT_TOOLS_CONFIGURE_CMDS · line 122
Quoted 6 lines
package/uboot-tools/uboot-tools.mk +3
-0@@ -113,22 +117,30 @@ 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
The added defines should be conditional on BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT, not BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT. That way you don't need libcrypto when only BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT is enabled. The counterparts in target UBOOT_TOOLS_CONFIGURE_CMDS above is correct.
Quoted 9 lines
package/uboot-tools/uboot-tools.mk +1
-2+ mkdir -p $(@D)/include/asm touch $(@D)/include/asm/linkage.h endef HOST_UBOOT_TOOLS_MAKE_OPTS = HOSTCC="$(HOSTCC)" \ HOSTCFLAGS="$(HOST_CFLAGS)" \ - HOSTLDFLAGS="$(HOST_LDFLAGS)" \ - CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
package/uboot-tools/uboot-tools.mk define HOST_UBOOT_TOOLS_CONFIGURE_CMDS · line 138
Quoted 10 lines
package/uboot-tools/uboot-tools.mk +7
-1+ HOSTLDFLAGS="$(HOST_LDFLAGS)" + +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_TOOLS_MKEFICAPSULE=y +HOST_UBOOT_TOOLS_DEPENDENCIES += host-gnutls host-util-linux +endif 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
Enabling CONFIG_TOOLS_LIBCRYPTO requires host-openssl as a dependency (which is missing), but as mentioned above it's not actually needed here and should be moved to the BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT section below.
Quoted 19 lines
package/uboot-tools/uboot-tools.mk +7
-1HOST_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@@ -213,12 +225,18 @@ define HOST_UBOOT_TOOLS_BUILD_CMDS $(HOST_UBOOT_TOOLS_GENERATE_BOOT_SCRIPT) endef +ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_MKEFICAPSULE),y) +define HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE + $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule +endef +endif +
package/uboot-tools/uboot-tools.mk define HOST_UBOOT_TOOLS_BUILD_CMDS · line 242
Quoted 10 lines
package/uboot-tools/uboot-tools.mk +1
-1define HOST_UBOOT_TOOLS_INSTALL_CMDS $(INSTALL) -m 0755 -D $(@D)/tools/mkimage $(HOST_DIR)/bin/mkimage - $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(HOST_DIR)/bin/mkeficapsule $(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(HOST_DIR)/bin/mkenvimage $(INSTALL) -m 0755 -D $(@D)/tools/dumpimage $(HOST_DIR)/bin/dumpimage $(HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN) + $(HOST_UBOOT_TOOLS_INSTALL_MKEFICAPSULE) $(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(HOST_DIR)/bin/fw_printenv ln -sf $(HOST_DIR)/bin/fw_printenv $(HOST_DIR)/bin/fw_setenv $(HOST_UBOOT_TOOLS_INSTALL_ENVIMAGE)
Best regards,
Fiona
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot