blob: 44b6ae6cd5cd3d4f53153ddda74ec7581f09a989 (
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
|
# (c) 2016 Jan-Simon Moeller dl9pf(at)gmx.de
# License GPLv2
################################################################################
## Source the aglsetup script
################################################################################
SETUP_OPTS=""
# check aglsetup version
source meta-agl/scripts/aglsetup.sh --version >/dev/null 2>&1 || AGLSETUP_VERSION=1.0.0
# add setup topic (if new enough version)
TOPIC_SUPPORT_VER=1.2.0
if [[ "$(echo -e "$AGLSETUP_VERSION\n$TOPIC_SUPPORT_VER" | sort -V | head -n1)" == $TOPIC_SUPPORT_VER ]]; then
SETUP_OPTS="--topic change-${GERRIT_CHANGE_NUMBER}-${GERRIT_PATCHSET_NUMBER}"
fi
# source the env
source meta-agl/scripts/aglsetup.sh ${SETUP_OPTS} -m ${MACHINE} -b output ${TARGETFEATURES}
# link the shared downloads and sstate-cache
ln -sf ../../downloads
ln -sf ../../sstate-cache
echo "" >> conf/local.conf
echo "### ADDED BY AUTOBUILDER ###" >> conf/local.conf
echo "" >> conf/local.conf
# save some pre-build env needed to uniquely identify the source
MANIFEST_R=repo-manifest-r.txt
repo manifest -r > ${MANIFEST_R}
sha1sum ${MANIFEST_R} | awk '{print $1}' > ${MANIFEST_R}.sha1
cat <<EOF > pre-build-env.txt
TARGETBRANCH=${TARGETBRANCH}
TARGETIMAGE=${TARGETIMAGE}
TARGETFEATURES=${TARGETFEATURES}
TARGETMACHINE=${TARGETMACHINE}
TARGETPROJECT=${TARGETPROJECT}
MACHINE=${MACHINE}
GERRIT_CHANGE_NUMBER=${GERRIT_CHANGE_NUMBER}
GERRIT_PATCHSET_NUMBER=${GERRIT_PATCHSET_NUMBER}
EOF
|