diff options
Diffstat (limited to 'scripts/oe-buildenv-internal')
| -rwxr-xr-x | scripts/oe-buildenv-internal | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/scripts/oe-buildenv-internal b/scripts/oe-buildenv-internal deleted file mode 100755 index 2fdb19565a..0000000000 --- a/scripts/oe-buildenv-internal +++ /dev/null | |||
| @@ -1,119 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # OE-Core Build Environment Setup Script | ||
| 4 | # | ||
| 5 | # Copyright (C) 2006-2011 Linux Foundation | ||
| 6 | # | ||
| 7 | # SPDX-License-Identifier: GPL-2.0-or-later | ||
| 8 | # | ||
| 9 | |||
| 10 | if ! $(return >/dev/null 2>&1) ; then | ||
| 11 | echo 'oe-buildenv-internal: error: this script must be sourced' | ||
| 12 | echo '' | ||
| 13 | echo 'Usage: . $OEROOT/scripts/oe-buildenv-internal &&' | ||
| 14 | echo '' | ||
| 15 | echo 'OpenEmbedded oe-buildenv-internal - an internal script that is' | ||
| 16 | echo 'used in oe-init-build-env to initialize oe build environment' | ||
| 17 | echo '' | ||
| 18 | exit 2 | ||
| 19 | fi | ||
| 20 | |||
| 21 | # It is assumed OEROOT is already defined when this is called | ||
| 22 | if [ -z "$OEROOT" ]; then | ||
| 23 | echo >&2 "Error: OEROOT is not defined!" | ||
| 24 | return 1 | ||
| 25 | fi | ||
| 26 | |||
| 27 | if [ -z "$OE_SKIP_SDK_CHECK" ] && [ -n "$OECORE_SDK_VERSION" ]; then | ||
| 28 | echo >&2 "Error: The OE SDK/ADT was detected as already being present in this shell environment. Please use a clean shell when sourcing this environment script." | ||
| 29 | return 1 | ||
| 30 | fi | ||
| 31 | |||
| 32 | # We potentially have code that doesn't parse correctly with older versions | ||
| 33 | # of Python, and rather than fixing that and being eternally vigilant for | ||
| 34 | # any other new feature use, just check the version here. | ||
| 35 | py_v38_check=$(python3 -c 'import sys; print(sys.version_info >= (3,8,0))') | ||
| 36 | if [ "$py_v38_check" != "True" ]; then | ||
| 37 | echo >&2 "BitBake requires Python 3.8.0 or later as 'python3' (scripts/install-buildtools can be used if needed)" | ||
| 38 | return 1 | ||
| 39 | fi | ||
| 40 | unset py_v38_check | ||
| 41 | |||
| 42 | if [ -z "$BDIR" ]; then | ||
| 43 | if [ -z "$1" ]; then | ||
| 44 | BDIR="build" | ||
| 45 | else | ||
| 46 | BDIR="$1" | ||
| 47 | if [ "$BDIR" = "/" ]; then | ||
| 48 | echo >&2 "Error: / is not supported as a build directory." | ||
| 49 | return 1 | ||
| 50 | fi | ||
| 51 | |||
| 52 | # Remove any possible trailing slashes. This is used to work around | ||
| 53 | # buggy readlink in Ubuntu 10.04 that doesn't ignore trailing slashes | ||
| 54 | # and hence "readlink -f new_dir_to_be_created/" returns empty. | ||
| 55 | BDIR=$(echo $BDIR | sed -re 's|/+$||') | ||
| 56 | |||
| 57 | BDIR=$(readlink -f "$BDIR") | ||
| 58 | if [ -z "$BDIR" ]; then | ||
| 59 | PARENTDIR=$(dirname "$1") | ||
| 60 | echo >&2 "Error: the directory $PARENTDIR does not exist?" | ||
| 61 | return 1 | ||
| 62 | fi | ||
| 63 | fi | ||
| 64 | if [ -n "$2" ]; then | ||
| 65 | BITBAKEDIR="$2" | ||
| 66 | fi | ||
| 67 | fi | ||
| 68 | if [ "${BDIR#/}" != "$BDIR" ]; then | ||
| 69 | BUILDDIR="$BDIR" | ||
| 70 | else | ||
| 71 | BUILDDIR="$(pwd)/$BDIR" | ||
| 72 | fi | ||
| 73 | unset BDIR | ||
| 74 | |||
| 75 | if [ -z "$BITBAKEDIR" ]; then | ||
| 76 | BITBAKEDIR="$OEROOT/bitbake$BBEXTRA" | ||
| 77 | test -d "$BITBAKEDIR" || BITBAKEDIR="$OEROOT/../bitbake$BBEXTRA" | ||
| 78 | fi | ||
| 79 | |||
| 80 | BITBAKEDIR=$(readlink -f "$BITBAKEDIR") | ||
| 81 | BUILDDIR=$(readlink -f "$BUILDDIR") | ||
| 82 | BBPATH=$BUILDDIR | ||
| 83 | |||
| 84 | export BBPATH | ||
| 85 | |||
| 86 | if [ ! -d "$BITBAKEDIR" ]; then | ||
| 87 | echo >&2 "Error: The bitbake directory ($BITBAKEDIR) does not exist! Please ensure a copy of bitbake exists at this location or specify an alternative path on the command line" | ||
| 88 | return 1 | ||
| 89 | fi | ||
| 90 | |||
| 91 | # Add BitBake's library to PYTHONPATH | ||
| 92 | PYTHONPATH=$BITBAKEDIR/lib:$PYTHONPATH | ||
| 93 | export PYTHONPATH | ||
| 94 | |||
| 95 | # Remove any paths added by sourcing this script before | ||
| 96 | [ -n "$OE_ADDED_PATHS" ] && PATH=$(echo $PATH | sed -e "s#$OE_ADDED_PATHS##") || | ||
| 97 | PATH=$(echo $PATH | sed -e "s#$OEROOT/scripts:$BITBAKEDIR/bin:##") | ||
| 98 | |||
| 99 | # Make sure our paths are at the beginning of $PATH | ||
| 100 | OE_ADDED_PATHS="$OEROOT/scripts:$BITBAKEDIR/bin:" | ||
| 101 | PATH="$OE_ADDED_PATHS$PATH" | ||
| 102 | export OE_ADDED_PATHS | ||
| 103 | |||
| 104 | # This is not needed anymore | ||
| 105 | unset BITBAKEDIR | ||
| 106 | |||
| 107 | # Used by the runqemu script | ||
| 108 | export BUILDDIR | ||
| 109 | |||
| 110 | BB_ENV_PASSTHROUGH_ADDITIONS_OE="MACHINE DISTRO TCMODE TCLIBC HTTP_PROXY http_proxy \ | ||
| 111 | HTTPS_PROXY https_proxy FTP_PROXY ftp_proxy FTPS_PROXY ftps_proxy ALL_PROXY \ | ||
| 112 | all_proxy NO_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY \ | ||
| 113 | SDKMACHINE BB_NUMBER_THREADS BB_NO_NETWORK PARALLEL_MAKE GIT_PROXY_COMMAND \ | ||
| 114 | SOCKS5_PASSWD SOCKS5_USER SCREENDIR STAMPS_DIR BBPATH_EXTRA BB_SETSCENE_ENFORCE \ | ||
| 115 | BB_LOGCONFIG" | ||
| 116 | |||
| 117 | BB_ENV_PASSTHROUGH_ADDITIONS="$(echo $BB_ENV_PASSTHROUGH_ADDITIONS $BB_ENV_PASSTHROUGH_ADDITIONS_OE | tr ' ' '\n' | LC_ALL=C sort --unique | tr '\n' ' ')" | ||
| 118 | |||
| 119 | export BB_ENV_PASSTHROUGH_ADDITIONS | ||
