summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Schenker <philippe.schenker@toradex.com>2021-04-08 14:43:13 +0200
committerOleksandr Suvorov <oleksandr.suvorov@toradex.com>2021-04-09 10:59:52 +0000
commit3ae7ec26415b80d631caf70b97d233ae88cf4218 (patch)
treee8507814141a6554b2de99635c0c7acad1481b7b
parent6f73903d685a476bbf8bd70bd795b993b4efef60 (diff)
gitlab-ci: add size check for colibri imx7/6ulltoradex_5.4-2.3.x-imx
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
-rw-r--r--.gitlab-ci.yml61
1 files changed, 60 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0577c129b1fc..b7415e856a1e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -36,7 +36,66 @@ check_patch:
echo -e "building: \n$DEVICETREES"
make -j$THREADS $DEVICETREES
make -j$THREADS
- make mrproper
+
+colibri-imx6ull-kernel:
+ stage: build-kernel
+ image: gitlab.int.toradex.com:4567/rd/linux-bsp/ci-toolchain-container:linux-toradex_aarch32_arm_builder-bb6f84e
+ variables:
+ DEFCONFIG: colibri-imx6ull_defconfig
+ GIT_STRATEGY: fetch
+ GIT_DEPTH: "1"
+ # Choose max kernel size that `ubinfo /dev/ubi0_0` reports
+ MAX_KERNEL_SIZE_B: 8507392
+ script: |
+ echo "GCC used to build binaries is"
+ which ${CROSS_COMPILE}gcc
+ ${CROSS_COMPILE}gcc --version
+ echo -e "Arch is \e[36m$ARCH\e[39m"
+ echo "Current directory: ${PWD}"
+ THREADS=$(grep processor /proc/cpuinfo -c)
+ echo "building with $THREADS parallel threads"
+ DEVICETREES=$(find arch/arm/boot/dts/ -regextype posix-extended -regex "^.*\/imx.*(apalis|colibri|verdin).*\.dts" | sed 's/arch\/arm\/boot\/dts\///' | sed 's/\.dts/\.dtb/')
+ make $DEFCONFIG
+ echo -e "building: \n$DEVICETREES"
+ make -j$THREADS $DEVICETREES
+ make -j$THREADS
+ 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
+
+colibri-imx7-kernel:
+ stage: build-kernel
+ image: gitlab.int.toradex.com:4567/rd/linux-bsp/ci-toolchain-container:linux-toradex_aarch32_arm_builder-bb6f84e
+ variables:
+ DEFCONFIG: colibri_imx7_defconfig
+ GIT_STRATEGY: fetch
+ GIT_DEPTH: "1"
+ # Choose max kernel size that `ubinfo /dev/ubi0_0` reports
+ MAX_KERNEL_SIZE_B: 8507392
+ script: |
+ echo "GCC used to build binaries is"
+ which ${CROSS_COMPILE}gcc
+ ${CROSS_COMPILE}gcc --version
+ echo -e "Arch is \e[36m$ARCH\e[39m"
+ echo "Current directory: ${PWD}"
+ THREADS=$(grep processor /proc/cpuinfo -c)
+ echo "building with $THREADS parallel threads"
+ DEVICETREES=$(find arch/arm/boot/dts/ -regextype posix-extended -regex "^.*\/imx.*(apalis|colibri|verdin).*\.dts" | sed 's/arch\/arm\/boot\/dts\///' | sed 's/\.dts/\.dtb/')
+ make $DEFCONFIG
+ echo -e "building: \n$DEVICETREES"
+ make -j$THREADS $DEVICETREES
+ make -j$THREADS
+ 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
64-bit-kernel:
stage: build-kernel