-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·28 lines (20 loc) · 1.09 KB
/
setup.sh
File metadata and controls
executable file
·28 lines (20 loc) · 1.09 KB
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
#!/bin/sh
unset BBPATH BBLAYERS BB_ENV_EXTRAWHITE DL_DIR YOCTO_TOPDIR BUILDDIR
unset LD_LIBRARY_PATH
export YOCTO_TOPDIR=`pwd`
# get rid of trailing and leading slashes
TARGET_CONFIG="$(echo $1 | sed -e 's|^/||' -e 's|/$||')"
export BBPATH=${YOCTO_TOPDIR}/${TARGET_CONFIG}
export BUILDDIR=${YOCTO_TOPDIR}/${TARGET_CONFIG}
export DL_DIR=${YOCTO_TOPDIR}/downloads
export BB_ENV_EXTRAWHITE="YOCTO_TOPDIR DL_DIR BUILDDIR PYTHONPATH"
export PATH=${YOCTO_TOPDIR}/yocto/meta-klipper/scripts:${YOCTO_TOPDIR}/yocto/poky/scripts:${YOCTO_TOPDIR}/yocto/poky/bitbake/bin:${PATH}
export PYTHONPATH=${YOCTO_TOPDIR}/yocto/meta-klipper/scripts/lib:${YOCTO_TOPDIR}/yocto/poky/bitbake/lib
if [ ! -d /opt/poky/3.1.2 ]; then
echo "Please install http://downloads.yoctoproject.org/releases/yocto/yocto-3.1.2/buildtools/x86_64-buildtools-extended-nativesdk-standalone-3.1.2.sh"
else
source /opt/poky/3.1.2/environment-setup-x86_64-pokysdk-linux
export PYTHONPATH=$PYTHONPATH:/opt/poky/3.1.2/sysroots/x86_64-pokysdk-linux/usr/lib/python3.8/site-packages/
fi
echo "Setup complete for $TARGET_CONFIG"
cd $TARGET_CONFIG