IXP1200 Linux How To

This How To explains how to set up an IXP1200 Linux development environment.

Getting Started

Setting up a TFTP server

Burning Cygmon into Flash

Configuring Cygmon to boot Linux on IXP12EB

Installing Cross Hosted toolchain

Building Linux kernel for IXP12EB

Customizing Linux Ramdisk

Using Minicom

Using NFS

Compiling hello world

Debugging hello world with remote GDB

Using the Microcode Workbench

Known Issues

Downloads

 


Getting Started

Hardware needed

 

Software needed

Make sure you use static IP addresses for IXP1200 and for Linux PC.  

Back to Top


Setting up a tftp server

If you want to boot the IXP1200 Linux off the network you will need to set up a tftp server on your x86 Linux host:

         For the RedHat 7.2 configure the file /etc/xinetd.d/tftp as follows.

service tftp
{
         socket_type         = dgram
         protocol            = udp
         wait                = yes
         user                = nobody
         log_on_success      += USERID
         log_on_failure      += USERID
         server              = /usr/sbin/in.tftpdp
         server_args         = /tftpboot -l
         disabled            = no
}

Copy following files into /tftpboot directory:

zImage                   Linux kernel image (To build your own kernel, see Building Linux kernel for IXP12EB)
ramdisk_img.gz         Ramdisk for Linux

 Back to Top


Burning Cygmon into Flash

 

Files needed

FUtil.exe utility to burn flash on ixp1200 eval system

flash.img flash image which includes cygmon

Hardware setup

Once the flash is programmed, you will have cygmon in the flash and can boot Linux.

Back to Top


Configuring Cygmon to boot Linux on IXP12EB

  • Open hyperterm and power cycle the eval system. Again hit space during the countdown and hit c for configure. This time at the boot manager you should see a fourth OS option, cygmon.
  • Select cygmon as the default OS. Also set the countdown value to 1 and boot by typing b
When Cygmon first boots, you must set up some parameters to instruct the system to boot Linux from the network.
  • 1 BOOTP/Manual 
    Set this to manual for Network downloads.
  • Local IP address 
    Set this to a unique IP address for your network.
  • Remote IP address 
    Set this to the IP address of your Host Linux fileserver.
  • Linux kernel file name 
    Set this to zImage
  • Linux ramdisk filename
    Set this to ramdisk_img.gz
  • Linux kernel load offset (C0808000)
    Set this to C0808000 to boot the kernel at the correct location.

Back to Top


Installing Cross Hosted toolchain

Intel IXA SDK v.2.01 comes with pre-compiled RPM package for ARM toolchain:
Volume II/cd1/rmps/armbe-v4b-fcs.i386.rpm

Installing this toolchain is as easy as with any RPM package for Linux:

You can also build and install ARM cross compiler from source files.

Back to Top


Building Linux kernel for IXP12EB

Source Files location:

Extract kernel tarball and apply patches. Enter kernel source directory:

Copy new zImage file to /tftpboot directory

Back to Top


Customizing Linux Ramdisk

  • Get the compressed Ramdisk image ramdisk_img.gz file to your directory

  • gunzip ramdisk_img

  • mkdir ramdisk

  • mount -o loop ramdisk_img ramdisk

  • The file system in the Ramdisk image is now in ramdiks/ directory. Make any necessary changes to Ramdisk file system.

  • umount ramdisk

  • gzip ramdisk_img

  • cp ramdisk_img.gz /tftpboot

Back to Top


Using Minicom

Instead of Hyperterm on Windows 98/NT, you can use minicom on Linux to connect over the serial port to the IXP1200. To set up minicom on your x86 Linux machine, first connect the serial port on your x86 Linux host to the IXP1200.

Configuring the serial port

Using minicom scripts

If you dont want to type in the ip address every single time you boot, you can use minicom scripts and use your time for more productive things like going to meetings. (thanks layne !!).

Copy the following minicom scripts into your /minicom directory.

bootixp

start

If the system hangs you can kill the script by typing CTRL C at the minicom window.

