tools: add gptfdisk for hifiveu image generation
authorZoltan HERPAI <wigyori@uid0.hu>
Mon, 20 Aug 2018 21:07:19 +0000 (23:07 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Thu, 21 Apr 2022 07:35:11 +0000 (09:35 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
tools/Makefile
tools/gptfdisk/Makefile [new file with mode: 0644]

index e6002220e83ce1c6af6fc8690e92f28d2eff370d..5927acf23d3903e870ee0e05c5b2debd86634e46 100644 (file)
@@ -31,7 +31,7 @@ tools-$(BUILD_ISL) += isl
 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_hifiveu) += popt
+tools-$(CONFIG_TARGET_hifiveu) += gptfdisk popt
 tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
 tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
 tools-$(CONFIG_USES_MINOR) += kernel2minor
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))