Difference between revisions of "QEMU"

From IGEP - ISEE Wiki

Jump to: navigation, search
Line 12: Line 12:
  
 
Download QEMU sources from linaro git repository:  
 
Download QEMU sources from linaro git repository:  
<pre>$ [http://git.linaro.org/gitweb?p=qemu/qemu-linaro.git;a=summary git clone git://git.linaro.org/qemu/qemu-linaro.git]</pre>
+
<pre>$ [http://git.linaro.org/gitweb?p=qemu/qemu-linaro.git;a=summary git clone git://git.linaro.org/qemu/qemu-linaro.git]</pre>  
 
Download IGEP support patch for QEMU from this [http://downloads.igep.es/QEMU/0001-IGEP_QEMU_support.path link ]and after that apply the patch as:  
 
Download IGEP support patch for QEMU from this [http://downloads.igep.es/QEMU/0001-IGEP_QEMU_support.path link ]and after that apply the patch as:  
 
<pre>$ cd qemu-linaro
 
<pre>$ cd qemu-linaro
  
$ patch -p1 &lt; 0001-IGEP_QEMU_support.path</pre>
+
$ patch -p1 &lt; 0001-IGEP_QEMU_support.path</pre>  
 
Configure the sources for build with this command:  
 
Configure the sources for build with this command:  
<pre>$ ./configure --target-list=arm-softmmu --prefix=<span style="color: rgb(255, 0, 0);">/opt/qemu-linaro</span></pre>
+
<pre>$ ./configure --target-list=arm-softmmu --prefix=&lt;span style="color: rgb(255, 0, 0);"&gt;/opt/qemu-linaro&lt;/span&gt;</pre>  
 
Build the sources:  
 
Build the sources:  
<pre>$ make </pre>
+
<pre>$ make </pre>  
 
Install QEMU:  
 
Install QEMU:  
<pre>$ make install</pre>
+
<pre>$ make install</pre>  
 
Optionally you can download from [http://downloads.igep.es/QEMU/qemu-linaro.tar.gz here] the QEMU binaries, we suggest install it under /opt directory with the right user execution permissions.<br>  
 
Optionally you can download from [http://downloads.igep.es/QEMU/qemu-linaro.tar.gz here] the QEMU binaries, we suggest install it under /opt directory with the right user execution permissions.<br>  
  
Line 29: Line 29:
 
Go to your qemu install directory.<br>  
 
Go to your qemu install directory.<br>  
 
<pre>$ cd /opt/qemu-linaro/bin
 
<pre>$ cd /opt/qemu-linaro/bin
</pre>
+
</pre>  
 
We provide a QEMU ready image based on Ubuntu/Linaro Nano (Oneric 11.11) image, it can be download from [http://downloads.igep.es/QEMU/igep.nano.img here].<br>  
 
We provide a QEMU ready image based on Ubuntu/Linaro Nano (Oneric 11.11) image, it can be download from [http://downloads.igep.es/QEMU/igep.nano.img here].<br>  
  
Line 48: Line 48:
 
<pre>qemu-system-arm -M igep -m 512 -clock unix -serial stdio -drive file=igep-nano.img,if=sd,cache=writeback -usb -monitor telnet:localhost:7100,server,nowait,nodelay</pre>  
 
<pre>qemu-system-arm -M igep -m 512 -clock unix -serial stdio -drive file=igep-nano.img,if=sd,cache=writeback -usb -monitor telnet:localhost:7100,server,nowait,nodelay</pre>  
 
Parameters:<br>  
 
Parameters:<br>  
 +
 +
-m : Memory assigned to the Virtualized board in Mega Bytes.
  
 
<br>  
 
<br>  

Revision as of 16:30, 10 January 2012

QEMU on IGEP Boards

QEMU  is a generic and open source machine emulator and virtualizer.

When used as a machine emulator, QEMU can run OSes and programs made for one machine (e.g. an ARM board) on a different machine (e.g. your own PC). By using dynamic translation, it achieves very good performance.

When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU. QEMU supports virtualization when executing under the Xen hypervisor or using the KVM kernel module in Linux. When using KVM, QEMU can virtualize x86, server and embedded PowerPC, and S390 guests.

QEMU documentation can be found here.

Build QEMU with IGEP support

Download QEMU sources from linaro git repository:

$ [http://git.linaro.org/gitweb?p=qemu/qemu-linaro.git;a=summary git clone git://git.linaro.org/qemu/qemu-linaro.git]

Download IGEP support patch for QEMU from this link and after that apply the patch as:

$ cd qemu-linaro

$ patch -p1 < 0001-IGEP_QEMU_support.path

Configure the sources for build with this command:

$ ./configure --target-list=arm-softmmu --prefix=<span style="color: rgb(255, 0, 0);">/opt/qemu-linaro</span>

Build the sources:

$ make 

Install QEMU:

$ make install

Optionally you can download from here the QEMU binaries, we suggest install it under /opt directory with the right user execution permissions.

Board Emulation

Go to your qemu install directory.

$ cd /opt/qemu-linaro/bin

We provide a QEMU ready image based on Ubuntu/Linaro Nano (Oneric 11.11) image, it can be download from here.

The image has 2 partitions (you can see the partitions using fdisk -ul command as: fdisk -ul igep-nano.img)

Device                 Boot      Start         End      Blocks   Id  System

igep-nano.img1   *            63            106494       53232    c  FAT32 LBA (Boot)

igep-nano.img2                106496     1048575      470016   83  Linux (Root filesystem)

Optionally you can mount the partitions in you host PC and modify the content as:

First Partition: 
$ mount -o loop,offset$[63*512] igep-nano.img /mnt/tmp
Second Partition: 
$ mount -o loop,offset$[106496*512] igep-nano.img /mnt/tmp

Now you're ready for execute the emulator:

qemu-system-arm -M igep -m 512 -clock unix -serial stdio -drive file=igep-nano.img,if=sd,cache=writeback -usb -monitor telnet:localhost:7100,server,nowait,nodelay

Parameters:

-m : Memory assigned to the Virtualized board in Mega Bytes.