blob: 7e3def1723420259c117f1b6942efdaf702fa172 (
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
|
#!/bin/bash -x
echo "Device --> $DEVICE"
echo "Platform --> $PLATFORM"
echo "Test --> $TEST"
echo "REPO_BRANCH --> $REPO_BRANCH"
echo "BITBAKE_CACHE -- $BITBAKE_CACHE"
export DEVICE=${DEVICE:-'qemux86-64'}
export LANG=en_US.UTF-8
export REPO_BRANCH=${REPO_BRANCH:-'master'}
repo_sync()
{
if [ "${PLATFORM}" == "agl" ] || [ "${PLATFORM}" == "AGL" ]
then
repo init -b eel -m default.xml -u https://gerrit.automotivelinux.org/gerrit/AGL/AGL-repo.git
else
repo init -u https://github.com/advancedtelematic/updater-repo.git
fi
echo "Manifest before update"
REPO_MANIFEST=".repo/manifests/$REPO_BRANCH.xml"
cat $REPO_MANIFEST
METAUPDATER_REV=`git rev-parse HEAD`
sed -i 's/meta-updater" remote="github" revision="'$REPO_BRANCH'"/meta-updater" remote="github" revision="'$METAUPDATER_REV'"/' $REPO_MANIFEST
echo "Manifest after update"
cat $REPO_MANIFEST
repo init -m ${REPO_BRANCH}.xml
repo sync
if [ "${PLATFORM}" == "agl" ] || [ "${PLATFORM}" == "AGL" ]
then
source meta-agl/scripts/aglsetup.sh -m $DEVICE agl-demo agl-appfw-smack agl-sota
else
source meta-updater/scripts/envsetup.sh $DEVICE
fi
}
customize_build()
{
CONF_FILE_PATH="conf/local.conf"
if [ -f "$CONF_FILE_PATH" ]
then
echo "SOTA_PACKED_CREDENTIALS = \"${CI_PROJECT_DIR}/data/credentials.zip\"" >> $CONF_FILE_PATH
echo 'OSTREE_BRANCHNAME = "ostree_qemu_from_gitlab"' >> $CONF_FILE_PATH
echo "DL_DIR = \"${BITBAKE_CACHE}\"" >> $CONF_FILE_PATH
echo "SSTATE_DIR = \"${BITBAKE_CACHE}\"" >> $CONF_FILE_PATH
echo 'IMAGE_INSTALL_append = " vim dropbear"' >> $CONF_FILE_PATH
echo 'SANITY_TESTED_DISTROS = ""' >> conf/local.conf
cat $CONF_FILE_PATH
else
echo "$CONF_FILE_PATH not found."
exit 1
fi
touch conf/sanity.conf
}
run_command()
{
if [ "${PLATFORM}" == "agl" ] || [ "${PLATFORM}" == "AGL" ]; then
bitbake agl-demo-platform
elif [ "${TEST}" == "oe-selftest" ] || [ "${TEST}" == "OE-SELFTEST" ]; then
oe-selftest -r updater
elif [ "${DEVICE}" == "raspberrypi3" ]; then
bitbake rpi-basic-image
elif [ "${DEVICE}" == "qemux86-64" ]; then
bitbake core-image-minimal
else
echo "Unknown parameter provided"
exit 1
fi
}
repo_sync
customize_build
run_command
df -h
|