aboutsummaryrefslogtreecommitdiff
path: root/coresight.yaml
blob: 921130d73609d4206b76a1a26fa50e67db74e5e5 (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
- job:
    name: coresight
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
                - job-workspace
    parameters:
        - password:
            name: PUBLISH_KEY
            default: ${PUBLISH_KEY}
    disabled: false
    node: build
    display-name: 'Coresight'
    scm:
        - git:
            url: http://git.linaro.org/kernel/coresight.git
            refspec: +refs/heads/master:refs/remotes/origin/master
            name: origin
            branches:
                - origin/master
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
    wrappers:
        - timestamps
        - copy-to-slave:
            includes:
                - gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
    builders:
        - 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/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 hwpack_type=vexpress
            export kernel_flavour=vexpress
            export use_config_fragment=1
            export conf_filenames="arch/arm/configs/vexpress_defconfig linaro/configs/coresight.conf"
            export MAKE_DTBS=true
            export toolchain_url="http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.09_linux.tar.xz"

            # XXX
            mkdir -p linaro/configs
            cat << EOF > linaro/configs/coresight.conf
            CONFIG_CORESIGHT=y
            CONFIG_CORESIGHT_LINKS_AND_SINKS=y
            CONFIG_CORESIGHT_LINK_AND_SINK_TMC=y
            CONFIG_CORESIGHT_SINK_TPIU=y
            CONFIG_CORESIGHT_SINK_ETBV10=y
            CONFIG_CORESIGHT_SOURCE_ETM3X=y
            CONFIG_LBDAF=y
            EOF

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

            # XXX
            mkdir -p out
            cp -a builddir-*-${kernel_flavour}/.config out/kernel.config
            mv hwpack_linaro-${hwpack_type}_*_armhf_supported.* out/

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

            export HWPACK_BUILD_URL=http://snapshots.linaro.org/kernel-hwpack/vexpress-coresight/${BUILD_NUMBER}/`ls hwpack_linaro-${hwpack_type}_*_armhf_supported.tar.gz`
            export ROOTFS_BUILD_URL=http://releases.linaro.org/14.11/openembedded/images/minimal-armv7a/linaro-image-minimal-genericarmv7a-20141121-301.rootfs.tar.gz
            export ROOTFS_BUILD_NUMBER=20141121-301
            export DEVICE_TYPE=vexpress-tc2
            export BUNDLE_STREAM_NAME=/public/team/linaro/coresight/
            export LAVA_SERVER=validation.linaro.org/RPC2/

            ./lci-build-tools/yaml-to-json.py configs/${JOB_NAME}/lava-job-definitions/vexpress-tc2/template.yaml > custom_lava_job_definition.json

            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}
            EOF

            ${HOME}/bin/linaro-cp out kernel-hwpack/vexpress-coresight/${BUILD_NUMBER}

            CCACHE_DIR=${CCACHE_DIR} ccache -M 20G
            CCACHE_DIR=${CCACHE_DIR} ccache -s
        - trigger-builds:
            - project: 'post-build-lava'
              property-file: post_build_lava_parameters