diff options
Diffstat (limited to 'scripts/Makefile.lib')
-rw-r--r-- | scripts/Makefile.lib | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 396da16aabf..1c702ca8aac 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -262,6 +262,34 @@ cmd_lzo = (cat $(filter-out FORCE,$^) | \ | |||
262 | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 262 | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
263 | (rm -f $@ ; false) | 263 | (rm -f $@ ; false) |
264 | 264 | ||
265 | # XZ | ||
266 | # --------------------------------------------------------------------------- | ||
267 | # Use xzkern to compress the kernel image and xzmisc to compress other things. | ||
268 | # | ||
269 | # xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage | ||
270 | # of the kernel decompressor. A BCJ filter is used if it is available for | ||
271 | # the target architecture. xzkern also appends uncompressed size of the data | ||
272 | # using size_append. The .xz format has the size information available at | ||
273 | # the end of the file too, but it's in more complex format and it's good to | ||
274 | # avoid changing the part of the boot code that reads the uncompressed size. | ||
275 | # Note that the bytes added by size_append will make the xz tool think that | ||
276 | # the file is corrupt. This is expected. | ||
277 | # | ||
278 | # xzmisc doesn't use size_append, so it can be used to create normal .xz | ||
279 | # files. xzmisc uses smaller LZMA2 dictionary than xzkern, because a very | ||
280 | # big dictionary would increase the memory usage too much in the multi-call | ||
281 | # decompression mode. A BCJ filter isn't used either. | ||
282 | quiet_cmd_xzkern = XZKERN $@ | ||
283 | cmd_xzkern = (cat $(filter-out FORCE,$^) | \ | ||
284 | sh $(srctree)/scripts/xz_wrap.sh && \ | ||
285 | $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | ||
286 | (rm -f $@ ; false) | ||
287 | |||
288 | quiet_cmd_xzmisc = XZMISC $@ | ||
289 | cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ | ||
290 | xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ | ||
291 | (rm -f $@ ; false) | ||
292 | |||
265 | # misc stuff | 293 | # misc stuff |
266 | # --------------------------------------------------------------------------- | 294 | # --------------------------------------------------------------------------- |
267 | quote:=" | 295 | quote:=" |