Hi Xiang,
erofs-utils hard-codes its maximum supported block size at build time:
configure sets EROFS_MAX_BLOCK_SIZE either from the MAX_BLOCK_SIZE
environment variable, or by probing sysconf(_SC_PAGESIZE) on the
*build* host (falling back to 4096 when cross-compiling, and to a
16 KiB minimum on aarch64 since 1.9).
EROFS images created on aarch64 systems running 64 KiB-page kernels
use blkszbits=16. Since the arm64 buildds run 4 KiB-page kernels,
the shipped binaries reject such images:
$ fsck.erofs /dev/disk/by-label/app
<E> erofs: blksize 65536 isn't supported on this platform
<E> erofs: failed to read superblock
All consumers are affected: fsck.erofs, dump.erofs, erofsfuse and
mount.erofs. Note that on trixie (1.8.6) the cap is 4096, so even
16 KiB-block images are rejected there.
I verified this on an arm64 device running a 64 KiB-page kernel:
fsck.erofs 1.8.6 from trixie rejects both 16 KiB and 64 KiB images,
while a build with EROFS_MAX_BLOCK_SIZE=65536 checks both fine.
No source change is needed: the attached debdiff exports
MAX_BLOCK_SIZE=65536 in debian/rules, which is the documented
autoconf argument variable for exactly this purpose. The larger
limit only grows a few on-stack buffers (64 KiB instead of 4/16 KiB
in erofs_read_superblock() and friends), which is fine with the
default 8 MiB thread stack - upstream already ships 16 KiB buffers
on aarch64.
Reproducer:
mkfs.erofs -b 65536 img.erofs srcdir/
fsck.erofs img.erofs
I rebuilt the package with the attached debdiff and verified that
the resulting fsck.erofs checks both 16 KiB and 64 KiB blocksize
images successfully.
Thanks,
Ping Li
diff -Nru erofs-utils-1.9.4/debian/changelog erofs-utils-1.9.4/debian/changelog
--- erofs-utils-1.9.4/debian/changelog 2026-08-19 20:00:00.000000000 +0800
+++ erofs-utils-1.9.4/debian/changelog 2026-11-04 15:57:18.070014646 +0800
@@ -1,3 +1,11 @@
+erofs-utils (1.9.4-1.1) UNRELEASED; urgency=medium
+
+ * Build with MAX_BLOCK_SIZE=65536 so that fsck.erofs & co. accept
+ EROFS images with 64 KiB blocks (as created on aarch64 systems
+ running 64 KiB-page kernels).
+
+ -- Ping Li <leeonion.muyu@gmail.com> Wed, 04 Nov 2026 15:57:12 +0800
+
erofs-utils (1.9.4-1) unstable; urgency=medium
* New upstream release 1.9.4.
diff -Nru erofs-utils-1.9.4/debian/rules erofs-utils-1.9.4/debian/rules
--- erofs-utils-1.9.4/debian/rules 2026-08-19 20:00:00.000000000 +0800
+++ erofs-utils-1.9.4/debian/rules 2026-11-04 15:19:41.829224626 +0800
@@ -4,6 +4,13 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+# erofs-utils hard-codes its maximum supported block size at build time;
+# configure otherwise probes the build host's page size, which caps arm64
+# builds at 16 KiB (or 4 KiB on 4 KiB-page buildds). EROFS images with
+# 64 KiB blocks (aarch64 64 KiB-page kernels) then fail with:
+# <E> erofs: blksize 65536 isn't supported on this platform
+export MAX_BLOCK_SIZE = 65536
+
ifneq ($(DEB_TARGET_ARCH_OS),linux)
SKIP_FUSE2FS=yes
SKIP_SELINUX=yes