blob: 3b85c7baf194e52d1dff60faebcea7abf8b50de4 (
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
|
- job:
name: u-boot-am57xx-evm
project-type: freestyle
defaults: global
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
everyone-flat:
- job-read
- job-extended-read
- job-build
- job-cancel
- build-discarder:
days-to-keep: 30
num-to-keep: 30
disabled: false
node: docker-buster-amd64
display-name: 'U-Boot upstream (mainline) for am57xx-evm'
scm:
- git:
url: https://github.com/u-boot/u-boot
refspec: +refs/heads/master:refs/remotes/origin/master
name: origin
branches:
- refs/heads/master
skip-tag: true
shallow-clone: false
wipe-workspace: false
triggers:
- pollscm: 'H/5 * * * *'
wrappers:
- timestamps
- build-name:
name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
- credentials-binding:
- text:
credential-id: QA_REPORTS_TOKEN
variable: QA_REPORTS_TOKEN
builders:
- linaro-publish-token
- shell: |
#!/bin/bash
env |grep GIT
set -ex
trap cleanup_exit INT TERM EXIT
cleanup_exit()
{
cd ${WORKSPACE}
rm -rf build out
git clean -fdx
git reset --hard
#sudo umount bootfs || true
#sudo kpartx -dv x15-install.img || true
}
sudo apt-get update
sudo apt-get install -y libssl-dev python-requests rsync \
swig libpython-dev gcc-arm-linux-gnueabihf \
parted kpartx pigz python-pip virtualenv
cat Makefile
export CC=arm-linux-gnueabihf-
make ARCH=arm CROSS_COMPILE=${CC} distclean
make ARCH=arm CROSS_COMPILE=${CC} am57xx_evm_defconfig
make ARCH=arm CROSS_COMPILE=${CC}
mkdir -p out bootfs
# create x15 boot image
dd if=/dev/zero of=x15-install.img bs=48 seek=1M count=0
/sbin/parted --script x15-install.img mklabel msdos
/sbin/parted --script x15-install.img mkpart p fat32 0 48
/sbin/parted --script x15-install.img set 1 boot
for device in $(sudo kpartx -avs x15-install.img | cut -d' ' -f3); do
partition=$(echo ${device} | cut -d'p' -f3)
case "${partition}" in
1)
sudo mkfs.fat -F16 /dev/mapper/${device}
sudo mount /dev/mapper/${device} bootfs
;;
esac
done
sudo cp MLO bootfs
sudo cp u-boot.img bootfs
sudo umount bootfs
sudo kpartx -dv x15-install.img
time pigz -9 x15-install.img
mv x15-install.img.gz out/x15-u-boot-sd-${BUILD_NUMBER}.img.gz
./scripts/setlocalversion --save-scmversion
GIT_TAG=$(git describe --abbrev=0)
LOCALVERSION=$(cat .scmversion)
# remove leading 'v' as it doesn't show up in u-boot version string
cat << EOF > ${WORKSPACE}/submit_for_testing_parameters
BUILD_NUMBER=${BUILD_NUMBER}
UBOOT_VERSION_STRING="${GIT_TAG:1}${LOCALVERSION}"
LAVA_JOB_PRIORITY=50
IMAGE_URL="http://snapshots.linaro.org/components/kernel/u-boot/${BUILD_NUMBER}/x15-u-boot-sd-${BUILD_NUMBER}.img.gz"
IMAGE_COMP=gz
PROJECT_NAME=ti-uboot
PROJECT=projects/ti/
EOF
cp .config out/config
cp MLO u-boot.img u-boot-dtb.bin arch/arm/dts/*.dtb spl/u-boot-spl.bin spl/u-boot-spl.dtb out/
test -d ${HOME}/bin || mkdir ${HOME}/bin
wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
time python3 ${HOME}/bin/linaro-cp.py \
--api_version 3 \
--link-latest \
out components/kernel/u-boot/${BUILD_NUMBER}
# submit tests to LAVA
rm -rf venv | true
virtualenv -p python3 venv
source ./venv/bin/activate
git clone https://github.com/Linaro/lava-test-plans.git
cd lava-test-plans
pip install -r requirements.txt
./submit_for_testing.py --variables ${WORKSPACE}/submit_for_testing_parameters \
--device-type x15-bl \
--test-plan ti-uboot \
--qa-server-team ti \
--qa-server-project u-boot \
--lava-server https://validation.linaro.org \
--build-id ${BUILD_NUMBER}-${GIT_COMMIT,length=8}
publishers:
- email:
recipients: 'vishal.bhoj@linaro.org'
|