Back to Top


Using NFS

To use NFS with the IXP1200, you need to set up an NFS server on your Red Hat x86 machine.

Setting up the NFS server on your Red Hat x86 machine

root# rpm -qa | grep -i "nfs.*"

root# rpm -Uvh nfs-server-2.2beta40-1.i386.rpm

portmap: 10.3.19.0/255.255.255.0

/nfsdir 10.3.19.xx (rw)

where "/nfsdir" is the pathname of the directory that you want to export (to be visible to ixp1200) and 10.3.19.xx is the IP addr of your ixp1200. Alternately, you can have something like

/nfsdir *.sc.intel.com (rw)

          (or)

/nfsdir 10.3.19.0/255.25.255.0 (rw)

          (or)

/nfsdir 10.3.19.*

The former will allow anybody in sc.intel.com to have access to your nfs server and the latter only the machines in 10.3.19.*

(There are documented security holes. Somebody, theoretically, can wipe out your harddisk. ) You can also use readonly permissions (ro) instead of (rw).

        root# /sbin/service portmap status

         root# /sbin/service nfs status

Note: Ignore any warnings you get, unless it doesn't work!

For more details (like how to optimize for better speed, etc etc..)

http://www.linux.org/docs/ldp/howto/NFS-HOWTO.html

Setting up the NFS Client

This will be the ixp1200. The latest kernel and ramdisk image should be nfs ready. so all you need to do is start portmap and then mount. On the current ramdisk image portmap is automatically started when you do ifup. So just mount away

root# mount -t nfs server-ip-or-name:/nfsdir /nfs

Just to make sure that you have the correct image, try first connecting to an existing nfs server. You can use the machine 10.3.19.163 - the directory is /nfsdir.

Note: There are many different versions of nfs server. The daemons are also named differently. With many versions, comes the compatibilty problems. For the ixp1200 client, use only the above mentioned rpm for nfs server.

Back to Top


Compiling Hello World

Create your hello.c program. Then type

armv4b-unknown-linux-gcc mbig-endian hello.c o hello

All compiler utilities are prefixed with armv4b-unknown-linux-

Compiler options

armv4b-unknown-linux-gcc mbig-endian hello.c

armv4b-unknown-linux-ld EB hello.o foo.o o hello

Back to Top


Using GDB remotely

You can use GDB on your x86 Linux host to remotely debug applications running on the ixp1200.

Installing gdb

Debugging foo

gdbserver <hostip-addr>:<port number> foo <arguments>

e.g. gdbserver 10.3.19.128:12345 foo

gdb foo

            target remote <ixp1200-ipaddr>:<port number>

If you want a GUI front end, then type xxgdb foo instead of gdb foo. The binary for xxgdb can be the one with red-hat since it is only the frontend.

Back to Top


Using the Microcode workbench

cat > /etc/hosts

10.3.19.xxx <name-of-NT-host>  

 hit enter

then type CTRL-D to exit.  

        insmod /lib/modules/ue.o

       rs_udebug &

 

Back to Top


Known Issues

These are the currently known bugs/features

Back to Top


Downloads (from Netwinder)

You can download the binaries that are needed for ixp1200.

FUtil.exe          utility to burn flash on ixp1200 eval system

flash.img          flash image which includes cygmon

zImage             Linux kernel image

           ramdisk_img.gz   RamDisk for Linux 

        ixa.arm-v4b-1.i386.rpm RPM for Big endian cross compiler(armtoolchain).

ixp1200_linux.tar.gz contains the patch sources for creating ixp1200 armtoolchain and zImage for Linux. All other sources (binutils, gcc, glibc, Linux patches for StrongARM) are listed here at ftp://ftp.netwinder.org/users/u/urnaik/

         gdb                  x86 binary for Linux host for debug.

         bootixp             Expect script for bootup configuration for ixp1200.

         start                Expect script for bootup configuration for ixp1200.

         octal_gig_headers    Header files for Octalmac and Gigabit driver.

 

Back to Top