blob: b3c56e9ce0dee9321b49aee05041d7fac0af493c (
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
|
#!/bin/sh
# NOTE: this script only accepts long options
perror() {
echo "[CI-BUILD-ERROR] : $1"
}
pwarning() {
echo "[CI-BUILD-WARNING]: $1"
}
pinfo() {
echo "[CI-BUILD-INFO] : $1"
}
options=$(echo $* | sed 's/=/ /g')
set -- $options
pinfo "Parsing parameters"
while true; do
case "$1" in
--abi)
abi=$2; shift 2;;
--arch)
arch=$2; shift 2;;
--archvariant)
archvariant=$2; shift 2;;
--clibrary)
clibrary=$2; shift 2;;
--endian)
endian=$2; shift 2;;
--float)
float=$2; shift 2;;
--os)
os=$2; shift 2;;
--toolchain)
toolchain=$2; shift 2;;
--workspace)
workspace=$2; shift 2;;
--downloaddir)
downloaddir=$2; shift 2;;
--makecmd)
makecmd=$2; shift 2;;
--)
shift; break ;;
*)
break;;
esac
done
#
# Basic checks
#
if [ "x$workspace" = "x" ]; then
perror "Workspace not specified"
exit 1
fi
if [ "x$arch" = "x" ]; then
perror "Architecture not specified"
exit 1
fi
if [ ! -d $workspace/defconfigs/$arch ]; then
perror "Architecture $arch seems not be supported"
exit 1
fi
if [ ! -e $workspace/defconfigs/$arch/$arch-ci-build.sh ]; then
perror "Architecture $arch does not provide specifics"
exit 1
fi
xmakecmd=""
if [ "x$makecmd" = "x" ]; then
xmakecmd=make
else
xmakecmd=$makecmd
fi
cd $workspace && rm -rf .config .config.old && $xmakecmd clean
#
# arch script
#
. $workspace/defconfigs/$arch/$arch-ci-build.sh
#
# Now generating .config
#
if [ ! "x$downloaddir" = "x" ]; then
if [ -d $downloaddir ]; then
echo "CONFIG_EMBTK_DOWNLOAD_DIR=\"$downloaddir\"" >> $workspace/.config
fi
fi
set --
cat $workspace/defconfigs/common.kconfig >> $workspace/.config
cd $workspace && rm -rf $workspace/generated/* && $xmakecmd olddefconfig && $xmakecmd
|