blob: 14e81dd2c9948b5b9f9a20b1bc5ca6842c386f84 (
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
|
#!/bin/sh -x
if [ -n "$1" -a -n "$2" ]; then
export hwpack="$1"
export FILES="$2"
else
echo "usage: $0 <boardname> <filesource>"
exit 1
fi
case $hwpack in
mustang)
echo "starting nfs script for mustang"
;;
*)
;;
esac
image="xenlava-${hwpack}.tar"
suite="vivid"
#get last rootfs that built OK
export ROOTFS_BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/ubuntu-arm64-rootfs/label=build,rootfs=nano/lastSuccessfulBuild/buildNumber`
export ROOTFS_BUILD_TIMESTAMP=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/ubuntu-arm64-rootfs/label=build,rootfs=nano/lastSuccessfulBuild/buildTimestamp?format=yyyyMMdd`
export ROOTFS_BUILD_FILENAME="linaro-${suite}-nano-${ROOTFS_BUILD_TIMESTAMP}-${ROOTFS_BUILD_NUMBER}.tar.gz"
export ROOTFS_BUILD_URL="http://snapshots.linaro.org/ubuntu/images/nano-arm64/${ROOTFS_BUILD_NUMBER}/${ROOTFS_BUILD_FILENAME}"
wget -N --progress=dot -e dotbytes=2M ${ROOTFS_BUILD_URL}
if [ $? -ne 0 ]; then
echo "rootfs download failed"
exit 1
fi
#get xen hypervisor and tools
export XEN_BUILD_NUMBER=`wget -q --no-check-certificate -O - https://ci.linaro.org/jenkins/job/xen-packages/label=docker-utopic-arm64/lastSuccessfulBuild/buildNumber`
wget -N --progress=dot -e dotbytes=2M "http://snapshots.linaro.org/components/platform/xen/${XEN_BUILD_NUMBER}/arm64/xen-arm64.deb"
if [ $? -ne 0 ]; then
echo "Can't download xen-arm64 deb"
exit 1
fi
MOUNT=binary
sudo rm -rf $MOUNT ${image} ${image}.xz
sudo tar xaf ${ROOTFS_BUILD_FILENAME}
# midway uses a u-boot script for booting, we use our own script with xen stuff
#add hvc0 init file and xen tools package to the rootfs image
sudo cp ${FILES}/files/hvc0.conf ${MOUNT}/etc/init/
sudo dpkg-deb --vextract xen-arm64.deb $MOUNT
sudo touch ${MOUNT}/etc/resolv.conf
sudo tar cf $image binary/
sudo chown $USER:$USER $image
#compress the image
xz ${image}
|