Skip to content
View in the app

A better way to browse. Learn more.

Learn more

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

Featured Replies

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

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.