Ron Linux 2.6

From RCSWiki

Jump to: navigation, search

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
  1. Software Platform Settings
  2. Change OS & Library Settings to linux_2_6
  3. OS and Libraries
    1. connected_peripherals
    2. set memory size to 0x0400 0000 (NO SPACE, 64MB of on-board DDR)
    3. set bus freq for uart 100 000 000 (NO SPACES, 100 MHz bus)
    4. target directory is optional (use absolute path if you do, I don't use it at all)
  4. leave software Platform Settings (click OK)
  5. 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

  1. click BRAM INIT -- this generates a implementation/download.bit we 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

  1. 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)

  1. 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
  1. configure the kernel
    1. start with a pre-configured sample.config file
cp -i sample.config .config
make ARCH=ppc CROSS_COMPILE=${CTARGET}- oldconfig
    1. adapt if you like
make ARCH=ppc CROSS_COMPILE=${CTARGET}- menuconfig
    1. copy ramdisk.image.gz into place
cp -i ../mkrootfs/ramdisk.image.gz arch/ppc/boot/images/ramdisk.image.gz
    1. 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
Personal tools