Skip to content
Snippets Groups Projects
Commit bc54e54b authored by Lorenzo Pagliai's avatar Lorenzo Pagliai
Browse files

[BITBAKE][CONF] Optimize parameters for the build

* Insert the parameter BB_NUMBER_THREADS defining the maximum number of
tasks BitBake should run in parallel at any one time (default set to 64).
* Insert the parameter PARALLEL_MAKE specifying extra options that are
passed to the make command during the compile tasks (default set to 64).
parent 556c42f9
No related branches found
No related tags found
No related merge requests found
......@@ -39,6 +39,7 @@ variables:
#GitLab group containing LAVA tests
TEST_REPO_URL: "https://gitlab-ci-token:${GITBOT_TOKEN}@git.seco.com/devops/lava-test-suite/lava-test.git"
TEST_BRANCH: main
NUM_MAX_CPU: 64
stages:
# - manifest-pipeline
......@@ -210,7 +211,7 @@ retrigger:
sh .gitlab-ci/scripts/build_setup.sh $GITBOT_TOKEN $CI_REPOSITORY_URL $BUILD_BRANCH $DEFCONFIG_FILE $RECIPE_NAME
. ./seco-setup.sh -d ${DEFCONFIG_FILE};
. ./seco-setup.sh -c;
if [ -z "$CI_COMMIT_TAG" ]; then sh ../.gitlab-ci/scripts/yocto_cache_setup.sh $PROCESSOR $CUSTOM; fi;
if [ -z "$CI_COMMIT_TAG" ]; then sh ../.gitlab-ci/scripts/yocto_cache_setup.sh $PROCESSOR $NUM_MAX_CPU $CUSTOM; fi;
time bitbake ${RECIPE_NAME};
if [[ "$CI_JOB_NAME" != *"embedded"* ]]; then time bitbake seco-bundle-edgehog; fi;
. ../.gitlab-ci/scripts/check_build_artifacts.sh;
......
#!/bin/bash
PROCESSOR=$1
CUSTOM=$2
NUM_MAX_CPU=$2
CUSTOM=$3
sed -i -e '/DL_DIR ?=/d' conf/local.conf;
echo 'DL_DIR = "/var/cache/edgehog_downloads"' >> conf/local.conf;
......@@ -24,6 +26,10 @@ if [ -z "$CUSTOM" ]; then
fi
fi
#Optimize the Yocto build by setting the max number of threads
echo "BB_NUMBER_THREADS = \"${NUM_MAX_CPU}\"" >> conf/local.conf
echo "PARALLEL_MAKE = \"-j ${NUM_MAX_CPU}\"" >> conf/local.conf
echo '###############################'
echo '#### Displaying local.conf ####'
echo '###############################'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment