summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: a4fe54d8e6fbb5a6986a6cfe171d3473cf7f03b4 (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
36
37
38
39
40
41
42
43
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:latest
  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 $PWD
    THREADS=$(grep processor /proc/cpuinfo -c)
    echo "building with $THREADS parallel threads"
    cd $CI_PROJECT_DIR
    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 multi_v7_defconfig
    echo -e "building: \n$DEVICETREES"
    make $DEVICETREES
    make -j $THREADS
    make mrproper
    source /select_64bit_toolchain.sh
    echo "GCC used to build binaries is"
    which ${CROSS_COMPILE}gcc
    ${CROSS_COMPILE}gcc --version
    echo -e "Arch is \e[36m$ARCH\e[39m"
    DEVICETREES=$(find arch/arm64/boot/dts/ -regextype posix-extended -regex "^.*\/fsl.*(apalis|colibri|verdin).*\.dts" | sed 's/arch\/arm64\/boot\/dts\///' | sed 's/\.dts/\.dtb/')
    make defconfig
    echo -e "building: \n$DEVICETREES"
    make $DEVICETREES
    make -j $THREADS
    make mrproper