All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yu Chien Peter Lin via buildroot <buildroot@buildroot.org>
To: <buildroot@buildroot.org>
Cc: tim609@andestech.com, Yu Chien Peter Lin <peterlin@andestech.com>,
	ycliang@andestech.com,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: [Buildroot] [PATCH v3 1/4] package/andes-spi-burn: new package
Date: Tue, 10 Sep 2024 14:26:32 +0800	[thread overview]
Message-ID: <20240910062635.4193650-2-peterlin@andestech.com> (raw)
In-Reply-To: <20240910062635.4193650-1-peterlin@andestech.com>

Add a new package for Andes AE350 SPI_burn tool to program
flash memory.

Signed-off-by: Yu Chien Peter Lin <peterlin@andestech.com>
---
 DEVELOPERS                                 |  1 +
 package/Config.in.host                     |  1 +
 package/andes-spi-burn/Config.in.host      |  8 +++++++
 package/andes-spi-burn/andes-spi-burn.hash |  3 +++
 package/andes-spi-burn/andes-spi-burn.mk   | 27 ++++++++++++++++++++++
 5 files changed, 40 insertions(+)
 create mode 100644 package/andes-spi-burn/Config.in.host
 create mode 100644 package/andes-spi-burn/andes-spi-burn.hash
 create mode 100644 package/andes-spi-burn/andes-spi-burn.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 069965680b..aab5a6c05f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2487,6 +2487,7 @@ N:	Yu Chien Peter Lin <peterlin@andestech.com>
 F:	board/andes
 F:	configs/andes_ae350_45_defconfig
 F:	package/kmon/
+F:	package/andes-spi-burn/
 
 N:	Olaf Rempel <razzor@kopf-tisch.de>
 F:	package/ctorrent/
diff --git a/package/Config.in.host b/package/Config.in.host
index e4fbee4f2a..191833d94d 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -4,6 +4,7 @@ menu "Host utilities"
 	source "package/aespipe/Config.in.host"
 	source "package/agent-proxy/Config.in.host"
 	source "package/amlogic-boot-fip/Config.in.host"
+	source "package/andes-spi-burn/Config.in.host"
 	source "package/android-tools/Config.in.host"
 	source "package/asn1c/Config.in.host"
 	source "package/babeltrace2/Config.in.host"
diff --git a/package/andes-spi-burn/Config.in.host b/package/andes-spi-burn/Config.in.host
new file mode 100644
index 0000000000..cd92b448bf
--- /dev/null
+++ b/package/andes-spi-burn/Config.in.host
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_HOST_ANDES_SPI_BURN
+	bool "host andes-spi-burn"
+	depends on BR2_riscv
+	help
+	  Andes Technology SPI_burn tool to program bootloader and
+	  device-tree blob onto flash memory of AE350 platform.
+
+	  https://github.com/andestech/Andes-Development-Kit
diff --git a/package/andes-spi-burn/andes-spi-burn.hash b/package/andes-spi-burn/andes-spi-burn.hash
new file mode 100644
index 0000000000..5e4b4c8c97
--- /dev/null
+++ b/package/andes-spi-burn/andes-spi-burn.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  d354611540a553fe59ea5a1660426d13c43fb29c378734fe455af2ea6e85b728  flash_v5.3.0.zip
+sha256  cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30  LICENSE
diff --git a/package/andes-spi-burn/andes-spi-burn.mk b/package/andes-spi-burn/andes-spi-burn.mk
new file mode 100644
index 0000000000..45f9638d27
--- /dev/null
+++ b/package/andes-spi-burn/andes-spi-burn.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# andes-spi-burn
+#
+################################################################################
+
+ANDES_SPI_BURN_VERSION = 5.3.0
+ANDES_SPI_BURN_SOURCE = flash_v$(ANDES_SPI_BURN_VERSION).zip
+ANDES_SPI_BURN_SITE = https://github.com/andestech/meta-andes/releases/download/ast-v5_3_0-release
+ANDES_SPI_BURN_LICENSE = Apache-2.0
+ANDES_SPI_BURN_FILES = LICENSE
+
+define HOST_ANDES_SPI_BURN_EXTRACT_CMDS
+	$(UNZIP) $(HOST_ANDES_SPI_BURN_DL_DIR)/$(ANDES_SPI_BURN_SOURCE) -d $(@D)
+	mv $(@D)/flash/* $(@D)
+	rmdir $(@D)/flash
+endef
+
+define HOST_ANDES_SPI_BURN_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) -C $(@D)/src-SPI_burn --makefile=Makefile_SPIburn_linux
+endef
+
+define HOST_ANDES_SPI_BURN_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/src-SPI_burn/SPI_burn $(HOST_DIR)/bin/SPI_burn
+endef
+
+$(eval $(host-generic-package))
-- 
2.34.1

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

  reply	other threads:[~2024-09-10  6:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-10  6:26 [Buildroot] [PATCH v3 0/4] Support Andes SPI_burn tool Yu Chien Peter Lin via buildroot
2024-09-10  6:26 ` Yu Chien Peter Lin via buildroot [this message]
2024-09-14 19:00   ` [Buildroot] [PATCH v3 1/4] package/andes-spi-burn: new package Thomas Petazzoni via buildroot
2024-09-20 10:16     ` Yu-Chien Peter Lin via buildroot
2024-09-10  6:26 ` [Buildroot] [PATCH v3 2/4] configs/andes_ae350_45: Enable host-andes-spi-burn Yu Chien Peter Lin via buildroot
2024-09-10  6:26 ` [Buildroot] [PATCH v3 3/4] board/andes/ae350: uboot.config.fragment: Support loading U-Boot on RAM Yu Chien Peter Lin via buildroot
2024-09-10  6:26 ` [Buildroot] [PATCH v3 4/4] board/andes/ae350: readme.txt: Add SPI_burn tool instructions Yu Chien Peter Lin 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=20240910062635.4193650-2-peterlin@andestech.com \
    --to=buildroot@buildroot.org \
    --cc=peterlin@andestech.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=tim609@andestech.com \
    --cc=ycliang@andestech.com \
    /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.