summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 00a9a12c1233cb709223c2605dff5c864a07b4c4 (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
44
45
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=$(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 -j$THREADS $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"
    echo "Current directory: ${PWD}"
    echo "building with $THREADS parallel threads"
    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 -j$THREADS $DEVICETREES
    make -j$THREADS
    make mrproper