package/jh71xx-tools: new package
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Fri, 14 May 2021 22:03:15 +0000 (00:03 +0200)
committerYann E. MORIN <yann.morin.1998@free.fr>
Sat, 15 May 2021 12:11:22 +0000 (14:11 +0200)
Add jh71xx-tools as a new host package, it includes a tool that allows
to recover the bootloader of JH71xx-based platforms, such as the
BeagleV.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
[yann.morin.1998@free.fr:
  - fix alphabetical order, spotted by Bin
  - use LICENSE as license file, update license hash accordingly
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
DEVELOPERS
package/Config.in.host
package/jh71xx-tools/Config.in.host [new file with mode: 0644]
package/jh71xx-tools/jh71xx-tools.hash [new file with mode: 0644]
package/jh71xx-tools/jh71xx-tools.mk [new file with mode: 0644]

index ed86dc82ba070acbce8895bdc26a0c4ca57e716d..a90ad1c354c3b1ec7a41c8dd91c580bcd474e320 100644 (file)
@@ -2633,6 +2633,7 @@ F:        package/heirloom-mailx/
 F:     package/hiawatha/
 F:     package/igh-ethercat/
 F:     package/intltool/
+F:     package/jh71xx-tools/
 F:     package/libcap/
 F:     package/libffi/
 F:     package/libsha1/
index ba6a68c728c2465bf81bcb24c1291b9abbe8281f..064c98af3da6b4710e3ed1ee24ea3c8839939a8c 100644 (file)
@@ -39,6 +39,7 @@ menu "Host utilities"
        source "package/imagemagick/Config.in.host"
        source "package/imx-mkimage/Config.in.host"
        source "package/imx-usb-loader/Config.in.host"
+       source "package/jh71xx-tools/Config.in.host"
        source "package/jq/Config.in.host"
        source "package/jsmin/Config.in.host"
        source "package/kmod/Config.in.host"
diff --git a/package/jh71xx-tools/Config.in.host b/package/jh71xx-tools/Config.in.host
new file mode 100644 (file)
index 0000000..08872f2
--- /dev/null
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_HOST_JH71XX_TOOLS
+       bool "host jh71xx-tools"
+       depends on BR2_riscv
+       help
+         Bootloader recovery and updater tool for StarFive JH7100 SoCs.
+
+         https://github.com/kprasadvnsi/JH71xx-tools
diff --git a/package/jh71xx-tools/jh71xx-tools.hash b/package/jh71xx-tools/jh71xx-tools.hash
new file mode 100644 (file)
index 0000000..6bc7abe
--- /dev/null
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  0f16ea896164f6e8bfe0a03bbbd95ff14d474445ba6f045f9377d01282c9364f  jh71xx-tools-7a29f4b9d2355aa39afa8680680909bb74e4991d.tar.gz
+sha256  cf03c59b41f6d8a5046f7bff4bbe3576075314299a4d0828d7855bf60af81001  LICENSE
diff --git a/package/jh71xx-tools/jh71xx-tools.mk b/package/jh71xx-tools/jh71xx-tools.mk
new file mode 100644 (file)
index 0000000..f082e2a
--- /dev/null
@@ -0,0 +1,20 @@
+################################################################################
+#
+# jh71xx-tools
+#
+################################################################################
+
+JH71XX_TOOLS_VERSION = 7a29f4b9d2355aa39afa8680680909bb74e4991d
+JH71XX_TOOLS_SITE = $(call github,kprasadvnsi,JH71xx-tools,$(JH71XX_TOOLS_VERSION))
+JH71XX_TOOLS_LICENSE = MIT
+JH71XX_TOOLS_LICENSE_FILES = LICENSE
+
+define HOST_JH71XX_TOOLS_BUILD_CMDS
+       $(HOSTCC) -o $(@D)/jh7100-recover $(@D)/jh7100-recover.c
+endef
+
+define HOST_JH71XX_TOOLS_INSTALL_CMDS
+       $(INSTALL) -D -m 0755 $(@D)/jh7100-recover $(HOST_DIR)/bin/jh7100-recover
+endef
+
+$(eval $(host-generic-package))