Recipes 4 SBCPowerQUICCII : Appendix A 

Download and Installation


30.April.2004 : Beta version now available

Known Limitations :

  1. Ethernet support on 3 FEC/FCC channels is limited to 100 Mbps
  2. COM2 serial port has not been tested

Development Environment :

RHL9, full installation, in particular, NFS and DHCP must be present on the Linux host.  The recipes provided below, for setting up NFS and DHCP have to be modified for other Linux hosts.


A typical embedded Linux distribution is make up of three main components:

  1. Cross-development toolchain  (ELDK version 2.1)
  2. Target root filesystem  (Monta Vista Linux Journeyman Edition 2.0)
  3. Linux kernel  (kernel.org version 2.4.25)

This distribution was developed utilizing the WindPower ICE from WindRiver and the VisionClick GUI, version 7.11a.  The ICE firmware has to be in-sync with VisionClick in order to support Linux development.  From the telnet window into the ICE, typing the version command on my system yields the following...

Firmware Type BSP Version 1.7c  Created On: Dec 29 2003 14:27:14

OS        version = V2.5.0

REPC    version = V2.5.0

NA        version = V4.0.5

If your version numbers are older than these, please contact your WindRiver representative.

In addition, two utilities associated with the Convert function had to be updated to correctly support Linux kernel debug.  Download this zip file and extract the contents into C:\ESTII.  You may want to save the existing files (convert and Objcvt) in case something goes wrong.

Additional information on the Linux kernel debug support built into the WRS tools is available.

Files of interest in the kernel directory tree.


Cross-Development ToolChain

This toolchain contains a 2.95.4 gcc compiler.  The tarball is a copy of the ELDK usr/ directory tree.

Recommended Installation Recipe

  1. Download tarball

  2. As root, extract tarball into /opt directory

  3. In development user's .bashrc file add following line

export PATH=$PATH:/opt/eldk-usr/bin

If a directory other than /opt is chosen to root the toolchain, step 3 above needs to be modified, as well as the CPATH macro setting in the kernel Makefile.


Target Root FileSystem

The target root filesystem is expected to be NFS-mounted by the target during the development process.

Recommended Installation Recipe

  1. Download tarball

  2. As root, extract tarball into /exports/rootfs directory

    1. NOTE: the /exports/rootfs directory tree is non-standard and needs to be created, this command suffices:  mkdir -p /exports/rootfs

  3. Add following line to /etc/exports file:  (omit line number)

    1. /exports/rootfs/wrspqii *(rw,no_root_squash,no_all_squash)

  4. Add following lines to /etc/dhcpd.conf file:  (omit line numbers)

    1. ddns-update-style ad-hoc;

    2. allow booting;

    3. allow bootp;

    4. deny unknown-clients;

    5. subnet aaa.aaa.aaa.aaa netmask bbb.bbb.bbb.bbb {

      1. default-lease-time 1209600;

      2. max-lease-time 31557600;

      3. group {

        1. host target {

          1. hardware ethernet cc:cc:cc:cc:cc:cc;

          2. fixed-address ddd.ddd.ddd.ddd;

          3. option root-path "/exports/rootfs/wrspqii";

        2. }

      4. }

    6. }

    aaa.aaa.aaa.aaa is subnet Linux host is on, e.g. 192.168.0.0

    bbb.bbb.bbb.bbb is appropriate netmask for subnet, e.g. 255.255.255.0

    target is hostname of the target box

    cc:cc:cc:cc:cc:cc is MAC address for target 10baseT ethernet channel (eth0)

    ddd.ddd.ddd.ddd is IP address for target, on same subnet as aaa.aaa.aaa.aaa

  5. Start or restart NFS : /etc/init.d/nfs start (or restart)

  6. Start or restart DHCP : /etc/init.d/dhcpd start (or restart)

  7. Synchronize NFS : exportfs -ra

    1. This command yields a warning about the default behavior of NFS changing.

If the /exports/rootfs is not used as the extraction point for the target's root filesystem, a number of steps in this recipe need to be modified, as well as the INSTALL_MOD_PATH macro in the kernel's root Makefile.  DHCP and NFS can be configured to start automatically when your Linux host boots.  If you need help with this, please email help@recipes4linux.com


Linux Kernel

When this port started, 2.4.25 was the latest (2.4.x) kernel available at www.kernel.org.

Recommended Installation Recipe

  1. Download tarball

  2. Extract tarball in development user's home directory tree

  3. Two macros in the kernel's root Makefile need to be modified if the toolchain or root filesystem were installed in non-default locations.  These macros are CPATH and INSTALL_MOD_PATH.

  4. cd to root of kernel tree

  5. make mrproper

  6. cp CONFIG .config

  7. make xconfig

  8. Save and Exit

  9. make dep

  10. make zImage

  11. make modules

  12. make modules_install

A compressed kernel image is found in .../arch/ppc/boot/images/zImage.embedded

It is highly recommended that you verify the base configuration boots on your system before you make any configuration changes to the kernel (e.g. make xconfig)


WRS Tool Support for Linux Kernel Debug

Make sure you have a copy of AppNote-254, title: visionCLICK 7.11 for LINUX, from Wind River.  A number of commands have been added to the emulator, available through the terminal window, to support Linux kernel debugging.

Become familiar with the MMU command, which sets up a MMU translation table for the emulator.  On my system, typing mmul, yields the following output:

Index Logical Physical Mask Area Type PID
00 0x21000000 0x21000000 0xffff0000 UNKNOWN 0xffffffff
01 0xf0010100 0xf0010100 0xffff0000 UNKNOWN 0xffffffff
02 0xc0000000 0x00000000 0xf0000000 VIRTUAL 0x00000000
03 0x00000000 0x00000000 0xf0000000 VIRTUAL 0x00000000

Index 00 gives you access to the Control Status Register described on page 34 of the SBCPowerQUICCII Engineering Reference Guide.

Index 01 gives you access to the internal register file, starting with the Memory Controller.

Index 02 gives you access to the virtual kernel space.

Index 03 gives you access to the full range of physical memory.

Since visionCLICK runs on a Windows box and the Linux kernel is developed on a Linux box, the kernel source code has to be on a Samba-mapped directory that the Windows box can see.  The simplest Samba configuration allows a user's home directory to be Samba-mapped so Windows boxes can see it.  If you followed the default recipe above for installing the kernel source code in a user's home directory tree, the default Samba configuration should suffice.  Make sure you add the Windows username/password to the Samba database.  If you need help configuring Samba, pleas email help@recipes4linux.com.


Files of Interest in the Kernel Tree

.../include/linux/init.h

A number of macros are redefined here to accommodate the current visionCLICK software.  The __init macros allow the kernel to reclaim memory only used during the boot process.  Unfortunately visionCLICK doesn't handle this very well at this time.  When a future release of visionCLICK fixes this limitation, the macros can be put back to their original settings.

.../arch/ppc/boot/images/zImage.embedded

This is the target file generated from the make zImage command.  Essentially it is a kernel loader and compressed kernel image.  The kernel loader sets the boot command line as well as initializing the bd_t structure with board specific information.

Utilizing this file to load the kernel, results in the following steps for kernel debug:

  1. Convert vmlinux in root of kernel tree

  2. Convert and load zImage.embedded

  3. Set breakpoint at 0x400140

  4. Go

  5. When BP is hit, load symbol file for vmlinux convert

  6. Set kernel breakpoints

  7. Go

.../arch/ppc/boot/simple/embed_config.c

This file contains the loader function that sets up the bd_t structure for this board.  Search on CONFIG_WRSPQII in this file.  The kernel boot line is taken from a configuration parameter.

.../arch/ppc/8260_io/fcc_enet.c

This file contains the FCC/FEC ethernet code for the three 10/100 ports on the board.  For low-level debug of packet traffic a print_packet function is available that can be called from the Ethernet Receive interrupt function (fcc_enet_rx) or the Ethernet Start Transmit function (fcc_enet_start_xmit).  The calls to the print_packet function are commented out in this release.

.../arch/ppc/platforms/wrspqii.h

Header file for this board.


Contact  mailto:tmike@recipes4linux.com

Copyright © 2004 Tools Made Tough