From: Elvis Dowson <elvis.dowson@gmail.com>
To: openembedded-devel@lists.openembedded.org
Cc: bruce.ashfield@windriver.com, Elvis Dowson <elvis.dowson@gmail.com>
Subject: [oe-core 5/5] qemu: runqemu: Add support for launching qemuarmv7 and qemuarma9 machine configurations.
Date: Thu, 29 Aug 2013 22:35:58 +0400 [thread overview]
Message-ID: <1377801358-3942-5-git-send-email-elvis.dowson@gmail.com> (raw)
In-Reply-To: <1377801358-3942-1-git-send-email-elvis.dowson@gmail.com>
This commit
- adds support for launching qemuarmv7 and qemuarmv9 machine configurations.
Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com>
---
scripts/runqemu | 14 ++++++++---
scripts/runqemu-internal | 58 ++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 65 insertions(+), 7 deletions(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index 04dc3b0..3282893 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -39,6 +39,8 @@ usage() {
echo ""
echo "Examples:"
echo " $MYNAME qemuarm"
+ echo " $MYNAME qemuarmv7"
+ echo " $MYNAME qemuarma9"
echo " $MYNAME qemux86-64 core-image-sato ext3"
echo " $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/ serial"
echo " $MYNAME qemux86 ramfs"
@@ -107,7 +109,7 @@ KVM_ENABLED="no"
while true; do
arg=${1}
case "$arg" in
- "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" | "qemumipsel" | \
+ "qemux86" | "qemux86-64" | "qemuarm" | "qemuarmv7" | "qemuarma9" |"qemumips" | "qemumipsel" | \
"qemumips64" | "qemush4" | "qemuppc" | "qemumicroblaze" | "qemuzynq")
[ -z "$MACHINE" ] && MACHINE=$arg || \
error "conflicting MACHINE types [$MACHINE] and [$arg]"
@@ -224,13 +226,13 @@ fi
if [ -z "$MACHINE" ]; then
if [ "x$FSTYPE" = "xvmdk" ]; then
- MACHINE=`basename $VM | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
+ MACHINE=`basename $VM | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemuarmv7\|qemuarma9\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
if [ -z "$MACHINE" ]; then
error "Unable to set MACHINE from vmdk filename [$VM]"
fi
echo "Set MACHINE to [$MACHINE] based on vmdk [$VM]"
else
- MACHINE=`basename $KERNEL | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
+ MACHINE=`basename $KERNEL | sed 's/.*\(qemux86-64\|qemux86\|qemuarm\|qemuarmv7\|qemuarma9\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
if [ -z "$MACHINE" ]; then
error "Unable to set MACHINE from kernel filename [$KERNEL]"
fi
@@ -294,6 +296,12 @@ QEMUX86_64_DEFAULT_FSTYPE=ext3
QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
QEMUARM_DEFAULT_FSTYPE=ext3
+QEMUARMV7_DEFAULT_KERNEL=zImage-qemuarmv7.bin
+QEMUARMV7_DEFAULT_FSTYPE=ext3
+
+QEMUARMA9_DEFAULT_KERNEL=uImage
+QEMUARMA9_DEFAULT_FSTYPE=cpio
+
QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
QEMUMIPS_DEFAULT_FSTYPE=ext3
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal
index 8a6e551..3f35054 100755
--- a/scripts/runqemu-internal
+++ b/scripts/runqemu-internal
@@ -50,6 +50,12 @@ else
"qemuarm")
mem_size=128
;;
+ "qemuarmv7")
+ mem_size=1024
+ ;;
+ "qemuarma9")
+ mem_size=1024
+ ;;
"qemumicroblaze")
mem_size=64
;;
@@ -267,6 +273,8 @@ fi
case "$MACHINE" in
"qemuarm") ;;
+ "qemuarmv7") ;;
+ "qemuarma9") ;;
"qemumicroblaze") ;;
"qemumips") ;;
"qemumipsel") ;;
@@ -325,7 +333,7 @@ if [ "$NFS_SERVER" = "" ]; then
NFS_DIR=$ROOTFS
fi
-if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarmv7" ]; then
+if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" ]; then
QEMU=qemu-system-arm
MACHINE_SUBTYPE=versatilepb
export QEMU_AUDIO_DRV="none"
@@ -347,8 +355,50 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" = "qemuarmv6" -o "$MACHINE" = "qemuarm
if [ "$MACHINE" = "qemuarmv6" ]; then
QEMUOPTIONS="$QEMUOPTIONS -cpu arm1136"
fi
- if [ "$MACHINE" = "qemuarmv7" ]; then
- QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a8"
+fi
+
+if [ "$MACHINE" = "qemuarmv7" ]; then
+ QEMU=qemu-system-arm
+ MACHINE_SUBTYPE=beagle
+ export QEMU_AUDIO_DRV="none"
+ QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS"
+ # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
+ if [ "${FSTYPE:0:3}" = "ext" -o "$FSTYPE" = "btrfs" ]; then
+ KERNCMDLINE="root=/dev/sda rw console=ttyO2,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY highres=off"
+ QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -cpu cortex-a8 -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
+ fi
+
+ if [ "$FSTYPE" = "nfs" ]; then
+ if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
+ echo "Error: NFS mount point $ROOTFS doesn't exist"
+ cleanup
+ return 1
+ fi
+ KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+ QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} --no-reboot $QEMU_UI_OPTIONS"
+ fi
+fi
+
+if [ "$MACHINE" = "qemuarma9" ]; then
+ QEMU=qemu-system-arm
+ MACHINE_SUBTYPE=vexpress-a9
+ export QEMU_AUDIO_DRV="none"
+ QEMU_UI_OPTIONS="-show-cursor -usb"
+ # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
+ if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then
+ KERNCMDLINE="earlyprintk root=/dev/ram0 rw console=ttyAMA0,38400n8 rootwait vmalloc=256MB devtmpfs.mount=0 console=tty mem=$QEMU_MEMORY highres=off"
+ QEMUOPTIONS="-M ${MACHINE_SUBTYPE} -cpu cortex-a9 -m 1024 -initrd $ROOTFS"
+ #QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} -hda $ROOTFS -no-reboot $QEMU_UI_OPTIONS"
+ fi
+
+ if [ "$FSTYPE" = "nfs" ]; then
+ if [ "$NFS_SERVER" = "192.168.7.1" -a ! -d "$NFS_DIR" ]; then
+ echo "Error: NFS mount point $ROOTFS doesn't exist"
+ cleanup
+ return 1
+ fi
+ KERNCMDLINE="root=/dev/nfs nfsroot=$NFS_SERVER:$NFS_DIR,$UNFS_OPTS rw $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY"
+ QEMUOPTIONS="$QEMU_NETWORK_CMD -M ${MACHINE_SUBTYPE} --no-reboot $QEMU_UI_OPTIONS"
fi
fi
@@ -522,7 +572,7 @@ fi
if [ "x$RAMFS" = "xtrue" ]; then
QEMUOPTIONS="-initrd $ROOTFS -nographic"
- KERNCMDLINE="root=/dev/ram0 debugshell"
+ KERNCMDLINE="earlyprintk root=/dev/ram debugshell"
fi
if [ "x$ISOFS" = "xtrue" ]; then
--
1.7.10.4
prev parent reply other threads:[~2013-08-29 18:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-29 18:35 [oe-core 1/5] qemu: Add cpio to the list of image filesystem types Elvis Dowson
2013-08-29 18:35 ` [oe-core 2/5] qemu: Add support for qemuarma9 Elvis Dowson
2013-08-29 18:35 ` [oe-core 3/5] qemu: Add support for qemuarmv7 Elvis Dowson
2013-08-29 18:35 ` [oe-core 4/5] linux-yocto: Add support for qemuarmv7 and qemuarma9 Elvis Dowson
[not found] ` <521F963F.3070801@windriver.com>
2013-08-29 18:48 ` Elvis Dowson
2013-08-29 18:35 ` Elvis Dowson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1377801358-3942-5-git-send-email-elvis.dowson@gmail.com \
--to=elvis.dowson@gmail.com \
--cc=bruce.ashfield@windriver.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.