Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Mattias Walström" <lazzer@gmail.com>
To: buildroot@buildroot.org
Cc: "Mattias Walström" <lazzer@gmail.com>
Subject: [Buildroot] [PATCH 2/2] package/uboot-tools: Add new tool fdt_add_pubkey
Date: Wed,  7 Aug 2024 16:04:41 +0200	[thread overview]
Message-ID: <20240807140441.3795948-2-lazzer@gmail.com> (raw)
In-Reply-To: <20240807140441.3795948-1-lazzer@gmail.com>

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

  reply	other threads:[~2024-08-07 14:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2024-08-07 19:39 ` Thomas Petazzoni via buildroot
2024-08-08 17:39   ` Mattias Walström

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240807140441.3795948-2-lazzer@gmail.com \
    --to=lazzer@gmail.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox