Skip to contentSkip to conversation

fs/erofs: unbreak custom compression handling

PATCH Applied Peter Korsgaard 2 participants 3 messages May 16, 2025 – May 18, 2025 EROFS file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs/erofs: unbreak custom compression handling

Fixes:
https://autobuild.buildroot.net/results/0f856def945b9a863f45f7a58553b62f6875720b/

Commit a02e43741719 ("fs/erofs: add custom compression option with optional compress-hints file") added logic for custom compression, but in fact it did not work.

BR2_TARGET_ROOTFS_EROFS_COMPRESSION_{ALGORITHMS,HINTS} are kconfig string variables, so we need to use qstrip rather than strip.

---
 fs/erofs/erofs.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
fs/erofs/erofs.mk +3 -3
index 6543a364f1..881ecea053 100644
@@ -11,9 +11,9 @@ ROOTFS_EROFS_ARGS += -zlz4hc,$(BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL)
 else ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZMA),y)
 ROOTFS_EROFS_ARGS += -zlzma,$(BR2_TARGET_ROOTFS_EROFS_LZMA_LEVEL)
 else ifeq ($(BR2_TARGET_ROOTFS_EROFS_CUSTOM_COMPRESSION),y)
-ROOTFS_EROFS_ARGS += -z$(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
-ROOTFS_EROFS_ARGS += --compress-hints $(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
+ROOTFS_EROFS_ARGS += -z$(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
+ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
+ROOTFS_EROFS_ARGS += --compress-hints $(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
 endif
 endif
 
Signature · 6 lines
2.39.5

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 11 lines · Peter Korsgaard

Fixes:
https://autobuild.buildroot.net/results/0f856def945b9a863f45f7a58553b62f6875720b/

Commit a02e43741719 ("fs/erofs: add custom compression option with optional compress-hints file") added logic for custom compression, but in fact it did not work.

BR2_TARGET_ROOTFS_EROFS_COMPRESSION_{ALGORITHMS,HINTS} are kconfig string variables, so we need to use qstrip rather than strip.

Applied to master, thanks.

Regards,
Arnout

Quoted 11 lines
---
  fs/erofs/erofs.mk | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
fs/erofs/erofs.mk +0 -0
index 6543a364f1..881ecea053 100644
@@ -11,9 +11,9 @@ ROOTFS_EROFS_ARGS += -zlz4hc,$(BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL)
  else ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZMA),y)
  ROOTFS_EROFS_ARGS += -zlzma,$(BR2_TARGET_ROOTFS_EROFS_LZMA_LEVEL)

fs/erofs/erofs.mk ROOTFS_EROFS_ARGS += -zlz4hc,$(BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL) · line 19

Quoted 10 lines
fs/erofs/erofs.mk +3 -3
  else ifeq ($(BR2_TARGET_ROOTFS_EROFS_CUSTOM_COMPRESSION),y)
-ROOTFS_EROFS_ARGS += -z$(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
-ROOTFS_EROFS_ARGS += --compress-hints $(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
+ROOTFS_EROFS_ARGS += -z$(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
+ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
+ROOTFS_EROFS_ARGS += --compress-hints $(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
  endif
  endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw
In reply to Peter Korsgaard
Quoted 11 lines · Peter Korsgaard

Fixes:
https://autobuild.buildroot.net/results/0f856def945b9a863f45f7a58553b62f6875720b/

Commit a02e43741719 ("fs/erofs: add custom compression option with optional compress-hints file") added logic for custom compression, but in fact it did not work.

BR2_TARGET_ROOTFS_EROFS_COMPRESSION_{ALGORITHMS,HINTS} are kconfig string variables, so we need to use qstrip rather than strip.

Applied to 2025.02.x, thanks.

Regards,
Arnout

Quoted 11 lines
---
  fs/erofs/erofs.mk | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
fs/erofs/erofs.mk +0 -0
index 6543a364f1..881ecea053 100644
@@ -11,9 +11,9 @@ ROOTFS_EROFS_ARGS += -zlz4hc,$(BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL)
  else ifeq ($(BR2_TARGET_ROOTFS_EROFS_LZMA),y)
  ROOTFS_EROFS_ARGS += -zlzma,$(BR2_TARGET_ROOTFS_EROFS_LZMA_LEVEL)

fs/erofs/erofs.mk ROOTFS_EROFS_ARGS += -zlz4hc,$(BR2_TARGET_ROOTFS_EROFS_LZ4HC_LEVEL) · line 19

Quoted 10 lines
fs/erofs/erofs.mk +3 -3
  else ifeq ($(BR2_TARGET_ROOTFS_EROFS_CUSTOM_COMPRESSION),y)
-ROOTFS_EROFS_ARGS += -z$(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
-ifneq ($(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
-ROOTFS_EROFS_ARGS += --compress-hints $(strip $(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
+ROOTFS_EROFS_ARGS += -z$(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_ALGORITHMS))
+ifneq ($(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS)),)
+ROOTFS_EROFS_ARGS += --compress-hints $(call qstrip,$(BR2_TARGET_ROOTFS_EROFS_COMPRESSION_HINTS))
  endif
  endif
 

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot