Linux Setup guide for ENP-XXXX

advertisement
Linux Setup guide for ENP-XXXX
7/12/2016
Revision 1.0
1
1.
INTRODUCTION
4
2.
CAVEATS
5
3.
CONFIGURING ROM BASED COMPONENTS
6
3.1.
Configuring the Rom based components on the ENP-2505/6
3.1.1.
Boot Manager Configuration
3.1.2.
Flashing Cygmon into the Flash
3.1.3.
Configuring Cygmon to boot Linux from PCI
6
3.2.
Configuring the Rom based components on the ENP-3511
3.2.1.
Boot Manager Configuration
3.2.2.
Flashing Cygmon into the Flash
3.2.3.
Configuring Cygmon to boot Linux from the 82559 devices.
9
4.
6
6
8
9
9
9
CONFIGURING THE LINUX HOST
11
4.1.
Boot/Install RedHat 7.2 from the CD-ROM
11
4.2.
Upgrading the Host RedHat Linux Kernel
12
4.3.
Configure TFTP
13
4.4.
Configure DHCP
13
4.5.
Linux Host NFS configuration
4.5.1.
Configuring NFS for the ENP-2505/6
4.5.2.
Configure NFS for the ENP-3511
5.
14
14
14
INSTALL THE INTEL IXA SDK 2.01
15
5.1.
Installing the IXA SDK on the Linux Host
15
5.2.
Installing IXA SDK on the Windows Development Workstation
15
6.
ENP CONFIGURATION
17
6.1.
ENP Software Installation
17
6.2.
Rebuilding the ENP Linux kernel
17
6.3.
Applying the IXA SDK patch
17
6.4.
Rebuilding the pciDg driver module
18
6.5.
Rebuilding the SDK
18
7.
ENP2505/6 SPECIFIC CONFIGURATION
20
7.1.
Installing the ENP-2505 and ENP-2506 IXP1200 PCI Board
20
7.2.
Booting the ENP-2505/6
20
2
7.3.
Changes specific to the ENP-2506
20
7.4.
Verifying ENP-2505/6 Driver operation
21
7.5.
ENP-2505 and ENP-2506 NFS Filesystem
21
7.6.
Completing the Host networking configuration
22
8.
ENP-3511 SPECIFIC CONFIGURATION
23
8.1.
NFS issue on the C Stepping IXP1200
23
8.2.
21555 interrupt on the ENP-3511
23
8.3.
Quick setup for the ENP-3511
23
9.
RUNNING THE IXA SDK DEMO APPLICATIONS WITHOUT THE WORKBENCH
9.1.
Simple Count Application
9.1.1.
Compiling the microcode
9.1.2.
Compiling the Core Component of the MicroACE
9.1.3.
Starting the Count Application
9.1.4.
Stopping the Count Application
24
9.2.
26
L3 Forwarding Application
24
24
24
25
26
10. DEVELOPING AND DEBUGGING MICROCODE USING THE DEVELOPER
WORKBENCH
28
10.1.
Simple Count Application
28
10.2.
Starting the Count Application
28
10.3.
Downloading the Microcode from the workbench
10.3.1.
Stopping the Count Application
28
29
REFERENCES
Document Title
Document Source
ENP-2505 Hardware Reference Manual
ENP SDK Developers Guide
IXA SDK 2.01 Installation and Setup Guide
IXA SDK 2.01 ACE Programming Framework
SDK 2.01 Tutorial
GRUB Manual
RadiSys Corporation
RadiSys Corporation
Intel Corporation.
Intel Corporation.
http://www.gnu.org/manual/grub-0.92/grub.html
3
1. Introduction
This document describes how to boot embedded Linux on the various members of the RadiSys ENP
Embedded Network Processor family.
The supported embedded Linux version is 2.3.99 based on the kernel supplied by Intel in the IXA SDK
2.0.1 release.
Two different configurations are available depending on which ENP board you have. The first
configuration which supports the ENP-2505 and ENP-2506 the embedded Linux kernel and filesystem
are loaded into ENP-2505 SDRAM over the PCI bus (through the 21555 non-transparent bridge) from
the System Host. This host must be running RedHat Linux 7.2. This configuration requires a newer
version of the Linux kernel than that supplied with RedHat Linux 7.2 release. Instructions are provide
later in the guide to upgrade to this kernel.
The second configuration supports the ENP-3511, where the embedded Linux kernel and filesystem are
loaded over the 82559 network devices on the ENP-3511.
4
2. Caveats
Please note the current known limitations below:

This document describes a configuration for booting Linux on the RadiSys Corporation ENP2505/6 and ENP-3511 cards only.
 A problem appears to exist in the C stepping of the IXP1200 Network Processor in the PCI DMA
engines, which prevents connection to a NFS Server. A workaround is provided while this issue is
investigated further. This workaround is described later in the guide.
 On the ENP-3511 the 21555 non-transparent bridge generates an Interrupt after power-up, which if
not handled causes the system to hang when the network is enabled. A workaround is provided and
is described later in the guide.
 Deploying and debugging microcode using the Developer Workbench is not fully supported using
the ENP-2506 card in this release.
5
3. Configuring Rom based components
3.1.
Configuring the Rom based components on the ENP-2505/6
3.1.1.
Boot Manager Configuration
To boot embedded Linux OS, the BootManager must first be configured to boot Cygmon.
 Set the Enp board’s switches to the BootManager setting
Refer to the ENP-2505/6 Hardware Reference Manual for more information about the available
jumper settings.

Set your COM port to:
Baud rate
Parity
Data bits
Stop bits
Flow Control

38400
no parity
8
1
None
Power on the ENP board. The BootManager starts and displays the follow message on the serial
port:
Press space bar to stop auto-boot...
10

Press the space bar before the countdown reaches 0 (zero). The BootManager prompt displays:
[BootMgr]

Print the List of available boot options by entering the command:
p
This list displays:
OS list:
0 Flash Utility
1 Monitor
2 Cygmon
3 VxWorks
4 OS-9
Default OS: 2
Countdown value: 10

Change the default OS to Cygmon by entering this command at the BootManager command
prompt.
C
Set the default OS to “2”, or Cygmon before proceeding.

Reboot the ENP-2505/6 and allow the BootManager to complete the countdown. The system
should boot Cygmon and display the following prompt:
Cygmon>
3.1.2.
Flashing Cygmon into the Flash
Prior to the release of the ENP SDK 2.01 the Cygmon linux loader was not integrated into the ROM’s
for the ENP-2505/6. To flash this component in flash you should first refer to Appendix C of the ENP
6
SDK Manual and the Hardware Reference guide for the appropriate product before updating the flash
contents.
 Set the Enp board’s switches to the BootManager setting
Refer to the ENP-2505/6 Hardware Reference Manual for more information about the available
jumper settings.

Connect the supplied serial cable to the ENP board and start a terminal emulator program (like
Hyperterm). Configure the Comport setting to be the following
Baud rate
Parity
Data bits
Stop bits
Flow Control

38400
no parity
8
1
None
Reboot the ENP board and you should see the BootManager countdown as shown.
Init IXF440 MAC Addresses: succeeded.
Press space bar to stop auto-boot...
10

Press the space bar before the countdown reaches 0 (zero). The BootManager prompt displays:
[BootMgr]

Type "b0" to enter the Flash update mode.
[BootMgr]: b0
FlashUtil, Version 1.1.0

At this point disconnect the terminal emulator. Copy the attached two files to a new directory and
'cd' to that directory in a DOS window. Use the command
futil -f enp_250x_cygmon.img.swap
This Cygmon image is contained in ENP SDK 2.01.

To update cygmon area the starting offset should be set to 80000 and the ending offset to C0000.
When prompted say Yes to updating the Reserved or Cygmon area.
D:\cygmon\enp2505>futil -f enp_250x_cygmon.img.swap
Flash Utility, Version 1.1
Numeric parameters (other than the bank and comm port) should be
entered as hexadecimal numbers without the leading '0x'.
Enter a blank line to accept the default value.
Enter a period ('.') to abort the program.
Use Serial Port (Yes):
Comm port (1):
FlashUtil, Version 1.1.1
CPU Revision: 6901C123
Flash Width: 32
Flash Bank Size: 4096 KBytes
Flash Type Bank[0]: 28F320C3-B
Flash Type Bank[1]: 28F320C3-B
Flash Type Bank[2]: 28F320C3-B
Flash Type Bank[3]: 28F320C3-B
Starting at bank 0
7
Filename (enp_250x_cygmon.img.swap):
The first instruction is not a branch instruction.
This does not appear to be a valid ARM file, do you want to continue (No):
yes
Starting offset in flash (000000): 80000
Ending offset in flash (1C0000): c0000
Starting offset in file (000000):
Do you want to re-program the Reserved partition (Yes): yes
Sending data to remote system...
Percent complete: 100
Updating flash...
Percent Complete: 100
done

Re-connect the terminal emulator and reboot the ENP-2505/6 and again interrupt the BootManager
countdown. Typing 'b2' will then boot to Cygmon. Refer to the ENP SDK Manual for other
information concerning the BootManager parameters.
3.1.3.
Configuring Cygmon to boot Linux from PCI
When Cygmon first boots, you must set up some parameters to instruct the system to boot Linux from
the PCI bus.

List the boot options by entering this command at the Cygmon prompt:
Cygmon> bo
The current boot options display:
[BootOptions]:
1 BOOTP/Manual (manual)
2 Local IP (209.162.222.144)
3 Remote IP (209.162.222.149)
4 Linux kernel file name (zImage)
5 Linux ramdisk file name (ramdisk_img.gz)
6 Linux kernel load offset (C4008000)
7 Linux boot command line string ()
8 Countdown to auto-boot linux (1)
9 Starting SDRAM offset for host PCI access (0 MB)
10 SDRAM window size for host PCI access (256 MB)
11 Linux download mode [1] 0=FTP 1=HOST
Enter option number (1 to 11), "q" to quit, "s" to
[BootOptions]:

save:
Ensure that the following parameters values are set:

1 BOOTP/Manual
Set this to manual for PCI download.

6 Linux kernel load offset
Set this to C4008000 to boot the kernel at the correct location.

9 Starting SDRAM offset for host PCI access (0 MB)
10 SDRAM window size for host PCI access (256 MB)
Set these to open the correct PCI window through the 2155 non-transparent bridge.
Starting SDRAM offset must be 0 and the Window must be 256Mbytes at present.

11 Linux download mode
Set this to host for PCI download.
8

Reboot the ENP-2505/6 and when Cygmon automatically boots the following message should be
continuously printed to the serial port.
Press space bar to abort host download mode....
Press space bar to abort host download mode....
Press space bar to abort host download mode....
3.2.
Configuring the Rom based components on the ENP-3511
3.2.1.
Boot Manager Configuration
Please set up the BootManager on the ENP-3511 by referring to the previous section describing ENP2505/6 BootManager configuration.
3.2.2.
Flashing Cygmon into the Flash
Please refer to the procedure for flashing the ENP2505 and ENP2506 earlier in this guide. This should
be followed to update the ENP-3511, with the exception that the Cygmon image for the ENP-3511 is
enp_3511_cygmon.img.swap
This Cygmon image is contained in ENP SDK 2.01.
3.2.3.
Configuring Cygmon to boot Linux from the 82559 devices.
When Cygmon first boots, you must set up some parameters to instruct the system to boot Linux from
the network.

List the boot options by entering this command at the Cygmon prompt:
Cygmon> bo
The current boot options display:
[BootOptions]:
1 BOOTP/Manual (manual)
2 Local IP (209.162.222.144)
3 Remote IP (209.162.222.149)
4 Linux kernel file name (zImage)
5 Linux ramdisk file name (ramdisk_img.gz)
6 Linux kernel load offset (C4008000)
7 Linux boot command line string ()
8 Countdown to auto-boot linux (1)
9 Starting SDRAM offset for host PCI access (0 MB)
10 SDRAM window size for host PCI access (256 MB)
11 Linux download mode [0] 0=FTP 1=HOST
Enter option number (1 to 11), "q" to quit, "s" to save:
[BootOptions]:

Ensure that the following parameters values are set:

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.
9


Linux kernel file name
Set this to /tftpboot/zImage

Linux ramdisk filename
Set this to /tftpboot/ramdisk_img_bv.gz

6 Linux kernel load offset (C4008000)
Set this to C4008000 to boot the kernel at the correct location.

11 Linux download mode [1] 0=FTP 1=HOST
Set this to FTP for Network downloads.
Reboot the ENP-3511 and use the command to boot the Linux kernel:
gl
The Following should be observed:
TFTPing /tftpboot/zImage...
file transfer complete - total 487596 bytes
TFTPing /tftpboot/ramdisk_img_bv.gz...
file transfer complete - total 2184723 bytes
10
4. Configuring the Linux Host
4.1.
Boot/Install RedHat 7.2 from the CD-ROM
When installing RedHat 7.2 on the host system, you can accept most installation defaults with the
exception of the following:

Installation Type:
Custom

Disk Partitioning Setup:
Manually partition with Disk Druid

Disk Setup. While this can be setup as the user desires, the configuration will affect the setup
of /etc/grub.conf when configuring the system to use a later kernel. Our configuration is setup
on a formatted drive as follows:
1.
Delete /dev/hdb1 partition to make room to install Linux.
2.
Click New to create first of three partitions:
Mount Point: /boot
Filesystem Type: ext2
Size (MB): 128
Additional Size Options: “Fixed size”
3.
Create second partition:
Mount Point: <Not Applicable>
Filesystem Type: swap
Size (MB): 512 (should equal RAM size on the host)
Additional Size Options: “Fixed size”
4.
Create third partition:
Mount Point: /
Filesystem Type: ext2
Additional Size Options: “Fill to maximum allowable
size”

Boot Loader Configuration
Use GRUB as the boot loader

Install Boot Loader record on:
/dev/hda Master Boot Record (MBR)

Firewall Configuration
No firewall

Account Configuration
Set root password
Add ixa user account.
11

Package Selection. Keep defaults, except for the following groups listed below.
NFS File Server
Software Development
Kernel Development
Windows Compatibility / Interoperability

Boot Disk Creation
NOTE: It is strongly recommended that a boot disk should be created for recovery purposes.
4.2.
Upgrading the Host RedHat Linux Kernel
NOTE: This step can safely be ignored if you are using an ENP-3511 as your target hardware and you
are booting through the on-board 82559 Ethernet devices.
The ENP-2505/6 PCI drivers require a newer version of the Linux kernel and header files than those
supplied with the RedHat Linux 7.2 distribution. Use the file linux-2.4-17.src.rpm provided
on the RadiSys ENP SDK 2.01 CD-ROM to install the newer kernel and header files for Linux.
1. Log into Linux as root.
2. Mount and Change to /ENP_LINUX_SDK/Host_Linux_upgrade directory on
RadiSys ENP SDK 2.01 CD-ROM.
3. Use the following command to update the kernel installed on the system.
 rpm –recompile linux-2.4-17.src.rpm
Ensure that this step completes error free. It make be necessary to modify the
environment variable $PATH to include /sbin if not already present.
4. Modify /etc/grub.conf to add an additional boot option for the 2.4-17 kernel.
Sample Configuration
Your system’s configuration may not match this sample. Refer to the Grub manual for the
correct configuration for your system.
NOTE: The updated kernel may display a warning message related to system audio devices if
these are present on your system. These messages may appear as Kudzu message or a startup
warning. These can be safely ignored.
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.7)
root (hd0,0)
kernel vmlinuz-2.4.7-10 ro root=/dev/hda3
initrd /initrd-2.4.7-10.img
title Red Hat Linux (2.4.17)
root (hd0,0)
kernel /vmlinuz-2.4.17 ro root=/dev/hda3
initrd /initrd-2.4.7-10.img
5.
Reboot system and verify that the Grub setup screen includes Linux Kernel 2.4.17 and the
original Linux kernel Linux 2.4.as boot options.
6.
Boot the updated Linux kernel to verify the kernel upgrade was successful.
7.
The default boot option can be set to always boot the desired kernel. As an example in the
validation system the following applies:
Default = 0 will boot vmlinuz-2.4.7-10
Default = 1 will boot vmlinuz-2.4.17
12
NOTE: This configuration is optimized for a Pentium 4 based Host Linux system. If another Host
Linux system type is used, the .config file supplied in the RPM file may have to be modified.
 List the files contained in the RPM
rpm2cpio linux-2.4-17.src.rpm | cpio –t
 Extract the files contained in the RPM
rpm2cpio linux-2.4-17.src.rpm | cpio –ivd config.tar
rpm2cpio linux-2.4-17.src.rpm | cpio –ivd linux-2.4.17.tar.gz
rpm2cpio linux-2.4-17.src.rpm | cpio –ivd linux.spec

Copy the RPM files to /usr/src/redhat/SOURCES
 Rebuild the RPM file using the command:
rpm –ba linux.spec
 Then rebuild the kernel using the command
rpm –recompile linux-2.4-17.src.rpm
4.3.
Configure TFTP
The Linux Host must be configured to allow the ENP boards to boot the Linux kernel and filesystem
using the TFTP protocol.

For the RedHat 7.2 configure the file /etc/xinetd.d/tftp as follows.
service tftp
{
socket_type
protocol
wait
user
log_on_success
log_on_failure
server
server_args
disabled
}
= dgram
= udp
= yes
= nobody
+= USERID
+= USERID
= /usr/sbin/in.tftpd
= /tftpboot -l
= no
NOTE: The latest version of tftp-0.28-2.i386.rpm appears to already assume a path of /tftpboot.
Therefore the Cygmon boot Options need to be modified to remove this path.
If this is the case for your setup, set the kernel filename and ramdisk filename as follows:
4 Linux kernel file name (zImage)
5 Linux ramdisk file name (ramdisk_img.gz)
4.4.
Configure DHCP
The DHCP protocol should be configured to supply an IP address to the ENP system using the BOOTP
protocol.
1.
Edit or create the configuration file /etc/dhcpd.conf adding
 Set a.b.c.d to your subnet address
13




Set e.f.g.h to your subnet mask
Set i.j.k.l to your gateway address
Set m.n.o.p to your target IP address
Set xx:xx:xx:xx:xx:xx to your ENP MAC address.
allow bootp;
subnet a.b.c.d netmask e.f.g.h {
default-lease-time 1209600;
max-lease-time 31557600;
option routers i.j.k.l;
group {
host enp_linux.radisys.com {
hardware ethernet xx:xx:xx:xx:xx:xx;
fixed-address m.n.o.p;
}
}
}
2.
Create the file /var/lib/dhcp/dhcpd.leases with the following command:
touch /var/lib/dhcp/dhcpd.leases
3.
Restart dhcpd using the command
/etc/rc.d/init.d/dhcpd restart
4.
To configure DHCP to startup at boot time use the command
/sbin/chkconfig dhcpd on
4.5.
Linux Host NFS configuration
The NFS (Network Filesystem) is used to connect to the IXA SDK filesystem already installed on the
Host Linux system.
4.5.1.
Configuring NFS for the ENP-2505/6
When using the ENP-2505/6 NFS is automatically started by the script
./bootixp
No further configuration is required.
4.5.2.
Configure NFS for the ENP-3511
When using the ENP-3511 you must configure your host to allow the ENP-3511 to connect to a
filesystem using NFS.

Add the following entry into /etc/exports
/opt *(rw)

Restart the NFS daemon using the command
/etc/rc.d.init.d/nfs restart

To configure NFS to startup at boot time use the command
/sbin/chkconfig nfs on

Synchronize the NFS server using the command
/usr/sbin/exportfs –ra
14
5. Install the Intel IXA SDK 2.01
Before starting the Intel IXA SDK installation it is recommended that the user first read the IXA SDK
2.01 Installation and Setup Guide. The Chapter entitled “Installing and Configuring the IXA SDK for a
Linux Development Environment” is particularly appropriate to this configuration.
If your target is the ENP-2505/6 PCI card, the supported configuration is very different to those
configurations described in the IXA SDK Installation and Setup Guide. However If you plan to develop
on the ENP-3511 then this IXA document and the other Intel IXA SDK documentation will be you
primary reference.
Installation of Intel’s IXA SDK 2.01 will be completed in two sections
 Windows Development Workstation
Use the Windows NT workstation to develop and deploy microcode applications targeted for the
IXP1200 microengines
 Linux Host system.
Use the Linux Host to develop software for the StrongARM core (core components).
NOTE: You will not be installing the ENP-2505/6 PCI card during the setup of the IXA SDK
software. The setup of the ENP-2505/6 board will come in a later section.
5.1.
Installing the IXA SDK on the Linux Host
To install the IXA SDK on your development workstation:
1. Log in as root on your Linux host system.
2. Mount the IXA SDK CD-ROM titled “IXA SDK VOLII CD 1” with the following command:
cd /mnt/cdrom/rpms
3.
Use the RPM utility to install the IXA SDK packages:
rpm -i –v ixa.sdk-2.01.D-fcs.i386.rpm
rpm -i –v ixa.executive-2.01.D-fcs.i386.rpm
rpm -i –v armbe-v4b-fcs.i386.rpm
rpm -i –v ixa.binaries-2.01.D-fcs.i386.rpm
NOTE: The installation directory is /opt/ixasdk and is fixed.
4.
To make necessary environment variables permanent, modify the file /etc/profile
# IXA SDK path settings
if ! echo $PATH | /bin/grep -q "/usr/local/armbe/bin" ; then
PATH="$PATH:/usr/local/armbe/bin"
fi
if ! echo $PATH | /bin/grep -q "/opt/ixasdk/bin" ; then
PATH="$PATH:/opt/ixasdk/bin"
fi
IXROOT="/opt/ixasdk"
CONFIG="ARM_BE"
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC IXROOT CONFIG
5.2.
Installing IXA SDK on the Windows Development Workstation
To compile and deploy IXP1200 microcode, you must install the IXA Developers Workbench on a
Windows NT system.
NOTE: Windows 2000 is also supported by Intel Developer’s Workbench although this has not been
validated for this particular setup.
1.
Run SETUP.EXE from Workbench directory located on IXA SDK CD1.
15
2.
3.
Ensure that you do the following when prompted:
 Install IXP1200 Portmapper service
 Enter the Micro C compiler license Key. (If you don’t have one, a 60-day trail version is
available.)
Install Cygwin, selecting the following when prompted:
 Install from Local Directory
 Accept default install directory
 Default Text File Type = Unix
 Install for = All
4.
Click fcs to skip the following packages:
 IXA_SDK
 IXA_ambe_toolchain
 IXA_bincomps
 IXA_executive
5.
6.
Complete rest of installation as instructed by the setup program.
Complete these post-installation tasks:
 Install Adobe Acrobat
 Install the IXA SDK 2.01 update patch
The patch is located on the IXA EDU Workstation CD-Rom in the IXA_SDK_updates
directory. Refer to the readme file in that directory for installation instructions.
 Update cygwin.bat file.
Cygwin.bat is located on the IXA EDU Workstation CD-Rom in the IXA_SDK_updates
directory. Copy it into the C:\eLinuxIDE-IXP1200\cygwin directory.
16
6. ENP Configuration
6.1.
ENP Software Installation
The following steps will setup the drivers for the ENP boards under Linux. This package contains the
drivers needed to boot Linux on the ENP-2505 and ENP-2506 and communicate with the board once
booted.
NOTE: The supported configuration for the ENP-3511 differs from the ENP-2505 and ENP-2506. The
ENP-3511 has two onboard 82559 Ethernet devices and the Linux kernel is booted over the network
through these devices. Although it is possible to also boot Linux through the 21555 non-transparent
PCI Bridge, this is not yet a supported configuration on the ENP-3511. This step should not however
be skipped as the IXP kernel sources are unpacked and rebuilt during this step.
Change to the /ENP_LINUX_SDK/ENP_2505_Driver directory on the RadiSys ENP SDK 2.01 CD.
To install the ENP-2505 card driver package use the following commands:
 cd /mnt/cdrom/ENP_LINUX_SDK/ENP_2505_Driver
 rpm –recompile boot_drv-2.0-1.src.rpm
This package will install the ENP-2505/6 drivers, embedded Linux (2.3.99) for the ENP, boot scripts
and the source for each of these components in the directory
/opt/ixasdk/enp-2505
Reboot the Linux Host and preparation for installing the ENP-2505/6 into your Host system.
6.2.
Rebuilding the ENP Linux kernel
The 2.3.99 Linux kernel contains an API in the Linux kernel designed to provide information about the
system. In order to pass the correct configuration to various drivers and modules, the Linux kernel must
be rebuilt for the particular ENP board at hand.
The ENP Linux kernel is contained at:
/opt/ixasdk/enp2505/src/linuxIXAedu
To rebuild the kernel for the appropriate target
cd /opt/ixasdk/enp2505/src/linuxIXAedu
make xconfig
Select “system and Processor types”
Under “IXP Board type” select the appropriate ENP hardware type.
Select “Save and exit”
To rebuild type the command
make dep; make clean; make zImage
NOTE: This procedure will copy the zImage kernel into the required location for the PCI download
scripts.
6.3.
Applying the IXA SDK patch
The Intel IXA SDK supports the Spectacle Island system only. Some changes are required in order to
support the various ENP platforms. These changes are supplied in the form of a patch file on the
ENPSDK 2.01 CD and is called:
/ENP_LINUX_SDK/ENP_UPDATES_FOR_IXA_SDK/enp_changes_ixa_sdk.patc
h
17
To apply this patch, follow the following instructions.





cd /opt
tar cvzf ixasdk.tgz ixasdk
cp <CD>/ENP_UPDATES_FOR_IXA_SDK/enp_changes_ixa_sdk.patch /opt
cd /opt/ixasdk
cat ../enp_changes_ixa_sdk.patch | patch -p1
You should observe the following listing:
[root@skellig ixasdk]# cat ../enp_changes_ixa_sdk.patch | patch -p1
patching file src/Makefile.rules
patching file src/arch.incl
patching file src/microace/aces/interface_ace/include/ixbus.h
patching
file
src/microace/aces/interface_ace/source/driver/gigadrv/ixf1002.h
patching file src/microace/aces/interface_ace/source/driver/octdrv/octmac.c
patching file src/microace/aces/interface_ace/source/driver/octdrv/octmac.h
patching file src/microace/aces/interface_ace/source/ingress/ingress_ace.cpp
patching file src/microace/aces/tutorial2/packet_monitor/source/init.c
patching file src/microace/apps/ixconfig/main.c
patching file src/microace/common/resource_manager/driver/microengine.c
patching
file
src/microace/common/wbench/BoardSupport/linux/IXP1200EB/sysLib.c
patching file src/microace/common/wbench/Include/config_1200.h
patching file src/microace/common/wbench/Makefile
patching
file
src/microace/common/wbench/SA1_CoreLibs/app_1200/config_1200.cpp
patching file src/microace/common/wbench/SA1_CoreLibs/ue/Makefile
patching file src/microace/common/wbench/SA1_CoreLibs/uelib/Makefile
patching file src/microace/common/wbench/Share/rs_udebug/Makefile
patching file src/microace/common/wbench/Utils/Makefile
patching file src/microace/projects/Count_8_1/ixsys_count_8_1.config
[root@skellig ixasdk]#
Note: Please ensure all patches are applied
6.4.
before continuing.
Rebuilding the pciDg driver module
The pciDg driver modules are supplied prebuilt for the IXP and the X86 side of the 21555 bridge. If
these need to be rebuilt, edit the following file:
/opt/ixasdk/enp-2505/src/pciDg/rules.mk
Set the following variables to match your setup.
ARM-TOOLS = /usr/local/armbe/bin/armv4b-unknown-linuxARM-KERNEL-INCLUDES = $(PWD)/../linux/include
X86-KERNEL-INCLUDES =
Or create a symbolic link to the IXP1200 Linux header files with the command:
ln –s /opt/ixasdk/src/linuxIXAedu /opt/ixasdk/src/linux
Rebuild the module using the command:
make clean; make
6.5.
Rebuilding the SDK
Before using with the various ENP platforms, the SDK needs to be re-built. Follow these steps:
1.
Set up the environment variable IX_TARGET_TYPE in the file:
18
/opt/ixasdk/src/arch.incl
Current supported targets are
 ENP2505
 ENP2506
 ENP3511
 SPECTACLE_ISLAND
2.
Rebuild the MicroAce framework using the commands:
cd /opt/ixasdk/src/microace
make clean; make
The IXA SDK is now ready to use with the ENP boards.
19
7. ENP2505/6 Specific Configuration
7.1.
Installing the ENP-2505 and ENP-2506 IXP1200 PCI Board
To install the ENP-2505/6:
1.
Open the Host Linux PC.
2.
Remove two expansion slot plate covers to accommodate the installation of the ENP-2505/6
and the serial connection of the ENP-2505/6 back to the Host Linux COM1 port.
3.
Install the Serial cable:



4.
7.2.
Pass the 3-pin portion of the Serial Cable through one of the expansion slot openings from
the back of the PC.
Connect the Serial Cable to the ENP-2505/6 card at header marked serial.
Connect the DB-9 end of the serial cable to the Com1 serial interface of the Host Linux
system.
Install ENP-2505/6 board into an available 32 or 64-pin PCI slot, as described in Chapter 2,
Installation and Configuration in the RadiSys ENP-2505/6 Hardware Reference guide.
Booting the ENP-2505/6
The ENP2505/6 will automatically boot Cygmon each time you reboot the Host Linux system. It will
not however automatically boot embedded Linux. This step must be executed manually each time Host
Linux system is rebooted. The user booting the card must have root privileges to use the supplied boot
script.

Prior to booting Linux on the ENP-2505/6 for the first time, use minicom on the Linux Host to
verify that the ENP-2505/6 has indeed booted Cygmon and is displaying the following message on
COM1.
Press space bar to abort host download mode....
Press space bar to abort host download mode....
Press space bar to abort host download mode....

If this message is not received please ensure that Cygmon and the BootManager are boot
configured correctly for this configuration. If you do see this message you are ready to run the
Linux booting script.

Execute the following script command from the /opt/ixasdk/enp-2505/bootixp
directory at the Linux shell prompt:
./bootixp
NOTE: Each time Cygmon boots, the 256Mbytes of SDRAM on the ENP-2505/6 are mapped into the
secondary side of the 21555 non-transparent bridge. This allows this memory to be accessed from the
Primary side of the 21555 Bridge, which is the Linux Host.
When the booting script is executed, the Linux Host copies the ENP-2505/6 Linux kernel and
Filesystem through the bridge into the ENP-2505/6 SDRAM. When this is complete, Cygmon is
instructed to boot this image.
7.3.
Changes specific to the ENP-2506
The configuration files in the IXA SDK are setup for the Spectacle Island. In order to use with the
ENP2506 you must modify the script:
20
/opt/ixasdk/bin/arm-be/ixlibace
Make the following changes. These changes are required as the ENP-2506 has 2 x Gigabit Ethernet
ports only.
libace_mk() {
libace_rm
mknod
mknod
mknod
mknod
-m
-m
-m
-m
666
666
666
666
/dev/ue0 c 10 240
/dev/if0 c 253 0
/dev/if1 c 253 1
/dev/rm
c 10 88
}
NOTE: The original script works fine with all other ENP products.
7.4.
1.
Verifying ENP-2505/6 Driver operation
Once the bootixp script has successfully completed the following message will be displayed:
** Finished ENP-2505 driver install **
2.
At this point you should verify that the modules have loaded with the command:
lsmod
The following display is expected from the ENP-2505/6:
Module
pciDgNet-arm
pciDg-arm
Size
2668
7544
Used by
1
0 [pciDgNet-arm]
The following display is expected from the Host Linux system:
Module
pciDgNet
pciDg
Size
1920
5568
Used by
1
0 [pciDgNet]
3. Ping the Host operating system from the ENP-2505/6 system.
 Ping the Host operating system by entering the command from the ENP-2505/6:
ping 192.168.0.4

