mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Christian Melki <christian.melki@t2data.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 4/6] rules/efitools: Add new package.
Date: Fri, 16 Jul 2021 15:41:05 +0200	[thread overview]
Message-ID: <20210716134107.31712-4-christian.melki@t2data.com> (raw)
In-Reply-To: <20210716134107.31712-1-christian.melki@t2data.com>

efitools for target. Might be used for reading efivariables
or signing/resigning images on the target. efitools might also
be used for signing EFI images on host.
This is the target package.

Signed-off-by: Christian Melki <christian.melki@t2data.com>
---
 rules/efitools.in   | 11 ++++++
 rules/efitools.make | 84 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 95 insertions(+)
 create mode 100644 rules/efitools.in
 create mode 100644 rules/efitools.make

diff --git a/rules/efitools.in b/rules/efitools.in
new file mode 100644
index 000000000..1b1b1d0ba
--- /dev/null
+++ b/rules/efitools.in
@@ -0,0 +1,11 @@
+## SECTION=shell_and_console
+
+config EFITOOLS
+	tristate
+	select LIBC_DL
+	select GNU_EFI
+	select OPENSSL
+	select HOST_EFITOOLS
+	prompt "efitools"
+	help
+	  Useful tools for manipulating UEFI secure boot platforms
diff --git a/rules/efitools.make b/rules/efitools.make
new file mode 100644
index 000000000..4e43dc3fd
--- /dev/null
+++ b/rules/efitools.make
@@ -0,0 +1,84 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2021 by Christian Melki <christian.melki@t2data.com>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_EFITOOLS) += efitools
+
+#
+# Paths and names
+#
+EFITOOLS_VERSION	:= 1.9.2
+EFITOOLS_MD5		:= a3a3f04ed6aa5486c97dd206edeebe0a
+EFITOOLS		:= efitools-$(EFITOOLS_VERSION)
+EFITOOLS_SUFFIX		:= tar.gz
+EFITOOLS_URL		:= https://git.kernel.org/pub/scm/linux/kernel/git/jejb/efitools.git/snapshot/$(EFITOOLS).$(EFITOOLS_SUFFIX)
+EFITOOLS_SOURCE		:= $(SRCDIR)/$(EFITOOLS).$(EFITOOLS_SUFFIX)
+EFITOOLS_DIR		:= $(BUILDDIR)/$(EFITOOLS)
+EFITOOLS_LICENSE	:= GPL-2.0-or-later
+EFITOOLS_LICENSE_FILES	:= \
+	file://COPYING;md5=97d554a32881fee0aa283d96e47cb24a
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ifdef PTXCONF_ARCH_X86
+EFITOOLS_ARCH       := ia32
+ifdef PTXCONF_ARCH_X86_64
+EFITOOLS_ARCH       := x86_64
+endif
+endif
+ifdef PTXCONF_ARCH_ARM
+EFITOOLS_ARCH       := arm
+endif
+ifdef PTXCONF_ARCH_ARM64
+EFITOOLS_ARCH       := aarch64
+endif
+
+EFITOOLS_CONF_TOOL	:= NO
+
+EFITOOLS_MAKE_ENV	:= \
+	$(CROSS_ENV) \
+	ARCH=$(EFITOOLS_ARCH) \
+	INCDIR_PREFIX=$(SYSROOT) \
+	CRTPATH_PREFIX=$(SYSROOT) \
+	OPENSSL_LIB=$(PTXDIST_SYSROOT_HOST) \
+	SIGN_EFI_SIG_LIST=$(PTXDIST_SYSROOT_HOST)/usr/bin/sign-efi-sig-list \
+	CERT_TO_EFI_SIG_LIST=$(PTXDIST_SYSROOT_HOST)/usr/bin/cert-to-efi-sig-list \
+	CERT_TO_EFI_HASH_LIST=$(PTXDIST_SYSROOT_HOST)/usr/bin/cert-to-efi-hash-list \
+	HASH_TO_EFI_SIG_LIST=$(PTXDIST_SYSROOT_HOST)/usr/bin/hash-to-efi-sig-list \
+	prefix=/usr
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/efitools.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, efitools)
+	@$(call install_fixup, efitools,PRIORITY,optional)
+	@$(call install_fixup, efitools,SECTION,base)
+	@$(call install_fixup, efitools,AUTHOR,"Christian Melki <christian.melki@t2data.com>")
+	@$(call install_fixup, efitools,DESCRIPTION,missing)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/cert-to-efi-hash-list)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/cert-to-efi-sig-list)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/efi-readvar)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/efi-updatevar)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/efitool-mkusb)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/flash-var)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/hash-to-efi-sig-list)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/sig-list-to-certs)
+	@$(call install_copy, efitools, 0, 0, 0755, -, /usr/bin/sign-efi-sig-list)
+	@$(call install_finish, efitools)
+
+	@$(call touch)
+
+# vim: syntax=make
-- 
2.32.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  parent reply	other threads:[~2021-07-16 13:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-16 13:41 [ptxdist] [PATCH 1/6] rules/host-gnu-efi: " Christian Melki
2021-07-16 13:41 ` [ptxdist] [PATCH 2/6] rules/gnu-efi: " Christian Melki
2021-07-19  9:09   ` Roland Hieber
2021-07-19  9:11     ` Roland Hieber
2021-07-20 13:08     ` Christian Melki
2021-07-20 14:22       ` Roland Hieber
2021-07-16 13:41 ` [ptxdist] [PATCH 3/6] rules/host-efitools: " Christian Melki
2021-07-16 13:41 ` Christian Melki [this message]
2021-07-16 13:41 ` [ptxdist] [PATCH 5/6] rules/host-sbsigntools: " Christian Melki
2021-07-16 13:41 ` [ptxdist] [PATCH 6/6] rules/sbsigntools: " Christian Melki

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=20210716134107.31712-4-christian.melki@t2data.com \
    --to=christian.melki@t2data.com \
    --cc=ptxdist@pengutronix.de \
    /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