[oe-commits] Nitin A Kamble : scripts/runqemu: enable btrfs

git version control git at git.openembedded.org
Thu Jun 30 19:59:05 UTC 2011


Module: openembedded-core.git
Branch: master
Commit: 45689bbd46b0bb8e66b7c0ff7cc3321e5eef5b5f
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=45689bbd46b0bb8e66b7c0ff7cc3321e5eef5b5f

Author: Nitin A Kamble <nitin.a.kamble at intel.com>
Date:   Thu Jun 16 17:58:39 2011 -0700

scripts/runqemu: enable btrfs

Signed-off-by: Nitin A Kamble <nitin.a.kamble at intel.com>

---

 scripts/runqemu          |    6 +++---
 scripts/runqemu-internal |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index aa44070..5aed25a 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -71,7 +71,7 @@ process_filename() {
             usage
         fi
     elif [[ "x$EXT" == "xext2" || "x$EXT" == "xext3" ||
-            "x$EXT" == "xjffs2" ]]; then
+            "x$EXT" == "xjffs2" || "x$EXT" == "xbtrfs" ]]; then
         # A file ending in a supportted fs type is a rootfs image
         if [[ -z "$FSTYPE" || "$FSTYPE" == "$EXT" ]]; then
             FSTYPE=$EXT
@@ -101,7 +101,7 @@ while [ $i -le $# ]; do
                 usage
             fi
             ;;
-        "ext2" | "ext3" | "jffs2" | "nfs")
+        "ext2" | "ext3" | "jffs2" | "nfs" | "btrfs")
             if [[ -z "$FSTYPE" || "$FSTYPE" == "$arg" ]]; then
                 FSTYPE=$arg
             else
@@ -317,7 +317,7 @@ 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
+          "x$EXT" == "xjffs2" || "x$EXT" == "xbtrfs" ]]; then
         FSTYPE=$EXT
     else
         echo "Note: Unable to determine filesystem extension for $ROOTFS"
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index ffac05e..c15632d 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -277,7 +277,7 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
     MACHINE_SUBTYPE=versatilepb
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
     # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         KERNCMDLINE="root=/dev/sda rw console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M versatilepb -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
     fi
@@ -301,7 +301,7 @@ fi
 if [ "$MACHINE" = "qemux86" ]; then
     QEMU=qemu
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware -enable-gl"
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS"
     fi
@@ -322,7 +322,7 @@ fi
 if [ "$MACHINE" = "qemux86-64" ]; then
     QEMU=qemu-system-x86_64
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware -enable-gl"
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         KERNCMDLINE="vga=0 root=/dev/hda rw mem=$QEMU_MEMORY $KERNEL_NETWORK_CMD"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -hda $ROOTFS $QEMU_UI_OPTIONS"
     fi
@@ -345,7 +345,7 @@ fi
 
 if [ "$MACHINE" = "spitz" ]; then
     QEMU=qemu-system-arm
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         echo $ROOTFS
         ROOTFS=`readlink -f $ROOTFS`
         echo $ROOTFS
@@ -361,7 +361,7 @@ if [ "$MACHINE" = "qemumips" ]; then
     QEMU=qemu-system-mips
     MACHINE_SUBTYPE=malta
     QEMU_UI_OPTIONS="-vga cirrus $QEMU_UI_OPTIONS"
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         #KERNCMDLINE="root=/dev/hda console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -M $MACHINE_SUBTYPE -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
@@ -383,7 +383,7 @@ if [ "$MACHINE" = "qemuppc" ]; then
     CPU_SUBTYPE=603e
     BIOS=powerpc_rom.bin
     QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -nographic"
-    if [ "$FSTYPE" = "ext3" ]; then
+    if [ "$FSTYPE" = "ext3" -o "$FSTYPE" = "btrfs" ]; then
         KERNCMDLINE="root=/dev/hda rw console=ttyS0 console=tty0 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
         QEMUOPTIONS="$QEMU_NETWORK_CMD -cpu $CPU_SUBTYPE -M $MACHINE_SUBTYPE -bios $BIOS -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
     fi





More information about the Openembedded-commits mailing list