blob: 411bb55829b1654fb71ff17a01327da27c6e41d1 [file] [log] [blame]
Zhimin81a09692020-10-12 09:03:50 +00001.. Copyright (c) 2019 Intel
Luis Farias9d66fca2020-05-28 19:01:58 -07002..
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
19Build Prerequisite
20====================
21
22.. contents::
23 :depth: 3
24 :local:
25
26This 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
28Install ICC
29------------
30Intel® C++ Compiler v19.0.3 is used for the test application and system integration with L1,
Luis Farias70d9d922020-08-11 16:05:37 -070031The Intel® C++ Compiler can be obtained using the following link https://software.intel.com/en-us/system-studio/choose-download with community |br|
Luis Farias9d66fca2020-05-28 19:01:58 -070032license::
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
37performed yet, so please provide feedback through O-DU Low project WIKI page if you face any issues.*
38
39
Luis Farias70d9d922020-08-11 16:05:37 -070040You can follow the installation guide from above website to download Intel System Studio and install. Intel® Math Kernel Library, Intel® Integrated Performance Primitives and Intel® C++ Compiler are mandatory components.
41Here we are using the Linux* Host,Linux* Target and standalone installer as one example, below link might need update based on the website ::
Luis Farias9d66fca2020-05-28 19:01:58 -070042
Luis Farias70d9d922020-08-11 16:05:37 -070043 #wget https://registrationcenter-download.intel.com/akdlm/irc_nas/16789/system_studio_2020_u2_ultimate_edition_offline.tar.gz
Luis Farias9d66fca2020-05-28 19:01:58 -070044 #cd /opt && mkdir intel && cp $BUILD_DIR/license.lic intel/license.lic
Luis Farias70d9d922020-08-11 16:05:37 -070045 #tar -zxvf $BUILD_DIR/system_studio_2020_u2_ultimate_edition_offline.tar.gz
Luis Farias9d66fca2020-05-28 19:01:58 -070046
47Edit system_studio_2020_ultimate_edition_offline/silent.cfg to accept the EULA file as below example::
48
49 ACCEPT_EULA=accept
50 PSET_INSTALL_DIR=opt/intel
51 ACTIVATION_LICENSE_FILE=/opt/intel/license.lic
52 ACTIVATION_TYPE=license_file
53
54Silent installation::
55
56 #./install.sh -s silent.cfg
57
58Set env for ICC::
59
60 #source /opt/intel/system_studio_2020/bin/iccvars.sh intel64
61 #export PATH=/opt/intel/system_studio_2020/bin/:$PATH
62
63
Luis Farias70d9d922020-08-11 16:05:37 -070064Download and Build DPDK
65-----------------------
Luis Farias9d66fca2020-05-28 19:01:58 -070066 - download DPDK::
67
Luis Farias70d9d922020-08-11 16:05:37 -070068 #wget http://static.dpdk.org/rel/dpdk-19.11.tar.x
69 #tar -xf dpdk-19.11.tar.xz
Luis Farias9d66fca2020-05-28 19:01:58 -070070 #export RTE_TARGET=x86_64-native-linuxapp-icc
Luis Farias70d9d922020-08-11 16:05:37 -070071 #export RTE_SDK=Intallation_DIR/dpdk-19.11
Luis Farias9d66fca2020-05-28 19:01:58 -070072
Luis Farias70d9d922020-08-11 16:05:37 -070073 - 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 |br| O-RAN FHI Lib Introduction -> setup configuration -> A.2 prerequisites
Luis Farias9d66fca2020-05-28 19:01:58 -070074
Luis Farias70d9d922020-08-11 16:05:37 -070075 - SW FEC was enabled by default, to enable HW FEC with specific accelerator card, you need to get the associated driver and build steps from the accelerator card vendors.
Luis Farias9d66fca2020-05-28 19:01:58 -070076
Luis Farias9d66fca2020-05-28 19:01:58 -070077
78 - build DPDK
Luis Farias9d66fca2020-05-28 19:01:58 -070079 build DPDK::
Zhimin81a09692020-10-12 09:03:50 +000080 Set your ICC installation path to /usertools/dpdk-setup.sh, DEFAULT_PATH="your ICC installation path"/bin/iccvars.sh, then run it to build DPDK with below option.
Luis Farias9d66fca2020-05-28 19:01:58 -070081 #./usertools/dpdk-setup.sh
Luis Farias70d9d922020-08-11 16:05:37 -070082 select [39] x86_64-native-linuxapp-icc
83 exit [62] Exit Script
Zhimin81a09692020-10-12 09:03:50 +000084 please pay attention, the number 39 might change in your setup, you need choose accordingly to option 'x86_64-native-linuxapp-icc'
85
86 - set DPDK path
ZhiminYuan11547620331df222020-06-20 03:34:32 +080087 DPDK path is needed during build and run lib/app::
Luis Farias9d66fca2020-05-28 19:01:58 -070088
Zhimin81a09692020-10-12 09:03:50 +000089 #export RTE_SDK=Installation_DIR/dpdk-19.11
Luis Farias70d9d922020-08-11 16:05:37 -070090 #export DESTDIR=Installation_DIR/dpdk-19.11
Luis Farias9d66fca2020-05-28 19:01:58 -070091
92
93Install google test
94-------------------
95Download google test from https://github.com/google/googletest/releases
96 - Example build and installation commands::
97
98 #tar -xvf googletest-release-1.7.0.tar.gz
99 #mv googletest-release-1.7.0 gtest-1.7.0
100 #export GTEST_DIR=YOUR_DIR/gtest-1.7.0
Luis Farias70d9d922020-08-11 16:05:37 -0700101 #export GTEST_ROOT= $GTEST_DIR
Luis Farias9d66fca2020-05-28 19:01:58 -0700102 #cd ${GTEST_DIR}
103 #g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc
104 #ar -rv libgtest.a gtest-all.o
105 #cd ${GTEST_DIR}/build-aux
106 #cmake ${GTEST_DIR}
107 #make
108 #cd ${GTEST_DIR}
109 #ln -s build-aux/libgtest_main.a libgtest_main.a
110
111- Set the google test Path
112 this path should be always here when you build and run O-RAN FH lib unit test::
113
114 #export DIR_ROOT_GTEST="your google test path"
115
116
117Configure FEC card
118--------------------
Luis Farias70d9d922020-08-11 16:05:37 -0700119For the Bronze Release only a SW FEC is available so this step is not needed, for later releases the required information will be added to the document.
120
121Customize a setup environment shell script
122------------------------------------------
123Using as an example the provided in the folder phy\\setupenv.sh as the starting point
124customize this script to provide the paths to the tools and libraries that
125are used building and running the code.
126You can add for example the following entries based on your particular installation and the
127following illustration is just an example::
128
129- export DIR_ROOT=/home/
130- #set the L1 binary root DIR
131- export DIR_ROOT_L1_BIN=$DIR_ROOT/FlexRAN
132- #set the phy root DIR
133- export DIR_ROOT_PHY=$DIR_ROOT/phy
134- #set the DPDK root DIR
135- #export DIR_ROOT_DPDK=/home/dpdk-19.11
136- #set the GTEST root DIR
137- #export DIR_ROOT_GTEST=/home/gtest/gtest-1.7.0
138- export DIR_WIRELESS_TEST_5G=$DIR_ROOT_L1_BIN/testcase
139- export DIR_WIRELESS_SDK=$DIR_ROOT_L1_BIN/sdk/build-avx512-icc
140- export DIR_WIRELESS_TABLE_5G=$DIR_ROOT_L1_BIN/l1/bin/nr5g/gnb/l1/table
141- #source /opt/intel/system_studio_2019/bin/iccvars.sh intel64 -platform linux
142- export XRAN_DIR=$DIR_ROOT_PHY/fhi_lib
143- export XRAN_LIB_SO=true
144- export RTE_TARGET=x86_64-native-linuxapp-icc
145- #export RTE_SDK=$DIR_ROOT_DPDK
146- #export DESTDIR=""
147- #export GTEST_ROOT=$DIR_ROOT_GTEST
148- export ORAN_5G_FAPI=true
149- export DIR_WIRELESS_WLS=$DIR_ROOT_PHY/wls_lib
150- export DEBUG_MODE=true
151- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_WIRELESS_WLS:$XRAN_DIR/lib/build
152- export DIR_WIRELESS=$DIR_ROOT_L1_BIN/l1
153- export DIR_WIRELESS_ORAN_5G_FAPI=$DIR_ROOT_PHY/fapi_5g
154- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_ROOT_L1_BIN/libs/cpa/bin
155
156Then issue::
157
158- source ./setupenv.sh
159
160This sets up the correct environment to build the code
161
162Then build the wls_lib, FHI_Lib, 5G FAPI TM prior to running the code with the steps described in the Run L1 section
163
164
Luis Farias9d66fca2020-05-28 19:01:58 -0700165
166
167
168
169
170