oe-buildenv/init.sh
Thomas Klaehn 19126870d1 Yocto build container: Usage as docker cloud container
Signed-off-by: Thomas Klaehn <tkl@blackfinn.de>
2019-02-24 09:06:20 +01:00

24 lines
420 B
Bash
Executable File

#!/bin/bash
# Determine parallel build capabilities.
proc="$(nproc >&1)"
parallel_build=$((proc - 1))
if [ ${proc} -gt 20 ]
then
BB_NUMBER_THREADS=20
PARALLEL_MAKE="-j 20"
else
BB_NUMBER_THREADS=${parallel_build}
PARALLEL_MAKE="-j "${parallel_build}
fi
BB_ENV_EXTRAWHITE="BB_NUMBER_THREADS PARALLEL_MAKE BB_NUMBER_PARSE_THREADS"
export BB_NUMBER_THREADS
export PARALLEL_MAKE
export BB_ENV_EXTRAWHITE
exec "$@"