2006-11-23 12:15:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-04-21 11:26:25 +00:00
|
|
|
# OE-Core Build Enviroment Setup Script
|
2006-11-23 12:15:17 +00:00
|
|
|
#
|
2011-04-21 11:26:25 +00:00
|
|
|
# Copyright (C) 2006-2011 Linux Foundation
|
2006-11-23 12:15:17 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
|
2010-11-24 22:25:28 +00:00
|
|
|
# It is assumed OEROOT is already defined when this is called
|
|
|
|
if [ -z "$OEROOT" ]; then
|
|
|
|
echo >&2 "Error: OEROOT is not defined!"
|
|
|
|
return
|
|
|
|
fi
|
2007-05-16 13:48:29 +00:00
|
|
|
|
2008-04-29 17:12:25 +00:00
|
|
|
if [ "x$BDIR" = "x" ]; then
|
2010-11-28 13:11:57 +00:00
|
|
|
if [ "x$1" = "x" ]; then
|
2010-07-21 13:55:39 +00:00
|
|
|
BDIR="build"
|
2010-11-28 13:11:57 +00:00
|
|
|
else
|
|
|
|
BDIR=`readlink -f "$1"`
|
|
|
|
fi
|
2010-07-21 13:55:39 +00:00
|
|
|
fi
|
2010-11-25 00:06:04 +00:00
|
|
|
if expr "$BDIR" : '/.*' > /dev/null ; then
|
2010-07-21 13:55:39 +00:00
|
|
|
BUILDDIR="$BDIR"
|
|
|
|
else
|
|
|
|
BUILDDIR="`pwd`/$BDIR"
|
2007-07-17 13:29:36 +00:00
|
|
|
fi
|
2008-10-28 10:01:03 +00:00
|
|
|
unset BDIR
|
2010-07-21 13:55:39 +00:00
|
|
|
|
2008-11-06 14:39:12 +00:00
|
|
|
BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
|
2008-10-28 10:01:03 +00:00
|
|
|
|
2008-11-06 15:21:36 +00:00
|
|
|
BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
|
2007-07-17 13:26:55 +00:00
|
|
|
BUILDDIR=`readlink -f "$BUILDDIR"`
|
2006-11-23 12:15:17 +00:00
|
|
|
|
2010-11-24 22:25:28 +00:00
|
|
|
if ! (test -d "$BITBAKEDIR"); then
|
2011-05-18 11:33:27 +00:00
|
|
|
echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location"
|
2007-07-25 10:37:56 +00:00
|
|
|
return
|
2006-11-23 12:15:17 +00:00
|
|
|
fi
|
|
|
|
|
2010-11-24 22:25:28 +00:00
|
|
|
PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH"
|
2010-11-28 13:11:57 +00:00
|
|
|
unset BITBAKEDIR
|
2010-05-12 14:43:51 +00:00
|
|
|
|
2011-04-20 15:44:10 +00:00
|
|
|
# Used by the runqemu script
|
2010-11-28 12:41:09 +00:00
|
|
|
export BUILDDIR
|
2010-11-28 13:11:57 +00:00
|
|
|
export PATH
|
2010-11-24 22:25:28 +00:00
|
|
|
|
2011-03-17 15:31:54 +00:00
|
|
|
export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC 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"
|