-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.sh
35 lines (30 loc) · 1019 Bytes
/
setup.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
COREBASE=$(realpath $(dirname ${BASH_SOURCE:-$0}))
if [ ! -d $COREBASE ]; then
echo "ERROR: $COREBASE not found. Confirm working directory."
return 2> /dev/null
fi
# BSPSET chooses one bblayers.conf by the following rule:
# BSPSET=xxx/yyy => meta-xxx/meta-yyy/conf/bblayers.conf
BSPSET=$1
if [ -z "$BSPSET" ]; then
echo "ERROR: missing BSPSET"
echo "usage: source $COREBASE/setup.sh <BSPSET>"
return 2> /dev/null
fi
BUILDDIR=build-$(echo "$BSPSET" | tr '/' '-')
BBLAYERS=$COREBASE/meta-$(echo "$BSPSET" | sed "s@/@/meta-@g")/conf/bblayers.conf
if [ ! -f $BBLAYERS ]; then
echo "ERROR: $BBLAYERS not found"
return 2> /dev/null
fi
# setup bblayers.conf
mkdir -p $BUILDDIR/conf
cp $BBLAYERS $BUILDDIR/conf/bblayers.conf
sed -i "s|##COREBASE##|$COREBASE|" $BUILDDIR/conf/bblayers.conf
# set poky environment variables
source $COREBASE/oe-init-build-env $BUILDDIR
# disable all proxies to fetch sources only from intranet
export http_proxy=""
export no_proxy=""
export RSYNC_PROXY=""
export GIT_PROXY_COMMAND=""