]> code.ossystems Code Review - openembedded-core.git/commitdiff
poky-qemu: miscellaneous bugfixes
authorScott Garman <scott.a.garman@intel.com>
Thu, 14 Oct 2010 18:29:44 +0000 (11:29 -0700)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 14 Oct 2010 19:12:04 +0000 (20:12 +0100)
In scenarios where the POKY_NATIVE_SYSROOT env variable hasn't been
set up, bug #427 can still be triggered. This fixes it by running
setup_tmpdir(). This fixes [BUGID #427].

Also, the qemu tap dev lock directory needs to be chmod 777 so that
multiple users can create and delete lock files.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
scripts/poky-qemu
scripts/poky-qemu-internal

index 66a6631df57f579e79e1fa2476052422d1806d4d..9e604b5a100774d229ff66ee462dfaee801ca3ae 100755 (executable)
@@ -165,19 +165,6 @@ fi
 machine2=`echo $MACHINE | tr 'a-z' 'A-Z' | sed 's/-/_/'`
 # MACHINE is now set for all cases
 
-if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then
-    # Extract the filename extension
-    EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'`
-    if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || 
-          "x$EXT" == "xjffs2" ]]; then
-        FSTYPE=$EXT
-    else
-        echo "Note: Unable to determine filesystem extension for $ROOTFS"
-        echo "We will use the default FSTYPE for $MACHINE"
-        # ...which is done further below...
-    fi
-fi
-
 # Defaults used when these vars need to be inferred
 QEMUX86_DEFAULT_KERNEL=bzImage-qemux86.bin
 QEMUX86_DEFAULT_FSTYPE=ext3
@@ -258,6 +245,21 @@ findimage() {
     exit 1
 }
 
+if [[ -e "$ROOTFS" && -z "$FSTYPE" ]]; then
+    setup_tmpdir
+
+    # Extract the filename extension
+    EXT=`echo $ROOTFS | awk -F . '{ print \$NF }'`
+    if [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" || 
+          "x$EXT" == "xjffs2" ]]; then
+        FSTYPE=$EXT
+    else
+        echo "Note: Unable to determine filesystem extension for $ROOTFS"
+        echo "We will use the default FSTYPE for $MACHINE"
+        # ...which is done further below...
+    fi
+fi
+
 if [ -z "$KERNEL" ]; then
     setup_tmpdir
     eval kernel_file=\$${machine2}_DEFAULT_KERNEL
index 2f8af95707bd0f4c92ce9f33b540873ea8e63380..66db0333ee61e83c9f9860eb3496ad82146af324 100755 (executable)
@@ -108,7 +108,10 @@ release_lock() {
 }
 
 LOCKDIR="/tmp/qemu-tap-locks"
-[ ! -d "$LOCKDIR" ] && mkdir $LOCKDIR
+if [ ! -d "$LOCKDIR" ]; then
+    mkdir $LOCKDIR
+    chmod 777 $LOCKDIR
+fi
 
 IFCONFIG=`which ifconfig`
 if [ -z "$IFCONFIG" ]; then