Downloading and Configuring Linux

From RCSWiki

Jump to: navigation, search

The RCS Lab currently uses Linux 2.6 kernel released by Xilinx (Xilinx Git Repository). We have in the past used Grant Likely's SecretLab; however, he appears to be having server troubles and has not posted updates for over a month (Last Checked: April 17, 2008).

NOTE: These directions assume you are using a Xilinx ML-410; however, it is possible with minimal modifications to target the ML-310 or other development boards.

Directions:

  1. If you have not already done so, download Latest Xilinx Linux Kernel
    • git clone git://git.xilinx.com/linux-2.6-xlnx.git
  2. Change directories into linux-2.6-xlnx directory
  3. Setup the Default ML-403 Configuration
    • Yes, ML-403 is correct, even though we use ML-410
    • You will type this every time you want to use the "make" command with Linux:
      • make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- <COMMAND>
      • ARCH=ppc sets the Architecture to PowerPC (ppc405 on FPGA)
      • CROSS_COMPILE set which Cross Compiler to use
        • We use CrossTools to build version gcc-4.2.1-glibc-2.3.6
        • You can source the CrossTools by: source /opt/crosstool/settings.sh
      • <COMMAND> Specify which command to run make on
        • dl403_defconfig setup Linux configuration to start with ML-403 Setttings
        • menuconfig Open menu to custom configurations
        • zImage Compile Linux Kernel to zImage.elf
        • zImage.initrd Build ELF with ramdisk
  4. So start with ml403_defconfig
    • make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- ml403_defconfig
  5. Then make the next changes in the Menu
    • make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- menuconfig
  6. Menu Configuration Changes (Depending on Situation you may make more / less)
    • Platform Options:
      • Change console=ttySO to: console=ttyUL0, root=/dev/ram
    • Device Drivers:
      • Network Device Support:
        • 'N' - Ethernet (10 or 100Mbit)
        • 'Y' - Ethernet (1000 Mbit):
          • 'Y' - Xilinx LLTEMAC 10/100/1000 Ethernet MAC driver
          • MARVELL 88E1111 using MII or other PHY
        • 'N' - Ethernet (10000 Mbit)
      • Character Devices:
        • Serial Drivers:
          • 'N' - 8250/16550 Compatible Serial Support
          • 'Y' - Xilinx uartlite serial port support
          • 'Y' - Support for console Xilinx uartlite serial port
  7. Make sure the xparameters_ml40x.h from Hardware Base System is copied to:
    • linux-2.6-xlnx/arch/ppc/platform/4xx/xparameters/xparameters_ml403.h
  8. Make sure the ramdisk.image.gz from the root file system is copied to:
    • linux-2.6-xlnx/arch/ppc/boot/images/ramdisk.image.gz
  9. Compile the Linux Kernel
    • make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- zImage
  10. Combine Linux Kernel with Initial Ram Disk
    • make ARCH=ppc CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd


At this point you should have a file called zImage.initrd.elf in linux-2.6-xlnx/arch/ppc/boot/images which will be combined with the hardware's download.bit to create an ACE file.


Continue on to the Combining Linux 2.6 with Hardware Base System Tutorial

Personal tools