diff options
author | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-20 06:32:42 +0200 |
---|---|---|
committer | Denys Drozdov <denys.drozdov@toradex.com> | 2022-01-25 15:16:54 +0200 |
commit | 07619da61cc5ea87fc705ff84d824add44ca4833 (patch) | |
tree | b687baac561e9f4929d077e6ce3d6150bd69f348 /.gitlab-ci.yml | |
parent | f5d1aa72060a12c0cce321e9b705c70a4ebd498a (diff) |
gitlab-ci: Update build_bsp_defconfig build stage
Fix building upstream kernel pipeline with imx_v6_v7_defconfig
Signed-off-by: Denys Drozdov <denys.drozdov@toradex.com>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5b2518690607..4d97c23c72f0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,11 +70,31 @@ check_patch: # If you need additional products build just copy-paste build_******_product section with new config name build_default_defconfig : - extends: .build_base - variables: - # Defining the path, which we will use to take a config file to build a kernel - KERNEL_FILE_PATH: colibri-imx7/torizon-upstream/torizon-core-docker stage: build-product + variables: + DEFCONFIG: "imx_v6_v7_defconfig" + # Choose max kernel size that `ubinfo /dev/ubi0_0` reports + MAX_KERNEL_SIZE_B: 12570624 + GIT_STRATEGY: fetch + GIT_DEPTH: "1" + script: | + #set -o xtrace + cd $CI_PROJECT_DIR + echo -e "Compiler used to build binaries is" + which ${CROSS_COMPILE}gcc + ${CROSS_COMPILE}gcc --version + echo -e "Arch is \e[36m$ARCH\e[39m" + THREADS=$(grep processor /proc/cpuinfo -c) + make $DEFCONFIG + make -j $THREADS 2>&1 | tee $KERNEL_BUILD_LOG_FILE_NAME + KERNEL_SIZE=$(ls -la arch/arm/boot/zImage | awk '{print $5}') + echo "Kernel size is ${KERNEL_SIZE} bytes" + if [ $KERNEL_SIZE -ge $MAX_KERNEL_SIZE_B ]; + then + echo "❌ Kernel exceeds the max size of ${MAX_KERNEL_SIZE_B}, failing CI pipeline"; + exit 1 + fi + allow_failure: true build_bsp_defconfig: stage: build-product |