Tutorials for Running Linux on Xilinx FPGAs

Version: r49 2010-05-06 22:17:39 -0600
Authors: David Baird
Tim Sander
Contact: dhbaird@gmail.com



2010-05-07 03:54:25 UTC David Baird <dhbaird@gmail.com>

I updated building-linux.html to contain updated information for newer kernel versions. I updated Running Xilinx ISE and EDK 10.1 in Ubuntu 8.10 to now also include support for Ubuntu 9.10 and 64-bit Linux. I added the Crosstool-ng 1.6.1 tutorial because the older tutorial, Crosstool-ng 1.3.2, has become defunct.

2009-12-16 03:58:03 UTC David Baird <dhbaird@gmail.com>

In the building-linux.html tutorial, I corrected the mkdosfs command to format exactly 1 reserved sector (which is required by SystemACE).

2009-06-04 16:00:01 UTC David Baird <dhbaird@gmail.com>

Tim Sander <tim01@iss.tu-darmstadt.de> contributed the SystemACE tutorial here. Thanks!


These tutorials explain how to run Linux on Xilinx FPGAs. These tutorials focus on the Xilinx EDK 10.1 SP3 and kernel releases circa January 2009.

These tutorials assume that:

  1. You are able to do "hello world" in EDK.

    If you are unable to do "hello world", then you should start with this tutorial:

  2. You are running Linux and that you are familiar with shell concepts.

    More information: Here are some shell concepts you should probably be familiar with, at a minimum: pwd, rm, cp, mkdir, cd, wget, sudo, su, $HOME, .bashrc, etc.. If you are not 100% familiar with all the commands, that may be okay: you might be able to pick these up as you go along.

  3. You know how to install additional software on your Linux computer.

    More information: As an example, you will need "genext2fs" for some of the tutorials. In Debian/Ubuntu, this is accomplished by typing "apt-get install genext2fs" as root.

  4. You have installed the ISE and EDK tools on your computer. If you don't know how to do this, then this tutorial might help:

    In these tutorials, the tools are assumed to be located installed at:

    • /home/xilinx/10.1_sp3/ise/ISE
    • /home/xilinx/10.1_sp3/edk/EDK
    • (there is an x101sp3 script which you can easily edit if your tools are located somewhere else)

You can use "Downloads" to skip over some steps in the tutorials:

It is possible for you to skip over some steps in some of the tutorials. Look for a "Downloads" section in a particular tutorial to see if you can simply download the end (or intermediate) results, thereby skipping some of the steps.

The general steps that are required to get Linux running are listed below. These steps are discussed in more detail by the tutorials:

  1. Install cross-development tools, so that you can compile the kernel and userspace applications.
  2. Create a bitstream (download.bit) using EDK.
  3. Generate a device-tree (xilinx.dts) using EDK and the device-tree generator.
  4. Configure and build the kernel, using the device-tree (xilinx.dts).
  5. Build the root filesystem (aka "user space") (this is possibly the most complicated part of this whole process).
  • To make this process easier to understand, it is preceded by a minimalist tutorial which creates the smallest possible root filesystem, containing only two files.

Basic Tutorials

  1. Install cross-development tools: Crosstool-ng 1.6.1 (older tutorial here: Crosstool-ng 1.3.2)
  2. Create an EDK project: Xilinx EDK 10.1, Virtex-II PRO XUP Board
  3. Build the Linux kernel: Just Linux (without Root Filesystem)
  4. Building the root filesystem (aka "user space"):

All Tutorials (for Advanced Users)

Beyond These Tutorials

Topics Not Yet Covered by These Tutorials

  • File systems beyond just initrd and initramfs.

    If you are using an MTD flash device, you'll probably want to investigate JFFS2 and YAFFS; The drivers for those file systems are able to communicate with Linux's MTD interfaces and are aware of how to explicitly erase blocks.

More Resources


The development of these tutorials has been graciously supported by the FPGA Mission Assurance Center.