How to decompress LZ4 compressed u-boot

  • I'm trying to modify the bootloader for my Amlogic device without having to recompile it.

    Bl33/u-boot is LZ4 compressed with a nonstandard header so I'm not able to decompress it with any standard LZ4 programs. Does anyone know how or of any scripts to decompress u-boot?

  • Yes the signing tool has an LZ4 compression option

    Code
    aml_encrypt_g12a --bl3sig --input u-boot.bin --compress lz4 --output u-boot.enc --level v3 --type bl33

    But it uses a custom frame header that's not recognized by the standard LZ4 program. I was just wondering if there is an easy solution for decompression.

    This isn't really specific to any box, I have seen the LZ4C magic in a number of bootloaders from different boxes indicating uboot is compressed.