Skip to content

btrfs: stop forcing the boot set uncompressed - #130

Open
Yury-MonZon wants to merge 1 commit into
devfrom
no-uncompress-zstd
Open

btrfs: stop forcing the boot set uncompressed#130
Yury-MonZon wants to merge 1 commit into
devfrom
no-uncompress-zstd

Conversation

@Yury-MonZon

Copy link
Copy Markdown
Contributor

What

Stop forcing the boot set uncompressed now that U-Boot can read zstd-compressed btrfs extents.

  • flipper-bls.sh: drop the uncompress() helper (no callers left)
  • 55-flipper-initrd.install: drop the modules-dir compression=none and the vmlinuz rewrite; the initrd move is unchanged
  • debian-rk3576-img.yaml: drop the /boot compression=none property

New boot files inherit the filesystem default (compress=zstd). Compressible files (dtb, dtbo, BLS loader entries) are stored zstd; vmlinuz/initrd stay raw since they are already image-compressed containers.

Why

The forced-uncompress worked around U-Boot's old zstd failing to read small files that btrfs stores as inline extents (the dtbo overlays and loader entries went through the inline decode path). That is fixed by the u-boot zstd 1.5.7 import in flipperdevices/u-boot#37.

Validation (RK3576, on hardware)

Fresh build from this branch running u-boot with flipperdevices/u-boot#37:

  • No compression=none on any boot dir; dtb / dtbo / loader entries stored zstd
  • Realtime compression on fresh writes confirmed (rename + no-reflink copy comes back zstd), so a kernel install compresses on the fly with no manual step
  • Boots @No-Graphics with a compressed base dtb, a compressed rk3576-no-graphics.dtbo (read and applied), and compressed BLS loader entries

Boot log and full details in flipperdevices/u-boot#37.

The u-boot zstd import (1.5.7) lets u-boot read zstd-compressed btrfs
extents, so the kernel/initrd/dtb/dtbo no longer need to be stored
uncompressed for the bootloader to read them.

Remove the compression=none forcing at every site:
- flipper-bls.sh: drop the uncompress() helper (no callers left)
- 55-flipper-initrd.install: drop the modules-dir property set and the
  vmlinuz rewrite; the initrd move is unchanged
- debian-rk3576-img.yaml: drop the /boot compression=none property

New boot files now inherit the filesystem default (compress=zstd).
Incompressible payloads (vmlinuz, initrd) stay raw; the dtb/dtbo and the
BLS loader entries compress.
@Yury-MonZon
Yury-MonZon requested a review from a team July 21, 2026 11:17

@alchark alchark left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but merging depends on flipperdevices/u-boot#37 (via upstream ideally)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants