Linux Setup Guide for ENP-XXXX

Linux Setup guide for ENP-XXXX

12/19/2018

Revision 1.0

1.Introduction

2.Caveats

3.Configuring Rom based components

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

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.

4.Configuring the Linux Host

4.1.Boot/Install RedHat 7.2 from the CD-ROM

4.2.Upgrading the Host RedHat Linux Kernel

4.3.Configure TFTP

4.4.Configure DHCP

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.Install the Intel IXA SDK 2.01

5.1.Installing the IXA SDK on the Linux Host

5.2.Installing IXA SDK on the Windows Development Workstation

6.ENP Configuration

6.1.ENP Software Installation

6.2.Rebuilding the ENP Linux kernel

6.3.Applying the IXA SDK patch

6.4.Rebuilding the pciDg driver module

6.5.Rebuilding the SDK

7.ENP2505/6 Specific Configuration

7.1.Installing the ENP-2505 and ENP-2506 IXP1200 PCI Board

7.2.Booting the ENP-2505/6

7.3.Changes specific to the ENP-2506

7.4.Verifying ENP-2505/6 Driver operation

7.5.ENP-2505 and ENP-2506 NFS Filesystem

7.6.Completing the Host networking configuration

8.ENP-3511 Specific Configuration

8.1.NFS issue on the C Stepping IXP1200

8.2.21555 interrupt on the ENP-3511

8.3.Quick setup for the ENP-3511

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

9.2.L3 Forwarding Application

10.Developing and Debugging microcode using the Developer Workbench

10.1.Simple Count Application

10.2.Starting the Count Application

10.3.Downloading the Microcode from the workbench

10.3.1.Stopping the Count Application

References

Document Title / Document Source
ENP-2505 Hardware Reference Manual / RadiSys Corporation
ENP SDK Developers Guide / RadiSys Corporation
IXA SDK 2.01 Installation and Setup Guide / Intel Corporation.
IXA SDK 2.01 ACE Programming Framework SDK 2.01 Tutorial / Intel Corporation.
GRUB Manual /

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.

2.Caveats

Please note the current known limitations below:

  • This document describes a configuration for booting Linux on the RadiSys Corporation ENP-2505/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.

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 rate38400

Parityno parity

Data bits 8

Stop bits 1

Flow Control 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 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 rate38400

Parityno parity

Data bits 8

Stop bits 1

Flow Control 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.

UseSerialPort (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

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 save:

[BootOptions]:

  • 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.

  • 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 ENP-2505/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.

  • 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

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”

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

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

  • 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.

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

  1. 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.
  1. Boot the updated Linux kernel to verify the kernel upgrade was successful.
  1. 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

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 = dgram

protocol = udp

wait = yes

user = nobody

log_on_success += USERID

log_on_failure += USERID

server = /usr/sbin/in.tftpd

server_args = /tftpboot -l

disabled = 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
  • 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;

}

}

}

  1. Create the file /var/lib/dhcp/dhcpd.leases with the following command:

touch /var/lib/dhcp/dhcpd.leases

  1. Restart dhcpd using the command

/etc/rc.d/init.d/dhcpd restart

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