* [Buildroot] [PATCH] package/uboot-tools: add support for mkeficapsule
@ 2021-11-18 17:45 Vincent Stehlé
2021-11-21 21:28 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Stehlé @ 2021-11-18 17:45 UTC (permalink / raw)
To: buildroot; +Cc: Vincent Stehlé, Matt Weber
The mkeficapsule U-Boot tool can be used to generate UEFI capsule binaries.
Add an option to cross-build it and install it to the target filesystem.
Also, build it and install it unconditionally to the host dir.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Matt Weber <matthew.weber@collins.com>
---
package/uboot-tools/Config.in | 8 ++++++++
package/uboot-tools/uboot-tools.mk | 19 ++++++++++++++++++-
2 files changed, 26 insertions(+), 1 deletion(-)
diff --git a/package/uboot-tools/Config.in b/package/uboot-tools/Config.in
index 681f87b45f5..e8bbf3a16ef 100644
--- a/package/uboot-tools/Config.in
+++ b/package/uboot-tools/Config.in
@@ -66,6 +66,14 @@ config BR2_PACKAGE_UBOOT_TOOLS_MKIMAGE
The mkimage tool from Das U-Boot bootloader, which allows
generation of U-Boot images in various formats.
+config BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE
+ bool "mkeficapsule"
+ help
+ Install the mkeficapsule tool on the target system
+
+ The mkeficapsule tool from Das U-Boot bootloader, which allows
+ generation of UEFI capsule binaries.
+
config BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE
bool "mkenvimage"
help
diff --git a/package/uboot-tools/uboot-tools.mk b/package/uboot-tools/uboot-tools.mk
index 81f60963ecf..37e329a2af6 100644
--- a/package/uboot-tools/uboot-tools.mk
+++ b/package/uboot-tools/uboot-tools.mk
@@ -22,6 +22,8 @@ define UBOOT_TOOLS_CONFIGURE_CMDS
touch $(@D)/include/config/auto.conf
mkdir -p $(@D)/include/generated
touch $(@D)/include/generated/autoconf.h
+ mkdir -p $(@D)/include/asm
+ touch $(@D)/include/asm/linkage.h
endef
UBOOT_TOOLS_MAKE_OPTS = CROSS_COMPILE="$(TARGET_CROSS)" \
@@ -40,6 +42,10 @@ UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT_SIGNATURE=y CONFIG_FIT_SIGNATURE_MAX_SIZE=0x
UBOOT_TOOLS_DEPENDENCIES += openssl host-pkgconf
endif
+ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE),y)
+UBOOT_TOOLS_MAKE_OPTS += CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
+endif
+
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_FIT_CHECK_SIGN),y)
define UBOOT_TOOLS_INSTALL_FIT_CHECK_SIGN
$(INSTALL) -m 0755 -D $(@D)/tools/fit_check_sign $(TARGET_DIR)/usr/bin/fit_check_sign
@@ -59,6 +65,12 @@ define UBOOT_TOOLS_INSTALL_MKIMAGE
endef
endif
+ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKEFICAPSULE),y)
+define UBOOT_TOOLS_INSTALL_MKEFICAPSULE
+ $(INSTALL) -m 0755 -D $(@D)/tools/mkeficapsule $(TARGET_DIR)/usr/bin/mkeficapsule
+endef
+endif
+
ifeq ($(BR2_PACKAGE_UBOOT_TOOLS_MKENVIMAGE),y)
define UBOOT_TOOLS_INSTALL_MKENVIMAGE
$(INSTALL) -m 0755 -D $(@D)/tools/mkenvimage $(TARGET_DIR)/usr/bin/mkenvimage
@@ -85,6 +97,7 @@ endef
define UBOOT_TOOLS_INSTALL_TARGET_CMDS
$(UBOOT_TOOLS_INSTALL_MKIMAGE)
+ $(UBOOT_TOOLS_INSTALL_MKEFICAPSULE)
$(UBOOT_TOOLS_INSTALL_MKENVIMAGE)
$(UBOOT_TOOLS_INSTALL_FWPRINTENV)
$(UBOOT_TOOLS_INSTALL_DUMPIMAGE)
@@ -98,11 +111,14 @@ define HOST_UBOOT_TOOLS_CONFIGURE_CMDS
touch $(@D)/include/config/auto.conf
mkdir -p $(@D)/include/generated
touch $(@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)"
+ HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+ CONFIG_EFI_HAVE_CAPSULE_SUPPORT=y
ifeq ($(BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT),y)
HOST_UBOOT_TOOLS_MAKE_OPTS += CONFIG_FIT=y CONFIG_MKIMAGE_DTC_PATH=dtc
@@ -193,6 +209,7 @@ endef
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_ENVIMAGE)
--
2.33.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/uboot-tools: add support for mkeficapsule
2021-11-18 17:45 [Buildroot] [PATCH] package/uboot-tools: add support for mkeficapsule Vincent Stehlé
@ 2021-11-21 21:28 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2021-11-21 21:28 UTC (permalink / raw)
To: Vincent Stehlé; +Cc: Matt Weber, buildroot
On Thu, 18 Nov 2021 18:45:47 +0100
Vincent Stehlé <vincent.stehle@arm.com> wrote:
> The mkeficapsule U-Boot tool can be used to generate UEFI capsule binaries.
> Add an option to cross-build it and install it to the target filesystem.
> Also, build it and install it unconditionally to the host dir.
>
> Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
> Cc: Matt Weber <matthew.weber@collins.com>
> ---
> package/uboot-tools/Config.in | 8 ++++++++
> package/uboot-tools/uboot-tools.mk | 19 ++++++++++++++++++-
> 2 files changed, 26 insertions(+), 1 deletion(-)
Applied to next, thanks.
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] 2+ messages in thread
end of thread, other threads:[~2021-11-21 21:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 17:45 [Buildroot] [PATCH] package/uboot-tools: add support for mkeficapsule Vincent Stehlé
2021-11-21 21:28 ` Thomas Petazzoni
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.