[OpenWrt-Devel] [PATCH 2/5] tools: add fiptool

Stijn Tintel stijn at linux-ipv6.be
Fri Oct 19 13:37:04 EDT 2018


Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
---
 tools/Makefile         |  2 +-
 tools/fiptool/Makefile | 37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletion(-)
 create mode 100644 tools/fiptool/Makefile

diff --git a/tools/Makefile b/tools/Makefile
index 0adc13acbf..f11c738ac6 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -38,7 +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_mesongx) += meson-tools
+tools-$(CONFIG_TARGET_mesongx) += fiptool meson-tools
 
 # builddir dependencies
 $(curdir)/bison/compile := $(curdir)/flex/compile
diff --git a/tools/fiptool/Makefile b/tools/fiptool/Makefile
new file mode 100644
index 0000000000..e92729e51a
--- /dev/null
+++ b/tools/fiptool/Makefile
@@ -0,0 +1,37 @@
+#
+# Copyright (C) 2017 Stijn Tintel <stijn at 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))
-- 
2.16.4


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list