Creating Hardware Base System For Linux

From RCSWiki

Revision as of 23:35, 12 January 2009 by Staduri (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

Getting Started

It is recommended to build the hardware base system first before starting to configure and compile Linux (at least until you are familiar with the steps involved in the process). This tutorial is aimed at creating a base system with the following components:

  • 300 MHz PPC
  • UART - 115200 8N1
  • Interrupt Controller
  • SysAce
  • IIC
  • MGT Protectors (Always Have these in your project!)
  • Tri-Mode (10/100/1000 Mbps) Ethernet
  • DDR
  • DDR2

Not all of these components are necessary for all projects (and adding more is possible), but use these to get started.

Base System Builder Wizard

  1. Using Xilinx 10.1i open XPS and Run the Base System Build Wizard
  2. Select Board:
    • Board Vendor: Xilinx
    • Board Name: Virtex-4 ML410 Evaluation Platform
    • Board Revision: C
  3. Select Processor: PowerPC
    • Note: It is possible to build a MicroBlaze Linux System (it might be a separate tutorial later)
  4. Configure PowerPC Processor: Processor Clock 300 MHz
  5. Configure IO Interfaces (1 of 5):
    • Check RS232_Uart_1
      • Baud Rate: 115200
      • Data Bits: 8
      • Parity: None
      • Check Use Interrupt
    • Uncheck RS232_UART_2
  6. Configure IO Interfaces (2 of 5):
    • Uncheck SPI EEPROM
    • Uncheck LEDs_8Bit
    • Uncheck LCD_OPTIONAL
    • Uncheck PCI_Arbiter_0
  7. Configure IO Interfaces (3 of 5):
    • Uncheck PCI32_Bridge
    • Check SysACE_CompactFlash
      • Check Use Interrupt
    • Check IIC_Bus
      • Check Use Interrupt
    • Uncheck Ethernet_MAC
  8. Configure IO Interfaces (4 of 5):
    • Check TriMode_MAC_MII
      • Check Use Interrupt
    • Check MGT_Wrapper
      • Check All MGTs (Projects MGTs is very important!)
  9. Configure IO Interfaces (5 of 5):
    • Check DDR2_SDRAM
    • Check DDR_SDRAM
  10. Add Internal Peripherals
    • Change Memory Size of BRAM IF CNTRL to: 64 KB
    • Uncheck:
      • Memory Test
      • Peripheral Self Test

Modifying I2C

In order for the MAC Address to be correctly read from the EEPROM on the I2C, the Addressing mode must be changed from 7-Bit to 10-Bit. To change the mode use XPS and click on System Assembly View. From there select the IIC_Bus, right click and select configure ip. Change Use 10-bit Address from 7-bit to 10-bit address and click OK.

Generating download.bit

Now generate the Hardware Base System's download.bit by:

  1. Generating the system.bit
    • make -f system.make bits at the commandline
    • or click Generate Bitstream in the GUI
  2. Generate the download.bit which combines the system.bit with the bootloop.elf
    • make -f system.make init_bram at the commandline
    • or click Update Bitstream in the GUI

Software Platform Settings

After generating the Hardware Base System you need to configure the Software Platform to change the project from a Standalone C project to a Linux 2.6 project. This requires a few steps that need to be done before building and configuring the Linux Kernel. If you miss this step and build the Linux System it will potentially not include all of the hardware you have selected in the BSB Wizard.

  1. From the Software Menu click Software Platform Settings
  2. Under Software Platforms:
    • Under OS & Library Settings (Far Left Side of Dialog Box):
      • Change the OS from Standalone to linux_2_6
  3. Under OS and Libraries (Far Left Side of Dialog Box):
    • Click Connected Periphs and Edit Current Value:
      • Click Add All and then Click OK
    • Set Memory Size to: 0x10000000
    • Set IIC Persistent HighAddr: 2047
    • Set IIC Persistent BaseAddr: 1024
  4. From the Software Menu click Generate Libraries and BSPs

Tying Hardware Base System and Linux Kernel Together

Copy the xparameters_ml40x.h file from the hardware base system into the Linux PowerPC 405 directory. The file is located at: <build directory>/ppc405_0/libsrc/linux_2_6_v1_00_c/linux/arch/ppc/platform/4xx/xparameters/xparameters_ml40x.h


The xparameters_ml40x.h file is generated when you Generate Libraries and BSP and consists of the relevant hardware addresses and parameters that Linux will use during its build. The ML40X part refers to Xilinx's ML-403 / 405 boards which the ML410 is very similar too. As of this posting, Xilinx does not directly export the ML-410 xparameters file. There are no changes that need to be made in order to use the file except to copy it to the correct location:

  1. Copy:
    • <build directory>/ppc405_0/libsrc/linux_2_6_v1_00_c/linux/arch/ppc/platform/4xx/xparameters/xparameters_ml40x.h to
    • <linux_irectory>/arch/ppc/platform/4xx/xparameters/xparameters_ml403.h
      • Notice the file is renamed from ml40x to ml403 which you will notice is the Board Version used during Linux Compilation's ml403_defconfig command.


Once the file has been copied, continue on with the Configuring Linux 2.6 for RAM Disk Tutorial if you wish to use a RAM Disk or with the Configuring Linux 2.6 for NFS Tutorial if you wish to use NFS

Personal tools