summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu47
1 files changed, 25 insertions, 22 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 18fd691873..dfa7f4bc2d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -62,28 +62,31 @@ process_filename() {
62 62
63 # Extract the filename extension 63 # Extract the filename extension
64 EXT=`echo $filename | awk -F . '{ print \$NF }'` 64 EXT=`echo $filename | awk -F . '{ print \$NF }'`
65 # A file ending in .bin is a kernel 65 case /$EXT/ in
66 if [ "x$EXT" = "xbin" ]; then 66 /bin/)
67 if [ -z "$KERNEL" ]; then 67 # A file ending in .bin is a kernel
68 KERNEL=$filename 68 if [ -z "$KERNEL" ]; then
69 else 69 KERNEL=$filename
70 echo "Error: conflicting KERNEL args [$KERNEL] and [$filename]" 70 else
71 usage 71 echo "Error: conflicting KERNEL args [$KERNEL] and [$filename]"
72 fi 72 usage
73 elif [ "x$EXT" = "xext2" -o "x$EXT" = "xext3" -o \ 73 fi
74 "x$EXT" = "xjffs2" -o "x$EXT" = "xbtrfs" ]; then 74 ;;
75 # A file ending in a supportted fs type is a rootfs image 75 /ext[234]/|/jffs2/|/btrfs/)
76 if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then 76 # A file ending in a supportted fs type is a rootfs image
77 FSTYPE=$EXT 77 if [ -z "$FSTYPE" -o "$FSTYPE" = "$EXT" ]; then
78 ROOTFS=$filename 78 FSTYPE=$EXT
79 else 79 ROOTFS=$filename
80 echo "Error: conflicting FSTYPE types [$FSTYPE] and [$EXT]" 80 else
81 usage 81 echo "Error: conflicting FSTYPE types [$FSTYPE] and [$EXT]"
82 fi 82 usage
83 else 83 fi
84 echo "Error: unknown file arg [$filename]" 84 ;;
85 usage 85 *)
86 fi 86 echo "Error: unknown file arg [$filename]"
87 usage
88 ;;
89 esac
87} 90}
88 91
89# Parse command line args without requiring specific ordering. It's a 92# Parse command line args without requiring specific ordering. It's a