Sorry, you need to enable JavaScript to visit this website.

Compiling qemu and zynq-linux

My previous post described how to get a VirtualBox VM running on Windows and launch the 64bit precompiled binary of the Zynq qemu Virtual Machine.  Here I am going to touch on how to get the qemu VM running on a 32 bit install of Linux.

Note: You will need a Xilinx login (free) to download some of these tools/packages/source code.

I will be running on Ubuntu LTS 10.04 32 bit for this how-to.  I also will be doing everything as root.  To make things easy for myself I just launch an instance of bash as root with the following command:

bash> sudo bash
[sudo] password for zynqgeek:

Ok, now that we are setup with root access, let's get into the nitty gritty.  I will be using the Xilinx wiki page for qemu as a reference here.

 First, we need to download the qemu source from the git tree.  Create a working folder that you will be using as scratch pad space.  Mine is in /home/tim/user.  Download the git source with this command:

    bash> git clone git://

Note: if you do not have git installed, you can download it with this command:

    bash> apt-get install git

Once you have git installed and pull down the source tree we can build qemu for our local system.  Note: this will require you to have the full gcc toolchain installed.  This blog isn't going to go into that, you can find more information about installing gcc here:

Ok, once git is done downloading about 110 or so MBytes you will see that a folder called qemu-xarm has been created.  Go into that directory.

    bash> cd qemu-xarm

Again following the how-to posted on the Xilinx qemu wiki, we are going to configure the system to be built. We do this with the configure script and this command:

    bash> ./configure --target-list=arm-softmmu --disable-werror --disable-kvm

Now, this might be where you dive into dependency hell.  If you are running on Ubuntu 10.04 LTS and haven't installed anything using apt-get, here is the list-o-libs that you will need to download and install:

zlib: download the latest from and do the following:

    bash> tar -zxvf zlib-x.y.z.tar.gz
    bash> cd zlib-x.y.x.tar.gz
    bash> ./configure
    bash> make
    bash> make install

glib-2.0:  download the latest by using apt-get:

    bash> apt-get install libglib2.0-dev

This should get you to a point where the ./configure command executes correctly.  Now we need to build qemu:

    bash> make

Assuming this executes correctly, you should end up with an executable called qemu-system-arm in the arm-softmmu folder.  Next, we need to compile a version of Linux for our emulator.  The Xilinx zynq-linux wiki does a great job of explaining how this is done.  Note: the kernel is large, over a Gigabyte large - plan accordingly.

Also, you need to download the arm tool chain to actually be able to compile the kernel against the arm ARCH.  The CodeBench Lite tools take a bit to install (java based installer).

A note on the .bin download, you may need to give it execution rights with chmod.

    bash> chmod +x xilinx_2011.09-50-arm-xilinx-linux-gnueabi.bin

At the time of this blog post the wiki appeared to have an error in its export command.  This is the command that I used:

bash> export PATH=

Once you have all the tools installed, the environment configured correctly, and the kernel compiled (which will take a while), we can move on to launching it with qemu!  The next post will dive into this. :D



Great tutorial! Have you had any luck compiling the root file system yet?

The next post discussed on another topic rather than launching it with qemu. Can we have a chance to experiment on Zynq environment without having a board by means of qemu or other Xilinx tools? I tried to build a simple hello world application with PlanAhead for Zynq platform. However, I couldn't successfully run the design without a development board. Please comment on this. It will be very helpful for ones who do not have the Zynq boards yet.

Thanks for all posts you have published.

Is this something along the lines of what you were looking for?

Hope that helps!

Sorry for my Anonymous comment inadvertently before.

The thing that I try to say was something like your "Testing code on QEMU" post. It is very helpful for the simulation of C codes on Zynq environment PS.

However, I would like to run C code from SDK. Is there any way to communicate SDK and QEMU ? It means Is there any way to Run As on QEMU on Xilinx SDK ? If we can run as on QEMU, it will be the best. Besides, If we put some custom hardware unit on PL, Could it be possible simulate the C code which interacts via AXI4 communication with this hardware unit using SDK ?

Thanks for your very quick reply and the post.


Gotcha. So there are two things here to note:

1. I can look to see what the steps are to get an output from SDK to run on qemu - I believe I have seen an app note on this from Xilinx. I'll see what I can come up with and put it in the list of how-to's I want to do (don't worry it's not too long of a list so far).

2. qemu does not allow for access to the PL, since it does not exist there. The AXI4 links to the PL just aren't represented in the qemu hardware emulator. There is, however, a tool you can use form cadence, however it is not free.

Also, I would suggest posting on the forums, as they have Avnet/Xilinx resources answering questions.

Well if you are searching for the latest and trending news from all across the globe and world then I guess,

Just like everyone else you must be using internet for this purpose but now the question occurs.

Which site to visit for the best news.

Don't worry about this, the answer is given in the link just given below

trending news in the world

awesome content shared by the author.

A very deep and keed research has been done in order to write this meaningful article