-
Notifications
You must be signed in to change notification settings - Fork 0
/
oe-setup-env
executable file
·53 lines (41 loc) · 1.23 KB
/
oe-setup-env
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
#!/bin/sh
# Setup enviroment for OpenEmbedded
# Adrian Alonso <[email protected]>
OEROOT="${HOME}/workspace/oe"
CUR_DIR=`pwd`
TARGET=$1
if [ ! -d ${OEROOT} ]; then
mkdir -p ${OEROOT}
fi
if [ ! -f ${OEROOT}/oe-setup-env ]; then
cp oe-setup-env ${OEROOT}
fi
if [ ! -f ${OEROOT}/oe-repos-update ]; then
cp oe-repos-update ${OEROOT}
fi
if [[ "${OEROOT}" != "${CUR_DIR}" ]]; then
cd ${OEROOT}
fi
# Set default machine if not provided as argument
[[ -z ${TARGET} ]] && TARGET="xilinx-ml507"
#unset BBPATH
case "${TARGET}" in
"xilinx-ml507" | "beagleboard")
if [ ! -d ${OEROOT}/build-${TARGET}/conf ]; then
mkdir -p ${OEROOT}/build-${TARGET}/conf
cp ${CUR_DIR}/${TARGET}.local.conf \
${OEROOT}/build-${TARGET}/conf/local.conf
fi
;;
*)
echo -e "Error unsorpported target, edit this script to suit your needs"
exit -1
;;
esac
[[ -z ${OEROOT} ]] && export OEROOT=${OEROOT}
[[ -z ${BB_ENV_EXTRAWHITE} ]] && export BB_ENV_EXTRAWHITE="OEROOT"
export BBPATH=${BBPATH}:${OEROOT}/build-${TARGET}:${OEROOT}/openembedded
export BBPATH=${OEROOT}/build-${TARGET}:${OEROOT}/openembedded
export PATH=${PATH}:${OEROOT}/bitbake/bin
./oe-repos-update ${TARGET}
cd ${OEROOT}/build-${TARGET}/conf