Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Bruce Ashfield <bruce.ashfield@windriver.com>
To: Elvis Dowson <elvis.dowson@gmail.com>
Cc: OpenEmbedded Core Mailing List
	<openembedded-core@lists.openembedded.org>
Subject: Re: QEMU with ARM Cortex A9 with hard float configuration - Kernel panic
Date: Tue, 27 Aug 2013 16:03:46 -0400	[thread overview]
Message-ID: <521D0622.6090802@windriver.com> (raw)
In-Reply-To: <2D33FB6A-9F7F-4E8E-8B1A-CED1D571A82C@gmail.com>

On 13-08-26 03:35 PM, Elvis Dowson wrote:
> Hi Bruce,
>
> On Aug 26, 2013, at 11:08 PM, Bruce Ashfield
> <bruce.ashfield@windriver.com <mailto:bruce.ashfield@windriver.com>> wrote:
>
>> Are you interested in something from scratch, versus something that
>> isn't already partially in the tree (like qemuarma9) ?
>>
>> We've got a few docs and tutorials, but I can also help step you through
>> the process to assist the existing material.
>
> I'd like to adapt the existing linux-yocto standard/base branch, and
> build up on existing qemuarma9 support. I've included detailed patch
> fragments below, so that you can replicate the current state of my work
> at your end.

Not ignoring this, I've just been tied up with 3.10 kernel work. I'll
get back to this shortly.

Cheers,

Bruce

