diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2023-10-20 20:09:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-10-23 11:55:19 +0200 |
commit | 910b10d79ab17dadadb318b60d336f495a35be78 (patch) | |
tree | 5105dbfb3e4823c75eb4dfaac2b3777738013bcb /lib | |
parent | 8375004d1cb6d59ecdc36f02b9e5212588f31782 (diff) | |
download | barebox-910b10d79ab17dadadb318b60d336f495a35be78.tar.gz barebox-910b10d79ab17dadadb318b60d336f495a35be78.tar.xz |
decompress: xz: enable armthumb BCJ filter for Thumb-2 barebox
The XZ decompressor in barebox has BCJ filter support for THUMB, but
like Linux, it's unused and instead the ARM BCJ filter is used.
Fixing that lets us save a few kilobytes, which is especially useful for
legacy configuration that fit a whole barebox into limited on-chip SRAM
(and not only the prebootloader). For example, with this patch applied
barebox-am33xx-beaglebone-mlo.img is shrinked 3K from 109236 to 106028 bytes.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20231020180912.2914428-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/decompress_unxz.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/decompress_unxz.c b/lib/decompress_unxz.c index 132ab4a239..ad6a5f20ba 100644 --- a/lib/decompress_unxz.c +++ b/lib/decompress_unxz.c @@ -133,6 +133,8 @@ #ifdef CONFIG_ARM # ifdef CONFIG_CPU_64 # define XZ_DEC_ARM64 +# elif defined CONFIG_THUMB2_BAREBOX +# define XZ_DEC_ARMTHUMB # else # define XZ_DEC_ARM # endif |