package/uboot-tools: add support for mkeficapsule
PATCH 1/1 package/uboot-tools: add support for mkeficapsule
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é <[email protected]>
Cc Matt Weber <[email protected]>
--- package/uboot-tools/Config.in | 8 ++++++++ package/uboot-tools/uboot-tools.mk | 19 ++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-)
package/uboot-tools/Config.in +8 -0
@@ -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
package/uboot-tools/uboot-tools.mk +18 -1
@@ -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)
Signature · 6 lines
2.33.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni
AppliedQuoted 10 lines · On Thu, 18 Nov 2021 18:45:47 +0100 Vincent Stehlé <[email protected]>…
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é <[email protected]>Cc Matt Weber <[email protected]>--- 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
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot