Wednesday, March 21, 2012

QEMU

Xilinx is maintaining a version of Linux just for Zynq!  Check out the landing page here:

http://wiki.xilinx.com/zynq-linux

From the above link:
Xilinx is striving to push code from the Xilinx GIT server to the open source community (kernel.org, u-boot, etc.). Pushing the code takes time such that the Xilinx GIT servers contain the latest code base and is recommended for customer use. A minimal BSP for Zynq has been pushed to the mainline (kernel.org) and is available there. At this time, Xilinx only supports Linux from the Xilinx GIT server. 
Xilinx has worked with the open source community to leverage QEMU to create a Virtual Machine (VM) so that software engineers can get up and running and begin developing for the Zynq ARM cores - pretty cool huh?  So, let's get that up and running!  First, here is the link with the how-to from Xilinx:

http://wiki.xilinx.com/zynq-qemu

Nothing too crazy here, download the tar.gz file from here:

http://www.xilinx.com/member/zynq_linux/zynq_linux.tar.gz

(note: you will have to login with your Xilinx ID to download the file.)

We need to extract the archive to use its contents.  The folks who maintain the tar command were nice enough to put in gzip decompression so we can un-archive the contents with a single command:

bash> tar xvzf zynq_linux.tar.gz

Boom, now we can go into the folder that was created by simply using the cd command (cd = change directory, see this stuff isn't that hard!)

bash> cd zynq_linux

Ok, now that we have the contents extracted and we are in the root directory of the QEMU VM, we can launch the VM with this command:

bash> ./start_qemu.sh

Alright, now we are in the VM.  The important thing to remember here is that the VM is operation accurate, not cycle accurate.  This means that if you are executing things on the QEMU VM you should not assume that the operation will run in the same time that it will on Zynq.  The result from all operations will be the same, the time it takes to run them, however, is not guaranteed to be.

Now that we have the VM up and running play around with what is available in the Linux image and get familiar with what is at your disposal.  Next we will dive into the Board Support Packages (BSP) files that come with the VM, and how you can use them as templates to write your own!




No comments:

Post a Comment