blob: bc147a918b7249b8fe45bbcdb62c84fa8a9478c7 (
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
|
#!/bin/bash
# (c) 2017 Jan-Simon Moeller dl9pf(at)gmx.de
# License GPLv2
#
# debugging purposes
set -e
################################################################################
## Header
################################################################################
# VARIABLES
OPTIND=1
#export DLHOST="http://download.automotivelinux.org/"
# DLHOST in auto.conf
export NOGFX=false
export VERBOSE=false
export DEBUG=false
function vprint() {
:
}
function dprint() {
:
}
echo "################################################################################"
set | grep TARGETARCH
echo "################################################################################"
# finally cmdline arguments
while getopts ":b:a:p:r:dvx" opt; do
case "$opt" in
b)
export TARGETBRANCH="$OPTARG"
;;
d)
DEBUG=true
function dprint() {
echo "DEBUG: $@"
}
;;
p)
export TARGETPROJECT="$OPTARG"
;;
a)
export TARGETARCH="arm"
;;
r)
export TARGETREFSPEC="$OPTARG"
;;
t)
export AGLBRANCH="$OPTARG"
;;
v)
VERBOSE=true
function vprint() {
echo "VERBOSE: \"$@\""
}
;;
x)
set -x
;;
h|\?)
echo "$0 [-h/-?] -bdinpqrvx"
echo "--------------------------------------------------------------------------------"
echo " -b <branch> - name of the branch to use (default=master)"
echo " -d - debug"
echo " -a - arch"
echo " one of:"
echo " -- arm"
echo " -- x86-64"
echo " -- aarch64"
echo " -p <project> - project to use (default=AGL/AGL-repo)"
echo " -r <refspec> - refspec to use (default=refs/heads/master)"
echo " -t <branch> - AGL release branch to use (default=master , e.g. dab)"
echo " -v - verbose"
echo " -x - set -x"
echo "--------------------------------------------------------------------------------"
echo " GERRIT_PROJECT, GERRIT_BRANCH, GERRIT_REFSPEC are used if present,"
echo " but cmdline arguments take precedence."
echo "--------------------------------------------------------------------------------"
exit 1
;;
:)
echo "Option -$OPTARG required an argument."
exit 1
;;
esac
done
if test ! -f ~/.gitconfig ; then
git config --global user.email "jenkins-dontreply@build.automotivelinux.org"
git config --global user.name "jenkins-dontreply@build.automotivelinux.org"
fi
##### map architecture to a machine SDK (until we have generic SDKs) #########
if test x"" = x"$TARGETARCH" ; then
echo "No TARGETARCH variable. Exiting."
exit 1
fi
case "$TARGETARCH" in
arm)
export TARGETSDKARCH="armv7ve.*hf-neon-vfpv4"
export TARGETSDKMACHINE="qemuarm"
;;
x86-64)
export TARGETSDKARCH="corei7-64"
# starting with master, we use qemu for the SDK.
if test x"master" = x"$AGLBRANCH" ; then
export TARGETSDKMACHINE="qemux86-64"
else
export TARGETSDKMACHINE="intel-corei7-64"
fi
;;
aarch64)
export TARGETSDKARCH="aarch64"
export TARGETSDKMACHINE="qemuarm64"
;;
esac
# failsafe
if test x"" = x"$TARGETSDKARCH" ; then
echo "No TARGETSDKARCH variable. Exiting."
exit 1
fi
# failsafe
if test x"" = x"$TARGETSDKMACHINE" ; then
echo "No TARGETSDKMACHINE variable. Exiting."
exit 1
fi
echo "################################################################################"
set | grep ^TARGET
echo "################################################################################"
|