5. OCTEON TX Board Support Package
This doc has information about steps to setup OCTEON TX platform and information about common offload hw block drivers of Cavium OCTEON TX SoC family.
More information about SoC can be found at Cavium, Inc Official Website.
5.1. Common Offload HW Block Drivers
- Crypto Driver See Cavium OCTEON TX Crypto Poll Mode Driver for octeontx crypto driver information.
- Eventdev Driver See OCTEON TX SSOVF Eventdev Driver for octeontx ssovf eventdev driver information.
- Mempool Driver See OCTEON TX FPAVF Mempool Driver for octeontx fpavf mempool driver information.
5.2. Steps To Setup Platform
There are three main pre-prerequisites for setting up Platform drivers on OCTEON TX compatible board:
OCTEON TX Linux kernel PF driver for Network acceleration HW blocks
The OCTEON TX Linux kernel drivers (includes the required PF driver for the Platform drivers) are available on Github at octeontx-kmod along with build, install and dpdk usage instructions.
Note
The PF driver and the required microcode for the crypto offload block will be available with OCTEON TX SDK only. So for using crypto offload, follow the steps mentioned in Setup Platform Using OCTEON TX SDK.
ARM64 Tool Chain
For example, the aarch64 Linaro Toolchain, which can be obtained from here.
Rootfile system
Any aarch64 supporting filesystem can be used. For example, Ubuntu 15.10 (Wily) or 16.04 LTS (Xenial) userland which can be obtained from http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.1-base-arm64.tar.gz.
As an alternative method, Platform drivers can also be executed using images provided as part of SDK from Cavium. The SDK includes all the above prerequisites necessary to bring up a OCTEON TX board. Please refer Setup Platform Using OCTEON TX SDK.
- Follow the DPDK Getting Started Guide for Linux to setup the basic DPDK environment.
5.3. Setup Platform Using OCTEON TX SDK
The OCTEON TX platform drivers can be compiled either natively on OCTEON TX ® board or cross-compiled on an x86 based platform.
The OCTEON TX ® board must be running the linux kernel based on OCTEON TX SDK 6.2.0 patch 3. In this, the PF drivers for all hardware offload blocks are already built in.
5.3.1. Native Compilation
If the kernel and modules are cross-compiled and copied to the target board, some intermediate binaries required for native build would be missing on the target board. To make sure all the required binaries are available in the native architecture, the linux sources need to be compiled once natively.
cd /lib/modules/$(uname -r)/source
make menuconfig
make
The above steps would rebuild the modules and the required intermediate binaries. Once the target is ready for native compilation, the OCTEON TX platform drivers can be compiled with the following steps,
meson build -Dexamples=<application>
ninja -C build
The example applications can be compiled using the following:
meson build -Dexamples=<application>
ninja -C build
5.3.2. Cross Compilation
The DPDK applications can be cross-compiled on any x86 based platform. The OCTEON TX SDK need to be installed on the build system. The SDK package will provide the required toolchain etc.
Refer to Cross compiling DPDK for aarch64 and aarch32 for generic arm64 details.
The following steps can be used to perform cross-compilation with OCTEON TX SDK 6.2.0 patch 3:
cd <sdk_install_dir>
source env-setup
The above steps will prepare build system with required toolchain. Now this build system can be used to build applications for OCTEON TX ® platforms.
cd <dpdk directory>
meson build --cross-file config/arm/arm64_thunderx_linux_gcc
ninja -C build
The example applications can be compiled using the following:
cd <dpdk directory>
meson build --cross-file config/arm/arm64_thunderx_linux_gcc -Dexamples=<application>
ninja -C build
Note
By default, meson cross compilation uses aarch64-linux-gnu-gcc
toolchain,
if OCTEON TX SDK 6.2.0 patch 3 is available then it can be used by
overriding the c, cpp, ar, strip binaries
attributes to respective thunderx
toolchain binaries in config/arm/arm64_thunderx_linux_gcc
file.
SDK and related information can be obtained from: Cavium support site.