tools: add gptfdisk for riscv64 image generation
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 20 Aug 2018 21:07:19 +0000 (23:07 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Sun, 7 Nov 2021 15:53:23 +0000 (16:53 +0100)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
tools/Makefile
tools/gptfdisk/Makefile [new file with mode: 0644]

index 686d5294d3e7fbad517a99ce6a3b120456003737..ee1f757b6a6ca23f95453b2c8659871520128277 100644 (file)
@@ -32,6 +32,7 @@ tools-$(BUILD_TOOLCHAIN) += expat gmp mpc mpfr
 tools-$(CONFIG_TARGET_apm821xx)$(CONFIG_TARGET_gemini) += genext2fs
 tools-$(CONFIG_TARGET_ath79) += lzma-old squashfs
 tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
+tools-$(CONFIG_TARGET_hifiveu) += gptfdisk
 tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
 tools-$(CONFIG_USES_MINOR) += kernel2minor
 tools-$(CONFIG_USE_SPARSE) += sparse
diff --git a/tools/gptfdisk/Makefile b/tools/gptfdisk/Makefile
new file mode 100644 (file)
index 0000000..e2adc74
--- /dev/null
@@ -0,0 +1,30 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Copyright (C) 2021 OpenWrt.org
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gptfdisk
+PKG_VERSION:=1.0.8
+
+PKG_SOURCE:=gptfdisk-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/gptfdisk
+PKG_HASH:=95d19856f004dabc4b8c342b2612e8d0a9eebdd52004297188369f152e9dc6df
+
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Compile
+       $(MAKE) -C $(HOST_BUILD_DIR) sgdisk
+endef
+
+define Host/Install
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/sgdisk $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/sgdisk
+endef
+
+$(eval $(call HostBuild))