blob: 945d73e9320da041408d73e6eedcb5a887b7da19 [file] [log] [blame]
Luis Farias2de97522022-03-17 20:01:53 -07001.. Copyright (c) 2019-2022 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 Farias2de97522022-03-17 20:01:53 -070068 #wget http://static.dpdk.org/rel/dpdk-20.11.tar.x
69 #tar -xf dpdk-20.11.tar.xz
Luis Farias9d66fca2020-05-28 19:01:58 -070070 #export RTE_TARGET=x86_64-native-linuxapp-icc
Luis Farias2de97522022-03-17 20:01:53 -070071 #export RTE_SDK=Intallation_DIR/dpdk-20.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
Luis Farias2de97522022-03-17 20:01:53 -070089 #export RTE_SDK=Installation_DIR/dpdk-20.11
90 #export DESTDIR=Installation_DIR/dpdk-20.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 Farias2de97522022-03-17 20:01:53 -0700119For the E Maintenance Release either a SW FEC, or an FPGA FEC (Vista Creek N3000) or an ASIC FEC (Mount Bryce ACC100) can be used.
120The procedure to configure the HW based FECs is explained below.
Luis Farias70d9d922020-08-11 16:05:37 -0700121
122Customize a setup environment shell script
123------------------------------------------
124Using as an example the provided in the folder phy\\setupenv.sh as the starting point
125customize this script to provide the paths to the tools and libraries that
126are used building and running the code.
127You can add for example the following entries based on your particular installation and the
128following illustration is just an example::
129
130- export DIR_ROOT=/home/
131- #set the L1 binary root DIR
132- export DIR_ROOT_L1_BIN=$DIR_ROOT/FlexRAN
133- #set the phy root DIR
134- export DIR_ROOT_PHY=$DIR_ROOT/phy
135- #set the DPDK root DIR
136- #export DIR_ROOT_DPDK=/home/dpdk-19.11
137- #set the GTEST root DIR
138- #export DIR_ROOT_GTEST=/home/gtest/gtest-1.7.0
139- export DIR_WIRELESS_TEST_5G=$DIR_ROOT_L1_BIN/testcase
140- export DIR_WIRELESS_SDK=$DIR_ROOT_L1_BIN/sdk/build-avx512-icc
141- export DIR_WIRELESS_TABLE_5G=$DIR_ROOT_L1_BIN/l1/bin/nr5g/gnb/l1/table
142- #source /opt/intel/system_studio_2019/bin/iccvars.sh intel64 -platform linux
143- export XRAN_DIR=$DIR_ROOT_PHY/fhi_lib
144- export XRAN_LIB_SO=true
145- export RTE_TARGET=x86_64-native-linuxapp-icc
146- #export RTE_SDK=$DIR_ROOT_DPDK
147- #export DESTDIR=""
148- #export GTEST_ROOT=$DIR_ROOT_GTEST
149- export ORAN_5G_FAPI=true
150- export DIR_WIRELESS_WLS=$DIR_ROOT_PHY/wls_lib
151- export DEBUG_MODE=true
152- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_WIRELESS_WLS:$XRAN_DIR/lib/build
153- export DIR_WIRELESS=$DIR_ROOT_L1_BIN/l1
154- export DIR_WIRELESS_ORAN_5G_FAPI=$DIR_ROOT_PHY/fapi_5g
155- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_ROOT_L1_BIN/libs/cpa/bin
156
157Then issue::
158
159- source ./setupenv.sh
160
161This sets up the correct environment to build the code
162
163Then build the wls_lib, FHI_Lib, 5G FAPI TM prior to running the code with the steps described in the Run L1 section
164
165
Luis Farias9d66fca2020-05-28 19:01:58 -0700166
167
168
169
170
171