aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xxd
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-02-28 19:26:07 +0000
committerRafał Miłecki <rafal@milecki.pl>2022-03-15 18:50:26 +0100
commit17e95532842c4d62b30669490eb00b39cf8ff743 (patch)
tree948f394679c76d03b0066afde498330b401a87a1 /tools/xxd
parentf44f8b07b0277d38fafb3d613a303454d3b9faaf (diff)
downloadupstream-17e95532842c4d62b30669490eb00b39cf8ff743.tar.gz
upstream-17e95532842c4d62b30669490eb00b39cf8ff743.tar.bz2
upstream-17e95532842c4d62b30669490eb00b39cf8ff743.zip
tools: add xxd (from vim)
U-Boot requires xxd to create the default environment from an external file as done in uboot-mediatek. Build xxd (only, not the rest of vim) as part of tools to make sure it is present on the buildhost. Reported-by: David Bauer <mail@david-bauer.net> Signed-off-by: Daniel Golle <daniel@makrotopia.org> (cherry picked from commit c4dd2441e7875c9550820f8380b3e41ca619ef27)
Diffstat (limited to 'tools/xxd')
-rw-r--r--tools/xxd/Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/xxd/Makefile b/tools/xxd/Makefile
new file mode 100644
index 0000000000..7c225baa00
--- /dev/null
+++ b/tools/xxd/Makefile
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=xxd
+PKG_SOURCE_NAME:=vim
+PKG_VERSION:=8.2
+PKG_RELEASE:=2
+VIMVER:=82
+
+PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.bz2
+PKG_SOURCE_URL:=http://ftp.vim.org/pub/vim/unix
+PKG_HASH:=f087f821831b4fece16a0461d574ccd55a8279f64d635510a1e10225966ced3b
+PKG_CPE_ID:=cpe:/a:vim:vim
+
+HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_NAME)$(VIMVER)
+HOST_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/host-build.mk
+
+define Host/Configure
+endef
+
+define Host/Compile
+ $(HOST_MAKE_VARS) $(MAKE) -C $(HOST_BUILD_DIR)/src/xxd
+endef
+
+define Host/Install
+ $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
+ $(INSTALL_BIN) $(HOST_BUILD_DIR)/src/xxd/xxd $(STAGING_DIR_HOST)/bin/
+endef
+
+$(eval $(call HostBuild))