1 .. SPDX-License-Identifier: BSD-3-Clause
2 Copyright(c) 2017 Cavium, Inc
4 OCTEON TX Board Support Package
5 ===============================
7 This doc has information about steps to setup OCTEON TX platform
8 and information about common offload hw block drivers of
9 **Cavium OCTEON TX** SoC family.
12 More information about SoC can be found at `Cavium, Inc Official Website
13 <http://www.cavium.com/OCTEON-TX_ARM_Processors.html>`_.
15 Common Offload HW Block Drivers
16 -------------------------------
19 See :doc:`../cryptodevs/octeontx` for octeontx crypto driver
22 2. **Eventdev Driver**
23 See :doc:`../eventdevs/octeontx` for octeontx ssovf eventdev driver
27 See :doc:`../mempool/octeontx` for octeontx fpavf mempool driver
30 Steps To Setup Platform
31 -----------------------
33 There are three main pre-prerequisites for setting up Platform drivers on
34 OCTEON TX compatible board:
36 1. **OCTEON TX Linux kernel PF driver for Network acceleration HW blocks**
38 The OCTEON TX Linux kernel drivers (includes the required PF driver for the
39 Platform drivers) are available on Github at `octeontx-kmod <https://github.com/caviumnetworks/octeontx-kmod>`_
40 along with build, install and dpdk usage instructions.
44 The PF driver and the required microcode for the crypto offload block will be
45 available with OCTEON TX SDK only. So for using crypto offload, follow the steps
46 mentioned in :ref:`setup_platform_using_OCTEON_TX_SDK`.
48 2. **ARM64 Tool Chain**
50 For example, the *aarch64* Linaro Toolchain, which can be obtained from
51 `here <https://releases.linaro.org/components/toolchain/binaries/4.9-2017.01/aarch64-linux-gnu>`_.
53 3. **Rootfile system**
55 Any *aarch64* supporting filesystem can be used. For example,
56 Ubuntu 15.10 (Wily) or 16.04 LTS (Xenial) userland which can be obtained
57 from `<http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/ubuntu-base-16.04.1-base-arm64.tar.gz>`_.
59 As an alternative method, Platform drivers can also be executed using images provided
60 as part of SDK from Cavium. The SDK includes all the above prerequisites necessary
61 to bring up a OCTEON TX board. Please refer :ref:`setup_platform_using_OCTEON_TX_SDK`.
63 - Follow the DPDK :doc:`../linux_gsg/index` to setup the basic DPDK environment.
65 .. _setup_platform_using_OCTEON_TX_SDK:
67 Setup Platform Using OCTEON TX SDK
68 ----------------------------------
70 The OCTEON TX platform drivers can be compiled either natively on
71 **OCTEON TX** :sup:`®` board or cross-compiled on an x86 based platform.
73 The **OCTEON TX** :sup:`®` board must be running the linux kernel based on
74 OCTEON TX SDK 6.2.0 patch 3. In this, the PF drivers for all hardware
75 offload blocks are already built in.
80 If the kernel and modules are cross-compiled and copied to the target board,
81 some intermediate binaries required for native build would be missing on the
82 target board. To make sure all the required binaries are available in the
83 native architecture, the linux sources need to be compiled once natively.
85 .. code-block:: console
87 cd /lib/modules/$(uname -r)/source
91 The above steps would rebuild the modules and the required intermediate binaries.
92 Once the target is ready for native compilation, the OCTEON TX platform
93 drivers can be compiled with the following steps,
95 .. code-block:: console
98 make config T=arm64-thunderx-linux-gcc
101 The example applications can be compiled using the following:
103 .. code-block:: console
107 export RTE_TARGET=build
108 cd examples/<application>
114 The DPDK applications can be cross-compiled on any x86 based platform. The
115 OCTEON TX SDK need to be installed on the build system. The SDK package will
116 provide the required toolchain etc.
118 Refer to :doc:`../linux_gsg/cross_build_dpdk_for_arm64` for further steps on
119 compilation. The 'host' & 'CC' to be used in the commands would change,
120 in addition to the paths to which libnuma related files have to be
123 The following steps can be used to perform cross-compilation with OCTEON TX
126 .. code-block:: console
131 git clone https://github.com/numactl/numactl.git
133 git checkout v2.0.11 -b v2.0.11
136 ./configure --host=aarch64-thunderx-linux CC=aarch64-thunderx-linux-gnu-gcc --prefix=<numa install dir>
139 The above steps will prepare build system with numa additions. Now this build system can be used
140 to build applications for **OCTEON TX** :sup:`®` platforms.
142 .. code-block:: console
146 export RTE_KERNELDIR=$THUNDER_ROOT/linux/kernel/linux
147 make config T=arm64-thunderx-linux-gcc
148 make -j CROSS=aarch64-thunderx-linux-gnu- CONFIG_RTE_KNI_KMOD=n CONFIG_RTE_EAL_IGB_UIO=n EXTRA_CFLAGS="-isystem <numa_install_dir>/include" EXTRA_LDFLAGS="-L<numa_install_dir>/lib -lnuma"
150 If NUMA support is not required, it can be disabled as explained in
151 :doc:`../linux_gsg/cross_build_dpdk_for_arm64`.
153 Following steps could be used in that case.
155 .. code-block:: console
157 make config T=arm64-thunderx-linux-gcc
158 make CROSS=aarch64-thunderx-linux-gnu-
161 SDK and related information can be obtained from: `Cavium support site <https://support.cavium.com/>`_.