Arch/PPC vs Arch/PowerPC Tutorial
From RCSWiki
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:
- Project -> Project Options
- 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.
- 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
- Under OS & Library Settings change OS:
- Software -> Generate Libraries and BSPs
- This creates ppc405_0/libsrc/fdt/fdt.ds
- Copy fdt.ds to linux-2.6-xlnx/arch/powerpc/boot/dts/ml405.dts
Configure Linux under Arch/PowerPC
- make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- ml405_defconfig
- make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- menuconfig
- Kernel Options:
- Set Initial Kernel Command String to:
- console=ttyUL0 root=/dev/ram
- Set Initial Kernel Command String to:
- 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
- Serial Drivers:
- Change Default RAM Disk Size:
- Kernel Options:
- Save Configuration
- make ARCH=powerpc CROSS_COMPILE=powerpc-405-linux-gnu- zImage
- Copy ramdisk.image.gz to:
- linux-2.6-xlnx/arch/powerpc/boot/ramdisk.image.gz
- 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
- Create Exectuable as:
Finishing Up
Use XMD to generate ACE file and test it on the Ml410
