tools: add fiptool
authorStijn Tintel <stijn@linux-ipv6.be>
Tue, 27 Jun 2017 07:32:57 +0000 (09:32 +0200)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 3 Aug 2022 09:59:14 +0000 (12:59 +0300)
Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
tools/Makefile
tools/fiptool/Makefile [new file with mode: 0644]

index 5ac4084c6832cfb835afa259a5a81c46226edf5f..f662bf746f29a707dc21b8d3044531964fe7ed2c 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_mesongx) += meson-tools
+tools-$(CONFIG_TARGET_mesongx) += fiptool meson-tools
 tools-$(CONFIG_TARGET_mxs) += elftosb sdimage
 tools-$(CONFIG_TARGET_realtek) += 7z
 tools-$(CONFIG_TARGET_tegra) += cbootimage cbootimage-configs
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
new file mode 100644 (file)
index 0000000..e92729e
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2017 Stijn Tintel <stijn@linux-ipv6.be>
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=fiptool
+
+PKG_SOURCE_URL=https://github.com/hardkernel/u-boot.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2016-06-01
+PKG_SOURCE_VERSION:=3a2dd09540d3639671d86145336f400ec07b1a4e
+
+PKG_LICENSE:=BSD-3-Clause
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Compile
+       +$(HOST_MAKE_VARS) \
+       $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/tools/fip_create \
+               $(HOST_MAKE_FLAGS) \
+               $(1)
+endef
+
+define Host/Install
+       $(INSTALL_BIN) \
+               $(HOST_BUILD_DIR)/tools/fip_create/fip_create \
+               $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/fip_create
+endef
+
+$(eval $(call HostBuild))