aboutsummaryrefslogtreecommitdiff
path: root/linux-linaro-tracking-ll.yaml
blob: ffdee7ecf0a19b5ce132bafdc1a9adcd82f5faf7 (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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
- job:
    name: linux-linaro-tracking-ll
    project-type: matrix
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
                - job-workspace
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
    parameters:
        - string:
            name: BUNDLE_STREAM_NAME
            default: '/private/team/linaro/ci-linux-linaro-tracking-ll/'
        - string:
            name: LAVA_SERVER
            default: 'validation.linaro.org/RPC2/'
    disabled: false
    node: build
    child-workspace: .
    display-name: 'Linux Linaro Kernel (tracking)'
    scm:
        - git:
            url: https://git.linaro.org/kernel/linux-linaro-tracking.git
            refspec: +refs/heads/linux-linaro:refs/remotes/origin/linux-linaro
            name: origin
            branches:
                - refs/heads/linux-linaro
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
    axes:
        - axis:
            type: user-defined
            name: hwpack
            values:
                - arndale
                - arndale-octa
                - arndale-uprobes
                - beaglebone
                - beaglebone-uprobes
                - ifc6410
                - panda
                - vexpress
                - vexpress64
        - axis:
            type: slave
            name: label
            values:
                - build
    execution-strategy:
        sequential: true
    wrappers:
        - timestamps
        - copy-to-slave:
            includes:
                - gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
                - gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
        - matrix-tie-parent:
            node: build
    builders:
        - linaro-publish-token
        - shell: |
            #!/bin/bash

            set -ex

            trap cleanup_exit INT TERM EXIT

            cleanup_exit()
            {
              cd ${WORKSPACE}
              rm -rf builddir*
              rm -rf out
              rm -f hwpack_linaro-* linux-*.deb
            }

            export LANG=C
            CCACHE_DIR="$HOME/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 use_config_fragment=1
            export MAKE_DTBS=true
            export make_bootwrapper=false
            export toolchain_url="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz"

            case "${hwpack}" in
              arndale)
                export hwpack_type="arndale"
                export board_types="arndale"
                export kernel_flavour="arndale"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/kvm-host.conf linaro/configs/xen.conf linaro/configs/arndale.conf"
                export DEVICE_TYPE="arndale"
                ;;
              arndale-octa)
                export hwpack_type="arndale-octa"
                export board_types="arndale-octa"
                export kernel_flavour="arndale-octa"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/arndale_octa.conf"
                export DEVICE_TYPE="arndale-octa"
                ;;
              arndale-uprobes)
                export hwpack_type="arndale"
                export board_types="arndale"
                export kernel_flavour="arndale"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/kvm-host.conf linaro/configs/xen.conf linaro/configs/uprobes.conf linaro/configs/arndale.conf"
                export DEVICE_TYPE="arndale"
                ;;
              beaglebone)
                export hwpack_type="beaglebone"
                export board_types="beaglebone-black"
                export kernel_flavour="am335x"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/multi_v7.conf linaro/configs/beaglebone.conf"
                export DEVICE_TYPE="beaglebone-black"
                ;;
              beaglebone-uprobes)
                export hwpack_type="beaglebone"
                export board_types="beaglebone-black"
                export kernel_flavour="am335x"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/uprobes.conf linaro/configs/multi_v7.conf linaro/configs/beaglebone.conf"
                export DEVICE_TYPE="beaglebone-black"
                ;;
              ifc6410)
                export kernel_flavour="ifc6410"
                export conf_filenames="arch/arm/configs/qcom_defconfig linaro/configs/linaro-base.conf linaro/configs/distribution.conf"
                export DEVICE_TYPE="ifc6410"
                ;;
              panda)
                export hwpack_type="panda"
                export board_types="panda-es"
                export kernel_flavour="omap"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/omap2plus.conf linaro/configs/panda.conf"
                export DEVICE_TYPE="panda-es"
                ;;
              vexpress)
                export hwpack_type="vexpress"
                export board_types="vexpress-tc2"
                export kernel_flavour="vexpress"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/kvm-guest.conf linaro/configs/xen.conf linaro/configs/big-LITTLE-IKS.conf linaro/configs/vexpress.conf"
                export DEVICE_TYPE="vexpress-tc2"
                ;;
              vexpress64)
                export hwpack_type="vexpress64"
                export board_types="rtsm_fvp_base-aemv8a"
                export kernel_flavour="vexpress64"
                export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/linaro-base64.conf linaro/configs/distribution.conf linaro/configs/kvm-guest.conf linaro/configs/kvm-host.conf linaro/configs/audit.conf linaro/configs/vexpress64.conf linaro/configs/workaround.conf"
                export DEVICE_TYPE="rtsm_fvp_base-aemv8a"
                export ARCH="arm64"
                export toolchain_url="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz"
                cat << EOF > startup.nsh
            fs3:\Image dtb=juno\juno.dtb console=ttyAMA0,115200 earlyprintk=pl011,0x7ff80000 root=/dev/sda5 rootwait rootfstype=ext4 rw verbose debug uefi_debug ignore_loglevel
            EOF
                cat << EOF > linaro/configs/workaround.conf
            CONFIG_PREEMPT=y
            # CONFIG_DEBUG_PREEMPT is not set
            EOF
                ;;
            esac

            rm -rf configs lci-build-tools
            git clone --depth 1 http://git.linaro.org/ci/lci-build-tools.git
            git clone --depth 1 http://git.linaro.org/ci/job/configs.git
            bash -x lci-build-tools/jenkins_kernel_build_inst

            mkdir -p out
            rm -rf artifacts
            mkdir artifacts
            [ "${hwpack}" = "arndale-uprobes" ] && python linaro-image-tools/linaro-hwpack-replace -t `ls hwpack_linaro-arndale_*_armhf_supported.tar.gz` -p `ls linux-headers-*-linaro-arndale_*.deb` -r linux-headers -d -i
            [ "${hwpack}" = "beaglebone-uprobes" ] && python linaro-image-tools/linaro-hwpack-replace -t `ls hwpack_linaro-beaglebone_*_armhf_supported.tar.gz` -p `ls linux-headers-*-linaro-am335x_*.deb` -r linux-headers -d -i
            [ "${hwpack}" = "ifc6410" ] && {
              cp -a *.deb out/
              cat builddir-*-${kernel_flavour}/arch/arm/boot/zImage builddir-*-${kernel_flavour}/arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb > out/zImage_ifc6410
              cp -a linux-[ih]*-linaro-ifc6410_*.deb out/zImage_ifc6410 artifacts/
            }
            [ "${hwpack}" = "vexpress64" ] && mv startup.nsh out/
            [ "${hwpack}" = "vexpress64" ] && cp -a builddir-*-${kernel_flavour}/.config kernel.config
            cp -a builddir-*-${kernel_flavour}/.config out/kernel_config_${kernel_flavour}
            [ "${hwpack}" != "ifc6410" ] && mv hwpack_linaro-${hwpack_type}* out/

            ${HOME}/bin/linaro-cp --api_version 3 out kernel-hwpack/linux-linaro-tracking-ll/${hwpack}/${BUILD_NUMBER}

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

            KERNEL_URL="http://snapshots.linaro.org/kernel-hwpack/linux-linaro-tracking-ll/${hwpack}/${BUILD_NUMBER}"
            [ "${hwpack}" != "ifc6410" ] && HWPACK_BUILD_URL="${KERNEL_URL}/`ls out/hwpack_linaro-${hwpack_type}*.tar.gz |xargs basename`"
            STARTUP_NSH="${KERNEL_URL}/startup.nsh"

            # Create post-build-lava parameters
            cat << EOF > post_build_lava_parameters
            DEVICE_TYPE=${DEVICE_TYPE}
            BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME}
            CUSTOM_JSON_URL=${JOB_URL}/ws/custom_lava_job_definition.json
            LAVA_SERVER=${LAVA_SERVER}
            HWPACK_BUILD_URL=${HWPACK_BUILD_URL}
            STARTUP_NSH=${STARTUP_NSH}
            hwpack_type=${hwpack_type}
            EOF
        - inject:
            properties-file: post_build_lava_parameters
        - shell: |
            case "${hwpack}" in
              arndale|beaglebone|panda|vexpress)
                # Get rootfs URL
                export ROOTFS_BUILD_NUMBER=704
                export ROOTFS_BUILD_URL="http://releases.linaro.org/15.05/ubuntu/vivid-images/developer/linaro-vivid-developer-20150522-704.tar.gz"

                ./lci-build-tools/yaml-to-json.py configs/linux-linaro-tracking-ll/lava-job-definitions/${DEVICE_TYPE}/template.yaml > custom_lava_job_definition.json
                ;;
              vexpress64)
                # Get rootfs URL
                export ROOTFS_BUILD_NUMBER=752
                export ROOTFS_BUILD_URL="http://releases.linaro.org/15.05/openembedded/images/lamp-armv8/linaro-image-lamp-genericarmv8-20150522-752.rootfs.tar.gz"

                ./lci-build-tools/yaml-to-json.py configs/linux-linaro-tracking-ll/lava-job-definitions/${DEVICE_TYPE}/template.yaml > custom_lava_job_definition.json
                ;;
              arndale-octa|arndale-uprobes|beaglebone-uprobes|ifc6410)
                echo "Skip"
                cat << EOF > post_build_lava_parameters
            BUNDLE_STREAM_NAME=${BUNDLE_STREAM_NAME}
            CUSTOM_JSON_URL=${JOB_URL}/ws/custom_lava_job_definition.json
            LAVA_SERVER=${LAVA_SERVER}
            EOF
                ;;
            esac
        - trigger-builds:
            - project: 'post-build-lava'
              property-file: post_build_lava_parameters
              block: true
        - conditional-step:
            condition-kind: strings-match
            condition-string1: '${ENV,var="hwpack"}'
            condition-string2: 'vexpress64'
            steps:
                - shell: |
                    DEVICE_TYPE=juno

                    # Get rootfs URL
                    export ROOTFS_BUILD_NUMBER=752
                    export ROOTFS_BUILD_URL="http://releases.linaro.org/15.05/openembedded/images/lamp-armv8/linaro-image-lamp-genericarmv8-20150522-752.rootfs.tar.gz"

                    if grep -Fxq 'CONFIG_EFI=y' kernel.config; then
                      ./lci-build-tools/yaml-to-json.py configs/linux-linaro-tracking-ll/lava-job-definitions/${DEVICE_TYPE}/template-efi.yaml > custom_lava_job_definition.json
                    else
                      ./lci-build-tools/yaml-to-json.py configs/linux-linaro-tracking-ll/lava-job-definitions/${DEVICE_TYPE}/template.yaml > custom_lava_job_definition.json
                    fi
                - trigger-builds:
                    - project: 'post-build-lava'
                      property-file: post_build_lava_parameters
                      block: true
    publishers:
        - archive:
            artifacts: 'artifacts/*'
            allow-empty: true
        - email-ext:
            recipients: 'andrey.konovalov@linaro.org, fathi.boudra@linaro.org'
            attach-build-log: true
            matrix-trigger: both