Ping the Target from the Host Linux system with the command:
ping 192.168.0.2
NOTE: The various IP addresses are set up by the bootixp script and can be changed by editing the
following file:
/opt/src/bootixp/create_environment.rc
7.5.
ENP-2505 and ENP-2506 NFS Filesystem
Running the bootixp script will automatically setup up an NFS mount between the Target and the Host.
No further configuration is required. The script mounts the NFS share to
21
/nfs
7.6.
Completing the Host networking configuration
The final networking configuration task required is to enable IP forwarding on the Linux host. This
can be accomplished at run time with the following command:
echo 1 > /proc/sys/net/ipv4/ip_forward
To make this change persistent across reboot edit the file /etc/sysctl.conf and set the variable
net.ipv4.ip_forward = 1.
This configuration change will allow the Developer workbench running on Windows NT to
communicate with the Target operating system on the ENP-2505.
Figure 1 – ENP-2505/6 Embedded Linux Setup
22
8. ENP-3511 Specific Configuration
The ENP-3511 target configuration boots the Linux kernel from the onboard 82559 devices. Therefore
there is no requirement to boot through the 21555 non-transparent PCI Bridge. This makes the system
initialization much easier. This setup is very similar to the default configuration of the Spectacle Island.
Therefore please refer to the IXA SDK 2.01 Installation and Setup guide for further information.
8.1.
NFS issue on the C Stepping IXP1200
The ENP3511 is currently shipping with a C Stepping IXP1200 processor. We have observed a DMA
anomaly, which results in an NFS connection error when attempting to connect to a NFS server. We
are working with Intel to develop an acceptable workaround for this issue. In the interim please
perform the following to avoid seeing this issue.
 Interrupt the Cygmon booting process by pressing the space bar
 From the Cygmon> prompt type the following command
fill ff000008 18
 Boot Linux with the command
gl
8.2.
21555 interrupt on the ENP-3511
When booting the ENP-3511 system the 21555, appears to power up with an interrupt pending. It is
necessary to clear this interrupt prior to enabling Networking. Type the following command:
insmod /lib/modules/pciDg-arm
8.3.
Quick setup for the ENP-3511
1. Log in as root with ixp1200 as password.
2. insmod /lib/modules/pciDg-arm
3. ifup <ip-address> <subnet-mask> <broadcast> <default-ip-address>
4. mount <host-ip-address>:/opt /nfs –t nfs
23
9. Running the IXA SDK Demo Applications without the Workbench
The Intel IXA SDK 2.01 contains several demo applications as an introduction to developing network
application of the IXP1200 using the active computing element (ACE) programming framework. These
Whereas these Demos were designed to be run on the Intel Spectacle Island Development
Environment. They can for the most part be easily modified to operate on the various ENP platforms.
Please refer to the Intel SDK ACE Programming Framework Tutorial Manual for detailed information
about each of these demos.
9.1.
Simple Count Application
The first step is to compile the microcode source files, which make up a part of the Count application.
All these microcode source files need to be compiled on the Windows NT development system. In this
current configuration the results of this compilation then need to be copied to the Host Linux system,
using FTP.
Follow the following steps from the IXA SDK tutorial chapter titled “Compiling and Running the
Simple Count Application”
9.1.1.
Compiling the microcode
Use the following steps to rebuild the microcode required for the simple Count Application.






Open a Cygwin Bash shell window on your Windows NT development system.
Ensure the following environment variables are setup.
echo $IXROOT should be set to /opt/ixasdk
echo $CONFIG should be set to ARM_BE
If not setup correctly type the following
Export IXROOT=/opt/ixasdk
export CONFIG=ARM_BE
change to the required tutorial directory
cd $IXROOT/src/microace/aces/tutorial1/ucbuild
Compile the microcode sources to generate all the required *.uof files
make –f Makefile.win
Use FTP to copy the *.uof files from your NT Workstation to your
Linux Host.
ftp <ip-address of the Linux Host>
cd /opt/ixasdk/bin/arm-be
bin
mput *.uof
bye
9.1.2.
Compiling the Core Component of the MicroACE
Follow the following steps to rebuild the Core Component of the Count Application MicroACE:

Ensure the following environment variables are setup.
echo $IXROOT should be set to /opt/ixasdk
echo $CONFIG should be set to ARM_BE

If not setup correctly type the following
export IXROOT=/opt/ixasdk
export CONFIG=ARM_BE

Compile and link the Core Component with the command:
make
24

As we are not downloading the code using the Develop Workbench we must edit a mode setting in
the file
$IXROOT/src/microace/projects/Count_8_1/ixsys_Coint_8_1.config
# Values for mode are
#
# 0x0
No workbench.
# 0x1
Download and debug via workbench
mode 0
#mode 1

The IXA SDK demo Applications were designed for the Spectacle Island Which has the following
configuration:
Port 0-15 10/100
Port 16-17 1000
This configuration file must also be setup to match your target ENP system.
interface 0 10.1.0.1 10.1.0.255 255.255.255.0 00:01:02:03:04:05 1
interface 1 10.2.0.1 10.2.0.255 255.255.255.0 00:01:02:03:04:06 1
interface 2 10.3.0.1 10.3.0.255 255.255.255.0 00:01:02:03:04:07 1
interface 3 10.4.0.1 10.4.0.255 255.255.255.0 00:01:02:03:04:08 1
#interface 4 10.5.0.1 10.5.0.255 255.255.255.0 00:01:02:03:04:09 1
#interface 5 10.6.0.1 10.6.0.255 255.255.255.0 00:01:02:03:04:10 1
#interface 6 10.7.0.1 10.7.0.255 255.255.255.0 00:01:02:03:04:11 1
#interface 7 10.8.0.1 10.8.0.255 255.255.255.0 00:01:02:03:04:12 1
#interface 8 10.9.0.1 10.9.0.255 255.255.255.0 00:01:02:03:04:13 1
#interface 9 10.10.0.1 10.10.0.255 255.255.255.0 00:01:02:03:04:14 1
#interface 10 10.11.0.1 10.11.0.255 255.255.255.0 00:01:02:03:04:15 1
#interface 11 10.12.0.1 10.12.0.255 255.255.255.0 00:01:02:03:04:16 1
#interface 12 10.13.0.1 10.13.0.255 255.255.255.0 00:01:02:03:04:17 1
#interface 13 10.14.0.1 10.14.0.255 255.255.255.0 00:01:02:03:04:18 1
#interface 14 10.15.0.1 10.15.0.255 255.255.255.0 00:01:02:03:04:19 1
#interface 15 10.16.0.1 10.16.0.255 255.255.255.0 00:01:02:03:04:20 1
#interface 16 10.17.0.1 10.17.0.255 255.255.255.0 00:01:02:03:04:21 1
#interface 17 10.18.0.1 10.18.0.255 255.255.255.0 00:01:02:03:04:22 1
NOTE: This configuration will depend on the ENP system you are using. The following are the
supported ports for each of the ENP systems.
ENP-3511
Port 0-7 10/100
ENP-2505
Port 0-3 10/100
ENP-2506
Port 0-1 1000

