Jump to content

[Armbian build PR] - rockchip64: fix uboot zstd decompression


Recommended Posts

Posted

Description

Fix uboot booting from zstd compressed BTRFS.

uboot logs before fix:

Found U-Boot script /boot/boot.scr
ZSTD_decompressStream error 7
3252 bytes read in 41 ms (77.1 KiB/s)
...
SCRIPT FAILED: continuing...

Error 7 means "frame parameter window too large". It looks like uboot's max window size specification on decompressor init is totally wrong (compressed data size is used as max window size). Zstd default max window size is 128MB, but I'm unsure is it good idea to malloc 128MB in uboot on each BTRFS extent decompression. So I have capped minimum window size to 128KB - it should be sufficient for BTRFS as max compressed extent size is 128KB.

How Has This Been Tested?

  • [x] Compile
  • [x] Boot ZSTD compressed BTRFS

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] Any dependent changes have been merged and published in downstream modules

View the full article

×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines