Arch/PPC vs Arch/PowerPC Tutorial

From RCSWiki

Revision as of 15:17, 2 July 2008 by Aschmidt (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

About

  • Author: Andy Schmidt
  • Last Modified: 07/02/2008
  • Notes: This tutorial will explain how to compile Linux 2.6 for the ML-410 with the arch/powerpc architecture structure rather than the arch/ppc as is described in previous tutorials. It is expected that you have a familiarity with the arch/ppc structure.

Hardware Configuration

The hardware Configuration remains the same for arch/ppc as for arch/powerpc. If you have a Hardware Base System, you do not need to re-create the hardware. You will only need to modify the Software Platform Settings in XPS

Software Platform Settings

The main difference between the arch/ppc and arch/powerpc is how the two detect devices and bootup. In arch/ppc there was an xparameters_ml403.h file that contains a bunch of #defines which are used during compilation of the Kernel. However, now with arch/powerpc there is a Device Tree Structure that is similar to the xparamters_ml403.h file, but how it is created is rather different.

Download gen-mhs-devtree: Used to generate Device Tree

  • git clone git://git.xilinx.com/gen-mhs-devtree

In XPS:

  1. Project -> Project Options
  2. Under Advanced Options (Optional) Browse Project Peripheral Repository
    • Set it to the gen-mhs-devtree/edk_lib directory
    • This imports the device tree generator script used in the Software Platform Settings step.
  3. Software -> Software Platform Settings
    • Under OS & Library Settings change OS:
      • standalone to fdt
    • Under OS and Libraries change bootargs to:
      • console=ttyUL0 root=/dev/ram
  4. Software -> Generate Libraries and BSPs
    • This creates ppc405_0/libsrc/fdt/fdt.ds
  5. Copy fdt.ds to linux-2.6-xlnx/arch/powerpc/boot/dts/ml405.dts

Configure Linux under Arch/PowerPC

  1. make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- ml405_defconfig
  2. make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- menuconfig
    • Kernel Options:
      • Set Initial Kernel Command String to:
        • console=ttyUL0 root=/dev/ram
    • Device Drivers:
    • Block Devices:
      • Change Default RAM Disk Size:
        • 65536
      • Character Devices:
        • Serial Drivers:
          • 'N' to 8250/16650 and Compatible serial support
          • 'Y' to Xilinx uart serial port support
          • 'Y' to Supprt for Console on Xilinx uartlite serial port
  3. Save Configuration
  4. make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- zImage
  5. Copy ramdisk.image.gz to:
    • linux-2.6-xlnx/arch/powerpc/boot/ramdisk.image.gz
  6. make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- zImage.initrd
    • Create Exectuable as:
      • linux-2.6-xlnx/arch/powerpc/boot/zImage.initrd
      • It is an ELF although it doesn't have the extension

Finishing Up

Use XMD to generate ACE file and test it on the Ml410

Personal tools