summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_ipk.bbclass
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2019-02-11 21:47:54 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-14 11:20:55 +0000
commitc6a243dbb2708ecc0cca722c273d56cbbb24d918 (patch)
treec0cf3dad355d0b97789d9c27c70d41041b4dc451 /meta/classes/package_ipk.bbclass
parent715c9e3ad6ab4200cff4895ea3fa09b3044db2a3 (diff)
downloadpoky-c6a243dbb2708ecc0cca722c273d56cbbb24d918.tar.gz
image_types.bbclass: Set memory usage limit and CPU threads for xz
when building with opkg backend and huge packages e.g. chromium/llvm all going in parallel, memory pressure causes xz to catapult with do_package_write_ipk: Failed to create package, opkg-build failed with: xz: (stdin): Cannot allocate memory since there are many tasks going on in parallel, xz adds to memory pressure and it wants it all, put an upper limit for memory xz can use We add a variable XZ_MAXRAM with 30% of RAM limit and can be customized if builders have more memory one can set it like XZ_DEFAULTS = "-M 0 -T 0" (From OE-Core rev: 28b277a93a34bba033d9d0d9f3227c9453efd384) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/package_ipk.bbclass')
-rw-r--r--meta/classes/package_ipk.bbclass2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index 508b7dcaff..d1b317b42b 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -8,7 +8,7 @@ IPKGCONF_SDK = "${WORKDIR}/opkg-sdk.conf"
8PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks" 8PKGWRITEDIRIPK = "${WORKDIR}/deploy-ipks"
9 9
10# Program to be used to build opkg packages 10# Program to be used to build opkg packages
11OPKGBUILDCMD ??= 'opkg-build -Z xz -a "--threads 0"' 11OPKGBUILDCMD ??= 'opkg-build -Z xz -a "${XZ_DEFAULTS}"'
12 12
13OPKG_ARGS += "--force_postinstall --prefer-arch-to-version" 13OPKG_ARGS += "--force_postinstall --prefer-arch-to-version"
14OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}" 14OPKG_ARGS += "${@['', '--no-install-recommends'][d.getVar("NO_RECOMMENDATIONS") == "1"]}"