build.sh: add support to provide cpus number to use
https://onedigi.atlassian.net/browse/DEL-7629 Signed-off-by: Arturo Buzarra <arturo.buzarra@digi.com>
This commit is contained in:
parent
54cb00e120
commit
6462549f04
|
|
@ -151,7 +151,10 @@ YOCTO_IMGS_DIR="${WORKSPACE}/images"
|
|||
YOCTO_INST_DIR="${WORKSPACE}/dey.$(echo ${DY_REVISION} | tr '/' '_')"
|
||||
YOCTO_PROJ_DIR="${WORKSPACE}/projects"
|
||||
|
||||
# If CPUS is unset, set it with the machine cpus
|
||||
if [ -z "${CPUS}" ]; then
|
||||
CPUS="$(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
[ ${CPUS} -gt 1 ] && MAKE_JOBS="-j${CPUS}"
|
||||
|
||||
printf "\n[INFO] Build Yocto \"${DY_REVISION}\" for \"${DY_PLATFORMS}\" (cpus=${CPUS})\n\n"
|
||||
|
|
|
|||
|
|
@ -188,7 +188,10 @@ YOCTO_INST_DIR="${WORKSPACE}/digi-yocto-sdk.$(echo ${DY_REVISION} | tr '/' '_')"
|
|||
YOCTO_DOWNLOAD_DIR="${DY_DOWNLOADS:-${WORKSPACE}}/downloads"
|
||||
YOCTO_PROJ_DIR="${WORKSPACE}/projects"
|
||||
|
||||
# If CPUS is unset, set it with the machine cpus
|
||||
if [ -z "${CPUS}" ]; then
|
||||
CPUS="$(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
[ ${CPUS} -gt 1 ] && MAKE_JOBS="-j${CPUS}"
|
||||
|
||||
printf "\n[INFO] Build Yocto \"${DY_REVISION}\" for \"${DY_PLATFORMS}\" (cpus=${CPUS})\n\n"
|
||||
|
|
|
|||
Loading…
Reference in New Issue