Linux XUPV2P

Linux On the XUPV2P

Setting up Linux on the XUPV2P. Most of this is ripoff of but its more specific to the xupv2p.


First of all I'm going to assume a couple of things.
1. Your using an x86 PC.
2. You want to use the PowerPC on the XUP
3. You have a Crosstool setup installed in /opt/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-405-linux-gnu/bin/
4. Your using EDK 9.1i

Creating a Base System

Create a new project using base system builder. These screen shots should show you all the options we used.
BSB-1 BSB-2 BSB-3 BSB-4 BSB-5 BSB-6 BSB-7 BSB-8 BSB-9 BSB-10 BSB-11 BSB-12

Setting up the software settings

Here is our software settings
Notice the our bootargs are set to console=/dev/ttyS0,115200 root=/dev/xsa2 rw <— this little rw addition will save you tons of headache when you are trying to understand why you cant write to the disk
Here's two tables that describe the bootargs

device type console text
xps_uart16550 console=ttySN
xps_uartlite console=ttyULN
N is 0 for the first device of the type. N is 1 for the second device of the type etc.
root filesystem location bootarg options
ramdisk root=/dev/ram
compact flash disk root=/dev/xsaN (where N is the partition number of the root file system.)
nfs root=/dev/nfs nfsroot=<nfs server>:<nfs share>,tcp (e.g. root=/dev/nfs nfsroot=,tcp)

Git and Setup Linux

We will be using the open-source Linux version from Xilinx. Change to your project directory.

cd <project-directory> # This is the project directory where your system.xmp is stored
git clone git://  # Creates a kernel tree in linux-2.6-xlnx folder

Link your device tree into the Linux build system and for convenience create a symlink to the Linux image file in the root project directory.

cd linux-2.6-xlnx/arch/powerpc/boot/dts
ln -s ../../../../../ppc405_0/libsrc/device-tree/xilinx.dts virtex405-xupv2p.dts
cd <project-directory>
ln -s linux-2.6-xlnx/arch/powerpc/boot/simpleImage.virtex405-xupv2p.elf .

Generate a bit file

We know need to generate a bitfile and download it to the board. Generate libraries and BSPs.

In EDK click
Hardware -> Download Bitstream

Software -> Generate Libraries and BSPs

Refernce DebianRFS here.

Create a Linux Kernel

Go into the linux-2.6-xlnx directory and run the following

ppckmake 40x/virtex4_defconfig # Sets up a default PowerPC 405 on Xilinx combination.
ppckmake menuconfig # This will start the configuration interface.  Add appropriate drivers and exit.
ppckmake simpleImage.virtex405-xupv2p # Builds an elf file compatible with XMD

Testing on JTAG

Start XMD and load the kernel into memory using JTAG

connect ppc hw 
dow simpleImage.virtex405-xupv2p.elf

Congrats, On serial you should see Linux start to boot.

-> TODO: ACE Files