-
Notifications
You must be signed in to change notification settings - Fork 10
/
setup-env
66 lines (60 loc) · 2.28 KB
/
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
54
55
56
57
58
59
60
61
62
63
64
65
66
# setup up the environment for a bitbake build. This is used
# by the makefile and may also be directly sourced from an
# interactive shell. The makefile uses 'env -i' to ensure
# no variables are inherited apart from CCACHE_DISABLE and
# CCACHE_DIR
#
# topdir must exist in the directory and define TOPDIR to
# the full path name of the working directory
. ./conf/topdir.conf
test -e ./setup-local || echo "setup-local does not exist, please update your conf/auto.conf and copy setup-local from common directory"
. ./setup-local
test -n "$TOPDIR" -a -d "$TOPDIR" || {
echo "environment: TOPDIR not defined" >&2
return
}
#
# the following must match the definitions in common/conf/site.conf
test ! -d "${TOPDIR}/bitbake/bin" || export PATH="${TOPDIR}/bitbake/bin:${PATH}"
test ! -d "${TOPDIR}/openembedded-core/scripts" || export PATH="${TOPDIR}/openembedded-core/scripts:${PATH}"
# used in bitbake wrapper for pseudodone location
export BUILDDIR="${TOPDIR}"
export BB_ENV_PASSTHROUGH_ADDITIONS="MACHINE DISTRO http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS GIT_PROXY_COMMAND PSEUDO_DISABLED PSEUDO_BUILD WEBOS_DISTRO_BUILD_ID"
export LD_LIBRARY_PATH=
export LANG=C
export MACHINE
export DISTRO
# Required for Python 3 starting with Yocto Morty release
export LC_ALL=en_US.utf8
#NOTE: if you add export definitions here add them below too!
#
# unset the following (unnecessary for the makefile, but safe)
unset LC_CTYPE
unset CC
unset CXX
unset MFLAGS
unset MAKEFLAGS
unset MAKE_TARGET
# be carefull with non-existent entries in BBPATH.. https://bugzilla.yoctoproject.org/show_bug.cgi?id=1709
unset BBPATH
#
# make bb into a 'safe' bitbake
alias bb-safe="env -i \
HOME='${HOME}' \
PYTHONPATH='${PYTHONPATH}' \
PATH='${PATH}' \
LD_LIBRARY_PATH='${LD_LIBRARY_PATH}' \
LANG='${LANG}' \
'${TOPDIR}/bitbake/bin/bitbake'"
alias bb="bitbake"
#
# remove TOPDIR - not required
unset TOPDIR
if [ ${TERM:-dumb} = dumb ]; then
export PS1='OE $MACHINE@$DISTRO \w \$ '
elif [ -n "${ZSH_VERSION}" ]; then
export PS1=$'%{\e[1;32m%}OE $MACHINE@$DISTRO%{\e[1;34m%} %1d $%{\e[0m%} '
else
export PS1='\[\033[01;32m\]OE $MACHINE@$DISTRO\[\033[01;34m\] \w \$\[\033[00m\] '
fi
echo "Altered environment for ${MACHINE}@${DISTRO} development"