qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Emulating A10


From: Jerry Stuckle
Subject: Re: [Qemu-discuss] Emulating A10
Date: Mon, 23 Nov 2015 16:20:03 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Peter,

Sorry for the delay - I'm being pulled about 20 different ways, and this
one is lower on the totem pole :)

Move below:

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.

>>  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.

>>                 -m 512M \
>>                 -hda /export/armhost/armhf.qcow2 \
> 
> This option is trying to connect a hard disk (scsi or IDE),
> but the vexpress-a9 doesn't have either of those (you can
> boot it via emulated SD card image).
> 

OK, I wasn't sure if the SD card image would be identified as a hard
disk or not.  Guess not.

>>                 -kernel /vmlinuz \
>>                 -initrd /initrd.img \
>>                 -append "root=/dev/sda1" \
> 
> You usually want something in the 'append' line to tell
> the kernel to put the console on the serial port.
> 

I'll keep that in mind for later.

>>                 -no-reboot
>>
>> (right now just trying to get it going).
>>
>> The result is a blank window opens and CPU goes to 100%.
> 
> This usually means "guest kernel crashed before it got to the
> point of sending anything to the UART and/or it didn't know
> where the UART on this board is".
> 
> 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.

> 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...
> 
> thanks
> -- PMM
> 

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.

I also have quite of code in userspace, some mine, some not, which needs
to be compiled and running.  While I could do that in an Ubuntu system,
I still need to ensure the code compiles and runs on the A8.

The main goal here is to be able to develop on my laptop without having
to drag the board and wires around, also.

I would love to be able to implement the hardware in QEMU, but I just
don't have the knowledge of QEMU's workings to do that, and don't have
the time to learn right now.  Maybe once some of these projects are
finished... :)

Thanks again
Jerry



reply via email to

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