blob: a63cab0246a934351063097ffc701fbe6747bb40 (
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
|
- job:
name: lkft-android-8.1-tracking
project-type: freestyle
defaults: global
logrotate:
daysToKeep: 60
numToKeep: 60
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
linaro:
- job-build
- job-cancel
parameters:
- string:
name: QA_SERVER
default: 'https://qa-reports.linaro.org'
- string:
name: QA_SERVER_PROJECT
default: 'android-8.1-tracking'
- string:
name: ANDROID_VERSION
default: 'Android 8.1'
- string:
name: REFERENCE_BUILD_URL
default: 'http://testdata.linaro.org/lkft/aosp-stable/android-8.1.0_r29/'
- string:
name: VTS_URL
default: 'http://testdata.linaro.org/vts/oreo-mr1-vts-release-07112018/'
- string:
name: CTS_URL
default: 'http://testdata.linaro.org/cts/android-cts-8.1_r6/'
- string:
name: TOOLCHAIN
default: 'clang-r328903'
disabled: false
node: docker-xenial-aosp
display-name: 'LKFT Android 8.1 validation on 4.4, 4.9 and 4.14 (HiKey)'
concurrent: true
triggers:
- timed : '@weekly'
wrappers:
- timestamps
- timeout:
timeout: 500
- credentials-binding:
- text:
credential-id: QA_REPORTS_TOKEN
variable: QA_REPORTS_TOKEN
- text:
credential-id: ARTIFACTORIAL_TOKEN
variable: ARTIFACTORIAL_TOKEN
- text:
credential-id: AP_SSID
variable: AP_SSID
- text:
credential-id: AP_KEY
variable: AP_KEY
builders:
- shell: |
#!/bin/bash
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
java -version
sudo apt-get update
sudo apt-get install -y gcc-4.9-multilib bison git gperf libxml2-utils python-mako zip time python-requests genisoimage patch mtools python-pip pxz libssl-dev
mkdir -p ${WORKSPACE}/out/
wget https://git.linaro.org/ci/job/configs.git/blob_plain/HEAD:/android-lcr/hikey/build-info/aosp-master-template.txt -O ${WORKSPACE}/out/BUILD-INFO.txt
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9
git clone --depth=1 https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86
export PATH=${PWD}/aarch64-linux-android-4.9/bin/:${PWD}/linux-x86/${TOOLCHAIN}/bin/:${PATH}
wget -q ${REFERENCE_BUILD_URL}/ramdisk.img -O out/ramdisk.img
git clone https://android.googlesource.com/kernel/hikey-linaro
cd hikey-linaro
git checkout android-hikey-linaro-4.14
git pull
git clone --depth=1 https://android.googlesource.com/kernel/configs
wget -q https://android-git.linaro.org/platform/system/core.git/plain/mkbootimg/mkbootimg -O mkbootimg
export KERNEL_DESCRIBE_4_14=$(git rev-parse --short HEAD)
export CLANG_TRIPLE=aarch64-linux-gnu-
export CROSS_COMPILE=aarch64-linux-android-
ARCH=arm64 scripts/kconfig/merge_config.sh arch/arm64/configs/hikey_defconfig configs/android-4.14/android-base.config configs/android-4.14/android-base-arm64.config
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) -s Image.gz-dtb
CMD="androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime printk.devkmsg=on buildvariant=userdebug"
python mkbootimg \
--kernel arch/arm64/boot/Image.gz-dtb \
--cmdline console="${CMD}" \
--os_version O \
--os_patch_level 2016-11-05 \
--ramdisk ../out/ramdisk.img \
--output ../out/boot-4.14-${KERNEL_DESCRIBE_4_14}.img
cp vmlinux ../out/4.14_vmlinux
cp .config ../out/4.14_defconfig
xz ../out/boot-4.14-${KERNEL_DESCRIBE_4_14}.img
# Build 4.9 kernel
git checkout android-hikey-linaro-4.9
git pull
export KERNEL_DESCRIBE_4_9=$(git rev-parse --short HEAD)
ARCH=arm64 scripts/kconfig/merge_config.sh arch/arm64/configs/hikey_defconfig configs/o-mr1/android-4.9/android-base.config configs/o-mr1/android-4.9/android-base-arm64.config
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) -s Image.gz-dtb
python mkbootimg \
--kernel arch/arm64/boot/Image.gz-dtb \
--cmdline console="${CMD}" \
--os_version O \
--os_patch_level 2016-11-05 \
--ramdisk ../out/ramdisk.img \
--output ../out/boot-4.9-${KERNEL_DESCRIBE_4_9}.img
cp vmlinux ../out/4.9_vmlinux
cp .config ../out/4.9_defconfig
xz ../out/boot-4.9-${KERNEL_DESCRIBE_4_9}.img
# Build 4.4 kernel
git checkout android-hikey-linaro-4.4
git pull
export KERNEL_DESCRIBE_4_4=$(git rev-parse --short HEAD)
ARCH=arm64 scripts/kconfig/merge_config.sh arch/arm64/configs/hikey_defconfig configs/o-mr1/android-4.4/android-base.config configs/o-mr1/android-4.4/android-base-arm64.config
make ARCH=arm64 CC=clang HOSTCC=clang -j$(nproc) -s Image.gz-dtb
python mkbootimg \
--kernel arch/arm64/boot/Image.gz-dtb \
--cmdline console="${CMD}" \
--os_version O \
--os_patch_level 2016-11-05 \
--ramdisk ../out/ramdisk.img \
--output ../out/boot-4.4-${KERNEL_DESCRIBE_4_4}.img
xz ../out/boot-4.4-${KERNEL_DESCRIBE_4_4}.img
cp vmlinux ../out/4.4_vmlinux
cp .config ../out/4.4_defconfig
cd ../
# Publish parameters
cat << EOF > ${WORKSPACE}/publish_parameters
PUB_DEST=android/lkft/android-8.1-tracking/${BUILD_NUMBER}
PUB_SRC=${PWD}/out
PUB_EXTRA_INC=^[^/]+zip
KERNEL_DESCRIBE_4_14=${KERNEL_DESCRIBE_4_14}
KERNEL_DESCRIBE_4_9=${KERNEL_DESCRIBE_4_9}
KERNEL_DESCRIBE_4_4=${KERNEL_DESCRIBE_4_4}
EOF
- inject:
properties-file: publish_parameters
- linaro-publish-token
- shell:
!include-raw:
- android/linaro-publisher.sh
- inject:
properties-file: publish_parameters
- shell: |
# Install ruamel.yaml
pip install --user --force-reinstall ruamel.yaml
pip install --user --force-reinstall Jinja2
export PUB_DEST=android/lkft/android-8.1-tracking/${BUILD_NUMBER}
export DEVICE_TYPE=hi6220-hikey
export LAVA_SERVER=https://lkft.validation.linaro.org/RPC2/
export DOWNLOAD_URL=http://snapshots.linaro.org/${PUB_DEST}
export KERNEL_COMMIT=${BUILD_NUMBER}
export TOOLCHAIN=clang
export KERNEL_REPO=hikey-linaro
export VTS_VERSION=$(echo $VTS_URL | awk -F"/" '{print$(NF-1)}')
export CTS_VERSION=$(echo $CTS_URL | awk -F"/" '{print$(NF-1)}')
export QA_BUILD_VERSION=${BUILD_NUMBER}
export KERNEL_DESCRIBE=${KERNEL_DESCRIBE_4_4}
export SRCREV_kernel=${KERNEL_DESCRIBE_4_4}
rm -rf configs
git clone --depth 1 http://git.linaro.org/ci/job/configs.git
# Submit jobs for 4.4 kernel
sed -i "s|boot.img.xz|boot-4.4-${KERNEL_DESCRIBE_4_4}.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
if curl --output /dev/null --silent --head --fail "${REFERENCE_BUILD_URL}/vendor.img.xz"; then
echo "This reference build comes with a vendor partition"
else
echo "No vendor partition, so flashing cache partition from the job instead"
sed -i "s|vendor.img.xz|cache.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
fi
export KERNEL_BRANCH="android-hikey-linaro-4.4-${KERNEL_DESCRIBE_4_4}"
export LAVA_SERVER=https://validation.linaro.org/RPC2/
python configs/openembedded-lkft/submit_for_testing.py \
--device-type ${DEVICE_TYPE} \
--build-number ${BUILD_NUMBER} \
--lava-server ${LAVA_SERVER} \
--qa-server ${QA_SERVER} \
--qa-server-team android-lkft \
--env-suffix "_4.4" \
--qa-server-project ${QA_SERVER_PROJECT} \
--git-commit ${QA_BUILD_VERSION} \
--template-path configs/lkft/lava-job-definitions \
--template-names template-boot.yaml template-vts-kernel-part1.yaml template-vts-kernel-part2.yaml template-vts-kernel-part3.yaml template-vts-kernel-part4.yaml template-cts-armeabi-v7a.yaml template-cts-arm64-v8a.yaml template-cts-displaytestcases.yaml \
--quiet
# Submit jobs for 4.9 kernel
cd configs
git reset --hard
cd -
sed -i "s|boot.img.xz|boot-4.9-${KERNEL_DESCRIBE_4_9}.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
if curl --output /dev/null --silent --head --fail "${REFERENCE_BUILD_URL}/vendor.img.xz"; then
echo "This reference build comes with a vendor partition"
else
echo "No vendor partition, so flashing cache partition from the job instead"
sed -i "s|vendor.img.xz|cache.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
fi
export KERNEL_BRANCH="android-hikey-linaro-4.9-${KERNEL_DESCRIBE_4_9}"
export KERNEL_DESCRIBE=${KERNEL_DESCRIBE_4_9}
export SRCREV_kernel=${KERNEL_DESCRIBE_4_9}
python configs/openembedded-lkft/submit_for_testing.py \
--device-type ${DEVICE_TYPE} \
--build-number ${BUILD_NUMBER} \
--lava-server ${LAVA_SERVER} \
--qa-server ${QA_SERVER} \
--qa-server-team android-lkft \
--env-suffix "_4.9" \
--qa-server-project ${QA_SERVER_PROJECT} \
--git-commit ${QA_BUILD_VERSION} \
--template-path configs/lkft/lava-job-definitions \
--template-names template-boot.yaml template-vts-kernel-part1.yaml template-vts-kernel-part2.yaml template-vts-kernel-part3.yaml template-vts-kernel-part4.yaml template-cts-armeabi-v7a.yaml template-cts-arm64-v8a.yaml template-cts-displaytestcases.yaml \
--quiet
# Submit jobs for 4.14 kernel
cd configs
git reset --hard
cd -
sed -i "s|boot.img.xz|boot-4.14-${KERNEL_DESCRIBE_4_14}.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
if curl --output /dev/null --silent --head --fail "${REFERENCE_BUILD_URL}/vendor.img.xz"; then
echo "This reference build comes with a vendor partition"
else
echo "No vendor partition, so flashing cache partition from the job instead"
sed -i "s|vendor.img.xz|cache.img.xz|g" configs/lkft/lava-job-definitions/${DEVICE_TYPE}/*.yaml
fi
export KERNEL_BRANCH="android-hikey-linaro-4.14-${KERNEL_DESCRIBE_4_14}"
export KERNEL_DESCRIBE=${KERNEL_DESCRIBE_4_14}
export SRCREV_kernel=${KERNEL_DESCRIBE_4_14}
python configs/openembedded-lkft/submit_for_testing.py \
--device-type ${DEVICE_TYPE} \
--build-number ${BUILD_NUMBER} \
--lava-server ${LAVA_SERVER} \
--qa-server ${QA_SERVER} \
--qa-server-team android-lkft \
--env-suffix "_4.14" \
--qa-server-project ${QA_SERVER_PROJECT} \
--git-commit ${QA_BUILD_VERSION} \
--template-path configs/lkft/lava-job-definitions \
--template-names template-boot.yaml template-vts-kernel-part2.yaml template-vts-kernel-part3.yaml template-vts-kernel-part4.yaml template-cts-armeabi-v7a.yaml template-cts-arm64-v8a.yaml template-cts-displaytestcases.yaml template-vts-kernel-part1.yaml \
--quiet
publishers:
- logparser:
parse-rules: '/var/lib/jenkins/userContent/android.parse'
unstable-on-warning: false
fail-on-error: false
- fingerprint:
files: 'build/fingerprints/*'
- email:
recipients: 'vishal.bhoj@linaro.org fathi.boudra@linaro.org'
|