Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
Tool Chain Installation

The Broadcom® Tool Chain provides compiler tools and libraries for the development of OpEN applications. Three types of tool chains are available as described below. Consult your Broadcom® support representative to determine the correct tool chain to use for your platform, and the correct CPU within that toolchain.

Host Requirements

The Broadcom Linux Toolchain and XLP MIPS Toolchain are supported on the following systems:

The Ubuntu Linux Native Toolchain is supported on the following system:

Broadcom Linux Toolchain

The Broadcom Linux toolchain tar ball contains a number of different tool chains for different CPU architectures including GTO, e500v1, e500mc, Raptor and Keystone. Consult your Broadcom® support representative to determine the correct tool chain to use for your platform.

Download

The Broadcom Linux Toolchain is available on docSAFE. Search for "toolchain" to find it. In the text below we assume the file is called ICOS_R300_toolchain.tar.bz2.

Installation

Unpacking the Tool Chain

The tool chain is supplied as a compressed tar ball with a filename such as ICOS_R300_toolchain.tar.bz2. The tools MUST be installed as follows:

  unix% su
  # cd /
  # rm -rf /projects/nwsoft-toolchains/brl
  # tar jxf <path>/ICOS_R300_toolchain.tar.bz2

Updating the CROSS_COMPILE variable

The OpEN compile environment requires that the CROSS_COMPILE variable be set to the full path of the cross compiler you are using. For example, for the GTO cross compiler this should be set to /projects/nwsoft-toolchains/brl/brl_3.8/e500v2/usr/bin/powerpc-broadcom-linux-gnuspe-. This can be done in one of two ways:

  unix% export CROSS_COMPILE=/projects/nwsoft-toolchains/brl/brl_3.8/e500v2/usr/bin/powerpc-broadcom-linux-gnuspe-

Updating the LD_LIBRARY_PATH variable

To ensure that the tool chain runs correctly, you must update your LD_LIBRARY_PATH environment variable for the BRL 2.0.1 toolchains. Be careful to make sure this gets set up for each new shell that you use. For example:

  unix% export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/projects/nwsoft-toolchains/brl/brl_2.0/host-libs/x86_64/el5/lib

You are now ready to build your OpEN application.

XLP MIPS Toolchain

Download

The XLP MIPS Toolchain is part of the XLP SDK and is available on docSAFE. Search for "toolchain" to find it. In the text below we assume the file is called sdk-base-2.2.7.tar.gz.

You will also need the ICOS_R<version>_open_source_support_code.tar.bz2 file, available on docSAFE.

Installation

The SDK is supplied as a compressed tar ball with a filename such as sdk-base-2.2.7.tar.gz. The tools MUST be installed as follows:

  unix% su
  # cd /
  # mkdir -p /projects/nwsoft-toolchains/netlogic
  # cd /projects/nwsoft-toolchains/netlogic
  # tar zxf <path>/sdk-base-2.2.7.tar.gz
  # mv sdk-base sdk-2.2.7
  # cd sdk-2.2.7

Now you must copy the required headers:

  # cp -r linux/include/mtd toolchains_bin/mipscross/linux/mips64-nlm-linux/include/

Next extract the shell script wrappers to the toolchain_bin folder. The sdk_2.2.7_toolchain_wrappers.tar.gz file is part of the ICOS_R<version>_open_source_support_code.tar.bz2 file:

  # cd /projects/nwsoft-toolchains/netlogic/sdk-2.2.7/toolchains_bin/mipscross/linux/bin
  # tar zxf <path>/sdk_2.2.7_toolchain_wrappers.tar.gz

As the final step, assign the execute permission to all of the extracted files in the bin directory:

  # chmod +x *elf32btsmip*
  # exit
  unix%

RPM Tool Chain Installation

If you are installing the XLP MIPS Toolchain for RPM compilation work, which is not typical, then you should follow the additional instructions defined in section XLP/WRX Specific Tool Chain Configuration for RPM Compilation.

You are now ready to build your OpEN application.

Ubuntu Linux Native Toolchain

Download Ubuntu Server 12.04 LTS ISO from Ubuntu website and install Ubuntu Server. After installation completes restart and boot from hard disk and login into the Ubuntu Linux. The following additional packages need to be installed to compile OpEN applications.

Download

Broadcom provides Kernel Image and Headers with NOS modifications as Debian packages. The packages are available on docSAFE. Search for "linux*.deb" to find the packages.

Linux Headers Extraction

The downloaded Headers packages MUST be installed as follows:

On 32-Bit Ubuntu:

  unix% dpkg -x linux-headers-3.5.0-23-generic_3.5.0-23.35~precise1_i386.deb </path/to/headers>
  unix% dpkg -x linux-headers-3.5.0-23_3.5.0-23.35~precise1_all.deb </path/to/headers>

On 64-Bit Ubuntu:

  unix% dpkg -x linux-headers-3.5.0-23-generic_3.5.0-23.35~precise1_amd64.deb </path/to/headers>
  unix% dpkg -x linux-headers-3.5.0-23_3.5.0-23.35~precise1_all.deb </path/to/headers>

Note: Ensure that the </path/to/headers> is used while exporting KERNEL_SRC variable as explained below.

Updating the KERNEL_SRC variable

To ensure that the tool chain runs correctly, you must update your KERNEL_SRC environment variable.

  unix% export KERNEL_SRC=</path/to/headers/>usr/src/linux-headers-3.5.0-23-generic/

Updating the CROSS_COMPILE variable

The OpEN compile environment requires that the CROSS_COMPILE variable be set to the full path of the cross compiler you are using. For example, for the native Linux compiler this should be set to /usr/bin. This can be done in one of two ways:

  unix% export CROSS_COMPILE=/usr/bin

You are now ready to build your OpEN application.