oe-buildenv-internal 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #!/bin/sh
  2. # OE-Core Build Enviroment Setup Script
  3. #
  4. # Copyright (C) 2006-2011 Linux Foundation
  5. #
  6. # This program is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. # It is assumed OEROOT is already defined when this is called
  20. if [ -z "$OEROOT" ]; then
  21. echo >&2 "Error: OEROOT is not defined!"
  22. return
  23. fi
  24. if [ "x$BDIR" = "x" ]; then
  25. if [ "x$1" = "x" ]; then
  26. BDIR="build"
  27. else
  28. BDIR=`readlink -f "$1"`
  29. fi
  30. fi
  31. if expr "$BDIR" : '/.*' > /dev/null ; then
  32. BUILDDIR="$BDIR"
  33. else
  34. BUILDDIR="`pwd`/$BDIR"
  35. fi
  36. unset BDIR
  37. BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
  38. BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
  39. BUILDDIR=`readlink -f "$BUILDDIR"`
  40. if ! (test -d "$BITBAKEDIR"); then
  41. echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Did you source the script in the correct directory?"
  42. return
  43. fi
  44. PATH="${OEROOT}/scripts:$BITBAKEDIR/bin/:$PATH"
  45. unset BITBAKEDIR
  46. # Used by the runqemu script
  47. export BUILDDIR
  48. export PATH
  49. 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"