]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: remove core-image-* whitelist
authorScott Garman <scott.a.garman@intel.com>
Thu, 5 Dec 2013 21:57:31 +0000 (13:57 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Dec 2013 18:01:39 +0000 (18:01 +0000)
Using a whitelist for image names to default to when none are
specified on the command line is no longer desired. Instead,
choose the most recently created image filename that conforms
to typical image naming conventions.

Fixes [YOCTO #5617].

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
scripts/runqemu

index 619ffb6bedf39c46b8c50e5b66f4dd228e2f8574..9c0a03b4e2d4c1219df33ff60a404581fc3b6ce5 100755 (executable)
@@ -399,18 +399,11 @@ findimage() {
 
     # Sort rootfs candidates by modification time - the most
     # recently created one is the one we most likely want to boot.
-    filenames=`ls -t $where/*-image*$machine.$extension 2>/dev/null | xargs`
-    for name in $filenames; do
-        case $name in
-        *core-image-sato* | \
-        *core-image-lsb* | \
-        *core-image-basic* | \
-        *core-image-minimal* )
-            ROOTFS=$name
-            return
-            ;;
-        esac
-    done
+    filename=`ls -t1 $where/*-image*$machine.$extension 2>/dev/null | head -n1`
+    if [ "x$filename" != "x" ]; then
+        ROOTFS=$filename
+        return
+    fi
 
     echo "Couldn't find a $machine rootfs image in $where."
     exit 1