Patchwork [btrfs,6/6] scripts/runqemu: enable btrfs

login
register
mail settings
Submitter Nitin A Kamble
Date June 21, 2011, 8:27 p.m.
Message ID <b907a0a93b1d7e92429efb08eb0f27c7eaa3c2d8.1308687821.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/6201/
State New, archived
Headers show

Comments

Nitin A Kamble - June 21, 2011, 8:27 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 scripts/runqemu          |    6 +++---
 scripts/runqemu-internal |   12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

Patch

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