qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] Emulating A10


From: Peter Maydell
Subject: Re: [Qemu-discuss] Emulating A10
Date: Wed, 25 Nov 2015 13:16:34 +0000

On 23 November 2015 at 21:20, Jerry Stuckle <address@hidden> wrote:
> Peter,
> On 11/5/2015 5:31 PM, Peter Maydell wrote:
>> On 5 November 2015 at 21:25, Jerry Stuckle <address@hidden> wrote:
>>> I'm having trouble trying to emulate an Olimex A10-OlinuXino-Lime
>>> (https://www.olimex.com/Products/OLinuXino/A10/A10-OLinuXino-LIME/open-source-hardware).
>>
>> QEMU doesn't have a model of this hardware.
>>
>
> I was afraid of that.  Is there any A8 support in QEMU?  Right now
> emulating the CPU is more important than a specific board.

Yes, we support the Cortex-A8 CPU.

>>>  To do so, I downloaded the Ubuntu trusty image (also tried Debian
>>> jessie with the same results), unzipped it and used 'dd' to copy to a
>>> qcow2 disk (attached with qemu-nbd).
>>>
>>> This comes up with one partition; I mounted it and added links for
>>> vmlinuz and initrd.img to their respective files in the /boot directory.
>>>  I then tried to run it with:
>>>
>>> #!/bin/sh
>>> qemu-system-arm  \
>>>                 -M vexpress-a9 \
>>
>> This option says "emulate a Versatile Express Cortex-A9 development
>> board". Probably the kernel you have doesn't have the support for
>> that compiled into it.
>>
>
> Ok, I'm not familiar with the A9, and was hoping it was close enough to
> the Cortex A8.

Depending on what you want to do, the A9 probably is close
enough to the A8 for many purposes (specifically, as far as
userspace is concerned they're about the same). But you do
need to have a kernel with support for the specific board you
are trying to run on (which will then naturally have support
for the CPU that that board has).

>> Also it seems likely that you'll want to pass QEMU the
>> correct device tree blob as well as the kernel and initrd.
>>
>
> OK, not sure what this would be, though.  I'll have to dig further into
> the QEMU doc.

You need to get the device tree blob that goes with your
kernel image -- it's provided as part of the kernel, not
from QEMU.

>> In general, if all you care about is userspace, you're
>> probably better trying to find instructions for how to
>> get (eg) Ubuntu running under QEMU, rather than taking
>> instructions for running Ubuntu on specific hardware
>> and trying to somehow get that kernel and disk image
>> to run on QEMU. If you actually need the exact hardware
>> emulated then you'll need to implement it in QEMU first...

> Therein lies the problem.  I'm actually developing some device drivers
> for this board.  While I understand I can't do the actual port I/O in
> QEMU because the device doesn't exist, I can emulate that routine and do
> the rest in QEMU.

If that's what you want to do, I would suggest starting by
getting a kernel booting with either the 'virt' board or
the 'vexpress-a9' ('virt' will be an A15 but that's fine
for your purposes I expect). Once you've got an upstream
built-from-source kernel booting you can use it as a base
for developing stuff.
(You might look at 'buildroot' as an easy way to do the
"configure and build a kernel and userspace"; it has some
targets with configs that should work with qemu.)

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]