summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-05-03 19:12:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-05-06 09:55:46 +0100
commit97482d61cf8f1639911e3bf9987e92f593cfcffe (patch)
treed048288f2d9aa876cd7e046543ae95bde5797f5b /scripts/runqemu
parent0ff3fa7cd9d2c4da8ae505827eaef8e8452ece2e (diff)
downloadpoky-97482d61cf8f1639911e3bf9987e92f593cfcffe.tar.gz
runqemu: Use OE_TMPDIR
The error message erroneously talked about TMPDIR. Just use OE_TMPDIR everywhere to make the name of the variable obvious. (From OE-Core rev: 7b633d0a4cf9aa05e6243974bab2b780c246f8ba) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu27
1 files changed, 11 insertions, 16 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index caabf61fe0..7c2c4b31db 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -55,11 +55,6 @@ SCRIPT_QEMU_OPT=""
55SCRIPT_QEMU_EXTRA_OPT="" 55SCRIPT_QEMU_EXTRA_OPT=""
56SCRIPT_KERNEL_OPT="" 56SCRIPT_KERNEL_OPT=""
57 57
58# Don't use TMPDIR from the external environment, it may be a distro
59# variable pointing to /tmp (e.g. within X on OpenSUSE)
60# Instead, use OE_TMPDIR for passing this in externally.
61TMPDIR="$OE_TMPDIR"
62
63# Determine whether the file is a kernel or QEMU image, and set the 58# Determine whether the file is a kernel or QEMU image, and set the
64# appropriate variables 59# appropriate variables
65process_filename() { 60process_filename() {
@@ -273,8 +268,8 @@ SPITZ_DEFAULT_KERNEL=zImage-spitz.bin
273SPITZ_DEFAULT_FSTYPE=ext3 268SPITZ_DEFAULT_FSTYPE=ext3
274 269
275setup_tmpdir() { 270setup_tmpdir() {
276 if [ -z "$TMPDIR" ]; then 271 if [ -z "$OE_TMPDIR" ]; then
277 # Try to get TMPDIR from bitbake 272 # Try to get OE_TMPDIR from bitbake
278 type -P bitbake &>/dev/null || { 273 type -P bitbake &>/dev/null || {
279 echo "In order for this script to dynamically infer paths"; 274 echo "In order for this script to dynamically infer paths";
280 echo "to kernels or filesystem images, you either need"; 275 echo "to kernels or filesystem images, you either need";
@@ -282,11 +277,11 @@ setup_tmpdir() {
282 echo "before running this script" >&2; 277 echo "before running this script" >&2;
283 exit 1; } 278 exit 1; }
284 279
285 # We have bitbake in PATH, get TMPDIR from bitbake 280 # We have bitbake in PATH, get OE_TMPDIR from bitbake
286 TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2` 281 OE_TMPDIR=`bitbake -e | grep ^TMPDIR=\" | cut -d '=' -f2 | cut -d '"' -f2`
287 if [ -z "$TMPDIR" ]; then 282 if [ -z "$OE_TMPDIR" ]; then
288 echo "Error: this script needs to be run from your build directory," 283 echo "Error: this script needs to be run from your build directory,"
289 echo "or you need to explicitly set TMPDIR in your environment" 284 echo "or you need to explicitly set OE_TMPDIR in your environment"
290 exit 1 285 exit 1
291 fi 286 fi
292 fi 287 fi
@@ -303,7 +298,7 @@ setup_sysroot() {
303 BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` 298 BUILD_OS=`uname | tr '[A-Z]' '[a-z]'`
304 BUILD_SYS="$BUILD_ARCH-$BUILD_OS" 299 BUILD_SYS="$BUILD_ARCH-$BUILD_OS"
305 300
306 OECORE_NATIVE_SYSROOT=$TMPDIR/sysroots/$BUILD_SYS 301 OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS
307 fi 302 fi
308} 303}
309 304
@@ -348,7 +343,7 @@ fi
348if [ -z "$KERNEL" ]; then 343if [ -z "$KERNEL" ]; then
349 setup_tmpdir 344 setup_tmpdir
350 eval kernel_file=\$${machine2}_DEFAULT_KERNEL 345 eval kernel_file=\$${machine2}_DEFAULT_KERNEL
351 KERNEL=$TMPDIR/deploy/images/$kernel_file 346 KERNEL=$OE_TMPDIR/deploy/images/$kernel_file
352 347
353 if [ -z "$KERNEL" ]; then 348 if [ -z "$KERNEL" ]; then
354 echo "Error: Unable to determine default kernel for MACHINE [$MACHINE]" 349 echo "Error: Unable to determine default kernel for MACHINE [$MACHINE]"
@@ -372,13 +367,13 @@ fi
372# core-image-sato 367# core-image-sato
373if [ "$LAZY_ROOTFS" = "true" ]; then 368if [ "$LAZY_ROOTFS" = "true" ]; then
374 setup_tmpdir 369 setup_tmpdir
375 echo "Assuming $ROOTFS really means $TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE" 370 echo "Assuming $ROOTFS really means $OE_TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE"
376 ROOTFS=$TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE 371 ROOTFS=$OE_TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE
377fi 372fi
378 373
379if [ -z "$ROOTFS" ]; then 374if [ -z "$ROOTFS" ]; then
380 setup_tmpdir 375 setup_tmpdir
381 T=$TMPDIR/deploy/images 376 T=$OE_TMPDIR/deploy/images
382 eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS 377 eval rootfs_list=\$${machine2}_DEFAULT_ROOTFS
383 findimage $T $MACHINE $FSTYPE 378 findimage $T $MACHINE $FSTYPE
384 379