Export the configuration file ixsys_count_8_1.config to the directory
$IXROOT/bin/arm_be where it will be picked up by the application startup script by typing the
command:
make
9.1.3.
Starting the Count Application
Now all that remains is to start the application. From the minicom serial connection to the ENP system
type the following commands:


cd /nfs/ixasdk/bin/arm-be
./ixstart ixsys_count_8_1.config
25
After 60 seconds the Application will start to display a count for the system ports.
NOTE: 16 ports are displayed even though the ENP systems are not configured for this number of
ports. Only the genuine ports will display a count other than 0.
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Total
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
for port
count of
0 = 0
1 = 0
2 = 0
3 = 0
4 = 0
5 = 0
6 = 0
7 = 0
8 = 0
9 = 0
10 = 0
11 = 0
12 = 0
13 = 0
14 = 0
15 = 0
packets=0
Use a packet generator (i.e. SmartBits) to generate packets and the count should start to increase for the
connected ports.
9.1.4.
Stopping the Count Application
To stop the application, type the following command:
 ./ixstop
9.2.
L3 Forwarding Application
Before starting the L3 Forwarding application enter the correct port configuration in the file:
 ixsys.config-sys-l3fwdr
NOTE: This configuration will depend on the ENP system you are using. The following are the
supported ports for each of the ENP systems.
ENP-3511
Port 0-7 10/100
ENP-2505
Port 0-3 10/100
ENP-2506
Port 0-1 1000
Start the Application using the following command
 ./ixstart ixsys.config-sys-l3fwdr
As a test of whether the L3 forwarder is active type the command:
ifconfig
This command should recognize the addition Ethernet devices present in the linux TCPIP stack. It is
also possibly to generate packets using packet generator, to demonstrate that the forwarder is working
as designed.
eth0
Link encap:Ethernet HWaddr AA:00:00:00:00:01
inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2731 errors:0 dropped:0 overruns:0 frame:0
26
TX packets:991 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
eth1
Link encap:Ethernet HWaddr 00:01:02:03:04:05
inet addr:10.1.0.1 Bcast:10.1.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
eth2
Link encap:Ethernet HWaddr 00:01:02:03:04:06
inet addr:10.2.0.1 Bcast:10.2.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
eth3
Link encap:Ethernet HWaddr 00:01:02:03:04:07
inet addr:10.3.0.1 Bcast:10.3.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
eth4
Link encap:Ethernet HWaddr 00:01:02:03:04:08
inet addr:10.4.0.1 Bcast:10.4.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
lo
Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:3924 Metric:1
RX packets:24 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
27
10. Developing and Debugging microcode using the Developer Workbench
10.1. Simple Count Application
In this configuration the microcode is deployed directly by the Developer Workbench. As we are
downloading the code using the Develop Workbench we must edit a mode setting in the file:
$IXROOT/src/microace/projects/Count_8_1/ixsys_Coint_8_1.config
#
#
0x0
0x1
No workbench.
Download and debug via workbench
#mode 0
mode 1
10.2. Starting the Count Application
Now all that remains is to start the application. From the minicom serial connection to the ENP type the
following commands. Ensure the following startup messages are displayed.
 cd /nfs/ixasdk/bin/arm-be
 ./ixstart ixsys_count_8_1.config
After 60 seconds the Application will start to display a count for the system ports. Note that at present
16 ports are displayed even though the system is not configured for this number of ports.
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
Count
for
for
for
for
for
for
for
for
for
for
for
for
for
for
port
port
port
port
port
port
port
port
port
port
port
port
port
port
0 = 0
1 = 0
2 = 0
3 = 0
4 = 0
5 = 0
6 = 0
7 = 0
8 = 0
9 = 0
10 = 0
11 = 0
12 = 0
13 = 0
These counters will remain at zero even if packets are generated.
10.3. Downloading the Microcode from the workbench
On the Windows NT development system invoke the Developer Workbench. Open the Simple Count
project:
C:\eLinuxIDE-IXP1200\cygwin\opt\ixasdk\src\microace\projects\Count_8_1_2\Count_8_1_2.dwp





Rebuild the project to rebuild all the Microcode files.
Configure hardware options to select a connection via Ethernet and setup the appropriate IP
address of the ENP system.
Start debugging
Start the Microcode
The count application will start to count.
28
10.3.1. Stopping the Count Application
To stop the application


From the Developer’s Workbench stop the Workbench debugger first and then
From the ENP Linux system type
./ixstop
29
Download