I'm interested in Zynq but will not be running Linux. Is there a how-to to bring Xilinx's Zynq QEMU based VM up on a Windows box?
Some links in the original FAQ are no longer valid (noted below), so here's a link to where the latest QEMU documentation can be found.
Not everyone interested in Zynq is going to be running Linux. So I thought I would put together a small step-by-step how-to on how to bring Xilinx's Zynq QEMU based VM up on a Windows box.
A few things:
- You will need admin access to do this.
- You will need a 64 bit host machine to support a 64bit virtual machine.
- The qemu image is compiled using a 64bit version of gcc, and thus expects a 64bit version of Liunx to run on.
Okay, let's go over what we are going to do first. We need to put in place a Virtual Machine of our own to run Linux in. We need to download the VM software, install it, download the Liunx ISO, install that, and then download and run the QEMU based Zynq VM within our Linux VM running on Windows. I'm exhausted just typing that, ha. But don't worry it will go quick (once we download everything that is) and the process is pretty painless.
So let's download our Virtual Machine software. Well, there are a few of them to pick from. In this case we are going to go with VirtualBox. The main reasons why I went with this was 1) free, and 2) mainstream. Also, if you are on a Mac you can also take advantage of VirtualBox to load up Linux and the Zynq VM :D
Here is the download link:
https://www.virtualbox.org/wiki/Downloads
For x86 based Windows machines, here is the link you want to go with: invalid link
Download (~90 MB, not too bad), and Install VirtualBox. The install process went pretty smoothly, although the executable did take about a minute to launch. I installed all components (default), and a quick launch icon, because I just know I'll be using this aaaalllll the time :D. The installer will plug away installing various drivers and files. Note that you may lose your network connection during the install (or at least I did). I am going to hold off on the VM creation portion until after we download our Linux ISO.
Next: Downloading Linux. Now I know that everyone has a different flavor that they prefer, and I know that there is a lot of debate over which is the best/fastest/awesomest and the like. I picked Ubuntu because I was familiar with it, and it ships with a lot of the niceties that Windows users are used to having. There are a lot of other versions of Linux that the Zynq VM will run on, but at the time of this post and the versions used, this configuration works.
Download Ubuntu here:
http://www.ubuntu.com/download/ubuntu/download
I downloaded Ubuntu 11.10 64-bit. The direct download link for that configuration can be found here:
http://www.ubuntu.com/start-download?distro=desktop&bits=64&release=latest
Sweet, we're all set with our downloads and we have VirtualBox installed. Let's create a VM to boot Linux up in.
Your VirtualBox main window should look like this, with no configured VM's
Click the 'New' button in the upper left of the window to get started. That will open the Create New Virtual Machine Wizard.
Click next and select the appropriate OS (Linux in our case) and version (Ubuntu in this case). Also name your VM something meaningful in case you end up adding several other VM's in the future. I named mine "Ubuntu 11.10".
Click next and we can select the amount of memory we are going to use. Now depending on what else you are going to use the VM, and how much memory you have in your system, you may want to fiddle with this. I choose 1024MB as to allow for enough memory for the Linux base OS as well as our QEMU Zynq VM. Again, if you find that you are having performance issues due to Swap Space disk read/writes you may want to increase this (if you have enough physical memory in the machine).
Next is the Hard Drive. With the cost of storage dropping every day I don't see any reason why not to allocate a lot of space to your VM. VirtualBox is suggesting a Start-Up Disk of 8 Gig. The way that Linux does different partitions this does make sense. If you want to add more space, you can always add a second Virtual Disk with all the space you need.
Unless you are looking for portability across various VM's sticking with the VitrualBox Disk Image (VDI) disk format should be just fine for your Virtual Disk.
There are two ways the VM will use the Virtual Disk, the first is Dynamic size allocation. This first option means that the disk will only grow when the Slave OS (Ubuntu Linux in our case) writes to the disk and the total number of bytes used increases. This is nice if you have a fairly small Hard Drive and don't want the Slave OS to take up any more space than it needs. If you have all the space in the world, then go with the second option and have it just allocate all the space up-front. I don't plan on using this VM for anything more than my Zynq VM so I am going to go with Dynamic allocation.
Now we can add our 'data partition' virtual disk, the one I mentioned that you could make as big as you wanted. This will be where you put all your personal files and what not. In my case I am going to make mine fairly small since, again, I will only be using it for the Zynq VM. I went with the default of 8 Gig.
That's it! Not too bad right? :D. The last page is a summary page, review your selections and click "Create" if you are happy with your decisions (don't worry you can change things around after the fact if you want to).
Ok, so here is our VM all set and ready to go!
Now we need to add to the VM the Ubuntu ISO image so that we can install our OS. This is pretty simple. First, make sure your VM is selected in the left list-o-VM's and click the Settings button (next to the New button) in the upper left. From there you will see a new window. On the left side there is a list of things to configure, find the "Storage" item and click on it.
There is a little icon that looks like three disk platters with a plus in front of it. Click that and a drop down will show with two options 1) Add CD/DVD Device and 2) Add Hard Disk. We want to add a CD/DVD Device, so select that option. Note that you can add a CD/DVD Device to the IDE Controller or SATA controller. I prefer the IDE Controller because it is compatible with older OS versions, however either should work with more modern OS's such as Ubuntu. I placed my drive on the IDE Controller.
A little box will pop up asking you to either pick a file, or leave the drive blank. We have already downloaded our ISO file so we will want to place that in the Virtual Drive. Click "Choose Disk" and navigate to where you downloaded the Ubuntu .iso file. Once you click "Open" on the File Dialog Box you will see the new CD/DVD Device in the device tree for the IDE Controller (or SATA Controller if you picked that one). You can click OK on the Settings window and return back to the VirutalBox main screen.
Are you excited? Butterflies? Well let's do this! Select your VM in the list on the left, and click the "Start" button (next to the New and Settings buttons) in the top left of the window.
There will be a series of message boxes that will pop up asking you about VM operation. The first will be the Auto Keyboard Capture. Read the description and click OK. The next box may be something about the color mode of your monitor. Read the description and click OK. There may also be a window about Pointer Integration. Again, read and click OK.
Ubuntu should automatically start loading in the VM since the boot order is the CD/DVD drive first. Once it boots you should see a screen like this:
This is the first window of the Ubuntu Install. If you made it this far, congrats! You have made your first Virtual Machine!
There are two options on this screen, the first is "Try Ubuntu 11.10" and the second is "Install Ubuntu 11.10". In our case we want to be able to read/write to the disk and keep things that we install remain on disk and not just in memory. Choose the "Install Ubuntu 11.10" option.
I am going to move forward with the install kind of quickly, since I will be using the default install options for everything. Spend some time reading the information on each of the pages of the install to better understand what the installer is doing.
Step 2 of 7 - Set your timezone. This should be pretty self evident.
Step 3 of 7 - Keyboard layout. Dvorak, you won't. (kidding for those who don't know: http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard)
Step 4 of 7 - I did the default here, and I suggest you do the same unless you have a very specific reason not to.
Step 5 of 7 - Name, Username, PaSSWorD and computer name. Note: there is a scroll bar, scroll down for more options.
Step 7 of 7 - No, I do not know where step 6 went either. Review your selections and click Install to proceed.
Let that sit for a bit and grab some coffee. Ubuntu Linux is being installed on the Virtual Disk that you created. You are going to want Internet Connectivity during the install so that the installer can pull down updated versions of the packages it is installing. This will, of course, add more time to the install process. There is a "Skip" button on the bottom right if you do not wish to go through this process of having the latest and greatest.
If you make it to this screen, congrats! You've Installed VirutalBox successfully and installed Ubuntu successfully! Click "Restart Now" and you should see the Ubuntu screen ask you to remove the CD/DVD media. In this case we don't need to do anything since the boot order is HDD, then CD/DVD. Hit enter and watch the VM restart.
On restart we see the login screen. Login and let the desktop load up. We will need to open a terminal to to download, untar, and launch the Zynq QEMU VM. Go to the top left and click on Applications (think of this similar to the Start menu in MS Windows. Click Accessories, and then Terminal (Applications -> Accessories-> terminal).
Ok, we've made it to the prompt! Nice! From here, follow the instructions in this post to get the Zynq QEMU VM up and running! QEMU