* [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04
@ 2024-08-07 14:04 Mattias Walström
2024-08-07 14:04 ` [Buildroot] [PATCH 2/2] package/uboot-tools: Add new tool fdt_add_pubkey Mattias Walström
2024-08-07 19:39 ` [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Thomas Petazzoni via buildroot
0 siblings, 2 replies; 4+ messages in thread
From: Mattias Walström @ 2024-08-07 14:04 UTC (permalink / raw)
To: buildroot; +Cc: Mattias Walström
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(-)
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
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] package/uboot-tools: Add new tool fdt_add_pubkey
2024-08-07 14:04 [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Mattias Walström
@ 2024-08-07 14:04 ` Mattias Walström
2024-08-07 19:39 ` [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Thomas Petazzoni via buildroot
1 sibling, 0 replies; 4+ messages in thread
From: Mattias Walström @ 2024-08-07 14:04 UTC (permalink / raw)
To: buildroot; +Cc: Mattias Walström
fdt_add_pubkey is useful to install trusted signatures inside
an existing uboot device tree.
Signed-off-by: Mattias Walström <lazzer@gmail.com>
---
package/uboot-tools/Config.in | 7 +++++++
package/uboot-tools/uboot-tools.mk | 8 ++++++++
2 files changed, 15 insertions(+)
diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in
index c3b0341ecd..fbcd6379c5 100644
--- a/package/uboot-tools/Config.in
+++ b/package/uboot-tools/Config.in
@@ -102,4 +102,11 @@ config BR2_PACKAGE_UBOOT_TOOLS_DUMPIMAGE
The dumpimage tool from Das U-Boot bootloader, which allows
extraction of data from U-Boot images.
+config BR2_PACKAGE_UBOOT_TOOLS_FDT_ADD_PUBKEY
+ bool "fdt_add_key"
+ help
+ Install the fdt_add_key tool on the target system
+
+ The fdt_add_pubkey is used to add a public key to the fdt.
+
endif
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 0f6b0972c9..6dad5eb664 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -82,6 +82,12 @@ define UBOOT_TOOLS_INSTALL_MKENVIMAGE
endef
endif
+ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FDT_ADD_PUBKEY),y)
+define UBOOT_TOOLS_INSTALL_FDT_ADD_PUBKEY
+ $(INSTALL) -m 0755 -D $(@D)/tools/fdt_add_pubkey $(TARGET_DIR)/usr/bin/fdt_add_pubkey
+endef
+endif
+
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FWPRINTENV),y)
define UBOOT_TOOLS_INSTALL_FWPRINTENV
$(INSTALL) -m 0755 -D $(@D)/tools/env/fw_printenv $(TARGET_DIR)/usr/sbin/fw_printenv
@@ -107,6 +113,7 @@ define UBOOT_TOOLS_INSTALL_TARGET_CMDS
$(UBOOT_TOOLS_INSTALL_FWPRINTENV)
$(UBOOT_TOOLS_INSTALL_DUMPIMAGE)
$(UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN)
+ $(UBOOT_TOOLS_INSTALL_FDT_ADD_PUBKEY)
endef
# host-uboot-tools
@@ -227,6 +234,7 @@ define HOST_UBOOT_TOOLS_INSTALL_CMDS
$(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
+ $(INSTALL) -m 0755 -D $(@D)/tools/fdt_add_pubkey $(HOST_DIR)/bin/fdt_add_pubkey
$(HOST_UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN)
$(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
--
2.43.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04
2024-08-07 14:04 [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Mattias Walström
2024-08-07 14:04 ` [Buildroot] [PATCH 2/2] package/uboot-tools: Add new tool fdt_add_pubkey Mattias Walström
@ 2024-08-07 19:39 ` Thomas Petazzoni via buildroot
2024-08-08 17:39 ` Mattias Walström
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-08-07 19:39 UTC (permalink / raw)
To: Mattias Walström; +Cc: Fabrice Fontaine, buildroot
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
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04
2024-08-07 19:39 ` [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Thomas Petazzoni via buildroot
@ 2024-08-08 17:39 ` Mattias Walström
0 siblings, 0 replies; 4+ messages in thread
From: Mattias Walström @ 2024-08-08 17:39 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: Fabrice Fontaine, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 1788 bytes --]
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
>
[-- Attachment #1.2: Type: text/html, Size: 3187 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-08-08 17:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-07 14:04 [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Mattias Walström
2024-08-07 14:04 ` [Buildroot] [PATCH 2/2] package/uboot-tools: Add new tool fdt_add_pubkey Mattias Walström
2024-08-07 19:39 ` [Buildroot] [PATCH 1/2] package/uboot-tools: Bump to version 2024.04 Thomas Petazzoni via buildroot
2024-08-08 17:39 ` Mattias Walström
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.