blob: 256ab9ad197acf20bee29651e321091abba5724e (
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
|
#!/bin/bash
set -ex
trap cleanup_exit INT TERM EXIT
save_debs=false
cleanup_exit()
{
cd ${WORKSPACE}
rm -rf lci-build-tools
rm -rf builddir*
rm -rf out
$save_debs || rm -f linux-*.deb
}
hwpack_is_optional=false
export CCACHE_DIR="$HOME/ccache"
export use_ccache=true
export use_config_fragment=1
export MAKE_DTBS=true
export git_web_url="https://git.linaro.org/gitweb?p=kernel/linux-linaro-tracking.git;a=shortlog;h=refs/heads/linux-linaro"
export toolchain_url="http://releases.linaro.org/14.08/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.9-2014.08_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"
;;
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"
;;
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"
;;
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"
;;
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"
;;
ifc6410)
hwpack_is_optional=true
save_debs=true
export kernel_flavour="ifc6410"
export conf_filenames="linaro/configs/linaro-base.conf linaro/configs/distribution.conf linaro/configs/ifc6410.conf"
;;
panda)
export hwpack_type="panda"
export board_types="panda,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"
;;
vexpress)
export hwpack_type="vexpress"
export board_types="vexpress-a9,vexpress-a5,vexpress-tc2,rtsm_ve-a15x1-a7x1,rtsm_ve-a15x4-a7x4"
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 lava_test_plan="ltp:9600,pwrmgmt"
;;
vexpress64)
export hwpack_type="vexpress64"
export board_types="rtsm_foundation-armv8"
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/vexpress64.conf linaro/configs/workaround.conf"
export ARCH=arm64
export toolchain_url="http://releases.linaro.org/14.08/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.08_linux.tar.xz"
cat << EOF > linaro/configs/workaround.conf
CONFIG_PREEMPT=y
# CONFIG_DEBUG_PREEMPT is not set
EOF
;;
esac
git clone https://git.linaro.org/ci/lci-build-tools.git
bash -x lci-build-tools/jenkins_kernel_build_inst
echo "HWPACK_JOB_NAME=${JOB_NAME}" > post_build_lava_parameters
echo "HWPACK_BUILD_NUMBER=${BUILD_NUMBER}" >> post_build_lava_parameters
echo "HWPACK_FILE_NAME=`ls hwpack_linaro-${hwpack}*.tar.gz`" >> post_build_lava_parameters
echo "BUNDLE_STREAM_NAME=/private/team/linaro/ci-linux-linaro-tracking-ll/" >> post_build_lava_parameters
case "${hwpack}" in
arndale|arndale-octa|panda)
echo "DEVICE_TYPE=${hwpack}" >> post_build_lava_parameters
;;
arndale-uprobes)
echo "Skip DEVICE_TYPE for ${hwpack}"
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
;;
beaglebone)
echo "DEVICE_TYPE=beaglebone-black" >> post_build_lava_parameters
;;
beaglebone-uprobes)
echo "Skip DEVICE_TYPE for ${hwpack}"
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
;;
vexpress)
echo "DEVICE_TYPE=vexpress-a9" >> post_build_lava_parameters
;;
vexpress64)
# use OE rootfs and custom LAVA job definition for vexpress64.
# Overwrite post_build_lava_parameters - only DEVICE_TYPE and
# CUSTOM_JSON_URL are needed there
device_type="rtsm_foundation-armv8"
echo "DEVICE_TYPE=${device_type}" > post_build_lava_parameters
echo "CUSTOM_JSON_URL=${BUILD_URL}/artifact/custom_lava_job_definition.json" >> post_build_lava_parameters
# generate custom json file
ROOTFS_BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/openembedded-armv8-rootfs/gcc_version=4.9,label=build,rootfs=minimal/lastSuccessfulBuild/buildNumber`
ROOTFS_BUILD_TIMESTAMP=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/openembedded-armv8-rootfs/gcc_version=4.9,label=build,rootfs=minimal/lastSuccessfulBuild/buildTimestamp?format=yyyyMMdd`
ROOTFS_BUILD_URL="http://snapshots.linaro.org/openembedded/images/minimal-armv8-gcc-4.9/${ROOTFS_BUILD_NUMBER}/linaro-image-minimal-genericarmv8-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.rootfs.tar.gz"
hwpack_filename=`ls hwpack_linaro-${hwpack}*.tar.gz`
sed -e "s|%%BUILD_NUMBER%%|${BUILD_NUMBER}|" \
-e "s|%%hwpack%%|${hwpack}|" \
-e "s|%%HWPACK_FILENAME%%|${hwpack_filename}|" \
-e "s|%%ROOTFS_BUILD_NUMBER%%|${ROOTFS_BUILD_NUMBER}|" \
-e "s|%%ROOTFS_BUILD_URL%%|${ROOTFS_BUILD_URL}|" \
-e "s|%%device_type%%|${device_type}|" \
-e "s|%%BUILD_URL%%|${BUILD_URL}|" \
linux-linaro-kernel-ci/job-template.json > custom_lava_job_definition.json
;;
ifc6410)
echo "Skip DEVICE_TYPE for ${hwpack} - ifc6410 uses a separate job to submit to LAVA"
# append dtb to zImage
cat builddir-*-${kernel_flavour}/arch/arm/boot/zImage \
builddir-*-${kernel_flavour}/arch/arm/boot/dts/qcom-apq8064-ifc6410.dtb \
> zImage_${hwpack}
;;
esac
cp -a builddir-*-${kernel_flavour}/.config kernel_config_${hwpack}
if [ $hwpack_is_optional != true ]; then
mkdir -p out
mv hwpack_linaro-${hwpack_type}* out/
${HOME}/bin/linaro-cp out kernel-hwpack/linux-linaro-tracking-ll-${hwpack}/${BUILD_NUMBER}
fi
CCACHE_DIR=${CCACHE_DIR} ccache -M 20G
CCACHE_DIR=${CCACHE_DIR} ccache -s
|