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>
Mon, 20 Aug 2018 21:13:55 +0000 (23:13 +0200)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
tools/Makefile
tools/gptfdisk/Makefile [new file with mode: 0644]

index 9a354f6c706967485762082b08c62d2b2bfcf4f4..1ac8cbf89548e5c264fd93f1cd190365bfb4b1ee 100644 (file)
@@ -38,6 +38,7 @@ tools-$(BUILD_B43_TOOLS) += b43-tools
 tools-$(BUILD_ISL) += isl
 tools-$(CONFIG_USE_SPARSE) += sparse
 tools-$(CONFIG_TARGET_apm821xx) += genext2fs
+tools-$(CONFIG_TARGET_riscv64) += gptfdisk
 
 # builddir dependencies
 $(curdir)/bison/compile := $(curdir)/flex/compile
diff --git a/tools/gptfdisk/Makefile b/tools/gptfdisk/Makefile
new file mode 100644 (file)
index 0000000..d214f99
--- /dev/null
@@ -0,0 +1,33 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+# Copyright (C) 2016 LEDE project
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gptfdisk
+PKG_VERSION:=1.0.4
+
+PKG_SOURCE:=gptfdisk-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/gptfdisk
+PKG_HASH:=b663391a6876f19a3cd901d862423a16e2b5ceaa2f4a3b9bb681e64b9c7ba78d
+
+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))