]> code.ossystems Code Review - openembedded-core.git/commit
classes/populate_sdk_base: Implement xz compression options
authorMike Looijmans <mike.looijmans@topic.nl>
Fri, 20 Mar 2020 14:45:20 +0000 (15:45 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Mar 2020 22:39:16 +0000 (22:39 +0000)
commit25533a48a19e3e6eb9f96be51b1373830b5bb9f0
tree5bf31147982369057f7818bce9d8897af7ab91d2
parent1e6061a4d223dc104039728ba169dbe63e74f750
classes/populate_sdk_base: Implement xz compression options

Building an SDK on a machine with 8GB RAM resulted in excessive swapping
due to the xz compressor using ~20GB of memory. This is because xz is
being called with "-T 0 -9".

To allow tuning the compression versus memory usage, introduce a variable
named SDK_XZ_OPTIONS that defaults to a more sane default:
SDK_XZ_OPTIONS ?= "${XZ_DEFAULTS} ${SDK_XZ_COMPRESSION_LEVEL}"
The use of XZ_DEFAULTS fixes the excessive memory usage.
The SDK_XZ_COMPRESSION_LEVEL variable allows overriding the speed vs
compression. In an office or development environment the extra time
spent on compressing a few percent more is just not worth it.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/populate_sdk_base.bbclass