]> git.baikalelectronics.ru Git - uboot.git/commit
boot: image: fixup zstd decompression buffer initialization typo
authorJérôme Carretero <cJ-uboot@zougloub.eu>
Wed, 16 Mar 2022 19:35:36 +0000 (15:35 -0400)
committerTom Rini <trini@konsulko.com>
Mon, 28 Mar 2022 12:22:17 +0000 (08:22 -0400)
commitc2c94318b2a0e2c312124cbf46157583b4119d1a
treed8ca5ddacd741cd875a513fcbbf2962b0cd62c0b
parente6f60c28d8bdbae1cf6201e4d83791afcac5a95f
boot: image: fixup zstd decompression buffer initialization typo

The code was mistakenly initializing the input buffer twice.

Tested to be working on BeagleBone by adjusting CONFIG_SYS_BOOTM_LEN to
64MiB (probably works with less) and preparing uImage with:

 cat arch/arm/boot/Image \
  | zstd --ultra -22 --zstd=windowLog=22 \
  > linux.bin.zst

 mkimage -A arm -T kernel uImage -C zstd -d linux.bin.zst \
  -a 0x80008000 -e 0x80008000

Without the windowLog restriction, bootm fails with a zstd decompression
error 7 (window too large), which I haven't troubleshooted.

There should be a bit more documentation on the feature...

Reviewed-by: Simon Glass <sjg@chromium.org>
Fixes: 1da36f20488 image: Update image_decomp() to avoid ifdefs
boot/image.c