b62cce18fbe0785a4c42d58e13feae6a1c447873
[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 DPDK::
66      
67          #wget http://fast.dpdk.org/rel/dpdk-18.08.tar.xz
68          #tar -xf dpdk-18.08.tar.xz
69          #export RTE_TARGET=x86_64-native-linuxapp-icc
70          #export RTE_SDK=Intallation_DIR/dpdk-18.08
71
72    - 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
73
74    - SW FEC was enabled by default, to enable HW FEC with specific accelerator card, you need get the associated driver and build steps from the accelerator card vendors.
75
76    - enable IGB UIO for NIC card::
77    
78          CONFIG_RTE_EAL_IGB_UIO=y
79          CONFIG_RTE_KNI_KMOD=y
80
81    - build DPDK
82       build DPDK::
83
84         #./usertools/dpdk-setup.sh
85         select [16] x86_64-native-linuxapp-icc
86         select [19] Insert VFIO module
87         exit   [35] Exit Script
88
89    - set DPDK path
90        DPDK path is needed during build and run lib/app::
91
92         #export RTE_SDK="your DPDK path"
93
94
95 Install google test
96 -------------------
97 Download google test from https://github.com/google/googletest/releases 
98    - Example build and installation commands::
99
100         #tar -xvf googletest-release-1.7.0.tar.gz
101         #mv googletest-release-1.7.0 gtest-1.7.0
102         #export GTEST_DIR=YOUR_DIR/gtest-1.7.0
103         #cd ${GTEST_DIR}
104         #g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc
105         #ar -rv libgtest.a gtest-all.o
106         #cd ${GTEST_DIR}/build-aux
107         #cmake ${GTEST_DIR}
108         #make
109         #cd ${GTEST_DIR}
110         #ln -s build-aux/libgtest_main.a libgtest_main.a
111
112 - Set the google test Path
113    this path should be always here when you build and run O-RAN FH lib unit test::
114
115         #export DIR_ROOT_GTEST="your google test path"
116
117
118 Configure FEC card
119 --------------------
120 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.
121
122
123
124
125
126