summaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-07 07:35:11 +0300
committerSimon Glass <sjg@chromium.org>2021-01-31 00:25:41 +0300
commit6deff872cf7ac25bf3d67066b57e7831cd560e5b (patch)
treee176c0c2cbdf196d18632a4a0dbd0168ea7f55a8 /tools/patman
parent9fc6ebd8feb4654483b544d12587857cf8938796 (diff)
downloadu-boot-6deff872cf7ac25bf3d67066b57e7831cd560e5b.tar.xz
patman: Correct lz4 compression parameters
At present on large files, lz4 uses a larger block size (e.g. 256KB) than the 64KB supported by the U-Boot decompression implementation. Also it is optimised for maximum compression speed, producing larger output than we would like. Update the parameters to correct these problems. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/tools.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/patman/tools.py b/tools/patman/tools.py
index d8e01a3e60..10997e4386 100644
--- a/tools/patman/tools.py
+++ b/tools/patman/tools.py
@@ -476,7 +476,8 @@ def Compress(indata, algo, with_header=True):
fname = GetOutputFilename('%s.comp.tmp' % algo)
WriteFile(fname, indata)
if algo == 'lz4':
- data = Run('lz4', '--no-frame-crc', '-c', fname, binary=True)
+ data = Run('lz4', '--no-frame-crc', '-B4', '-5', '-c', fname,
+ binary=True)
# cbfstool uses a very old version of lzma
elif algo == 'lzma':
outfname = GetOutputFilename('%s.comp.otmp' % algo)