aboutsummaryrefslogtreecommitdiff
path: root/linux-ltsi.yaml
blob: 03feec92a83f5334e363a006ce341223343b35a2 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
- job:
    name: linux-ltsi
    project-type: matrix
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
    parameters:
        - file:
            name: defconfig.properties
        - password:
            name: LAVA_USER
            default: ${LAVA_USER}
        - password:
            name: LAVA_TOKEN
            default: ${LAVA_TOKEN}
    disabled: false
    node: linaro-kernel-ci
    child-workspace: .
    display-name: 'Linux LTSI Kernel (linux-3.14.y)'
    scm:
        - git:
            url: git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
            refspec: +refs/heads/linux-3.14.y:refs/remotes/origin/linux-3.14.y
            name: origin
            branches: 
                - refs/heads/linux-3.14.y
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
    axes:
        - axis:
            type: user-defined
            name: ARCH
            values:
                - arm
                - arm64
        - axis:
            type: dynamic
            name: defconfig
            values:
                - defconfig_list
        - axis:
            type: slave
            name: label
            values:
                - linaro-kernel-ci
    execution-strategy:
        combination-filter: |
            (ARCH=="arm" && defconfig!="defconfig") || (ARCH=="arm64" && defconfig=="defconfig")
        sequential: true
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
        - matrix-tie-parent:
            node: linaro-kernel-ci
    builders:
        - linaro-publish-token
        - shell: |
            #!/bin/bash

            trap cleanup_exit INT TERM EXIT

            cleanup_exit()
            {
              cd ${WORKSPACE}
              rm -rf lci-build-tools
              rm -rf builddir*
              rm -rf out
              rm -rf configs
            }

            export LANG=C
            CCACHE_DIR="${HOME}/srv/ccache"
            CCACHE_UNIFY=1
            CCACHE_SLOPPINESS=file_macro,include_file_mtime,time_macros
            export CCACHE_DIR CCACHE_UNIFY CCACHE_SLOPPINESS 
            export use_ccache=true
            export make_silent=true
            export make_deb=false
            export make_bootwrapper=false
            export make_install=true
            export kernel_flavour="${defconfig}"
            export kernel_config="${defconfig}_defconfig"
            export MAKE_DTBS=true
            export tcbindir="${HOME}/srv/toolchain/arm-tc-15.02/bin"
            export toolchain_url="http://releases.linaro.org/15.02/components/toolchain/binaries/arm-linux-gnueabihf/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf.tar.xz"

            [ "${ARCH}" = "arm64" ] && export kernel_config="${defconfig}"
            [ "${ARCH}" = "arm64" ] && {
              export tcbindir="${HOME}/srv/toolchain/arm64-tc-15.02/bin"
              export toolchain_url="http://releases.linaro.org/15.02/components/toolchain/binaries/aarch64-linux-gnu/gcc-linaro-4.9-2015.02-3-x86_64_aarch64-linux-gnu.tar.xz"
            }

            git rev-parse -q --verify 3.14.4-ltsi > /dev/null && git branch -D 3.14.4-ltsi
            test -d ltsi-kernel || git clone --depth 1 http://git.linuxfoundation.org/ltsi-kernel.git
            bash ltsi-kernel/scripts/generate_git

            test -d lci-build-tools || git clone --depth 1 https://git.linaro.org/git/ci/lci-build-tools.git lci-build-tools
            bash lci-build-tools/jenkins_kernel_build_inst

            # XXX b2120 vmlinux
            [ "${defconfig}" = "multi_v7" ] && cp -a builddir-*-${kernel_flavour}/vmlinux out/ || true
            # XXX mustang uImage
            [ "${ARCH}" = "arm64" ] && mkimage -A arm -O linux -C none -T kernel -a 0x00080000 -e 0x00080000 -n Linux -d out/Image out/uImage || true

            # Publish to snapshots
            ${HOME}/bin/linaro-cp out kernel-hwpack/linux-ltsi/${defconfig}/${BUILD_NUMBER}

            CCACHE_DIR=${CCACHE_DIR} ccache -M 30G
            CCACHE_DIR=${CCACHE_DIR} ccache -s

            # Start LAVA dance
            test -d configs || git clone --depth 1 http://git.linaro.org/ci/job/configs.git

            export BUNDLE_STREAM_NAME=/anonymous/fabo/
            export LAVA_SERVER=validation.linaro.org/RPC2/
            export KERNEL_URL=http://snapshots.linaro.org/kernel-hwpack/linux-ltsi/${defconfig}/${BUILD_NUMBER}
            export DTB_URL=${KERNEL_URL}/dtbs
            export ROOTFS_BUILD_URL=http://releases.linaro.org/14.11/openembedded/images/minimal-armv7a/linaro-image-minimal-genericarmv7a-20141121-301.rootfs.tar.gz
            [ "${ARCH}" = "arm64" ] && export ROOTFS_BUILD_URL=http://releases.linaro.org/14.11/openembedded/images/minimal-armv8/linaro-image-minimal-genericarmv8-20141122-721.rootfs.tar.gz

            # Hack to use submit LAVA jobs directly
            python lci-build-tools/dtb-to-device.py