Ron Linux 2.6
From RCSWiki
Ron's Notes For Building Linux 2.6 System
WARNING: This page is not finished or tested! I'm just creating it as I figure it out.
(I.e., DO NOT RELY on this info yet!)
Set Up
PS1="`hostname`-cross> " bash
export CTARGET=powerpc-405-linux-gnu
export CHOST=i386-cross-linux-gnu
PATH=${PATH}:/opt/crosstool/gcc-4.2.1-glibc-2.3.6/powerpc-405-linux-gnu/bin
source /opt/xilinx/9.1i/settings.sh
Prepare Hardware
bsbwiz
Here's a simple prepared system.bsb file to use for the wizard.
xps system
- Software Platform Settings
- Change OS & Library Settings to linux_2_6
- OS and Libraries
- connected_peripherals
- set memory size to 0x0400 0000 (NO SPACE, 64MB of on-board DDR)
- set bus freq for uart 100 000 000 (NO SPACES, 100 MHz bus)
- target directory is optional (use absolute path if you do, I don't use it at all)
- leave software Platform Settings (click OK)
- click LIBGEN -- this creates a
./ppc405_0/libsrc/linux_2_6_v1_00_a/linux/arch/ppc/platforms/4xx/xparameters/xparameters_ml40x.h
file that we will need
- click BRAM INIT -- this generates a
implementation/download.bitwe will need later
Build Root File System
mkdir mkrootfs ; cd mkrootfs
(cp scripts)
sh mkext2.sh
This creates a ramdisk.image.gz we will need below.
Build Linux Kernel
- git a copy of linux-2.6-virtex
git clone git://git.secretlab.ca/git/linux-2.6-virtex.git
(may take 3-4 minutes to download, about 600 MiB)
- copy xparameters into place
cp -i ../hw/ppc405_0/libsrc/linux_2_6_v1_00_a/linux/arch/ppc/platforms/4xx/xparameters/xparameters_ml40x.h arch/ppc/platforms/4xx/xparameters/xparameters_ml403.h
- configure the kernel
- start with a pre-configured sample.config file
cp -i sample.config .config
make ARCH=ppc CROSS_COMPILE=${CTARGET}- oldconfig
- adapt if you like
make ARCH=ppc CROSS_COMPILE=${CTARGET}- menuconfig
- copy ramdisk.image.gz into place
cp -i ../mkrootfs/ramdisk.image.gz arch/ppc/boot/images/ramdisk.image.gz
- compile with ramdisk
make ARCH=ppc CROSS_COMPILE=${CTARGET}- zImage.initrd
Assemble ACE File
cd ..
mkdir ace
cd ace
cp /opt/xilinx/9.1i/edk/data/xmd/genace.tcl .
xmd -tcl genace.tcl -jprog -hw ../hw/implementation/download.bit \
-elf ../linux-2.6-virtex/arch/ppc/boot/images/zImage.initrd.elf \
-ace test1.ace -board ml410
