Parallelize via per-package target dirs

Change-Id: I781adb384d3da34823d082a23c0db68ed7589975
diff --git a/ci/build.sh b/ci/build.sh
index 99ae979..a907ebf 100755
--- a/ci/build.sh
+++ b/ci/build.sh
@@ -6,7 +6,7 @@
 ZUUL_JOB_NAME=$(jq < ~/zuul-env.json -r '.job')
 ZUUL_PROJECT_SRC_DIR=$HOME/$(jq < ~/zuul-env.json -r '.project.src_dir')
 ZUUL_PROJECT_SHORT_NAME=$(jq < ~/zuul-env.json -r '.project.short_name')
-CI_PARALLEL_JOBS=$(grep -c '^processor' /proc/cpuinfo)
+CI_PARALLEL_JOBS=$(awk -vcpu=$(getconf _NPROCESSORS_ONLN) 'BEGIN{printf "%.0f", cpu*1.3+1}')
 
 BUILD_DIR=~/build
 mkdir ${BUILD_DIR}
@@ -22,10 +22,9 @@
 fi
 
 echo BR2_PRIMARY_SITE=\"https://ci-logs.gerrit.cesnet.cz/t/public/mirror/buildroot\" >> .config
-make source
+make source -j${CI_PARALLEL_JOBS} --output-sync=target
 
-sed -i 's/^\(\.NOTPARALLEL\).*/#\1/' ${ZUUL_PROJECT_SRC_DIR}/submodules/buildroot/Makefile
-make -j${CI_PARALLEL_JOBS}
+make -j${CI_PARALLEL_JOBS} --output-sync=target
 mv images/update.raucb ~/zuul-output/artifacts/
 
 if [[ "${ZUUL_JOB_NAME}" =~ clearfog ]]; then