[openwrt/openwrt] tools: add erofs-utils

LEDE Commits lede-commits at lists.infradead.org
Sat Jul 5 06:25:10 PDT 2025


ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ece943540185d4f7b661129005e2417355b2526

commit 9ece943540185d4f7b661129005e2417355b2526
Author: Gao Xiang <hsiangkao at linux.alibaba.com>
AuthorDate: Thu Jun 26 01:14:32 2025 +0800

    tools: add erofs-utils
    
    Add erofs-utils to create an EROFS-based rootfs for image generation.
    
    Signed-off-by: Gao Xiang <hsiangkao at linux.alibaba.com>
    Link: https://github.com/openwrt/openwrt/pull/19244
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/Makefile             |  2 ++
 tools/erofs-utils/Makefile | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/tools/Makefile b/tools/Makefile
index 1776f64592..c2b36361a4 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -40,6 +40,7 @@ tools-y += cpio
 tools-y += dosfstools
 tools-y += e2fsprogs
 tools-y += elfutils
+tools-y += erofs-utils
 tools-y += expat
 tools-y += fakeroot
 tools-y += findutils
@@ -99,6 +100,7 @@ $(curdir)/cmake/compile += $(curdir)/libressl/compile $(curdir)/ninja/compile $(
 $(curdir)/dosfstools/compile := $(curdir)/automake/compile
 $(curdir)/e2fsprogs/compile := $(curdir)/libtool/compile $(curdir)/util-linux/compile
 $(curdir)/elfutils/compile := $(curdir)/m4/compile $(curdir)/zlib/compile $(curdir)/gnulib/compile $(curdir)/libtool/compile
+$(curdir)/erofs-utils/compile := $(curdir)/libtool/compile $(curdir)/xz/compile $(curdir)/lz4/compile $(curdir)/util-linux/compile
 $(curdir)/fakeroot/compile := $(curdir)/libtool/compile
 $(curdir)/findutils/compile := $(curdir)/bison/compile
 $(curdir)/firmware-utils/compile += $(curdir)/cmake/compile
diff --git a/tools/erofs-utils/Makefile b/tools/erofs-utils/Makefile
new file mode 100644
index 0000000000..e25f2f8409
--- /dev/null
+++ b/tools/erofs-utils/Makefile
@@ -0,0 +1,40 @@
+#
+# Copyright (C) 2009-2025 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.8.9
+PKG_RELEASE:=1
+
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git
+PKG_MIRROR_HASH:=feab7386de6faf11cb29af5bfa240ea119b14bfd66c14d80de0509c1ab16dcc6
+PKG_SOURCE_DATE:=2025-06-26
+PKG_SOURCE_VERSION:=81169bf3cfd26b8f2b3aa3b20da23971168a90a9
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/host-build.mk
+
+HOST_CONFIGURE_ARGS=\
+	--enable-multithreading \
+	--enable-lzma \
+	--enable-lz4 \
+	--disable-fuse \
+	--with-uuid
+
+define Host/Install
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/mkfs/mkfs.erofs $(STAGING_DIR_HOST)/bin/
+	$(INSTALL_BIN) $(HOST_BUILD_DIR)/fsck/fsck.erofs $(STAGING_DIR_HOST)/bin/
+endef
+
+define Host/Clean
+	rm -f $(STAGING_DIR_HOST)/bin/mkfs.erofs
+	rm -f $(STAGING_DIR_HOST)/bin/fsck.erofs
+endef
+
+$(eval $(call HostBuild))




More information about the lede-commits mailing list