diff mbox series

[1/2] package/starfive_spltool: new package

Message ID 20240403091952.653698-2-thomas.bonnefille@bootlin.com
State New
Headers show
Series Add board support for Star64 | expand

Commit Message

Thomas Bonnefille April 3, 2024, 9:14 a.m. UTC
This patch adds a new package for the Starfive SPL tool. It is used to
add header to the Secondary Program Loader for board based on the
Starfive JH7110 SoC.

Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
 DEVELOPERS                                    |  3 +++
 package/Config.in.host                        |  1 +
 package/starfive-spltool/Config.in.host       |  8 ++++++++
 .../starfive-spltool.hash                     |  2 ++
 package/starfive-spltool/starfive-spltool.mk  | 20 +++++++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/starfive-spltool/Config.in.host
 create mode 100644 package/starfive-spltool/JH7110_VF2_515_v5.11.3/starfive-spltool.hash
 create mode 100644 package/starfive-spltool/starfive-spltool.mk
diff mbox series

Patch

diff --git a/DEVELOPERS b/DEVELOPERS
index 6b38db0857..b8ec27f623 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2953,6 +2953,9 @@  N:	Thijs Vermeir <thijsvermeir@gmail.com>
 F:	package/ranger/
 F:	package/x265/
 
+N:	Thomas Bonnefille <thomas.bonnefille@bootlin.com>
+F:	package/starfive-spltool/
+
 N:	Thomas Claveirole <thomas.claveirole@green-communications.fr>
 F:	package/fcgiwrap/
 F:	package/openlayers/
diff --git a/package/Config.in.host b/package/Config.in.host
index 9543a22ffc..986b2854d0 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -107,6 +107,7 @@  menu "Host utilities"
 	source "package/sentry-cli/Config.in.host"
 	source "package/sloci-image/Config.in.host"
 	source "package/squashfs/Config.in.host"
+	source "package/starfive-spltool/Config.in.host"
 	source "package/sunxi-tools/Config.in.host"
 	source "package/swig/Config.in.host"
 	source "package/swugenerator/Config.in.host"
diff --git a/package/starfive-spltool/Config.in.host b/package/starfive-spltool/Config.in.host
new file mode 100644
index 0000000000..afb2777ca6
--- /dev/null
+++ b/package/starfive-spltool/Config.in.host
@@ -0,0 +1,8 @@ 
+config BR2_PACKAGE_HOST_STARFIVE_SPLTOOL
+	bool "host starfive-spltool"
+	depends on BR2_riscv
+	help
+	  Add header to the Secondary Program Loader with the 3rd party
+	  software given by Starfive-Tech for their SoCs.
+
+	  https://github.com/starfive-tech/soft_3rdpart/tree/JH7110_VisionFive2_devel/spl_tool
diff --git a/package/starfive-spltool/JH7110_VF2_515_v5.11.3/starfive-spltool.hash b/package/starfive-spltool/JH7110_VF2_515_v5.11.3/starfive-spltool.hash
new file mode 100644
index 0000000000..55835de310
--- /dev/null
+++ b/package/starfive-spltool/JH7110_VF2_515_v5.11.3/starfive-spltool.hash
@@ -0,0 +1,2 @@ 
+# Locally computed
+sha256  f5466225021fbe4e983cc85f32ce11d92ad30689b18e0d1390d16f6bfab74477  starfive-spltool-JH7110_VF2_515_v5.11.3.tar.gz
diff --git a/package/starfive-spltool/starfive-spltool.mk b/package/starfive-spltool/starfive-spltool.mk
new file mode 100644
index 0000000000..559df35074
--- /dev/null
+++ b/package/starfive-spltool/starfive-spltool.mk
@@ -0,0 +1,20 @@ 
+################################################################################
+#
+# starfive-spltool
+#
+################################################################################
+
+STARFIVE_SPLTOOL_VERSION = JH7110_VF2_515_v5.11.3
+STARFIVE_SPLTOOL_SITE = $(call github,starfive-tech,soft_3rdpart,$(STARFIVE_SPLTOOL_VERSION))
+STARFIVE_SPLTOOL_LICENSE = GPL-2.0+
+STARFIVE_SPLTOOL_FILES = spl_tool/LICENSE
+
+define HOST_STARFIVE_SPLTOOL_BUILD_CMDS
+	$(HOST_MAKE_ENV) $(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)/spl_tool
+endef
+
+define HOST_STARFIVE_SPLTOOL_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/spl_tool/spl_tool $(HOST_DIR)/bin/spl_tool
+endef
+
+$(eval $(host-generic-package))