- Om oss
- Plattformar och lösningar
- Utvecklingsverktyg och arbetsmetodik
Linux on MicroBlaze. Part 1
2012-04-26Publicerad av Sven-Åke Andersson
The goal of this chapter is to help us understand how to get the MicroBlaze Linux kernel source code, build it and run it on a Xilinx SP605 board. The Microblaze architecture was accepted into the mainline kernel and is in 2.6.31. It is contained in the linux-2.6-xlnx repository of the Xilinx GIT server. Everything on this site assumes building a Linux Kernel with MMU only as Xilinx is not supporting the non-MMU kernel. For more information see the Xilinx MicroBlaze Linux web page.
In June, 2009, MicroBlaze became the first soft-CPU architecture to be merged into the mainline Linux Kernel Source tree. This work was performed by Michal Simek (Linux and U-boot maintainer for MicroBlaze) and supported by PetaLogix and Xilinx. In May, 2009, Edgar E. Iglesias contributed a MicroBlaze guest port for QEMU. As of September 2009, MicroBlaze GNU tools support is also being contributed to the Free Software Foundation's mainline repositories. Support for MicroBlaze is included in GCC releases.
Minimum kernel hardware requirements
The following items must be present in the hardware system for the MMU based Linux kernel. Xilinx does not support the non-MMU kernel for MicroBlaze.
- The MMU in virtual mode and 2 memory protection zones
- A timer which has both timers in it
- A UART for the console, either UARTLite or UART 16550
- Interrupt Controller with the timer and UART connected
The SP605 board is the current test platform for the Linux support from Xilinx. We can download a reference design from here.
Here is the unzipped file structure.
ISE Project Navigator
We will use ISE Project Navigator to implement the hardware platform. All the ISE setup files reside in the HW directory. Let' start ISE and read in the design.
--> ise &
Click the Open Project button and select the ise_proj.xise setup file.
We will start by upgrading the embedded MicroBlaze design to Design Suite 13.4. Select system_i in the Hierarchy Window and in the Process Window double-click <Manage Processor Design (XPS)> to start XPS.
Xilinx Platform Studio (XPS)
The embedded MicroBlaze design is implemented in XPS and the Version Management Wizard helps us upgrade the design.
Here is a summary of all changes made to the project.
The axi_dma 4.00.a can be changed to axi_dma 5.00.a by exiting XPS and edit the system.mhs file (PARAMETER HW_VER = 5.00.a).
Here is a picture of the complete embedded system.
Synthesise and implement the design
We can now exit XPS and return to ISE Project Navigator where we will synthesise and implement the embedded design from the Processes Window.
Here is the result after implementation.
Generate programming file
To start the programming file generation we double-click "Generate Programming File".
The programming file is called ise_top.bit (same file as download.bit) and is stored in the ISE project directory.
Export to SDK
Before we can start the software design we have to export the hardware design to SDK. We start XPS again and select Export Hardware Design to SDK from the Project menu.
Here is the result.
We are now ready to start building the Linux image. Read the next chapter to find out if we succeeded.