diff --git a/scripts/poky-qemu b/scripts/poky-qemu
index bc312e0..dcaf6a3 100755
--- a/scripts/poky-qemu
+++ b/scripts/poky-qemu
@@ -27,13 +27,13 @@ usage() {
     echo "  ROOTFS - the rootfs image file or nfsroot directory to use"
     echo "  MACHINE=xyz - the machine name (optional, autodetected from KERNEL filename if unspecified)"
     echo "  Additional QEMU command-line options can be passed with:"
-    echo "    nographic - disables video console"
-    echo "    serial - enables a serial console on /dev/ttyS0"
+    echo "    \"<extra-qemu-options>\" - enables extra qemu options"
     echo ""
     echo "Examples:"
     echo "  $0 qemuarm"
     echo "  $0 qemux86-64 poky-image-sato ext3"
     echo "  $0 path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
+    echo "  $0 qemux86 \"<-nographic -m 256 -serial stdio>\""
     exit 1
 }
 
@@ -46,7 +46,7 @@ KERNEL=""
 FSTYPE=""
 ROOTFS=""
 LAZY_ROOTFS=""
-SCRIPT_QEMU_OPT=""
+SCRIPT_QEMU_EXTRA_OPT=""
 SCRIPT_KERNEL_OPT=""
 
 TMPDIR=""
@@ -117,12 +117,13 @@ while [ $i -le $# ]; do
                 usage
             fi
             ;;
-        "nographic")
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -nographic"
-            ;;
-        "serial")
-            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial stdio"
-            SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+        \<*\>)
+            SCRIPT_QEMU_EXTRA_OPT=$arg
+            serial_option=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-serial[[:space:]] *stdio\)'`
+#if -serial stdio option is added, we need to add an extra option in $SCRIPT_KERNEL_OPT
+            if [ ! -z "$serial_option" ]; then
+              SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
+            fi
             ;;
         *)
             # A directory name is an nfs rootfs
diff --git a/scripts/poky-qemu-internal b/scripts/poky-qemu-internal
index 62c1040..ea39786 100755
--- a/scripts/poky-qemu-internal
+++ b/scripts/poky-qemu-internal
@@ -29,6 +29,23 @@
 #   ROOTFS - the disk image file to use
 #
 
+mem_size=-1
+
+#Get rid of <> and get the contents of extra qemu running params
+SCRIPT_QEMU_EXTRA_OPT=`echo $SCRIPT_QEMU_EXTRA_OPT | sed -e 's/<//' -e 's/>//'`
+#if user set qemu memory, eg: -m 256 in qemu extra params, we need to do some 
+# validation check
+mem_set=`expr "$SCRIPT_QEMU_EXTRA_OPT" : '.*\(-m[[:space:]] *[0-9]*\)'`
+if [ ! -z "$mem_set" ] ; then
+#Get memory setting size from user input
+  mem_size=`echo $mem_set | sed 's/-m[[:space:]] *//'`
+  echo "$SCRIPT_QEMU_EXTRA_OPT"
+fi
+
+if [ $mem_size -gt 0 ]; then
+  QEMU_MEMORY="$mem_size"M
+fi
+
 if [ -z "$QEMU_MEMORY" ]; then
     case "$MACHINE" in
         "qemux86")
@@ -60,6 +77,7 @@ if [ "$MACHINE" = "qemuarm" ]; then
         echo "WARNING: qemuarm does not support > 128M of RAM."
         echo "*** Changing QEMU_MEMORY to default of 128M ***"
         QEMU_MEMORY="128M"
+        SCRIPT_QEMU_EXTRA_OPT=`echo $SCRIPT_QEMU_EXTRA_OPT | sed -e "s/$mem_set/-m 128/" `
     fi
 fi
 
@@ -441,8 +459,8 @@ fi
 
 echo "Running $QEMU..."
 # -no-reboot is a mandatory option - see bug #100
-echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_CMDLINE_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
-$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || /bin/true
+echo $QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_EXTRA_OPT --append '"'$KERNCMDLINE $SCRIPT_KERNEL_OPT'"'
+$QEMUBIN -kernel $KERNEL $QEMUOPTIONS $SERIALOPTS -no-reboot $SCRIPT_QEMU_EXTRA_OPT --append "$KERNCMDLINE $SCRIPT_KERNEL_OPT" || /bin/true
 
 cleanup
 