>
> I've performed the following steps till date, but unfortunately get a
> qemu ram / rom out of memory address error after doing all this. Must be
> because of an incorrectly mapped KMACHINE. The vexpress device doesn't
> support PCI, IDE or SCSI, only microsd card or ram devices, so the boot
> method should use an initrd file, for the root filesystem, as described
> here.
>
> https://wiki.linaro.org/PeterMaydell/QemuVersatileExpress
>
> *_Step 01.00: Clone linux-yocto-3.8 locally, create local meta branch,
> create local standard/qemuarma9 branch, tracking the master branch._*
>
> Make the following modification to the qemuarma9-standard.scc file.
>
>  From 8e9b465f242941b70d7b61045c073e82700fcd91 Mon Sep 17 00:00:00 2001
> From: Elvis Dowson <elvis.dowson@gmail.com <mailto:elvis.dowson@gmail.com>>
> Date: Mon, 26 Aug 2013 22:18:24 +0400
> Subject: [PATCH] qemuarma9: Update branch to qemuarma9.
>
> Signed-off-by: Elvis Dowson <elvis.dowson@gmail.com
> <mailto:elvis.dowson@gmail.com>>
> ---
>   meta/cfg/kernel-cache/bsp/qemuarma9/qemuarma9-standard.scc |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/cfg/kernel-cache/bsp/qemuarma9/qemuarma9-standard.scc
> b/meta/cfg/kernel-cache/bsp/qemuarma9/qemuarma9-standard.scc
> index c71fe1c..729125d 100644
> --- a/meta/cfg/kernel-cache/bsp/qemuarma9/qemuarma9-standard.scc
> +++ b/meta/cfg/kernel-cache/bsp/qemuarma9/qemuarma9-standard.scc
> @@ -3,7 +3,7 @@ define KTYPE standard
>   define KARCH arm
>
>   include ktypes/standard/standard.scc
> -branch arm-versatile-926ejs
> +branch qemuarma9
>
>   include qemuarma9.scc
>
> --
> 1.7.10.4
>
>
> *_Step 02.00: Create a new qemuarma9.conf machine definition._*
>
> There is a dts file in arch/arm/boot/dts called vexpress-v2p-ca9.dts.
>
> Q01: I guess the KMACHINE_qemuarma9 should be set to "vex press" ?
> instead of qemuarma9 below?
>
> #@TYPE: Machine
> #@NAME: qemuarma9
> #@DESCRIPTION: Machine configuration for QEMU ARM Cortex A9.
>
> # Specify the default tune.
> DEFAULTTUNE = "armv7a-neon"
>
> require conf/machine/include/qemu.inc
> require conf/machine/include/tune-cortexa9.inc
>
> # Specify the preferred kernel recipe version.
> PREFERRED_VERSION_linux-yocto ?= "3.8%"
>
> # Specify the machine name used by the kernel.
> KMACHINE_qemuarma9 = "qemuarma9" # Error?!!
>
> # Specify the kernel image type.
> KERNEL_IMAGETYPE = "uImage"
>
> MACHINE_DEVICETREE := "qemuarma9.dts"
>
> # Specify the serial console parameters.
> SERIAL_CONSOLE = "115200 ttyAMA0"
>
>
> *_Step 03.00: Patch the oe-core sources._*
>
> *Step 03.01: *Patch scripts/runqemu
>
> @@ -37,10 +37,11 @@ usage() {
>       echo "  qemuparams=\"xyz\" - specify custom parameters to QEMU"
>       echo "  bootparams=\"xyz\" - specify custom kernel parameters
> during boot"
>       echo ""
>       echo "Examples:"
>       echo "  $MYNAME qemuarm"
> +    echo "  $MYNAME qemuarma9 ramfs"
>       echo "  $MYNAME qemux86-64 core-image-sato ext3"
>       echo "  $MYNAME path/to/bzImage-qemux86.bin path/to/nfsrootdir/
> serial"
>       echo "  $MYNAME qemux86 ramfs"
>       echo "  $MYNAME qemux86 iso"
>       echo "  $MYNAME qemux86 qemuparams=\"-m 256\""
> @@ -105,11 +106,11 @@ process_filename() {
>   # bit more complex, but offers a great user experience.
>   KVM_ENABLED="no"
>   while true; do
>       arg=${1}
>       case "$arg" in
> -        "qemux86" | "qemux86-64" | "qemuarm" | "qemumips" |
> "qemumipsel" | \
> +        "qemux86" | "qemux86-64" | "qemuarm" | "qemuarma9" |"qemumips"
> | "qemumipsel" | \
>           "qemumips64" | "qemush4"  | "qemuppc" | "qemumicroblaze" |
> "qemuzynq")
>               [ -z "$MACHINE" ] && MACHINE=$arg || \
>                   error "conflicting MACHINE types [$MACHINE] and [$arg]"
>               ;;
>           "ext2" | "ext3" | "ext4" | "jffs2" | "nfs" | "btrfs")
> @@ -222,17 +223,17 @@ if [ "$FSTYPE" = "nfs" -a -z "$ROOTFS" ]; then
>       error "NFS booting without an explicit ROOTFS path is not yet
> supported"
>   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\|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\|qemuarma9\|qemumips64\|qemumips\|qemuppc\|qemush4\).*/\1/'`
>           if [ -z "$MACHINE" ]; then
>               error "Unable to set MACHINE from kernel filename [$KERNEL]"
>           fi
>           echo "Set MACHINE to [$MACHINE] based on kernel [$KERNEL]"
>       fi
> @@ -292,10 +293,13 @@ QEMUX86_64_DEFAULT_KERNEL=bzImage-qemux86-64.bin
>   QEMUX86_64_DEFAULT_FSTYPE=ext3
>   QEMUARM_DEFAULT_KERNEL=zImage-qemuarm.bin
>   QEMUARM_DEFAULT_FSTYPE=ext3
> +QEMUARMA9_DEFAULT_KERNEL=uImage
> +QEMUARMA9_DEFAULT_FSTYPE=cpio.gz
> +
>   QEMUMIPS_DEFAULT_KERNEL=vmlinux-qemumips.bin
>   QEMUMIPS_DEFAULT_FSTYPE=ext3
>   QEMUMIPSEL_DEFAULT_KERNEL=vmlinux-qemumipsel.bin
>   QEMUMIPSEL_DEFAULT_FSTYPE=ext3
>
>
> *Step 03.02: *Patch runqemu-internal.
>
> @@ -48,10 +48,13 @@ else
>               mem_size=128
>               ;;
>           "qemuarm")
>               mem_size=128
>               ;;
> +        "qemuarma9")
> +            mem_size=128
> +            ;;
>           "qemumicroblaze")
>               mem_size=64
>               ;;
>           "qemumips"|"qemumips64")
>               mem_size=128
> @@ -265,10 +268,11 @@ else
>           fi
>   fi
>   case "$MACHINE" in
>       "qemuarm") ;;
> +    "qemuarma9") ;;
>       "qemumicroblaze") ;;
>       "qemumips") ;;
>       "qemumipsel") ;;
>       "qemumips64") ;;
>       "qemush4") ;;
> @@ -348,10 +352,39 @@ if [ "$MACHINE" = "qemuarm" -o "$MACHINE" =
> "qemuarmv6" -o "$MACHINE" = "qemuarm
>           QEMUOPTIONS="$QEMUOPTIONS -cpu arm1136"
>       fi
>       if [ "$MACHINE" = "qemuarmv7" ]; then
>           QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a8"
>       fi
> +    if [ "$MACHINE" = "qemuarma9" ]; then
> +        MACHINE_SUBTYPE=vexpress-a9
> +        QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a9"
> +    fi
> +fi
> +
> +if [ "$MACHINE" = "qemuarma9" ]; then
> +    QEMU=qemu-system-arm
> +    MACHINE_SUBTYPE=vexpress-a9
> +    QEMUOPTIONS="$QEMUOPTIONS -cpu cortex-a9"
> +    export QEMU_AUDIO_DRV="none"
> +    QEMU_UI_OPTIONS="-show-cursor -usb"
> +    # QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -force-pointer"
> +    #QEMU_SYSTEM_OPTIONS="-M $MACHINE_SUBTYPE -serial null -serial
> mon:stdio -dtb $KERNEL-$MACHINE.dtb"
> +    if [ "${FSTYPE:0:3}" = "ext" -o "${FSTYPE:0:4}" = "cpio" ]; then
> +        KERNCMDLINE="earlyprintk root=/dev/mmcblk0p2 rw
> console=ttyAMA0,115200 console=tty $KERNEL_NETWORK_CMD mem=$QEMU_MEMORY
> highres=off -dtb $KERNEL-$MACHINE.dtb"
> +        QEMUOPTIONS="-M ${MACHINE_SUBTYPE} -initrd $ROOTFS -no-reboot
> $QEMU_UI_OPTIONS"
> +        #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
>   if [ "$MACHINE" = "qemux86" ]; then
>       QEMU=qemu-system-i386
>       QEMU_UI_OPTIONS="$QEMU_UI_OPTIONS -vga vmware"
> @@ -520,11 +553,11 @@ if [ "$MACHINE" = "qemuzynq" ]; then
>       fi
>   fi
>   if [ "x$RAMFS" = "xtrue" ]; then
>       QEMUOPTIONS="-initrd $ROOTFS -nographic"
> -    KERNCMDLINE="root=/dev/ram0 debugshell"
> +    KERNCMDLINE="earlyprintk root=/dev/mmcblk0p2 debugshell"
>   fi
>   if [ "x$ISOFS" = "xtrue" ]; then
>       QEMUOPTIONS="$QEMU_NETWORK_CMD -cdrom $ROOTFS $QEMU_UI_OPTIONS"
>   fi
>
> Best regards,
>
> Elvis Dowson
>
>



  reply	other threads:[~2013-08-27 20:03 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-25 17:43 QEMU with ARM Cortex A9 with hard float configuration - Kernel panic rewitt
2013-08-25 18:02 ` Elvis Dowson
2013-08-25 18:31   ` Elvis Dowson
2013-08-25 19:09     ` Elvis Dowson
2013-08-26  1:03       ` Bruce Ashfield
2013-08-26  3:58         ` Elvis Dowson
2013-08-26  4:24           ` Bruce Ashfield
2013-08-26 15:49             ` Elvis Dowson
2013-08-26 19:08               ` Bruce Ashfield
2013-08-26 19:35                 ` Elvis Dowson
2013-08-27 20:03                   ` Bruce Ashfield [this message]
2013-08-28 15:16                     ` Elvis Dowson
2013-08-28 22:43                       ` Bruce Ashfield
2013-08-29  4:36                         ` Elvis Dowson
2013-08-29  5:48                           ` Khem Raj
2013-08-29  8:50                             ` Elvis Dowson
2013-08-29 16:17                               ` Khem Raj
2013-08-29 16:18                                 ` Bruce Ashfield
2013-08-29 16:22                                 ` Elvis Dowson
2013-08-29 12:35                           ` Bruce Ashfield
2013-08-29 14:02                             ` Elvis Dowson
2013-08-29 16:23                               ` Bruce Ashfield
2013-08-29 16:28                                 ` Elvis Dowson
2013-08-26  1:11   ` Bruce Ashfield
  -- strict thread matches above, loose matches on Subject: below --
2013-08-29 19:32 rewitt
2013-08-29 19:40 ` Bruce Ashfield
2013-08-30 10:17 ` Elvis Dowson
2013-08-29 18:53 rewitt
2013-08-29 18:58 ` Bruce Ashfield
2013-08-29 19:01 ` Elvis Dowson
2013-08-29 19:16   ` Bruce Ashfield
2013-08-29 19:25     ` Elvis Dowson
2013-08-29 19:30       ` Bruce Ashfield
2013-08-25 14:37 Elvis Dowson
2013-08-25 14:44 ` Martin Jansa
2013-08-25 15:09   ` Elvis Dowson

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=521D0622.6090802@windriver.com \
    --to=bruce.ashfield@windriver.com \
    --cc=elvis.dowson@gmail.com \
    --cc=openembedded-core@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox