blob: 349e46beb4fa95d256fa91670e9c947627506fb6 (
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
|
- job:
name: 96boards-bubblegum
project-type: freestyle
defaults: global
logrotate:
daysToKeep: 30
numToKeep: 30
properties:
- authorization:
anonymous:
- job-read
- job-extended-read
- job-workspace
parameters:
- string:
name: ROOTFS
default: 'alip developer'
disabled: false
node: docker-jessie-amd64
display-name: '96boards - uCRobotics Bubblegum-96'
scm:
- git:
url: https://github.com/96boards-bubblegum/linux.git
refspec: +refs/heads/bubblegum96-3.10:refs/remotes/origin/bubblegum96-3.10
name: origin
branches:
- refs/heads/bubblegum96-3.10
skip-tag: true
shallow-clone: true
wipe-workspace: false
wrappers:
- timestamps
- build-name:
name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
builders:
- linaro-publish-token:
host: builds.96boards.org
- shell: |
#!/bin/bash
set -ex
trap cleanup_exit INT TERM EXIT
cleanup_exit()
{
cd ${WORKSPACE}
sudo kpartx -dv out/bubblegum-jessie_*.img || true
rm -rf lci-build-tools
rm -rf builddir*
rm -rf out
}
sudo apt-get update
sudo apt-get install -y kpartx python-requests
wget -q \
http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/a/android-tools/android-tools-fsutils_4.2.2+git20130218-3ubuntu41+linaro1_amd64.deb \
http://repo.linaro.org/ubuntu/linaro-tools/pool/main/l/linaro-image-tools/linaro-image-tools_2016.05-1linarojessie1_amd64.deb \
http://repo.linaro.org/ubuntu/linaro-tools/pool/main/l/linaro-image-tools/python-linaro-image-tools_2016.05-1linarojessie1_all.deb \
http://repo.linaro.org/ubuntu/linaro-overlay/pool/main/m/multipath-tools/kpartx_0.5.0-7ubuntu7.1_amd64.deb
sudo dpkg -i --force-all *.deb
rm -f *.deb
export LANG=C
export make_bootwrapper=false
export make_install=true
export kernel_flavour=bubblegum
export kernel_config=owl_evb_linux_hdmi_defconfig
export MAKE_DTBS=true
export ARCH=arm64
export tcbindir="${HOME}/srv/toolchain/arm64-tc-14.09/bin"
export toolchain_url=http://releases.linaro.org/14.09/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux.tar.xz
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
rm -rf out/dtbs
cp -a linux-*.deb out/
# Create the hardware pack
cp -a configs/96boards-bubblegum/hwpacks/linaro-bubblegum .
VERSION=`date +%Y%m%d`-${BUILD_NUMBER}
linaro-hwpack-create --debug linaro-bubblegum ${VERSION}
linaro-hwpack-replace -t `ls hwpack_linaro-bubblegum_*_arm64_supported.tar.gz` -p `ls linux-image-*-linaro-bubblegum_*.deb` -r linux-image -d -i
linaro-hwpack-replace -t `ls hwpack_linaro-bubblegum_*_arm64_supported.tar.gz` -p `ls linux-headers-*-linaro-bubblegum_*.deb` -r linux-headers -d -i
cat > out/HEADER.textile << EOF
Build information:
* build: "${BUILD_URL}":${BUILD_URL}
* git URL: "${GIT_URL}":${GIT_URL}
* git branch: ${GIT_BRANCH}
* git commit: ${GIT_COMMIT}
EOF
for rootfs in ${ROOTFS}; do
# Get rootfs
export ROOTFS_BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/job/debian-arm64-rootfs/label=docker-jessie-arm64,rootfs=${rootfs}/lastSuccessfulBuild/buildNumber`
export ROOTFS_BUILD_TIMESTAMP=`wget -q --no-check-certificate -O - https://ci.linaro.org/job/debian-arm64-rootfs/label=docker-jessie-arm64,rootfs=${rootfs}/lastSuccessfulBuild/buildTimestamp?format=yyyyMMdd`
export ROOTFS_BUILD_URL="http://snapshots.linaro.org/debian/images/${rootfs}-arm64/${ROOTFS_BUILD_NUMBER}/linaro-jessie-${rootfs}-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.tar.gz"
wget --progress=dot -e dotbytes=2M ${ROOTFS_BUILD_URL}
cat >> out/HEADER.textile << EOF
* rootfs (${rootfs}): "${rootfs}":http://snapshots.linaro.org/debian/images/${rootfs}-arm64/${ROOTFS_BUILD_NUMBER}
EOF
# Create pre-built image(s)
linaro-media-create --dev fastmodel --output-directory ${WORKSPACE}/out --image-file bubblegum-jessie_${rootfs}_${VERSION}.img --image-size 2G --binary linaro-jessie-${rootfs}-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.tar.gz --hwpack hwpack_linaro-bubblegum_*.tar.gz --hwpack-force-yes --bootloader uefi
# Create eMMC rootfs image(s)
mkdir boot rootfs
for device in $(sudo kpartx -avs out/bubblegum-jessie_${rootfs}_${VERSION}.img | cut -d' ' -f3); do
partition=$(echo ${device} | cut -d'p' -f3)
[ "${partition}" = "2" ] && sudo mount -o loop /dev/mapper/${device} boot
[ "${partition}" = "3" ] && sudo mount -o loop /dev/mapper/${device} rootfs
done
cat << EOF | sudo tee rootfs/etc/modprobe.d/blacklist-pvrsrvkm.conf
blacklist pvrsrvkm
EOF
cat << EOF | sudo tee rootfs/etc/fstab
/dev/disk/by-partlabel/SYSTEM / ext4 errors=remount-ro 0 1
EOF
sudo rm -rf rootfs/dev rootfs/boot rootfs/var/lib/apt/lists
sudo mkdir rootfs/dev rootfs/boot rootfs/var/lib/apt/lists
sudo mkfs.ext4 -L rootfs out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img.ext4 2G
mkdir rootfs-ext4
sudo mount -o loop out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img.ext4 rootfs-ext4
sudo cp -a rootfs/* rootfs-ext4
sudo umount boot rootfs rootfs-ext4
sudo kpartx -dv out/bubblegum-jessie_${rootfs}_${VERSION}.img
sudo ext2simg -v out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img.ext4 out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img
sudo rm -rf boot rootfs rootfs-ext4 out/*.ext4
# Compress image(s)
gzip -9 out/bubblegum-jessie_${rootfs}_${VERSION}.emmc.img
gzip -9 out/bubblegum-jessie_${rootfs}_${VERSION}.img
done
# Create boot image(s)
cat > boot.txt << EOF
setenv initrd_high "0xffffffffffffffff"
setenv fdt_high "0xffffffffffffffff"
setenv bootpart "2"
setenv bootcmd "fatload mmc 1:2 0x00080000 Image; fatload mmc 1:2 0x01ffffc0 uInitrd; fatload mmc 1:2 0x10000000 s900_96board.dtb; booti 0x00080000 0x01ffffc0 0x10000000"
setenv bootargs "console=tty0 console=ttyS5,115200n8 root=/dev/disk/by-partlabel/SYSTEM rootwait rw"
run bootcmd
boot
EOF
mkdir boot-fat
dd if=/dev/zero of=out/boot.emmc.img bs=512 count=102400
/sbin/mkfs.fat -F32 -n "BOOT" out/boot.emmc.img
sudo mount -o loop,rw,sync out/boot.emmc.img boot-fat
sudo cp -a out/Image out/s900_96board.dtb boot-fat/ || true
sudo mkimage -A arm64 -O linux -C none -T ramdisk -a 0 -e 0 -n "initramfs" -d out/initrd.img-* boot-fat/uInitrd || true
sudo mkimage -A arm -O linux -C none -T script -a 0 -e 0 -n "boot script" -d boot.txt boot-fat/boot.scr || true
sudo umount boot-fat
sudo chmod 777 out/boot.emmc.img
rm -rf boot-fat
# Compress boot partition image(s)
gzip -9 out/boot.emmc.img
# Create MD5SUMS file
(cd out && md5sum * > MD5SUMS.txt)
# Publish
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 python ${HOME}/bin/linaro-cp.py \
--server ${PUBLISH_SERVER} \
--link-latest \
out snapshots/bubblegum/linaro/debian/${BUILD_NUMBER}
publishers:
- email:
recipients: 'fathi.boudra@linaro.org daniel.thompson@linaro.org'
|