summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorScott Garman <scott.a.garman@intel.com>2010-10-08 10:14:14 -0700
committerScott Garman <scott.a.garman@intel.com>2010-10-08 14:47:54 -0700
commit7cd824a5388f7284a1252e9f61af2c88d26ca163 (patch)
tree16ef9a9c583f6c24ce338991e7cff449942af7fb /scripts
parente72e7b2fdc1a628122e7a9ee1e3f2ba4eaf32ba2 (diff)
downloadpoky-7cd824a5388f7284a1252e9f61af2c88d26ca163.tar.gz
poky-qemu: fix handling of some rootfs types
This allows the user to specify a rootfs type (e.g, poky-image-sato) without typing out the full filename and path (assuming we can infer a valid MACHINE and FSTYPE). This fixes [BUGID #415] Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/poky-qemu10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index ad4bdbf91c..4ce9e31a6b 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -44,6 +44,7 @@ MACHINE=${MACHINE:=""}
44KERNEL="" 44KERNEL=""
45FSTYPE="" 45FSTYPE=""
46ROOTFS="" 46ROOTFS=""
47LAZY_ROOTFS=""
47SCRIPT_QEMU_OPT="" 48SCRIPT_QEMU_OPT=""
48SCRIPT_KERNEL_OPT="" 49SCRIPT_KERNEL_OPT=""
49 50
@@ -74,6 +75,7 @@ while [ $i -le $# ]; do
74 *-image-*) 75 *-image-*)
75 if [ -z "$ROOTFS" ]; then 76 if [ -z "$ROOTFS" ]; then
76 ROOTFS=$arg 77 ROOTFS=$arg
78 LAZY_ROOTFS="true"
77 else 79 else
78 echo "Error: conflicting ROOTFS args [$ROOTFS] and [$arg]" 80 echo "Error: conflicting ROOTFS args [$ROOTFS] and [$arg]"
79 usage 81 usage
@@ -260,6 +262,14 @@ if [ -z "$FSTYPE" ]; then
260fi 262fi
261# FSTYPE is now set for all cases 263# FSTYPE is now set for all cases
262 264
265# Handle cases where a ROOTFS type is given instead of a filename, e.g.
266# poky-image-sato
267if [ "$LAZY_ROOTFS" = "true" ]; then
268 setup_tmpdir
269 echo "Assuming $ROOTFS really means $TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE"
270 ROOTFS=$TMPDIR/deploy/images/$ROOTFS-$MACHINE.$FSTYPE
271fi
272
263if [ -z "$ROOTFS" ]; then 273if [ -z "$ROOTFS" ]; then
264 setup_tmpdir 274 setup_tmpdir
265 T=$TMPDIR/deploy/images 275 T=$TMPDIR/deploy/images