]> code.ossystems Code Review - openembedded-core.git/commitdiff
Enable build dir outside of the poky directory
authorJoshua Lock <josh@linux.intel.com>
Wed, 21 Jul 2010 13:55:39 +0000 (14:55 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Wed, 21 Jul 2010 14:39:53 +0000 (15:39 +0100)
You need to first set up the build directory by sourcing the poky build script,
after that builds can be run in that directory so long as bitbake is in $PATH
removing the need to source the init script for each build.

i.e:
$ . poky-init-build-env ~/my-build
$ bitbake some-image
<<later, in a different shell>>
$ cd ~/my-build
$ export PATH=/path/to/bitbake/bin:$PATH
$ bitbake an-image

This patch also removes use of OEROOT in recipes, etc.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
14 files changed:
build/conf/bblayers.conf.sample
build/conf/local.conf.sample
build/conf/site.conf.sample
handbook/extendpoky.xml
meta/classes/imagetest-qemu.bbclass
meta/classes/sanity.bbclass
meta/conf/layer.conf
meta/packages/qemu/qemu-helper-nativesdk_1.0.bb
poky-init-build-env
scripts/poky-env-internal
scripts/pstage-scanner
scripts/qemuimage-tests/sanity/boot
scripts/qemuimage-tests/sanity/ssh
scripts/runqemu

index dff44e49c46f577ed248666f50a5dd27d45a0707..04b7768ffaec2973a1d70c9f925159b9bad70837 100644 (file)
@@ -4,6 +4,6 @@ LCONF_VERSION = "1"
 
 BBFILES ?= ""
 BBLAYERS = " \
-  ${OEROOT}/meta \
-  ${OEROOT}/meta-moblin \
+  ##POKYBASE##/meta \
+  ##POKYBASE##/meta-moblin \
   "
index 32bd409ecc2e861d73bc89eb56aef7fb1ed487e8..78c3bd144ea6b96b58b6e848bfb6486c12714611 100644 (file)
@@ -42,24 +42,6 @@ DISTRO ?= "poky"
 # For bleeding edge / experimental / unstable package versions
 # DISTRO ?= "poky-bleeding"
 
-# Poky has various extra metadata collections (openmoko, extras).
-# To enable these, uncomment all (or some of) the following lines:
-# BBFILES = "\
-#    ${OEROOT}/meta/packages/*/*.bb \
-#    ${OEROOT}/meta-extras/packages/*/*.bb \
-#    ${OEROOT}/meta-openmoko/packages/*/*.bb \
-#    ${OEROOT}/meta-moblin/packages/*/*.bb \
-#    "
-# BBFILE_COLLECTIONS = "normal extras openmoko moblin"
-# BBFILE_PATTERN_normal = "^${OEROOT}/meta/"
-# BBFILE_PATTERN_extras = "^${OEROOT}/meta-extras/"
-# BBFILE_PATTERN_openmoko = "^${OEROOT}/meta-openmoko/"
-# BBFILE_PATTERN_moblin = "^${OEROOT}/meta-moblin/"
-# BBFILE_PRIORITY_normal = "5"
-# BBFILE_PRIORITY_extras = "5"
-# BBFILE_PRIORITY_openmoko = "5"
-# BBFILE_PRIORITY_moblin = "5"
-
 BBMASK = ""
 
 # EXTRA_IMAGE_FEATURES allows extra packages to be added to the generated images 
@@ -109,7 +91,7 @@ PACKAGE_CLASSES ?= "package_ipk"
 # Note that a full build of everything in OpenEmbedded will take GigaBytes of hard
 # disk space, so make sure to free enough space. The default TMPDIR is
 # <build directory>/tmp
-TMPDIR = "${OEROOT}/build/tmp"
+#TMPDIR = "${POKYBASE}/build/tmp"
 
 
 # Uncomment this if you are using the Openedhand provided qemu deb - see README
index 060dca087cd1f54877323a8e2f5fbe387169c60f..42042042f7820a10fb1df727a5bfb35fd5f62c1e 100644 (file)
@@ -20,7 +20,7 @@ SCONF_VERSION = "1"
 # although this only works for http
 #GIT_PROXY_HOST = "proxy.example.com"
 #GIT_PROXY_PORT = "81"
-#export GIT_PROXY_COMMAND = "${OEROOT}/scripts/poky-git-proxy-command"
+#export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-command"
 
 # GIT_PROXY_IGNORE_* lines define hosts which do not require a proxy to access
 #GIT_CORE_CONFIG = "Yes"
@@ -32,7 +32,7 @@ SCONF_VERSION = "1"
 # and then share that binary somewhere in PATH, then use the following settings
 #GIT_PROXY_HOST = "proxy.example.com"
 #GIT_PROXY_PORT = "81"
-#export GIT_PROXY_COMMAND = "${OEROOT}/scripts/poky-git-proxy-socks-command"
+#export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-socks-command"
 
 
 # Uncomment this to use a shared download directory
index d03284d0e3c7c1beae80c8a2f47597c7c3960925..18edb1ac95c1e21bb4dbb8491870dbde587b98cc 100644 (file)
@@ -535,7 +535,7 @@ bitbake poky-image-sato
                 supported and non-invasive fashion.
            </para>
 
-          <para>
+           <para>
                The Poky tree includes two additional layers which demonstrate
                this functionality, meta-moblin and meta-extras.
                The meta-extras repostory is not enabled by default but enabling
@@ -547,12 +547,12 @@ bitbake poky-image-sato
 
 BBFILES ?= ""
 BBLAYERS = " \
-  ${OEROOT}/meta \
-  ${OEROOT}/meta-moblin \
-  ${OEROOT}/meta-extras \
+  /path/to/poky/meta \
+  /path/to/poky/meta-moblin \
+  /path/to/poky/meta-extras \
   "
 </literallayout>
-          </para>
+           </para>
 
           <para>
                Bitbake parses the conf/layer.conf of each of the layers in BBLAYERS
@@ -609,7 +609,7 @@ require conf/distro/include/poky-extras-src-revisions.inc
                 git repository of the format meta-prvt-XXXX and have this repository
                 cloned alongside the other meta directories in the Poky tree.
                 This way you can keep your Poky tree and it's configuration entirely
-                inside OEROOT.
+                inside POKYBASE.
             </para>
         </section>
 
index 742b75920874171c748c77e642efc15b3f273873..feab868476599d03344d517fec1a9be33804d0aa 100644 (file)
@@ -47,6 +47,7 @@ python do_qemuimagetest() {
         os.environ["QEMUARCH"] = machine
         os.environ["QEMUTARGET"] = pname
         os.environ["DISPLAY"] = bb.data.getVar("DISPLAY", d, True)
+        os.environ["POKYBASE"] = bb.data.getVar("POKYBASE", d, True)
 
         """run Test Case"""
         bb.note("Run %s test in scenario %s" % (case, scen))
index 94e96f8524ba7543567785a28794249c4b69db5e..31b8dd2b07d23440d05b6e51458b10eadae43d26 100644 (file)
@@ -194,11 +194,11 @@ def check_sanity(e):
                f.write(current_abi)
        f.close()
 
-       oeroot = data.getVar('OEROOT', e.data)
+       oeroot = data.getVar('POKYBASE', e.data)
        if oeroot.find ('+') != -1:
-               messages = messages + "Error, you have an invalid character (+) in your OEROOT directory path. Please more Poky to a directory which doesn't include a +."
+               messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +."
        elif oeroot.find (' ') != -1:
-               messages = messages + "Error, you have a space in your OEROOT directory path. Please move Poky to a directory which doesn't include a space."
+               messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
 
        if messages != "":
                raise_sanity_error(messages)
index d0d74884ec0399d28296e5fa8e0dc34092a8b9fa..30068d6aec86800ac2b7b450411e78a650202fbc 100644 (file)
@@ -12,9 +12,12 @@ BBFILE_PRIORITY_normal = "5"
 # Add scripts to PATH
 PATH := "${PATH}:${LAYERDIR}/scripts"
 
+# Set a variable to get to the top of the metadata location
+POKYBASE := ${@os.path.normpath("${LAYERDIR}/../")}
+
 # Set path to qemu image tests included in this layer
 
-QEMUIMAGETESTS := "${OEROOT}/scripts/qemuimage-tests"
+QEMUIMAGETESTS := "${POKYBASE}/scripts/qemuimage-tests"
 
 require conf/distro/include/poky-default-revisions.inc
 
index 5d8e45f1234e7df332af3046efc63d97d5be08bd..a4294ef5cf80202fe80f05a6fab2c9b22085cd02 100644 (file)
@@ -5,11 +5,11 @@ PR = "r7"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-helper"
 
-SRC_URI = "file://${OEROOT}/scripts/poky-qemu \
-           file://${OEROOT}/scripts/poky-qemu-internal \
-           file://${OEROOT}/scripts/poky-addptable2image \
-           file://${OEROOT}/scripts/poky-qemu-ifup \
-           file://${OEROOT}/scripts/poky-qemu-ifdown \
+SRC_URI = "file://${POKYBASE}/scripts/poky-qemu \
+           file://${POKYBASE}/scripts/poky-qemu-internal \
+           file://${POKYBASE}/scripts/poky-addptable2image \
+           file://${POKYBASE}/scripts/poky-qemu-ifup \
+           file://${POKYBASE}/scripts/poky-qemu-ifdown \
           file://raw2flash.c"
 
 S = "${WORKDIR}"
@@ -23,7 +23,7 @@ do_compile() {
 
 do_install() {
        install -d ${D}${bindir}
-       install -m 0755 ${WORKDIR}${OEROOT}/scripts/poky-* ${D}${bindir}/
+       install -m 0755 ${WORKDIR}${POKYBASE}/scripts/poky-* ${D}${bindir}/
        install raw2flash.spitz ${D}${bindir}/
        install flash2raw.spitz ${D}${bindir}/
        ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
index 94bf3f0f7fdf5837c0f21c1e63d64123d697af20..0f5e684a52f75c2ba7e1af95a9e78a0a2ab65a8b 100755 (executable)
@@ -21,7 +21,9 @@
 
 if test x"$0" = x"./poky-init-build-env"; then
    echo "Error: Run via '. ./poky-init-build-env'"
+elif test x"$BASH_SOURCE" = x; then
+   echo "Error: you are not running a Bash shell, please use Bash or add support for your shell to the init scripts"
 else
-   . ./scripts/poky-env-internal
+   . `dirname $BASH_SOURCE`/scripts/poky-env-internal
 fi
 
index 54b6ee8964fa219853267b247036bfec5fed4b65..862ce7aec297825f406af31f7d18efce663b7d50 100755 (executable)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 
-# Change this to the location of this file.
-# Also update the locations at the top of conf/local.conf
+# scripts/ is a sub-directory of OEROOT, we use readlink to get the full path
+SCRIPTPATH=`readlink -f "$BASH_SOURCE"`
+OEROOT="`dirname $SCRIPTPATH`/../"
 
-OEROOT=`pwd`
 if [ "x$BDIR" = "x" ]; then
-       if [ "x$1" = "x" ]; then
-               BDIR="build"
-       else
-               BDIR="$1"
-       fi
+         if [ "x$1" = "x" ]; then
+        BDIR="build"
+         else
+                   BDIR=`readlink -f "$1"`
+         fi
+fi
+if [[ "$BDIR" = /* ]] ; then
+    BUILDDIR="$BDIR"
+else
+    BUILDDIR="`pwd`/$BDIR"
 fi
-BUILDDIR="$OEROOT/$BDIR/"
 unset BDIR
+
+mkdir -p $BUILDDIR/conf
+if ! (test -w "$BUILDDIR"); then
+    echo >&2 "Error: Cannot write to $BUILDDIR, perhaps try sourcing with a writable path? i.e. . poky-init-build-env ~/my-build"
+    return
+fi
+
 BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
 PKGDIR="$OEROOT/meta/"
 BBPATH="$BITBAKEDIR $PKGDIR"
@@ -51,9 +62,8 @@ do
         continue
     fi
     if [ -e $OEROOT/$repo/poky-extra-environment ]; then
-       . $OEROOT/$repo/poky-extra-environment
+             . $OEROOT/$repo/poky-extra-environment
     fi
-    BBPATH=" $BBPATH $OEROOT/$repo"
 done
 
 BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR"
@@ -78,12 +88,13 @@ BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
 
 PATH="$BITBAKEDIR/bin/:$OEROOT/scripts:$PATH"
 
-cd "$BUILDDIR"
-
 # Remove any symlinks from paths
 BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
 PKGDIR=`readlink -f "$PKGDIR"`
 BUILDDIR=`readlink -f "$BUILDDIR"`
+OEROOT=`readlink -f "$OEROOT"`
+
+cd "$BUILDDIR"
 
 if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then
     echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?"
@@ -91,7 +102,7 @@ if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then
 fi
 
 if [ "x" = "x$POKYLOCALCONF" ]; then
-    POKYLOCALCONF="$BUILDDIR/conf/local.conf.sample"
+    POKYLOCALCONF="$OEROOT/build/conf/local.conf.sample"
 fi
 if ! (test -r "$BUILDDIR/conf/local.conf"); then
     echo "You had no conf/local.conf file. Poky has created this configuration file for you"
@@ -105,17 +116,19 @@ if ! (test -r "$BUILDDIR/conf/local.conf"); then
 fi
 
 if [ "x" = "x$POKYLAYERCONF" ]; then
-    POKYLAYERCONF="$BUILDDIR/conf/bblayers.conf.sample"
+    POKYLAYERCONF="$OEROOT/build/conf/bblayers.conf.sample"
 fi
 if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then
-    cp -f $POKYLAYERCONF $BUILDDIR/conf/bblayers.conf
+    # Put the abosolute path to the layers in bblayers.conf so we can run
+    # bitbake without the init script after the first run
+    sed "s|##POKYBASE##|$OEROOT|g" $POKYLAYERCONF > $BUILDDIR/conf/bblayers.conf
 fi
 
 # Prevent disturbing a new GIT clone in same console
 unset POKYLOCALCONF
 unset POKYLAYERCONF
 
-export BBPATH OEROOT BUILD_SYS BUILDDIR
+export BBPATH BUILD_SYS BUILDDIR
 
 # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make
 # install' if set
@@ -141,4 +154,4 @@ echo "Common targets are poky-image-minimal, poky-image-sato, meta-toolchain or
 echo
 echo "You can also run generated qemu images with a command like 'runqemu qemux86'"
 
-export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC OEROOT http_proxy ftp_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS"
+export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS"
index 9234912581b6b5c40f264df7d9167d7aa6595e2e..4a27aa5d262b2b9dd4d7a1b6cf726c28938d4a75 100755 (executable)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 ##
-## This script will scan all of the packages in ${OEROOT}/pstage (or argv[1])
+## This script will scan all of the packages in PSTAGE_DIR (or argv[1])
 ## in search of packages which install files outside of their native sysroot
 ##
 
@@ -16,15 +16,24 @@ def main():
     """Generate a list of pstage packages and scan them for badness"""
     package_list = []
 
-    ## First we walk the pstage directory, let's assume we're running from
-    ## a sibling of pstage (i.e. scripts) if no path defined
     try:
         path = sysv.arg[1]
     except:
-        path = os.path.join(os.environ.get("OEROOT"), "pstage")
+        # Assume pstage is a child of tmp, Poky's default
+        tmpdir = None
+        sub.Popen(["bitbake", "-e"], stdout=sub.PIPE,stderr=sub.PIPE)
+        err, out = p.communicate()
+        if (!out):
+            print("bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
+            exit
+        for line in out:
+            if line.find("PSTAGE_DIR=") != -1:
+                tmpdir = line.partition("=")[2].strip("\"")
+                break
 
     if len(path) < 1 or not os.path.exists(path):
-        path = os.path.join(os.environ.get("OEROOT"), "pstage")
+        print ("No path defined and bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
+        exit
     
     global logf
     try:
index b4c0094f2570ee6244a9a287fcc5899fdef36335..57b204b1704e6d6c9d3ee8ff47e8c395d4b05903 100755 (executable)
@@ -9,8 +9,7 @@
 # This file is licensed under the GNU General Public License,
 # Version 2.
 #
-
-. $OEROOT/scripts/qemuimage-testlib
+. $POKYBASE/scripts/qemuimage-testlib
 
 TIMEOUT=120
 QEMU_IPADDR="192.168.7.2"
index 7dd895951cbd332f19c46ff4b20c4db3efdd0fe4..3c7638cc2e91142f1dc8cb75bdcea1294de23c07 100755 (executable)
@@ -9,7 +9,7 @@
 # Version 2.
 #
 
-. $OEROOT/scripts/qemuimage-testlib
+. $POKYBASE/scripts/qemuimage-testlib
 
 TIMEOUT=360
 QEMU_IPADDR="192.168.7.2"
index c7c51ec77aba5fa03ec3b1c3fc35d6edf7a7dca4..bb26f8b6332313fd6cb2d45ec96128712b53d587 100755 (executable)
 
 
 if [ "x$BUILDDIR" = "x" ]; then
-    echo "You need to source poky-init-build-env before running this script"
-    exit 1
+    # BUILDDIR unset, try and get TMPDIR from bitbake
+    type -P bitbake &>/dev/null || {
+        echo "You either need bitbake in your PATH or to source poky-init-build-env before running this script" >&2; exit 1; }
+
+    # we have bitbake in PATH, get TMPDIR from the environment
+    TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
+else
+    TMPDIR=$BUILDDIR/tmp
+fi
+
+if ! (test -d "$TMPDIR"); then
+    echo >&2 "Error: no $TMPDIR directory, please re-run the script from the Poky build directory."
+    return
 fi
 
-INTERNAL_SCRIPT=`which poky-qemu-internal`
+SCRIPTSDIR=`dirname "$0"`
+INTERNAL_SCRIPT=SCRIPTSDIR/poky-qemu-internal`
 
 if [ "x$1" = "x" ]; then
     echo
@@ -67,9 +79,9 @@ fi
 
 if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then
     if [ "x$ZIMAGE" = "x" ]; then
-        ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin
+        ZIMAGE=$TMPDIR/deploy/images/zImage-$MACHINE.bin
     fi
-    CROSSPATH=$BUILDDIR/sysroots/$BUILD_SYS/arm-poky-linux-gnueabi/bin
+    CROSSPATH=$TMPDIR/sysroots/$BUILD_SYS/arm-poky-linux-gnueabi/bin
 fi
 
 function findimage {
@@ -96,7 +108,7 @@ function findimage {
 if [ "$MACHINE" = "qemuarm" ]; then
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-            T=$BUILDDIR/tmp/deploy/images
+            T=$TMPDIR/deploy/images
             findimage $T qemuarm ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
         fi
     fi
@@ -104,34 +116,34 @@ fi
 
 if [ "$MACHINE" = "qemumips" ]; then
     if [ "x$ZIMAGE" = "x" ]; then
-        ZIMAGE=$BUILDDIR/tmp/deploy/images/vmlinux-$MACHINE.bin
+        ZIMAGE=$TMPDIR/tmp/deploy/images/vmlinux-$MACHINE.bin
     fi
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-            T=$BUILDDIR/tmp/deploy/images
+            T=$TMPDIR/tmp/deploy/images
             findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
         fi
     fi
-    CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr
+    CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
 fi
 
 if [ "$MACHINE" = "qemuppc" ]; then
     if [ "x$ZIMAGE" = "x" ]; then
-        ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin
+        ZIMAGE=$TMPDIR/tmp/deploy/images/zImage-$MACHINE.bin
     fi
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-            T=$BUILDDIR/tmp/deploy/images
+            T=$TMPDIR/tmp/deploy/images
             findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
         fi
     fi
-    CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr
+    CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
 fi
 
 if [ "$MACHINE" = "spitz" ]; then
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-           HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-spitz.ext3
+           HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-spitz.ext3
         fi
     fi
 fi
@@ -139,7 +151,7 @@ fi
 if [ "$MACHINE" = "akita" ]; then
     if [ "$TYPE" = "jffs2" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-           HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-akita.jffs2
+           HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-akita.jffs2
         fi
     fi
 fi
@@ -147,7 +159,7 @@ fi
 if [ "$MACHINE" = "nokia800" ]; then
     if [ "$TYPE" = "jffs2" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-           HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-nokia800.jffs2
+           HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-nokia800.jffs2
         fi
     fi
 fi
@@ -155,15 +167,15 @@ fi
 
 if [ "$MACHINE" = "qemux86" ]; then
     if [ "x$ZIMAGE" = "x" ]; then
-        ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin
+        ZIMAGE=$TMPDIR/tmp/deploy/images/bzImage-$MACHINE.bin
     fi
     if [ "$TYPE" = "ext3" ]; then
         if [ "x$HDIMAGE" = "x" ]; then
-            T=$BUILDDIR/tmp/deploy/images
+            T=$TMPDIR/tmp/deploy/images
             findimage $T qemux86 ext3 "moblin-image-sdk moblin-image-netbook poky-image-sdk poky-image-sato poky-image-minimal"
         fi
     fi
-    CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr
+    CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
 fi
 
 if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then
@@ -182,6 +194,6 @@ if [ ! -e $CROSSPATH/$TARGET_SYS/bin/gcc ]; then
    ln -s $CROSSPATH/bin/$TARGET_SYS-gcc $CROSSPATH/$TARGET_SYS/bin/gcc
 fi
 
-CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr/bin:$CROSSPATH:$BUILDDIR/tmp/cross/bin
+CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr/bin:$CROSSPATH:$TMPDIR/tmp/cross/bin
 
 . $INTERNAL_SCRIPT