All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mylène Josserand" <mylene.josserand@collabora.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 2/3] package: Add new fip package
Date: Tue,  7 Jul 2020 09:53:38 +0200	[thread overview]
Message-ID: <20200707075339.389528-3-mylene.josserand@collabora.com> (raw)
In-Reply-To: <20200707075339.389528-1-mylene.josserand@collabora.com>

Firmware Image Pacakge (FIP) is used to sign Amlogic u-boot binaries.
It is a host package as it is only binaries to call on u-boot image
to sign it. One tool is a python script that needs to be called with
'python' command, otherwise, it is not working. That is why there is
a dependency on host-python.

For the moment, only LePotato's board is supported. Other ones
may be added later, if needed.

Signed-off-by: Myl?ne Josserand <mylene.josserand@collabora.com>
---
 package/Config.in.host     |  1 +
 package/fip/Config.in.host | 17 +++++++++++++++++
 package/fip/fip.hash       |  2 ++
 package/fip/fip.mk         | 30 ++++++++++++++++++++++++++++++
 4 files changed, 50 insertions(+)
 create mode 100644 package/fip/Config.in.host
 create mode 100644 package/fip/fip.hash
 create mode 100644 package/fip/fip.mk

diff --git a/package/Config.in.host b/package/Config.in.host
index f1246c708f..21d2bc4072 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -24,6 +24,7 @@ menu "Host utilities"
 	source "package/f2fs-tools/Config.in.host"
 	source "package/faketime/Config.in.host"
 	source "package/fatcat/Config.in.host"
+	source "package/fip/Config.in.host"
 	source "package/fwup/Config.in.host"
 	source "package/genext2fs/Config.in.host"
 	source "package/genimage/Config.in.host"
diff --git a/package/fip/Config.in.host b/package/fip/Config.in.host
new file mode 100644
index 0000000000..914020a1b3
--- /dev/null
+++ b/package/fip/Config.in.host
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_HOST_FIP
+	bool "host Amlogic FIP binaries"
+	help
+	  This package contains the FIP utilities, that is
+	  used to create U-Boot final binary.
+
+if BR2_PACKAGE_HOST_FIP
+
+config BR2_PACKAGE_HOST_FIP_LEPOTATO
+	bool "FIP lepotato version"
+	default y
+	select BR2_PACKAGE_HOST_PYTHON3
+	help
+	  This option will download the latest libretech-cc's version
+	  of the fip utility for the board "lepotato".
+
+endif
diff --git a/package/fip/fip.hash b/package/fip/fip.hash
new file mode 100644
index 0000000000..547fff8534
--- /dev/null
+++ b/package/fip/fip.hash
@@ -0,0 +1,2 @@
+# Locally computed
+sha256 7a59dc36c89b02c38f9b630b4abb7056869ff76ca6152b6c3ce797ddd1349a64  fip-bfdad4cc520b254813536ebfba8b9749386cd57c.tar.gz
diff --git a/package/fip/fip.mk b/package/fip/fip.mk
new file mode 100644
index 0000000000..d1fb43ad13
--- /dev/null
+++ b/package/fip/fip.mk
@@ -0,0 +1,30 @@
+################################################################################
+#
+# fip
+#
+################################################################################
+
+FIP_VERSION = bfdad4cc520b254813536ebfba8b9749386cd57c
+FIP_SITE = $(call github,LibreELEC,amlogic-boot-fip,$(FIP_VERSION))
+FIP_LICENSE = PROPRIETARY
+FIP_DEPENDENCIES = host-python3
+
+ifeq ($(BR2_PACKAGE_HOST_FIP_LEPOTATO),y)
+HOST_FIP_LEPOTATO_BINARIES += lepotato/bl2.bin lepotato/acs.bin \
+			lepotato/bl21.bin lepotato/bl30.bin \
+			lepotato/bl301.bin lepotato/bl31.img \
+			lepotato/blx_fix.sh lepotato/acs_tool.py lepotato/aml_encrypt_gxl
+endif
+
+define HOST_FIP_INSTALL_SUBDIR
+	$(INSTALL) -m 0755 -d $(HOST_DIR)/usr/bin/fip/
+endef
+
+define HOST_FIP_INSTALL_CMDS
+	$(foreach b,$(HOST_FIP_LEPOTATO_BINARIES),
+		$(INSTALL) -D -m 755 $(@D)/$(b) $(HOST_DIR)/usr/bin/fip/)
+endef
+
+HOST_FIP_PRE_INSTALL_HOOKS += HOST_FIP_INSTALL_SUBDIR
+
+$(eval $(host-generic-package))
-- 
2.27.0

  parent reply	other threads:[~2020-07-07  7:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-07  7:53 [Buildroot] [PATCH 0/3] board: Add support for LePotato Mylène Josserand
2020-07-07  7:53 ` [Buildroot] [PATCH 1/3] DEVELOPERS: Update Mylene's email Mylène Josserand
2020-07-07  7:53 ` Mylène Josserand [this message]
2020-07-07 12:37   ` [Buildroot] [PATCH 2/3] package: Add new fip package Romain Naour
2020-07-07 14:18     ` Mylene Josserand
2020-07-07 14:29       ` Romain Naour
2020-07-09 11:51         ` Mylene Josserand
2020-07-07  7:53 ` [Buildroot] [PATCH 3/3] configs/lepotato: Add new defconfig Mylène Josserand
2020-07-07 19:51 ` [Buildroot] [PATCH 0/3] board: Add support for LePotato Yann E. MORIN
2020-07-09 11:58   ` Mylene Josserand

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=20200707075339.389528-3-mylene.josserand@collabora.com \
    --to=mylene.josserand@collabora.com \
    --cc=buildroot@busybox.net \
    /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 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.