Skip to contentSkip to conversation

Using QEMU for embedded systems

Qemu-devel Waqqas Jabbar 5 participants 7 messages Feb 16, 2005 – Feb 20, 2005

lore
Share & tools
lore
#0 lore raw

Hi

First of all, i will like to share my appreciation about the project. Some good work you are doing here :)

I was thinking if qemu can emulate a complete PC, then it might be a good canditate to use in embedded system development to emulate a board. What do you think about it.

Advantages of this would be
1) Testing embedded software before the board is actually developed
2) Testing different configuration

Thanks in advance

goto

__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

#1 lore raw

Well, embedded devices are usually very different from each other, so new code would have to be made for each device. I have nothing against this, but I don't think it should be part of QEMU itself, but just made by the people needing this functionality.

Quoted 30 lines · Waqqas Jabbar

Hi

First of all, i will like to share my appreciation about the project. Some good work you are doing here :)

I was thinking if qemu can emulate a complete PC, then it might be a good canditate to use in embedded system development to emulate a board. What do you think about it.

Advantages of this would be
1) Testing embedded software before the board is actually developed
2) Testing different configuration

Thanks in advance

goto

__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#2 lore raw
In reply to Waqqas Jabbar
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waqqas" == Waqqas Jabbar <[email protected]> writes:

Waqqas> I was thinking if qemu can emulate a complete PC, then it Waqqas> might be a good canditate to use in embedded system Waqqas> development to emulate a board. What do you think about it.

I have been playing a bit around with that as well. I have modified the PPC prep target to match one of our embedded systems (IBM405 based).

It's pretty basic, but I do get the first text out on the serial port ;) - I'll need to implement some 40x specific instructions to continue.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

The bare basic needed for an embedded system is to emulate the following devices
1) one serial port
2) flash
3) ram

an aditional network card is also good (for tftp and nfs mounted kernel and/or root filesystem). The main difference between different board is the address where these devices are mapped.

The only thing missing in qemu is the flash device support. how did u handled it?

The size and memory location of these devices can be set thru a configuration file or as command-line parameter.

Did the new instructions that you added were required to boot linux on your board or was it required by the software you are developing on that board?

waqqas

Quoted 15 lines · --- Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waqqas" == Waqqas Jabbar

<[email protected]> writes:
Waqqas> I was thinking if qemu can emulate a
complete PC, then it
Waqqas> might be a good canditate to use in
embedded system
Waqqas> development to emulate a board. What do you
think about it.

I have been playing a bit around with that as well. I have modified
the PPC prep target to match one of our embedded systems (IBM405
based).

Quoted 14 lines

It's pretty basic, but I do get the first text out on the serial port
;) - I'll need to implement some 40x specific instructions to continue.

Signature · 7 lines
Bye, Peter Korsgaard


_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

#4 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waqqas" == Waqqas Jabbar <[email protected]> writes:

Waqqas> an aditional network card is also good (for tftp and nfs Waqqas> mounted kernel and/or root filesystem). The main difference Waqqas> between different board is the address where these devices Waqqas> are mapped.

Waqqas> The only thing missing in qemu is the flash device Waqqas> support. how did u handled it?

The work I did was for booting eCos, not Linux.

I hacked the BIOS support to load my bootloader - I didn't implement any flash emulation (yet).

Waqqas> Did the new instructions that you added were required to boot Waqqas> linux on your board or was it required by the software you Waqqas> are developing on that board?

It was required by eCos.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw
In reply to Peter Korsgaard
Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waqqas" == Waqqas Jabbar <[email protected]> writes:

Waqqas> I was thinking if qemu can emulate a complete PC, then it Waqqas> might be a good canditate to use in embedded system Waqqas> development to emulate a board. What do you think about it.

I have been playing a bit around with that as well. I have modified the PPC prep target to match one of our embedded systems (IBM405 based).

It's pretty basic, but I do get the first text out on the serial port ;) - I'll need to implement some 40x specific instructions to continue.

PPC 4xx support is planned. I already have a kernel emulation of 405 specific user-mode instructions, implemented like FP emulation. The goal is to be able to test PPC405 executables on standard ones (ie on Mac hw).
I can quite easily transpose this in qemu.

There's a lack of OEA specific instructions but most of them can be implemented with no-op. TLB management must be added, it may be really near the MIPS software TLB management (posted here a few days ago, message ID <1108309390.3148.12.camel@rapid>).
DCR is quite like direct devices IOs, it should be quite easy to do efficientl,y quite like IO in softmmu, using a table of callbacks for read & writes, imho.

The big part missing is the hardware emulation of 4xx internal devices. What is mandatory to boot is:
- external bus controller
- memory controller
- timers & watchdog
- interrupt controller
- some GPIOs control may be needed
- serial ports (which are not 16550 compatibles).
Some other special SPRs may also be needed...

I think most of the work to do is there, in hw emulation. I have a lack of detailed documentation about PPC 401. So, some links would be appreciated....

Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#6 lore raw
Quoted 6 lines · J. Mayer
Quoted 4 lines · Peter Korsgaard

I have been playing a bit around with that as well. I have modified the PPC prep target to match one of our embedded systems (IBM405 based).

Quoted 8 lines
Quoted 2 lines

It's pretty basic, but I do get the first text out on the serial port ;) - I'll need to implement some 40x specific instructions to continue.

PPC 4xx support is planned. I already have a kernel emulation of 405 specific user-mode instructions, implemented like FP emulation. The goal is to be able to test PPC405 executables on standard ones (ie on Mac hw).
I can quite easily transpose this in qemu.

I am *very* interested in PPC405. I have resources to help develop this and a group that can do testing. Please let me know what your plans are and how I might assist.