blob: b80daf105920c8f50b88e9e6e212d34a6445b0bf [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.
Luis Farias892daba2022-06-22 13:59:47 -070027For the f release the ICC compiler is optional and support will be discontinued in future releases
28
29Download and Install oneAPI
30---------------------------
31Download and install the Intel® oneAPI Base Toolkit by issuing the following commands from yor Linux
32Console:
33
34wget https://registrationcenter-download.intel.com/akdlm/irc_nas/18673/l_BaseKit_p_2022.2.0.262_offline.sh
35
36sudo sh ./l_BaseKit_p_2022.2.0.262_offline.sh
37
38Then follow the instructions on the installer.
39Additional information available from
40
41https://www.intel.com/content/www/us/en/developer/tools/oneapi/base-toolkit-download.html?operatingsystem=linux&distributions=webdownload&options=offline
Luis Farias9d66fca2020-05-28 19:01:58 -070042
Luis Farias76b44952022-04-01 16:10:08 -070043Install ICC and System Studio
44-----------------------------
45Intel® C++ Compiler and System Studio v19.0.3 is used for the test application and system integration with L1,available from the following link
46https://registrationcenter-download.intel.com/akdlm/irc_nas/emb/15322/system_studio_2019_update_3_composer_edition_offline.tar.gz
Luis Farias9d66fca2020-05-28 19:01:58 -070047
Luis Farias76b44952022-04-01 16:10:08 -070048The Intel® C++ Compiler can be used with a community license generated from the text below save it to a file named license.lic
49
50PACKAGE IF1C22FFF INTEL 2023.0331 4F89A5B28D2F COMPONENTS="CCompL \
51 Comp-CA Comp-CL Comp-OpenMP Comp-PointerChecker MKernL \
52 PerfPrimL ThreadBB" OPTIONS=SUITE ck=209 SIGN=9661868C5C80
53INCREMENT IF1C22FFF INTEL 2023.0331 31-mar-2023 uncounted \
54 90F19E3889A3 VENDOR_STRING="SUPPORT=COM \
55 https://registrationcenter.intel.com" HOSTID=ID=07472690 \
56 PLATFORMS="i86_n i86_r i86_re amd64_re x64_n" ck=175 \
57 SN=SMSAJ7B6G8WS TS_OK SIGN=920966B67D16
58PACKAGE IF1C22FFF INTEL 2023.0331 4F89A5B28D2F COMPONENTS="CCompL \
59 Comp-CA Comp-CL Comp-OpenMP Comp-PointerChecker MKernL \
60 PerfPrimL ThreadBB" OPTIONS=SUITE ck=209 SIGN=9661868C5C80
61INCREMENT IF1C22FFF INTEL 2023.0331 31-mar-2023 uncounted \
62 32225D03FBAA VENDOR_STRING="SUPPORT=COM \
63 https://registrationcenter.intel.com" HOSTID=ID=07472690 \
64 PLATFORMS="i86_n i86_r i86_re amd64_re x64_n" ck=80 \
65 SN=SMSAJ7B6G8WS SIGN=2577A4F65138
66PACKAGE IF1C22FFF INTEL 2023.0331 4F89A5B28D2F COMPONENTS="CCompL \
67 Comp-CA Comp-CL Comp-OpenMP Comp-PointerChecker MKernL \
68 PerfPrimL ThreadBB" OPTIONS=SUITE ck=209 SIGN=9661868C5C80
69INCREMENT IF1C22FFF INTEL 2023.0331 31-mar-2023 uncounted \
70 90F19E3889A3 VENDOR_STRING="SUPPORT=COM \
71 https://registrationcenter.intel.com" HOSTID=ID=07472690 \
72 PLATFORMS="i86_n i86_r i86_re amd64_re x64_n" ck=175 \
73 SN=SMSAJ7B6G8WS TS_OK SIGN=920966B67D16
74PACKAGE IF1C22FFF INTEL 2023.0331 4F89A5B28D2F COMPONENTS="CCompL \
75 Comp-CA Comp-CL Comp-OpenMP Comp-PointerChecker MKernL \
76 PerfPrimL ThreadBB" OPTIONS=SUITE ck=209 SIGN=9661868C5C80
77INCREMENT IF1C22FFF INTEL 2023.0331 31-mar-2023 uncounted \
78 32225D03FBAA VENDOR_STRING="SUPPORT=COM \
79 https://registrationcenter.intel.com" HOSTID=ID=07472690 \
80 PLATFORMS="i86_n i86_r i86_re amd64_re x64_n" ck=80 \
81 SN=SMSAJ7B6G8WS SIGN=2577A4F65138
82PACKAGE I4BB00C7C INTEL 2023.0331 8D6186E5077C COMPONENTS="Comp-CA \
83 Comp-CL Comp-OpenMP Comp-PointerChecker MKernL PerfPrimL \
84 ThreadBB" OPTIONS=SUITE ck=131 SIGN=7BB6EE06F9A6
85INCREMENT I4BB00C7C INTEL 2023.0331 31-mar-2023 uncounted \
86 F1765BD5FCB4 VENDOR_STRING="SUPPORT=COM \
87 https://registrationcenter.intel.com" HOSTID=ID=07472690 \
88 PLATFORMS="i86_mac x64_mac" ck=114 SN=SMSAJ7B6G8WS \
89 SIGN=4EC364AC3576
Luis Farias9d66fca2020-05-28 19:01:58 -070090
Luis Farias76b44952022-04-01 16:10:08 -070091Then copy license file to the build directory under license.lic ::
92
93 COPY license.lic $BUILD_DIR/license.lic
94
95*Note: Use serial number CG7X-J7B6G8WS*
Luis Farias9d66fca2020-05-28 19:01:58 -070096
97
Luis Farias70d9d922020-08-11 16:05:37 -070098You 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.
99Here 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 -0700100
Luis Farias76b44952022-04-01 16:10:08 -0700101 #wget https://registrationcenter-download.intel.com/akdlm/irc_nas/emb/15322/system_studio_2019_update_3_composer_edition_offline.tar.gz
Luis Farias9d66fca2020-05-28 19:01:58 -0700102 #cd /opt && mkdir intel && cp $BUILD_DIR/license.lic intel/license.lic
Luis Farias76b44952022-04-01 16:10:08 -0700103 #tar -zxvf $BUILD_DIR/system_studio_2019_update_3_composer_edition_offline.tar.gz
Luis Farias9d66fca2020-05-28 19:01:58 -0700104
Luis Farias892daba2022-06-22 13:59:47 -0700105Edit system_studio_2019_update_3_composer_edition_offline/silent.cfg to accept the EULA file as below example::
Luis Farias9d66fca2020-05-28 19:01:58 -0700106
107 ACCEPT_EULA=accept
108 PSET_INSTALL_DIR=opt/intel
109 ACTIVATION_LICENSE_FILE=/opt/intel/license.lic
110 ACTIVATION_TYPE=license_file
111
112Silent installation::
113
114 #./install.sh -s silent.cfg
115
Luis Farias892daba2022-06-22 13:59:47 -0700116Set env for oneAPI or ICC:
117 Check for your installation path. The following is an example for ICC.
118
Luis Farias76b44952022-04-01 16:10:08 -0700119 #source /opt/intel_2019/system_studio_2019/compiler_and_libraries_2019.3.206/linux/bin/iccvars.sh intel64
120 #export PATH=/opt/intel_2019/system_studio_2019/compiler_and_libraries_2019.3.206/linux/bin/:$PATH
Luis Farias9d66fca2020-05-28 19:01:58 -0700121
122
Luis Farias70d9d922020-08-11 16:05:37 -0700123Download and Build DPDK
124-----------------------
Luis Farias9d66fca2020-05-28 19:01:58 -0700125 - download DPDK::
126
Luis Farias892daba2022-06-22 13:59:47 -0700127 #wget http://static.dpdk.org/rel/dpdk-20.11.3.tar.x
128 #tar -xf dpdk-20.11.3.tar.xz
Luis Farias9d66fca2020-05-28 19:01:58 -0700129 #export RTE_TARGET=x86_64-native-linuxapp-icc
Luis Farias892daba2022-06-22 13:59:47 -0700130 #export RTE_SDK=Intallation_DIR/dpdk-20.11.3
Luis Farias9d66fca2020-05-28 19:01:58 -0700131
Luis Farias70d9d922020-08-11 16:05:37 -0700132 - 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 -0700133
Luis Farias70d9d922020-08-11 16:05:37 -0700134 - 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 -0700135
Luis Farias9d66fca2020-05-28 19:01:58 -0700136
137 - build DPDK
Luis Farias892daba2022-06-22 13:59:47 -0700138 This release uses DPDK version 20.11.3 so the build procedure for the DPDK is the following
139
140 Setup compiler environment
Luis Farias76b44952022-04-01 16:10:08 -0700141
Luis Farias892daba2022-06-22 13:59:47 -0700142 if [ $oneapi -eq 1 ]; then
143 export RTE_TARGET=x86_64-native-linuxapp-icx
144 export WIRELESS_SDK_TOOLCHAIN=icx
145 export SDK_BUILD=build-${WIRELESS_SDK_TARGET_ISA}-icc
146 source /opt/intel/oneapi/setvars.sh
147 export PATH=$PATH:/opt/intel/oneapi/compiler/2022.0.1/linux/bin-llvm/
148 echo "Changing the toolchain to GCC 8.3.1 20190311 (Red Hat 8.3.1-3)"
149 source /opt/rh/devtoolset-8/enable
150
151 else
152 export RTE_TARGET=x86_64-native-linuxapp-icc
153 export WIRELESS_SDK_TOOLCHAIN=icc
154 export SDK_BUILD=build-${WIRELESS_SDK_TARGET_ISA}-icc
155 source /opt/intel/system_studio_2019/bin/iccvars.sh intel64 -platform linux
156
157 fi
158
Luis Farias76b44952022-04-01 16:10:08 -0700159
160 The build procedure uses meson and ninja so if not present in your system please install before the next step
161
162 Then at the root of the DPDK folder issue::
163
164 meson build
165 cd build
166 ninja
167
Zhimin81a09692020-10-12 09:03:50 +0000168 - set DPDK path
ZhiminYuan11547620331df222020-06-20 03:34:32 +0800169 DPDK path is needed during build and run lib/app::
Luis Farias9d66fca2020-05-28 19:01:58 -0700170
Luis Farias892daba2022-06-22 13:59:47 -0700171 #export RTE_SDK=Installation_DIR/dpdk-20.11.3
172 #export DESTDIR=Installation_DIR/dpdk-20.11.3
Luis Farias9d66fca2020-05-28 19:01:58 -0700173
174
175Install google test
176-------------------
177Download google test from https://github.com/google/googletest/releases
178 - Example build and installation commands::
179
180 #tar -xvf googletest-release-1.7.0.tar.gz
181 #mv googletest-release-1.7.0 gtest-1.7.0
182 #export GTEST_DIR=YOUR_DIR/gtest-1.7.0
Luis Farias70d9d922020-08-11 16:05:37 -0700183 #export GTEST_ROOT= $GTEST_DIR
Luis Farias9d66fca2020-05-28 19:01:58 -0700184 #cd ${GTEST_DIR}
185 #g++ -isystem ${GTEST_DIR}/include -I${GTEST_DIR} -pthread -c ${GTEST_DIR}/src/gtest-all.cc
186 #ar -rv libgtest.a gtest-all.o
187 #cd ${GTEST_DIR}/build-aux
188 #cmake ${GTEST_DIR}
189 #make
190 #cd ${GTEST_DIR}
191 #ln -s build-aux/libgtest_main.a libgtest_main.a
192
193- Set the google test Path
194 this path should be always here when you build and run O-RAN FH lib unit test::
195
196 #export DIR_ROOT_GTEST="your google test path"
197
198
199Configure FEC card
200--------------------
Luis Farias892daba2022-06-22 13:59:47 -0700201For the F Release either a SW FEC, or an FPGA FEC (Vista Creek N3000) or an ASIC FEC (Mount Bryce ACC100) can be used.
Luis Farias2de97522022-03-17 20:01:53 -0700202The procedure to configure the HW based FECs is explained below.
Luis Farias70d9d922020-08-11 16:05:37 -0700203
204Customize a setup environment shell script
205------------------------------------------
206Using as an example the provided in the folder phy\\setupenv.sh as the starting point
207customize this script to provide the paths to the tools and libraries that
208are used building and running the code.
209You can add for example the following entries based on your particular installation and the
Luis Farias892daba2022-06-22 13:59:47 -0700210following illustration is just an example (use icx for oneApi instead of icc)::
Luis Farias70d9d922020-08-11 16:05:37 -0700211
212- export DIR_ROOT=/home/
213- #set the L1 binary root DIR
214- export DIR_ROOT_L1_BIN=$DIR_ROOT/FlexRAN
215- #set the phy root DIR
216- export DIR_ROOT_PHY=$DIR_ROOT/phy
217- #set the DPDK root DIR
Luis Farias892daba2022-06-22 13:59:47 -0700218- #export DIR_ROOT_DPDK=/home/dpdk-20.11.3
Luis Farias70d9d922020-08-11 16:05:37 -0700219- #set the GTEST root DIR
220- #export DIR_ROOT_GTEST=/home/gtest/gtest-1.7.0
221- export DIR_WIRELESS_TEST_5G=$DIR_ROOT_L1_BIN/testcase
222- export DIR_WIRELESS_SDK=$DIR_ROOT_L1_BIN/sdk/build-avx512-icc
223- export DIR_WIRELESS_TABLE_5G=$DIR_ROOT_L1_BIN/l1/bin/nr5g/gnb/l1/table
224- #source /opt/intel/system_studio_2019/bin/iccvars.sh intel64 -platform linux
225- export XRAN_DIR=$DIR_ROOT_PHY/fhi_lib
226- export XRAN_LIB_SO=true
227- export RTE_TARGET=x86_64-native-linuxapp-icc
228- #export RTE_SDK=$DIR_ROOT_DPDK
229- #export DESTDIR=""
230- #export GTEST_ROOT=$DIR_ROOT_GTEST
231- export ORAN_5G_FAPI=true
232- export DIR_WIRELESS_WLS=$DIR_ROOT_PHY/wls_lib
233- export DEBUG_MODE=true
234- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_WIRELESS_WLS:$XRAN_DIR/lib/build
235- export DIR_WIRELESS=$DIR_ROOT_L1_BIN/l1
236- export DIR_WIRELESS_ORAN_5G_FAPI=$DIR_ROOT_PHY/fapi_5g
237- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIR_ROOT_L1_BIN/libs/cpa/bin
238
239Then issue::
240
241- source ./setupenv.sh
242
243This sets up the correct environment to build the code
244
245Then build the wls_lib, FHI_Lib, 5G FAPI TM prior to running the code with the steps described in the Run L1 section
246
247
Luis Farias9d66fca2020-05-28 19:01:58 -0700248
249
250
251
252
253