All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vyacheslav Bocharov via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Subject: [Buildroot] [PATCH] package/amlogic-boot-fip: new package
Date: Tue, 18 Jan 2022 14:14:58 +0300	[thread overview]
Message-ID: <20220118111457.2491318-1-adeep@lexina.in> (raw)

Firmware Image Package (FIP) sources to sign Amlogic SoC u-boot binaries
in LibreELEC, Armbian and meta-meson, buildroot.

https://github.com/LibreELEC/amlogic-boot-fip

Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
---
 DEVELOPERS                                    |  3 ++
 package/Config.in                             |  1 +
 package/amlogic-boot-fip/Config.in            | 17 +++++++++
 .../amlogic-boot-fip/amlogic-boot-fip.hash    |  2 +
 package/amlogic-boot-fip/amlogic-boot-fip.mk  | 37 +++++++++++++++++++
 5 files changed, 60 insertions(+)
 create mode 100644 package/amlogic-boot-fip/Config.in
 create mode 100644 package/amlogic-boot-fip/amlogic-boot-fip.hash
 create mode 100644 package/amlogic-boot-fip/amlogic-boot-fip.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index a91e2dfcde..deda803018 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2894,6 +2894,9 @@ N:	Volkov Viacheslav <sv99@inbox.ru>
 F:	package/v4l2grab/
 F:	package/zbar/
 
+N:	Vyacheslav Bocharov <devel+buildroot@lexina.in>
+F:	package/amlogic-boot-fip/
+
 N:	Wade Berrier <wberrier@gmail.com>
 F:	package/ngrep/
 
diff --git a/package/Config.in b/package/Config.in
index 4df1474b91..df38024af2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -418,6 +418,7 @@ endmenu
 menu "Hardware handling"
 menu "Firmware"
 	source "package/am33x-cm3/Config.in"
+	source "package/amlogic-boot-fip/Config.in"
 	source "package/armbian-firmware/Config.in"
 	source "package/b43-firmware/Config.in"
 	source "package/linux-firmware/Config.in"
diff --git a/package/amlogic-boot-fip/Config.in b/package/amlogic-boot-fip/Config.in
new file mode 100644
index 0000000000..ceb09f8247
--- /dev/null
+++ b/package/amlogic-boot-fip/Config.in
@@ -0,0 +1,17 @@
+config BR2_PACKAGE_AMLOGIC_BOOT_FIP
+	 bool "amlogic-boot-fip"
+	 help
+	   This package enables access to various u-boot
+	   blobs from the LibreELEC amlogic-boot-fip repository.
+
+	   https://github.com/LibreELEC/amlogic-boot-fip
+
+if BR2_PACKAGE_AMLOGIC_BOOT_FIP
+
+config BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD
+	string "Board uboot firmware config"
+	depends on BR2_PACKAGE_AMLOGIC_BOOT_FIP
+	help
+	  Name of the board for which U-Boot firmware should be built 
+	  from amlogic-boot-fip
+endif
diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.hash b/package/amlogic-boot-fip/amlogic-boot-fip.hash
new file mode 100644
index 0000000000..5d6dd237e3
--- /dev/null
+++ b/package/amlogic-boot-fip/amlogic-boot-fip.hash
@@ -0,0 +1,2 @@
+# Locally calculated
+sha256  cdf9d3872457c33a2755cc504f6b0560a62a6ee04437ac28e66623a345ed4936  amlogic-boot-fip-7ff0004e0e4d261ba81334a2f46302bd06704aca-br1.tar.gz
diff --git a/package/amlogic-boot-fip/amlogic-boot-fip.mk b/package/amlogic-boot-fip/amlogic-boot-fip.mk
new file mode 100644
index 0000000000..6f646ae871
--- /dev/null
+++ b/package/amlogic-boot-fip/amlogic-boot-fip.mk
@@ -0,0 +1,37 @@
+
+################################################################################
+#
+# amlogic-boot-fip
+#
+################################################################################
+
+AMLOGIC_BOOT_FIP_VERSION = 7ff0004e0e4d261ba81334a2f46302bd06704aca
+AMLOGIC_BOOT_FIP_SITE = https://github.com/LibreELEC/amlogic-boot-fip
+AMLOGIC_BOOT_FIP_SITE_METHOD = git
+AMLOGIC_BOOT_FIP_INSTALL_IMAGES = YES
+AMLOGIC_BOOT_FIP_DEPENDENCIES = uboot
+
+AMLOGIC_BOOT_FIP_LICENSE = PROPRIETARY
+AMLOGIC_BOOT_FIP_REDISTRIBUTE = NO
+
+AMLOGIC_BOOT_BINS += u-boot.bin.sd.bin
+
+define AMLOGIC_BOOT_FIP_BUILD_CMDS
+    mkdir -p $(@D)/fip
+    cp $(BINARIES_DIR)/u-boot.bin $(@D)/fip/bl33.bin
+    cd "$(@D)"; ./build-fip.sh $(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)) $(@D)/fip/bl33.bin $(@D)/fip
+endef
+
+ifeq ($(BR2_PACKAGE_AMLOGIC_BOOT_FIP),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD)),)
+$(error No board u-boot firmware config name specified, check your BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD setting)
+endif # qstrip BR2_PACKAGE_AMLOGIC_BOOT_FIP_BOARD
+endif
+
+define AMLOGIC_BOOT_FIP_INSTALL_IMAGES_CMDS
+	$(foreach f,$(AMLOGIC_BOOT_BINS), \
+			cp -dpf "$(@D)/fip/$(f)" "$(BINARIES_DIR)/"
+	)
+endef
+
+$(eval $(generic-package))
-- 
2.30.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-01-18 11:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 11:14 Vyacheslav Bocharov via buildroot [this message]
2022-01-22 13:33 ` [Buildroot] [PATCH] package/amlogic-boot-fip: new package Thomas Petazzoni
2022-01-22 15:05   ` Vyacheslav via buildroot
2022-01-22 15:09     ` Thomas Petazzoni
2022-01-22 16:09       ` Vyacheslav via buildroot
2022-01-24 13:41         ` Neil Armstrong
2022-01-24 20:45           ` Thomas Petazzoni
2022-01-26  5:41             ` Vyacheslav via buildroot

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=20220118111457.2491318-1-adeep@lexina.in \
    --to=buildroot@buildroot.org \
    --cc=adeep@lexina.in \
    /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.