Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.6.0.3
|
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.
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:
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.
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.
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
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-
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.
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.
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%
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.
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.
sudo apt-get install p7zip-full
) sudo apt-get install gawk
) sudo apt-get install swig
) sudo apt-get install doxygen
) sudo apt-get install make; sudo apt-get install gcc; sudo apt-get install gcc-multilib
sudo apt-get install default-jre
) sudo apt-get install yui-compressor
) sudo apt-get install equivs
) sudo apt-get install lua5.2
) and create a soft link 'sudo ln -s /usr/bin/lua /usr/local/bin/lua52'
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.
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.
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/
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.