summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/conf/bblayers.conf.sample4
-rw-r--r--build/conf/local.conf.sample20
-rw-r--r--build/conf/site.conf.sample4
-rw-r--r--handbook/extendpoky.xml12
-rw-r--r--meta/classes/imagetest-qemu.bbclass1
-rw-r--r--meta/classes/sanity.bbclass6
-rw-r--r--meta/conf/layer.conf5
-rw-r--r--meta/packages/qemu/qemu-helper-nativesdk_1.0.bb12
-rwxr-xr-xpoky-init-build-env4
-rwxr-xr-xscripts/poky-env-internal49
-rwxr-xr-xscripts/pstage-scanner19
-rwxr-xr-xscripts/qemuimage-tests/sanity/boot3
-rwxr-xr-xscripts/qemuimage-tests/sanity/ssh2
-rwxr-xr-xscripts/runqemu50
14 files changed, 106 insertions, 85 deletions
diff --git a/build/conf/bblayers.conf.sample b/build/conf/bblayers.conf.sample
index dff44e49c4..04b7768ffa 100644
--- a/build/conf/bblayers.conf.sample
+++ b/build/conf/bblayers.conf.sample
@@ -4,6 +4,6 @@ LCONF_VERSION = "1"
4 4
5BBFILES ?= "" 5BBFILES ?= ""
6BBLAYERS = " \ 6BBLAYERS = " \
7 ${OEROOT}/meta \ 7 ##POKYBASE##/meta \
8 ${OEROOT}/meta-moblin \ 8 ##POKYBASE##/meta-moblin \
9 " 9 "
diff --git a/build/conf/local.conf.sample b/build/conf/local.conf.sample
index 32bd409ecc..78c3bd144e 100644
--- a/build/conf/local.conf.sample
+++ b/build/conf/local.conf.sample
@@ -42,24 +42,6 @@ DISTRO ?= "poky"
42# For bleeding edge / experimental / unstable package versions 42# For bleeding edge / experimental / unstable package versions
43# DISTRO ?= "poky-bleeding" 43# DISTRO ?= "poky-bleeding"
44 44
45# Poky has various extra metadata collections (openmoko, extras).
46# To enable these, uncomment all (or some of) the following lines:
47# BBFILES = "\
48# ${OEROOT}/meta/packages/*/*.bb \
49# ${OEROOT}/meta-extras/packages/*/*.bb \
50# ${OEROOT}/meta-openmoko/packages/*/*.bb \
51# ${OEROOT}/meta-moblin/packages/*/*.bb \
52# "
53# BBFILE_COLLECTIONS = "normal extras openmoko moblin"
54# BBFILE_PATTERN_normal = "^${OEROOT}/meta/"
55# BBFILE_PATTERN_extras = "^${OEROOT}/meta-extras/"
56# BBFILE_PATTERN_openmoko = "^${OEROOT}/meta-openmoko/"
57# BBFILE_PATTERN_moblin = "^${OEROOT}/meta-moblin/"
58# BBFILE_PRIORITY_normal = "5"
59# BBFILE_PRIORITY_extras = "5"
60# BBFILE_PRIORITY_openmoko = "5"
61# BBFILE_PRIORITY_moblin = "5"
62
63BBMASK = "" 45BBMASK = ""
64 46
65# EXTRA_IMAGE_FEATURES allows extra packages to be added to the generated images 47# EXTRA_IMAGE_FEATURES allows extra packages to be added to the generated images
@@ -109,7 +91,7 @@ PACKAGE_CLASSES ?= "package_ipk"
109# Note that a full build of everything in OpenEmbedded will take GigaBytes of hard 91# Note that a full build of everything in OpenEmbedded will take GigaBytes of hard
110# disk space, so make sure to free enough space. The default TMPDIR is 92# disk space, so make sure to free enough space. The default TMPDIR is
111# <build directory>/tmp 93# <build directory>/tmp
112TMPDIR = "${OEROOT}/build/tmp" 94#TMPDIR = "${POKYBASE}/build/tmp"
113 95
114 96
115# Uncomment this if you are using the Openedhand provided qemu deb - see README 97# Uncomment this if you are using the Openedhand provided qemu deb - see README
diff --git a/build/conf/site.conf.sample b/build/conf/site.conf.sample
index 060dca087c..42042042f7 100644
--- a/build/conf/site.conf.sample
+++ b/build/conf/site.conf.sample
@@ -20,7 +20,7 @@ SCONF_VERSION = "1"
20# although this only works for http 20# although this only works for http
21#GIT_PROXY_HOST = "proxy.example.com" 21#GIT_PROXY_HOST = "proxy.example.com"
22#GIT_PROXY_PORT = "81" 22#GIT_PROXY_PORT = "81"
23#export GIT_PROXY_COMMAND = "${OEROOT}/scripts/poky-git-proxy-command" 23#export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-command"
24 24
25# GIT_PROXY_IGNORE_* lines define hosts which do not require a proxy to access 25# GIT_PROXY_IGNORE_* lines define hosts which do not require a proxy to access
26#GIT_CORE_CONFIG = "Yes" 26#GIT_CORE_CONFIG = "Yes"
@@ -32,7 +32,7 @@ SCONF_VERSION = "1"
32# and then share that binary somewhere in PATH, then use the following settings 32# and then share that binary somewhere in PATH, then use the following settings
33#GIT_PROXY_HOST = "proxy.example.com" 33#GIT_PROXY_HOST = "proxy.example.com"
34#GIT_PROXY_PORT = "81" 34#GIT_PROXY_PORT = "81"
35#export GIT_PROXY_COMMAND = "${OEROOT}/scripts/poky-git-proxy-socks-command" 35#export GIT_PROXY_COMMAND = "${POKYBASE}/scripts/poky-git-proxy-socks-command"
36 36
37 37
38# Uncomment this to use a shared download directory 38# Uncomment this to use a shared download directory
diff --git a/handbook/extendpoky.xml b/handbook/extendpoky.xml
index d03284d0e3..18edb1ac95 100644
--- a/handbook/extendpoky.xml
+++ b/handbook/extendpoky.xml
@@ -535,7 +535,7 @@ bitbake poky-image-sato
535 supported and non-invasive fashion. 535 supported and non-invasive fashion.
536 </para> 536 </para>
537 537
538 <para> 538 <para>
539 The Poky tree includes two additional layers which demonstrate 539 The Poky tree includes two additional layers which demonstrate
540 this functionality, meta-moblin and meta-extras. 540 this functionality, meta-moblin and meta-extras.
541 The meta-extras repostory is not enabled by default but enabling 541 The meta-extras repostory is not enabled by default but enabling
@@ -547,12 +547,12 @@ bitbake poky-image-sato
547 547
548BBFILES ?= "" 548BBFILES ?= ""
549BBLAYERS = " \ 549BBLAYERS = " \
550 ${OEROOT}/meta \ 550 /path/to/poky/meta \
551 ${OEROOT}/meta-moblin \ 551 /path/to/poky/meta-moblin \
552 ${OEROOT}/meta-extras \ 552 /path/to/poky/meta-extras \
553 " 553 "
554</literallayout> 554</literallayout>
555 </para> 555 </para>
556 556
557 <para> 557 <para>
558 Bitbake parses the conf/layer.conf of each of the layers in BBLAYERS 558 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
609 git repository of the format meta-prvt-XXXX and have this repository 609 git repository of the format meta-prvt-XXXX and have this repository
610 cloned alongside the other meta directories in the Poky tree. 610 cloned alongside the other meta directories in the Poky tree.
611 This way you can keep your Poky tree and it's configuration entirely 611 This way you can keep your Poky tree and it's configuration entirely
612 inside OEROOT. 612 inside POKYBASE.
613 </para> 613 </para>
614 </section> 614 </section>
615 615
diff --git a/meta/classes/imagetest-qemu.bbclass b/meta/classes/imagetest-qemu.bbclass
index 742b759208..feab868476 100644
--- a/meta/classes/imagetest-qemu.bbclass
+++ b/meta/classes/imagetest-qemu.bbclass
@@ -47,6 +47,7 @@ python do_qemuimagetest() {
47 os.environ["QEMUARCH"] = machine 47 os.environ["QEMUARCH"] = machine
48 os.environ["QEMUTARGET"] = pname 48 os.environ["QEMUTARGET"] = pname
49 os.environ["DISPLAY"] = bb.data.getVar("DISPLAY", d, True) 49 os.environ["DISPLAY"] = bb.data.getVar("DISPLAY", d, True)
50 os.environ["POKYBASE"] = bb.data.getVar("POKYBASE", d, True)
50 51
51 """run Test Case""" 52 """run Test Case"""
52 bb.note("Run %s test in scenario %s" % (case, scen)) 53 bb.note("Run %s test in scenario %s" % (case, scen))
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 94e96f8524..31b8dd2b07 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -194,11 +194,11 @@ def check_sanity(e):
194 f.write(current_abi) 194 f.write(current_abi)
195 f.close() 195 f.close()
196 196
197 oeroot = data.getVar('OEROOT', e.data) 197 oeroot = data.getVar('POKYBASE', e.data)
198 if oeroot.find ('+') != -1: 198 if oeroot.find ('+') != -1:
199 messages = messages + "Error, you have an invalid character (+) in your OEROOT directory path. Please more Poky to a directory which doesn't include a +." 199 messages = messages + "Error, you have an invalid character (+) in your POKYBASE directory path. Please more Poky to a directory which doesn't include a +."
200 elif oeroot.find (' ') != -1: 200 elif oeroot.find (' ') != -1:
201 messages = messages + "Error, you have a space in your OEROOT directory path. Please move Poky to a directory which doesn't include a space." 201 messages = messages + "Error, you have a space in your POKYBASE directory path. Please move Poky to a directory which doesn't include a space."
202 202
203 if messages != "": 203 if messages != "":
204 raise_sanity_error(messages) 204 raise_sanity_error(messages)
diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index d0d74884ec..30068d6aec 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -12,9 +12,12 @@ BBFILE_PRIORITY_normal = "5"
12# Add scripts to PATH 12# Add scripts to PATH
13PATH := "${PATH}:${LAYERDIR}/scripts" 13PATH := "${PATH}:${LAYERDIR}/scripts"
14 14
15# Set a variable to get to the top of the metadata location
16POKYBASE := ${@os.path.normpath("${LAYERDIR}/../")}
17
15# Set path to qemu image tests included in this layer 18# Set path to qemu image tests included in this layer
16 19
17QEMUIMAGETESTS := "${OEROOT}/scripts/qemuimage-tests" 20QEMUIMAGETESTS := "${POKYBASE}/scripts/qemuimage-tests"
18 21
19require conf/distro/include/poky-default-revisions.inc 22require conf/distro/include/poky-default-revisions.inc
20 23
diff --git a/meta/packages/qemu/qemu-helper-nativesdk_1.0.bb b/meta/packages/qemu/qemu-helper-nativesdk_1.0.bb
index 5d8e45f123..a4294ef5cf 100644
--- a/meta/packages/qemu/qemu-helper-nativesdk_1.0.bb
+++ b/meta/packages/qemu/qemu-helper-nativesdk_1.0.bb
@@ -5,11 +5,11 @@ PR = "r7"
5 5
6FILESPATH = "${FILE_DIRNAME}/qemu-helper" 6FILESPATH = "${FILE_DIRNAME}/qemu-helper"
7 7
8SRC_URI = "file://${OEROOT}/scripts/poky-qemu \ 8SRC_URI = "file://${POKYBASE}/scripts/poky-qemu \
9 file://${OEROOT}/scripts/poky-qemu-internal \ 9 file://${POKYBASE}/scripts/poky-qemu-internal \
10 file://${OEROOT}/scripts/poky-addptable2image \ 10 file://${POKYBASE}/scripts/poky-addptable2image \
11 file://${OEROOT}/scripts/poky-qemu-ifup \ 11 file://${POKYBASE}/scripts/poky-qemu-ifup \
12 file://${OEROOT}/scripts/poky-qemu-ifdown \ 12 file://${POKYBASE}/scripts/poky-qemu-ifdown \
13 file://raw2flash.c" 13 file://raw2flash.c"
14 14
15S = "${WORKDIR}" 15S = "${WORKDIR}"
@@ -23,7 +23,7 @@ do_compile() {
23 23
24do_install() { 24do_install() {
25 install -d ${D}${bindir} 25 install -d ${D}${bindir}
26 install -m 0755 ${WORKDIR}${OEROOT}/scripts/poky-* ${D}${bindir}/ 26 install -m 0755 ${WORKDIR}${POKYBASE}/scripts/poky-* ${D}${bindir}/
27 install raw2flash.spitz ${D}${bindir}/ 27 install raw2flash.spitz ${D}${bindir}/
28 install flash2raw.spitz ${D}${bindir}/ 28 install flash2raw.spitz ${D}${bindir}/
29 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita 29 ln -fs raw2flash.spitz ${D}${bindir}/raw2flash.akita
diff --git a/poky-init-build-env b/poky-init-build-env
index 94bf3f0f7f..0f5e684a52 100755
--- a/poky-init-build-env
+++ b/poky-init-build-env
@@ -21,7 +21,9 @@
21 21
22if test x"$0" = x"./poky-init-build-env"; then 22if test x"$0" = x"./poky-init-build-env"; then
23 echo "Error: Run via '. ./poky-init-build-env'" 23 echo "Error: Run via '. ./poky-init-build-env'"
24elif test x"$BASH_SOURCE" = x; then
25 echo "Error: you are not running a Bash shell, please use Bash or add support for your shell to the init scripts"
24else 26else
25 . ./scripts/poky-env-internal 27 . `dirname $BASH_SOURCE`/scripts/poky-env-internal
26fi 28fi
27 29
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal
index 54b6ee8964..862ce7aec2 100755
--- a/scripts/poky-env-internal
+++ b/scripts/poky-env-internal
@@ -19,19 +19,30 @@
19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 20
21 21
22# Change this to the location of this file. 22# scripts/ is a sub-directory of OEROOT, we use readlink to get the full path
23# Also update the locations at the top of conf/local.conf 23SCRIPTPATH=`readlink -f "$BASH_SOURCE"`
24OEROOT="`dirname $SCRIPTPATH`/../"
24 25
25OEROOT=`pwd`
26if [ "x$BDIR" = "x" ]; then 26if [ "x$BDIR" = "x" ]; then
27 if [ "x$1" = "x" ]; then 27 if [ "x$1" = "x" ]; then
28 BDIR="build" 28 BDIR="build"
29 else 29 else
30 BDIR="$1" 30 BDIR=`readlink -f "$1"`
31 fi 31 fi
32fi
33if [[ "$BDIR" = /* ]] ; then
34 BUILDDIR="$BDIR"
35else
36 BUILDDIR="`pwd`/$BDIR"
32fi 37fi
33BUILDDIR="$OEROOT/$BDIR/"
34unset BDIR 38unset BDIR
39
40mkdir -p $BUILDDIR/conf
41if ! (test -w "$BUILDDIR"); then
42 echo >&2 "Error: Cannot write to $BUILDDIR, perhaps try sourcing with a writable path? i.e. . poky-init-build-env ~/my-build"
43 return
44fi
45
35BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" 46BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/"
36PKGDIR="$OEROOT/meta/" 47PKGDIR="$OEROOT/meta/"
37BBPATH="$BITBAKEDIR $PKGDIR" 48BBPATH="$BITBAKEDIR $PKGDIR"
@@ -51,9 +62,8 @@ do
51 continue 62 continue
52 fi 63 fi
53 if [ -e $OEROOT/$repo/poky-extra-environment ]; then 64 if [ -e $OEROOT/$repo/poky-extra-environment ]; then
54 . $OEROOT/$repo/poky-extra-environment 65 . $OEROOT/$repo/poky-extra-environment
55 fi 66 fi
56 BBPATH=" $BBPATH $OEROOT/$repo"
57done 67done
58 68
59BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR" 69BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR"
@@ -78,12 +88,13 @@ BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
78 88
79PATH="$BITBAKEDIR/bin/:$OEROOT/scripts:$PATH" 89PATH="$BITBAKEDIR/bin/:$OEROOT/scripts:$PATH"
80 90
81cd "$BUILDDIR"
82
83# Remove any symlinks from paths 91# Remove any symlinks from paths
84BITBAKEDIR=`readlink -f "$BITBAKEDIR"` 92BITBAKEDIR=`readlink -f "$BITBAKEDIR"`
85PKGDIR=`readlink -f "$PKGDIR"` 93PKGDIR=`readlink -f "$PKGDIR"`
86BUILDDIR=`readlink -f "$BUILDDIR"` 94BUILDDIR=`readlink -f "$BUILDDIR"`
95OEROOT=`readlink -f "$OEROOT"`
96
97cd "$BUILDDIR"
87 98
88if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then 99if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then
89 echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" 100 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
91fi 102fi
92 103
93if [ "x" = "x$POKYLOCALCONF" ]; then 104if [ "x" = "x$POKYLOCALCONF" ]; then
94 POKYLOCALCONF="$BUILDDIR/conf/local.conf.sample" 105 POKYLOCALCONF="$OEROOT/build/conf/local.conf.sample"
95fi 106fi
96if ! (test -r "$BUILDDIR/conf/local.conf"); then 107if ! (test -r "$BUILDDIR/conf/local.conf"); then
97 echo "You had no conf/local.conf file. Poky has created this configuration file for you" 108 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
105fi 116fi
106 117
107if [ "x" = "x$POKYLAYERCONF" ]; then 118if [ "x" = "x$POKYLAYERCONF" ]; then
108 POKYLAYERCONF="$BUILDDIR/conf/bblayers.conf.sample" 119 POKYLAYERCONF="$OEROOT/build/conf/bblayers.conf.sample"
109fi 120fi
110if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then 121if ! (test -r "$BUILDDIR/conf/bblayers.conf"); then
111 cp -f $POKYLAYERCONF $BUILDDIR/conf/bblayers.conf 122 # Put the abosolute path to the layers in bblayers.conf so we can run
123 # bitbake without the init script after the first run
124 sed "s|##POKYBASE##|$OEROOT|g" $POKYLAYERCONF > $BUILDDIR/conf/bblayers.conf
112fi 125fi
113 126
114# Prevent disturbing a new GIT clone in same console 127# Prevent disturbing a new GIT clone in same console
115unset POKYLOCALCONF 128unset POKYLOCALCONF
116unset POKYLAYERCONF 129unset POKYLAYERCONF
117 130
118export BBPATH OEROOT BUILD_SYS BUILDDIR 131export BBPATH BUILD_SYS BUILDDIR
119 132
120# Kill off the TERMINFO variable, as glibc will grab its contents in its 'make 133# Kill off the TERMINFO variable, as glibc will grab its contents in its 'make
121# install' if set 134# install' if set
@@ -141,4 +154,4 @@ echo "Common targets are poky-image-minimal, poky-image-sato, meta-toolchain or
141echo 154echo
142echo "You can also run generated qemu images with a command like 'runqemu qemux86'" 155echo "You can also run generated qemu images with a command like 'runqemu qemux86'"
143 156
144export 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" 157export BB_ENV_EXTRAWHITE="MACHINE DISTRO POKYMODE POKYLIBC http_proxy ftp_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS"
diff --git a/scripts/pstage-scanner b/scripts/pstage-scanner
index 9234912581..4a27aa5d26 100755
--- a/scripts/pstage-scanner
+++ b/scripts/pstage-scanner
@@ -1,7 +1,7 @@
1#!/usr/bin/env python 1#!/usr/bin/env python
2 2
3## 3##
4## This script will scan all of the packages in ${OEROOT}/pstage (or argv[1]) 4## This script will scan all of the packages in PSTAGE_DIR (or argv[1])
5## in search of packages which install files outside of their native sysroot 5## in search of packages which install files outside of their native sysroot
6## 6##
7 7
@@ -16,15 +16,24 @@ def main():
16 """Generate a list of pstage packages and scan them for badness""" 16 """Generate a list of pstage packages and scan them for badness"""
17 package_list = [] 17 package_list = []
18 18
19 ## First we walk the pstage directory, let's assume we're running from
20 ## a sibling of pstage (i.e. scripts) if no path defined
21 try: 19 try:
22 path = sysv.arg[1] 20 path = sysv.arg[1]
23 except: 21 except:
24 path = os.path.join(os.environ.get("OEROOT"), "pstage") 22 # Assume pstage is a child of tmp, Poky's default
23 tmpdir = None
24 sub.Popen(["bitbake", "-e"], stdout=sub.PIPE,stderr=sub.PIPE)
25 err, out = p.communicate()
26 if (!out):
27 print("bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
28 exit
29 for line in out:
30 if line.find("PSTAGE_DIR=") != -1:
31 tmpdir = line.partition("=")[2].strip("\"")
32 break
25 33
26 if len(path) < 1 or not os.path.exists(path): 34 if len(path) < 1 or not os.path.exists(path):
27 path = os.path.join(os.environ.get("OEROOT"), "pstage") 35 print ("No path defined and bitbake not in your environment, try pstage-scanner /some/path/to/pstage")
36 exit
28 37
29 global logf 38 global logf
30 try: 39 try:
diff --git a/scripts/qemuimage-tests/sanity/boot b/scripts/qemuimage-tests/sanity/boot
index b4c0094f25..57b204b170 100755
--- a/scripts/qemuimage-tests/sanity/boot
+++ b/scripts/qemuimage-tests/sanity/boot
@@ -9,8 +9,7 @@
9# This file is licensed under the GNU General Public License, 9# This file is licensed under the GNU General Public License,
10# Version 2. 10# Version 2.
11# 11#
12 12. $POKYBASE/scripts/qemuimage-testlib
13. $OEROOT/scripts/qemuimage-testlib
14 13
15TIMEOUT=120 14TIMEOUT=120
16QEMU_IPADDR="192.168.7.2" 15QEMU_IPADDR="192.168.7.2"
diff --git a/scripts/qemuimage-tests/sanity/ssh b/scripts/qemuimage-tests/sanity/ssh
index 7dd895951c..3c7638cc2e 100755
--- a/scripts/qemuimage-tests/sanity/ssh
+++ b/scripts/qemuimage-tests/sanity/ssh
@@ -9,7 +9,7 @@
9# Version 2. 9# Version 2.
10# 10#
11 11
12. $OEROOT/scripts/qemuimage-testlib 12. $POKYBASE/scripts/qemuimage-testlib
13 13
14TIMEOUT=360 14TIMEOUT=360
15QEMU_IPADDR="192.168.7.2" 15QEMU_IPADDR="192.168.7.2"
diff --git a/scripts/runqemu b/scripts/runqemu
index c7c51ec77a..bb26f8b633 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -19,11 +19,23 @@
19 19
20 20
21if [ "x$BUILDDIR" = "x" ]; then 21if [ "x$BUILDDIR" = "x" ]; then
22 echo "You need to source poky-init-build-env before running this script" 22 # BUILDDIR unset, try and get TMPDIR from bitbake
23 exit 1 23 type -P bitbake &>/dev/null || {
24 echo "You either need bitbake in your PATH or to source poky-init-build-env before running this script" >&2; exit 1; }
25
26 # we have bitbake in PATH, get TMPDIR from the environment
27 TMPDIR=`bitbake -e | grep TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
28else
29 TMPDIR=$BUILDDIR/tmp
30fi
31
32if ! (test -d "$TMPDIR"); then
33 echo >&2 "Error: no $TMPDIR directory, please re-run the script from the Poky build directory."
34 return
24fi 35fi
25 36
26INTERNAL_SCRIPT=`which poky-qemu-internal` 37SCRIPTSDIR=`dirname "$0"`
38INTERNAL_SCRIPT=SCRIPTSDIR/poky-qemu-internal`
27 39
28if [ "x$1" = "x" ]; then 40if [ "x$1" = "x" ]; then
29 echo 41 echo
@@ -67,9 +79,9 @@ fi
67 79
68if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then 80if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then
69 if [ "x$ZIMAGE" = "x" ]; then 81 if [ "x$ZIMAGE" = "x" ]; then
70 ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin 82 ZIMAGE=$TMPDIR/deploy/images/zImage-$MACHINE.bin
71 fi 83 fi
72 CROSSPATH=$BUILDDIR/sysroots/$BUILD_SYS/arm-poky-linux-gnueabi/bin 84 CROSSPATH=$TMPDIR/sysroots/$BUILD_SYS/arm-poky-linux-gnueabi/bin
73fi 85fi
74 86
75function findimage { 87function findimage {
@@ -96,7 +108,7 @@ function findimage {
96if [ "$MACHINE" = "qemuarm" ]; then 108if [ "$MACHINE" = "qemuarm" ]; then
97 if [ "$TYPE" = "ext3" ]; then 109 if [ "$TYPE" = "ext3" ]; then
98 if [ "x$HDIMAGE" = "x" ]; then 110 if [ "x$HDIMAGE" = "x" ]; then
99 T=$BUILDDIR/tmp/deploy/images 111 T=$TMPDIR/deploy/images
100 findimage $T qemuarm ext3 "poky-image-sdk poky-image-sato poky-image-minimal" 112 findimage $T qemuarm ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
101 fi 113 fi
102 fi 114 fi
@@ -104,34 +116,34 @@ fi
104 116
105if [ "$MACHINE" = "qemumips" ]; then 117if [ "$MACHINE" = "qemumips" ]; then
106 if [ "x$ZIMAGE" = "x" ]; then 118 if [ "x$ZIMAGE" = "x" ]; then
107 ZIMAGE=$BUILDDIR/tmp/deploy/images/vmlinux-$MACHINE.bin 119 ZIMAGE=$TMPDIR/tmp/deploy/images/vmlinux-$MACHINE.bin
108 fi 120 fi
109 if [ "$TYPE" = "ext3" ]; then 121 if [ "$TYPE" = "ext3" ]; then
110 if [ "x$HDIMAGE" = "x" ]; then 122 if [ "x$HDIMAGE" = "x" ]; then
111 T=$BUILDDIR/tmp/deploy/images 123 T=$TMPDIR/tmp/deploy/images
112 findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal" 124 findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
113 fi 125 fi
114 fi 126 fi
115 CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr 127 CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
116fi 128fi
117 129
118if [ "$MACHINE" = "qemuppc" ]; then 130if [ "$MACHINE" = "qemuppc" ]; then
119 if [ "x$ZIMAGE" = "x" ]; then 131 if [ "x$ZIMAGE" = "x" ]; then
120 ZIMAGE=$BUILDDIR/tmp/deploy/images/zImage-$MACHINE.bin 132 ZIMAGE=$TMPDIR/tmp/deploy/images/zImage-$MACHINE.bin
121 fi 133 fi
122 if [ "$TYPE" = "ext3" ]; then 134 if [ "$TYPE" = "ext3" ]; then
123 if [ "x$HDIMAGE" = "x" ]; then 135 if [ "x$HDIMAGE" = "x" ]; then
124 T=$BUILDDIR/tmp/deploy/images 136 T=$TMPDIR/tmp/deploy/images
125 findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal" 137 findimage $T $MACHINE ext3 "poky-image-sdk poky-image-sato poky-image-minimal"
126 fi 138 fi
127 fi 139 fi
128 CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr 140 CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
129fi 141fi
130 142
131if [ "$MACHINE" = "spitz" ]; then 143if [ "$MACHINE" = "spitz" ]; then
132 if [ "$TYPE" = "ext3" ]; then 144 if [ "$TYPE" = "ext3" ]; then
133 if [ "x$HDIMAGE" = "x" ]; then 145 if [ "x$HDIMAGE" = "x" ]; then
134 HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-spitz.ext3 146 HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-spitz.ext3
135 fi 147 fi
136 fi 148 fi
137fi 149fi
@@ -139,7 +151,7 @@ fi
139if [ "$MACHINE" = "akita" ]; then 151if [ "$MACHINE" = "akita" ]; then
140 if [ "$TYPE" = "jffs2" ]; then 152 if [ "$TYPE" = "jffs2" ]; then
141 if [ "x$HDIMAGE" = "x" ]; then 153 if [ "x$HDIMAGE" = "x" ]; then
142 HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-akita.jffs2 154 HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-akita.jffs2
143 fi 155 fi
144 fi 156 fi
145fi 157fi
@@ -147,7 +159,7 @@ fi
147if [ "$MACHINE" = "nokia800" ]; then 159if [ "$MACHINE" = "nokia800" ]; then
148 if [ "$TYPE" = "jffs2" ]; then 160 if [ "$TYPE" = "jffs2" ]; then
149 if [ "x$HDIMAGE" = "x" ]; then 161 if [ "x$HDIMAGE" = "x" ]; then
150 HDIMAGE=$BUILDDIR/tmp/deploy/images/poky-image-sato-nokia800.jffs2 162 HDIMAGE=$TMPDIR/tmp/deploy/images/poky-image-sato-nokia800.jffs2
151 fi 163 fi
152 fi 164 fi
153fi 165fi
@@ -155,15 +167,15 @@ fi
155 167
156if [ "$MACHINE" = "qemux86" ]; then 168if [ "$MACHINE" = "qemux86" ]; then
157 if [ "x$ZIMAGE" = "x" ]; then 169 if [ "x$ZIMAGE" = "x" ]; then
158 ZIMAGE=$BUILDDIR/tmp/deploy/images/bzImage-$MACHINE.bin 170 ZIMAGE=$TMPDIR/tmp/deploy/images/bzImage-$MACHINE.bin
159 fi 171 fi
160 if [ "$TYPE" = "ext3" ]; then 172 if [ "$TYPE" = "ext3" ]; then
161 if [ "x$HDIMAGE" = "x" ]; then 173 if [ "x$HDIMAGE" = "x" ]; then
162 T=$BUILDDIR/tmp/deploy/images 174 T=$TMPDIR/tmp/deploy/images
163 findimage $T qemux86 ext3 "moblin-image-sdk moblin-image-netbook poky-image-sdk poky-image-sato poky-image-minimal" 175 findimage $T qemux86 ext3 "moblin-image-sdk moblin-image-netbook poky-image-sdk poky-image-sato poky-image-minimal"
164 fi 176 fi
165 fi 177 fi
166 CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr 178 CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr
167fi 179fi
168 180
169if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "spitz" -o "$MACHINE" = "borzoi" -o "$MACHINE" = "akita" -o "$MACHINE" = "nokia800" ]; then 181if [ "$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
182 ln -s $CROSSPATH/bin/$TARGET_SYS-gcc $CROSSPATH/$TARGET_SYS/bin/gcc 194 ln -s $CROSSPATH/bin/$TARGET_SYS-gcc $CROSSPATH/$TARGET_SYS/bin/gcc
183fi 195fi
184 196
185CROSSPATH=$BUILDDIR/tmp/sysroots/$BUILD_SYS/usr/bin:$CROSSPATH:$BUILDDIR/tmp/cross/bin 197CROSSPATH=$TMPDIR/tmp/sysroots/$BUILD_SYS/usr/bin:$CROSSPATH:$TMPDIR/tmp/cross/bin
186 198
187. $INTERNAL_SCRIPT 199. $INTERNAL_SCRIPT