Linux on FPGA4U

From Fpga4u

Jump to: navigation, search

This page is about running Linux (uClinux actually, but there is not so much difference) on a Nios II processor programmed on the FPGA4U.

Prerequisites

  • Quartus/Nios II tools. In this document, it is assumed the tools are installed in /opt/altera8.0 (modify it correspondingly).
  • A board with the latest firmware (see FX2). It seems you need to use a kernel >=2.6.26 to be able to use the latest firmware (I'm not sure about that), otherwise, you may want to upgrade your kernel, or use the old Keil's firmware.

Howtos

  • If you just want to see Linux booting and running, follow these steps: Quick Start

Sample applications

To build any custom application, you have 2 alternatives:

  • You can build it from outside the uClinux tree, send it by FTP or copy it to nios2-linux/uClinux-dist/bin and rebuild the system (see CompileHello on NiosWiki).
  • You can also add it in the uClinux tree, following these instructions: PortingApps on NiosWiki

List of applications:

  • linux-hello.tar.bz2: A little application that displays a text message on the LEDs. You may need to change the addresses in IOLED1_BASE, IOLED2_BASE, IOLED3_BASE according to your design.

TODO

  • Fill gaps in these documents
  • Use JFFS2 on the EPCS to have a persistent file system
  • Add a proper Linux driver for the PIO (the current code writes directly to the registers (easy to do, thanks to the lack of MMU...))
  • Use the MMU in the newest Nios II (the kernel code is not implemented)
  • Try to increase the frequency of the CPU
  • ...
Personal tools