-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetupsdk
34 lines (31 loc) · 1.28 KB
/
setupsdk
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
if [ -n "$BASH_SOURCE" ]; then
export ROOT=$(pwd)
elif [ -n "$ZSH_NAME" ]; then
export ROOT=$(pwd)
else
export ROOT=$(pwd)
fi
export TEMPLATECONF=$ROOT/layers/meta-petalinux/conf/templates/default
# Use the internal layer, if it's checked out
if [ -d $ROOT/layers/meta-xilinx-internal ]; then
export TEMPLATECONF=$ROOT/layers/meta-xilinx-internal/conf/templates/default
fi
export PATH=$PATH:$ROOT/repos/poky/scripts
if [ -d $ROOT/layers/meta-xilinx-core/gen-machine-conf ]; then
export PATH=$PATH:$ROOT/layers/meta-xilinx-core/gen-machine-conf
fi
# Translate environment variables old to new
if [ -n "${BB_ENV_WHITELIST}" ]; then
echo "WARNING: BB_ENV_WHITELIST is obsolete, please use BB_ENV_PASSTHROUGH"
export BB_ENV_PASSTHROUGH="${BB_ENV_WHITELIST}"
unset BB_ENV_WHITELIST
fi
if [ -n "${BB_ENV_EXTRAWHITE}" ]; then
echo "WARNING: BB_ENV_EXTRAWHITE is obsolete, please use BB_ENV_PASSTHROUGH_ADDITIONS"
export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_EXTRAWHITE}"
unset BB_ENV_EXTRAWHITE
fi
source $ROOT/repos/poky/oe-init-build-env "$@"
cp <(cat ${ROOT}/conf/local.conf | envsubst) ${BUILDDIR}/conf/local.conf
cat ${ROOT}/conf/bblayers.conf | head -n2 > ${BUILDDIR}/conf/bblayers.conf
cat ${ROOT}/conf/bblayers.conf | tail -n+3 | envsubst >> ${BUILDDIR}/conf/bblayers.conf