Running The Linux Kernel On A DE0-nano FPGA Board

[Mike] has been filling up a rather intense wiki entry outlining how to run uClinux on a DE0-nano FPGA board. This is an inexpensive dev board that will run you somewhere between $80 and $100. Right off the bat he goes into a hefty list of the reasons that this is a foolish activity. To name a few: Once you’ve complete the build the device will be tethered for reboot.  This board doesn’t have Ethernet hardware and TCP/IP is one of the beast features of the uClinux kernel. And the FPGA tools are closed-source, which doesn’t often mesh with the ideals of Linux developers. But we still like to see what it really takes to get these large-scope firmware builds to compile and load correctly.

After his preamble you’ll find three main chunks. The first deals with setting up the toolchain on Fedora 14. From there, he installs packages necessary for cross-compiling, pulls down the source packages, and gets to work. Once the kernel is compiled and running on the FPGA [Mike] goes on to show you how to build out a simple hardware add-on in the form of a couple of LEDs connected to extra FPGA pins. The final portion of the wiki details rolling support for toggling the LEDs into the software distribution.

23 thoughts on “Running The Linux Kernel On A DE0-nano FPGA Board

    1. No no no, Raspberry Pi has too many locks and secrets. I would like to use the RPI for so many cool stuff, programming the internal DSP for example, but where is the entire indepth datasheet for the broadcom CPU? It it not available for the public! That is RPi’s biggest problem.

  1. more warnings i guess: developing with altera on ANY variety of linux host is the royal buttflush of nightmares. to make matters worse, i doubt this chip has a mmu implemented making any semi-recent linux dev a quick dead end.

    STILL, cool proof of concept Mike and nice work!

    1. Which FPGA development board would you recommend for development using a Linux (as development tool)? I am new in the area but have plans to try FPGAs.

      It would be best if I could combine an open source softcore and some custom circuit.

      1. If you mean using free software tools only, I don’t think this is entirely possible… If it’s okay for you to use closed source software:
        I’ve used several altera and xilinx based dev-boards on linux plattforms. Both offer free editions of their software which allow you to programm most of their chips (afik you only can’t use their newest chips so first check if the board you’d buy doesn’t have any unsupported chip). I ran into some smaller driver issues with both but xlilinx’ tools seemed a bit more buggy on linux. For simulation I use modelsim, which also has a free edition.

        I don’t know any actual board you should start with. That’s a decision you’ll have to make on your own (based on your buget, periphery you’d like ect). The DE0-nano mentioned here is a cheap start, if you want to get into FPGA development, but it lacks features you’d probabbly like to have.

      2. pockpock is pretty much right on there with both points. i try real hard to use opensource or pseudo opensource tools for both xilinx and altera. sadly there’s usually some little bullshit thing i needed so i ended up pirating this and that.

        as for a starter kit i would just start as small as possible till you work up to needing larger/faster hardware. besides, larger faster stuff gets expensive quick, not only hardware wise but in software licensing also.

        btw go xilinx, not altera. ;)

    2. This is an FPGA! Do NOT put FPGA’s in the same bin as microcomputers or cpu’s. It is a totally different thing. You cannot say that an FPGA does not have this or does not have that therefore crap. That is totally up to you, if you want your FPGA to have an MMU, then design one, or get one and flash it in.

  2. Without a licensed core, it will only run for up to an hour, and while the JTAG is connected. As ypu poiny out,Fine to play with, but useless for any real uses.

    The NIOS2/e core is free to use, but only runs at 1/6th the speed – no caches etc…

    Mike

  3. The original link in the article is not working anymore, does someone have a copy or better updated version of this?
    I am really interested to learn on how I can run Linux on a DE0-NANO board (w/ Cyclone IV)

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.