summaryrefslogtreecommitdiff
path: root/common/setup-openembedded
diff options
context:
space:
mode:
Diffstat (limited to 'common/setup-openembedded')
-rw-r--r--common/setup-openembedded47
1 files changed, 47 insertions, 0 deletions
diff --git a/common/setup-openembedded b/common/setup-openembedded
new file mode 100644
index 0000000000..46151e5774
--- /dev/null
+++ b/common/setup-openembedded
@@ -0,0 +1,47 @@
+# 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 -n "$TOPDIR" -a -d "$TOPDIR" || {
+ echo "environment: TOPDIR not defined" >&2
+ exit 1
+}
+
+. ./conf/auto.conf
+export DISTRO
+export MAKE_TARGET
+
+#
+# the following must match the definitions in common/conf/site.conf
+export PYTHONPATH="${TOPDIR}/bitbake/lib"
+export BBPATH="${TOPDIR}:${TOPDIR}/openembedded:${TOPDIR}/bitbake"
+export PATH="${TOPDIR}/bitbake/bin:${PATH}"
+export LD_LIBRARY_PATH=
+export LANG=C
+#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
+#
+# make bb into a 'safe' bitbake
+alias bb-safe="env -i \
+ HOME='${TOPDIR}/home' \
+ PYTHONPATH='${PYTHONPATH}' \
+ BBPATH='${BBPATH}' \
+ PATH='${PATH}' \
+ LD_LIBRARY_PATH='${LD_LIBRARY_PATH}' \
+ LANG='${LANG}' \
+ '${TOPDIR}/bitbake/bin/bitbake'"
+alias bb="'${TOPDIR}/bitbake/bin/bitbake'"
+#
+# remove TOPDIR - not required
+unset TOPDIR