tools: add erofs-utils
authorPaul Spooren <mail@aparcar.org>
Sun, 29 May 2022 23:34:57 +0000 (01:34 +0200)
committerPaul Spooren <mail@aparcar.org>
Mon, 18 Jul 2022 21:56:14 +0000 (23:56 +0200)
needed for mkfs.erofs

Signed-off-by: Paul Spooren <mail@aparcar.org>
tools/Makefile
tools/erofs-utils/Makefile [new file with mode: 0644]

index be1a23ed512fb5f3edd1466f0df12495d93bde2d..193dc6d802d2fe6c13b2778c0d2c406d83e6bed9 100644 (file)
@@ -22,7 +22,7 @@ ifneq ($(CONFIG_SDK)$(CONFIG_PACKAGE_kmod-b43)$(CONFIG_PACKAGE_b43legacy-firmwar
 endif
 
 tools-y += autoconf autoconf-archive automake bc bison cmake cpio dosfstools
-tools-y += e2fsprogs fakeroot findutils firmware-utils flex gengetopt
+tools-y += e2fsprogs erofs-utils fakeroot findutils firmware-utils flex gengetopt
 tools-y += libressl libtool lzma m4 make-ext4fs meson missing-macros mkimage
 tools-y += mklibs mtd-utils mtools ninja padjffs2 patch-image
 tools-y += patchelf pkgconf quilt squashfskit4 sstrip xxd zip zlib zstd
@@ -48,6 +48,7 @@ $(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile
 $(curdir)/dosfstools/compile := $(curdir)/autoconf/compile $(curdir)/automake/compile
 $(curdir)/expat/compile := $(curdir)/cmake/compile
 $(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile
+$(curdir)/erofs-utils/compile := $(curdir)/automake/compile
 $(curdir)/fakeroot/compile := $(curdir)/libtool/compile
 $(curdir)/findutils/compile := $(curdir)/bison/compile
 $(curdir)/firmware-utils/compile += $(curdir)/libressl/compile $(curdir)/zlib/compile
diff --git a/tools/erofs-utils/Makefile b/tools/erofs-utils/Makefile
new file mode 100644 (file)
index 0000000..e65767c
--- /dev/null
@@ -0,0 +1,32 @@
+#
+# Copyright (C) 2009-2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=erofs-utils
+PKG_VERSION:=1.5
+PKG_RELEASE:=$(AUTORELEASE)
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
+PKG_SOURCE_DATE:=2022-05-17
+PKG_SOURCE_VERSION:=a2821a66b42aee5430bccee82c280e38d1e9ab29
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS=\
+       --without-uuid \
+       --enable-lzma
+
+define Host/Install
+       $(INSTALL_BIN) $(HOST_BUILD_DIR)/mkfs/mkfs.erofs $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+       rm -f $(STAGING_DIR_HOST)/bin/mkfs.erofs
+endef
+
+$(eval $(call HostBuild))