FAPI TM, WLS_LIB and ODULOW documentation
[o-du/phy.git] / docs / build_prerequisite.rst
1 ..    Copyright (c) 2019 Intel
2 ..
3 ..  Licensed under the Apache License, Version 2.0 (the "License");
4 ..  you may not use this file except in compliance with the License.
5 ..  You may obtain a copy of the License at
6 ..
7 ..      http://www.apache.org/licenses/LICENSE-2.0
8 ..
9 ..  Unless required by applicable law or agreed to in writing, software
10 ..  distributed under the License is distributed on an "AS IS" BASIS,
11 ..  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 ..  See the License for the specific language governing permissions and
13 ..  limitations under the License.
14
15 .. |br| raw:: html
16
17    <br />
18
19 Build Prerequisite
20 ====================
21
22 .. contents::
23     :depth: 3
24     :local:
25     
26 This section describes how to install and build the required components needed to build the FHI Library, WLS Library and the 5G FAPI TM modules.
27
28 Install ICC
29 ------------
30 IntelĀ® C++ Compiler v19.0.3 is used for the test application and system integration with L1, 
31 The IntelĀ® C++ Compiler can be obtained using the follwoing link https://software.intel.com/en-us/system-studio/choose-download with community |br|
32 license::
33
34          COPY $icc_license_file $BUILD_DIR/license.lic
35     
36 *Note: The version available at this link is always the latest ICC version, the verification for that version may not have been 
37 performed yet, so please provide feedback through O-DU Low project WIKI page if you face any issues.*
38
39
40 Download Intel System Studio from Intel website and install ICC ::
41
42          #wget https://registrationcenter-download.intel.com/akdlm/irc_nas/16242/system_studio_2020_ultimate_edition_offline.tar.gz 
43          #cd /opt && mkdir intel && cp $BUILD_DIR/license.lic intel/license.lic
44          #tar -zxvf $BUILD_DIR/system_studio_2020_ultimate_edition_offline.tar.gz
45
46 Edit system_studio_2020_ultimate_edition_offline/silent.cfg to accept the EULA file as below example::
47   
48          ACCEPT_EULA=accept
49          PSET_INSTALL_DIR=opt/intel
50          ACTIVATION_LICENSE_FILE=/opt/intel/license.lic
51          ACTIVATION_TYPE=license_file
52     
53 Silent installation::
54
55          #./install.sh -s silent.cfg
56
57 Set env for ICC::
58  
59          #source /opt/intel/system_studio_2020/bin/iccvars.sh intel64
60          #export PATH=/opt/intel/system_studio_2020/bin/:$PATH
61
62
63 Build DPDK
64 -----------
65    - download FEC SDK lib::
66    
67          #wget https://software.intel.com/sites/default/files/managed/23/b8/FlexRAN-FEC-SDK-19-04.tar.gz
68          #tar -xzvf FlexRAN-FEC-SDK-19-04.tar.gz
69
70    - build FEC SDK lib::
71         
72          #./FlexRAN-FEC-SDK-19-04.sh
73          #cd FlexRAN-FEC-SDK-19-04/sdk
74          #./create-makefiles-linux.sh
75          #cd build-avx512-icc
76          #make;make install
77
78    *note: you need to accept the Intel OBL commercial use license during the installation*
79
80    - download DPDK::
81      
82          #wget http://fast.dpdk.org/rel/dpdk-18.08.tar.xz
83          #tar -xf dpdk-18.08.tar.xz
84          #export RTE_TARGET=x86_64-native-linuxapp-icc
85          #export RTE_SDK=Intallation_DIR/dpdk-18.08
86
87
88    - patch DPDK for O-RAN FHI lib, this patch is specific for O-RAN FHI to reduce the data transmission latency of Intel NIC. This may not be needed for some NICs, please refer to O-RAN FHI Lib Introduction -> setup configuration -> A.2 prerequisites
89
90
91    - change DPDK config to enable SW FEC support
92
93      check the configuration as below in dpdk-18.08/config/common_base::
94      
95          CONFIG_RTE_LIBRTE_BBDEV=y
96          CONFIG_RTE_LIBRTE_BBDEV_DEBUG=n
97          CONFIG_RTE_BBDEV_MAX_DEVS=128
98          CONFIG_RTE_BBDEV_OFFLOAD_COST=y
99          CONFIG_RTE_BBDEV_SDK_AVX2=y
100          CONFIG_RTE_BBDEV_SDK_AVX512=y
101
102    - enable FEC accelerator card, DPDK BBDev framework support any kind of accelerator card to plug in the associated driver while using the same interface. Right now there is no open source driver available yet, so you need to get the associated vendor's driver to enable the capability to use an accelerator card. 
103
104    - enable IGB UIO for FEC card and NIC configure::
105    
106          CONFIG_RTE_EAL_IGB_UIO=y
107          CONFIG_RTE_KNI_KMOD=y
108
109    - build DPDK
110       setup Env for BBDev SW::
111
112         #export FLEXRAN_SDK=$Intallation_DIR/FlexRAN-FEC-SDK-19-04/sdk/build-avx512-icc/install
113
114       build DPDK::
115
116         #./usertools/dpdk-setup.sh
117         select [16] x86_64-native-linuxapp-icc
118         select [19] Insert VFIO module
119         exit   [35] Exit Script
120    - set DPDK path
121      this path should be always there during you build and run lib/app::
122
123         #export RTE_SDK="your DPDK path"
124
125
126 Install google test
127 -------------------
128 Download google test from https://github.com/google/googletest/releases 
129    - Example build and installation commands::
130
131         #tar -xvf googletest-release-1.7.0.tar.gz
132         #mv googletest-release-1.7.0 gtest-1.7.0
133         #export GTEST_DIR=YOUR_DIR/gtest-1.7.0
134         #cd ${GTEST_DIR}
135         #g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc
136         #ar -rv libgtest.a gtest-all.o
137         #cd ${GTEST_DIR}/build-aux
138         #cmake ${GTEST_DIR}
139         #make
140         #cd ${GTEST_DIR}
141         #ln -s build-aux/libgtest_main.a libgtest_main.a
142
143 - Set the google test Path
144    this path should be always here when you build and run O-RAN FH lib unit test::
145
146         #export DIR_ROOT_GTEST="your google test path"
147
148
149 Configure FEC card
150 --------------------
151 For the Bronze Release only as SW FEC is available so this step is not needed, for later releases the required information will be added to the document.
152
153
154
155
156
157