-
Notifications
You must be signed in to change notification settings - Fork 7
/
test_repack_boot.sh
executable file
·127 lines (110 loc) · 4.27 KB
/
test_repack_boot.sh
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
#!/bin/bash
# SPDX-License-Identifier: MIT
get_artifact() {
local local_prefix=${1}
local local_postfix=${2}
local artifact=$(grep ${local_prefix} index.txt|grep ${local_postfix}|tail -1|sed "s|.*${local_prefix}|${local_prefix}|"|sed "s|${local_postfix}.*|${local_postfix}|")
echo ${artifact}
}
base="http://snapshots.linaro.org/openembedded/lkft/lkft"
oe_version="sumo"
linux="linux-mainline"
ROOTFS_BUILDNR="2140"
# Hikey test
machine=hikey
BUILDNR=${ROOTFS_BUILDNR}
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".ext4.gz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR=latest
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
dtb="${url}/$(get_artifact "Image-" ".dtb")"
kernel="${url}/$(get_artifact "Image-" ".bin")"
mv index.txt "${machine}"-artifacts.index.txt
echo
echo TARGET: ${machine}
echo ./repack_boot.sh -t ${machine} -f "${rootfs}" -d "${dtb}" -k "${kernel}" -m "${modules}"
# am57xx-evm test
machine=am57xx-evm
BUILDNR="${ROOTFS_BUILDNR}"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".ext4.gz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR="latest"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -qo index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
dtb="${url}/$(get_artifact "zImage-" ".dtb")"
kernel="${url}/$(get_artifact "zImage-" ".bin")"
mv index.txt "${machine}"-artifacts.index.txt
echo
echo TARGET: ${machine}
echo ./repack_boot.sh -t ${machine} -f "${rootfs}" -d "${dtb}" -k "${kernel}" -m "${modules}"
# dragonboard-410c test
machine=dragonboard-410c
BUILDNR="${ROOTFS_BUILDNR}"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".ext4.gz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR="latest"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -qo index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
dtb="${url}/$(get_artifact "Image.gz-" ".dtb")"
kernel="${url}/$(get_artifact "Image.gz-" ".bin")"
mv index.txt "${machine}".index.txt
echo
echo TARGET: ${machine}
echo ./repack_boot.sh -t ${machine} -d "${dtb}" -k "${kernel}"
echo ./resize_rootfs.sh -s -f ${rootfs} -o ${modules}
# juno test
machine=juno
BUILDNR="${ROOTFS_BUILDNR}"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".tar.xz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR="latest"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -qo index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
mv index.txt "${machine}".index.txt
echo
echo TARGET: ${machine}
echo EXTRA_SIZE=128000 ./resize_rootfs.sh -f ${rootfs} -o ${modules}
# intel-core2-32 test
machine=intel-core2-32
BUILDNR="${ROOTFS_BUILDNR}"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".tar.xz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR="latest"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -qo index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
mv index.txt "${machine}".index.txt
echo
echo TARGET: ${machine}
echo EXTRA_SIZE=128000 ./resize_rootfs.sh -f ${rootfs} -o ${modules}
# intel-corei7-64 test
machine=intel-corei7-64
BUILDNR="${ROOTFS_BUILDNR}"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -o index.txt
rootfs="${url}/$(get_artifact "rpb-console-image-lkft-" ".tar.xz")"
mv index.txt "${machine}"-rootfs.index.txt
BUILDNR="latest"
url="${base}"/"${oe_version}"/"${machine}"/lkft/"${linux}"/"${BUILDNR}"
curl -sL "${url}" -qo index.txt
modules="${url}/$(get_artifact "modules-" ".tgz")"
mv index.txt "${machine}".index.txt
echo
echo TARGET: ${machine}
echo EXTRA_SIZE=128000 ./resize_rootfs.sh -f ${rootfs} -o ${modules}
rm *.index.txt