blob: fdb40cbeb99bc2a9f6d6f16653fabcefce0f28f0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
variables:
# uncomment for the pipeline debug purpose
# CI_DEBUG_TRACE: "true"
CI_IMAGE: gitlab.int.toradex.com:4567/philippe.schenker/linux-toradex/ci-kernel-builder:gcc9
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
stages:
- build-kernel
build_kernel:
stage: build-kernel
image: $CI_IMAGE
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "1"
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"
cd $CI_PROJECT_DIR
DEVICETREES=$(ls arch/arm/boot/dts/vf*colibri*.dts | sed 's/arch\/arm\/boot\/dts\///' | sed 's/\.dts/\.dtb/')
make colibri_vf_defconfig
# workaround lzop missing in the build container
sed -i 's/CONFIG_KERNEL_LZO=y/# CONFIG_KERNEL_LZO is not set/' .config
sed -i 's/..CONFIG_KERNEL_GZIP is not set/CONFIG_KERNEL_GZIP=y/' .config
echo -e "building: \n$DEVICETREES"
make -j$THREADS $DEVICETREES
make -j$THREADS
make mrproper
|