Xtensa on QEMU: Difference between revisions

From Linux/Xtensa
Jump to navigation Jump to search
(Initial Xtensa on QEMU description)
 
m (fix git repo address)
Line 7: Line 7:


== Getting and building QEMU ==
== Getting and building QEMU ==
QEMU is developed using git. The main tree is located at http://git.qemu.org/qemu.git. Release tarballs and guest systems images are available at http://wiki.qemu.org/Download.
QEMU is developed using git. The main tree is located at git://git.qemu.org/qemu.git. Release tarballs and guest systems images are available at http://wiki.qemu.org/Download.


This will make a copy of master QEMU repository, configure, build and install QEMU binaries for little-endian and big-endian targets:
This will make a copy of master QEMU repository, configure, build and install QEMU binaries for little-endian and big-endian targets:

Revision as of 03:13, 12 November 2011

Setting up and running Xtensa simulation on QEMU

QEMU is a free processor/machine emulator and virtualizer.

Starting with version 1.0 QEMU offers Xtensa architecture emulation. DC232B (LE) and fsf (BE) cores are supported on sim and LX60/LX200 platforms.

Getting and building QEMU

QEMU is developed using git. The main tree is located at git://git.qemu.org/qemu.git. Release tarballs and guest systems images are available at http://wiki.qemu.org/Download.

This will make a copy of master QEMU repository, configure, build and install QEMU binaries for little-endian and big-endian targets:

 $ git clone git://git.qemu.org/qemu.git
 $ mkdir qemu-xtensa ; cd qemu-xtensa
 $ ../qemu/configure --prefix=`pwd`/root --target-list=xtensa-softmmu,xtensaeb-softmmu
 $ make install

QEMU options

Option Meaning Example
-M <machine-name> Emulate specific platform type. Use '?' to list all supported platform types. -M lx60
-cpu <core-name> Emulate specific core type. Use '?' to list all supported core types. -cpu dc232b
-m megs Set emulated RAM size to megs MB -m 128
-semihosting Enable SIMCALL instruction for the protection ring 0. -semihosting
-kernel <elf-image> Load elf-image and start emulation from its entry point. Note that image is loaded to virtual addresses it is linked for. For LX60/LX200 this option also chooses 'boot from SRAM' mode, mapping SRAM to the System ROM region at physical address 0xFE000000. -kernel xtensa-2.6.29-smp/arch/xtensa/boot/Image.elf
-append <kernel arguments> (Not for sim platform) Wrap kernel arguments into the bootparameters block and pass pointer to it to the elf-image in a2. -append 'console=ttyS0 ip=dhcp root=/dev/nfs rw'
-pflash <flash-image> (Not for sim platform) Mount flash-image as a system FLASH. Note that image size must match platform FLASH size (4MB for LX60, 16MB for LX200). -pflash u-boot.dc232b_xtav200.flash

sim platform

LX60/LX200 platform