<div dir="ltr">Ping.<div><br></div><div>Regards,</div><div>Jagadeesh<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 10:18 AM, Jagadeesh Krishnanjanappa <span dir="ltr">&lt;<a href="mailto:jkrishnanjanappa@mvista.com" target="_blank">jkrishnanjanappa@mvista.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The other changes include,<br>
runqemu - fix MACHINE type being detected as qemuarm when qemuarm64 kernel<br>
          image name is given.<br>
<br>
runqemu-internal - Added console=ttyAMA0,115200 as one of the boot parameters<br>
                   for qemuarm, in order to print bootlog messages on the<br>
                   console.<br>
<br>
                 - Use &quot;-nographic&quot; option only if &quot;serial&quot; option is not<br>
                   specified. Otherwise we get below error when<br>
                   &#39;runqemu &lt;kernel_image&gt; &lt;rootfs_image&gt; serial&#39; is executed,<br>
<br>
(snip)<br>
QEMU 2.2.0 monitor - type &#39;help&#39; for more information<br>
(qemu) qemu-system-aarch64: -serial stdio: cannot use stdio by multiple character devices<br>
-- CUT --<br>
<br>
qemuarm64 NFS booting has been tested successfully on Ubuntu 14.04 host.<br>
<br>
Signed-off-by: Jagadeesh Krishnanjanappa &lt;<a href="mailto:jkrishnanjanappa@mvista.com">jkrishnanjanappa@mvista.com</a>&gt;<br>
---<br>
 scripts/runqemu          |  4 ++--<br>
 scripts/runqemu-internal | 20 +++++++++++++++-----<br>
 2 files changed, 17 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/scripts/runqemu b/scripts/runqemu<br>
index 84ece4d..09c507d 100755<br>
--- a/scripts/runqemu<br>
+++ b/scripts/runqemu<br>
@@ -232,13 +232,13 @@ fi<br>
<br>
 if [ -z &quot;$MACHINE&quot; ]; then<br>
     if [ &quot;x$FSTYPE&quot; = &quot;xvmdk&quot; ]; then<br>
-        MACHINE=`basename $VM | sed -n &#39;s/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p&#39;`<br>
+        MACHINE=`basename $VM | sed -n &#39;s/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p&#39;`<br>
         if [ -z &quot;$MACHINE&quot; ]; then<br>
             error &quot;Unable to set MACHINE from vmdk filename [$VM]&quot;<br>
         fi<br>
         echo &quot;Set MACHINE to [$MACHINE] based on vmdk [$VM]&quot;<br>
     else<br>
-        MACHINE=`basename $KERNEL | sed -n &#39;s/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p&#39;`<br>
+        MACHINE=`basename $KERNEL | sed -n &#39;s/.*\(qemux86-64\|qemux86\|qemuarm64\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/p&#39;`<br>
         if [ -z &quot;$MACHINE&quot; ]; then<br>
             error &quot;Unable to set MACHINE from kernel filename [$KERNEL]&quot;<br>
         fi<br>
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal<br>
index 2db5566..e346c64 100755<br>
--- a/scripts/runqemu-internal<br>
+++ b/scripts/runqemu-internal<br>
@@ -275,9 +275,6 @@ else<br>
<br>
         KERNCMDLINE=&quot;mem=$QEMU_MEMORY&quot;<br>
         QEMU_UI_OPTIONS=&quot;-show-cursor -usb -usbdevice wacom-tablet&quot;<br>
-        if [ $MACHINE = &#39;qemuarm64&#39; ]; then<br>
-            QEMU_UI_OPTIONS=&quot;-nographic&quot;<br>
-        fi<br>
<br>
         NFS_INSTANCE=`echo $TAP | sed &#39;s/tap//&#39;`<br>
         export NFS_INSTANCE<br>
@@ -368,7 +365,7 @@ if [ &quot;$MACHINE&quot; = &quot;qemuarm&quot; -o &quot;$MACHINE&quot; = &quot;qemuarmv6&quot; -o &quot;$MACHINE&quot; = &quot;qemuarm<br>
             cleanup<br>
             return 1<br>
         fi<br>
-        KERNCMDLINE=&quot;root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY&quot;<br>
+        KERNCMDLINE=&quot;root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw console=ttyAMA0,115200 $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY&quot;<br>
         QEMUOPTIONS=&quot;$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} --no-reboot $QEMU_UI_OPTIONS&quot;<br>
     fi<br>
     if [ &quot;$MACHINE&quot; = &quot;qemuarmv6&quot; ]; then<br>
@@ -383,12 +380,25 @@ if [ &quot;$MACHINE&quot; = &quot;qemuarm64&quot; ]; then<br>
     QEMU=qemu-system-aarch64<br>
<br>
     export QEMU_AUDIO_DRV=&quot;none&quot;<br>
-    QEMU_UI_OPTIONS=&quot;$QEMU_UI_OPTIONS&quot;<br>
+    if [ &quot;x$SERIALSTDIO&quot; = &quot;x&quot; ] ; then<br>
+        QEMU_UI_OPTIONS=&quot;-nographic&quot;<br>
+    else<br>
+        QEMU_UI_OPTIONS=&quot;&quot;<br>
+    fi<br>
     if [ &quot;${FSTYPE:0:3}&quot; = &quot;ext&quot; -o &quot;$FSTYPE&quot; = &quot;btrfs&quot; ]; then<br>
         KERNCMDLINE=&quot;root=/dev/vda rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD&quot;<br>
         # qemu-system-aarch64 only support &#39;-machine virt -cpu cortex-a57&#39; for now<br>
         QEMUOPTIONS=&quot;$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $ROOTFS_OPTIONS $QEMU_UI_OPTIONS&quot;<br>
     fi<br>
+    if [ &quot;$FSTYPE&quot; = &quot;nfs&quot; ]; then<br>
+        if [ &quot;$NFS_SERVER&quot; = &quot;192.168.7.1&quot; -a ! -d &quot;$NFS_DIR&quot; ]; then<br>
+            echo &quot;Error: NFS mount point $ROOTFS doesn&#39;t exist&quot;<br>
+            cleanup<br>
+            return 1<br>
+        fi<br>
+        KERNCMDLINE=&quot;root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw console=ttyAMA0,38400 mem=$QEMU_MEMORY highres=off $KERNEL_NETWORK_CMD&quot;<br>
+        QEMUOPTIONS=&quot;$QEMU_NETWORK_CMD -machine virt -cpu cortex-a57 $QEMU_UI_OPTIONS&quot;<br>
+    fi<br>
 fi<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
1.8.2.3<br>
<br>
</font></span></blockquote></div><br></div></div></div>