Zhimin | 81a0969 | 2020-10-12 09:03:50 +0000 | [diff] [blame^] | 1 | .. Copyright (c) 2019 Intel |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 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, |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 31 | The Intel® C++ Compiler can be obtained using the following link https://software.intel.com/en-us/system-studio/choose-download with community |br| |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 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 | |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 40 | You 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. |
| 41 | Here we are using the Linux* Host,Linux* Target and standalone installer as one example, below link might need update based on the website :: |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 42 | |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 43 | #wget https://registrationcenter-download.intel.com/akdlm/irc_nas/16789/system_studio_2020_u2_ultimate_edition_offline.tar.gz |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 44 | #cd /opt && mkdir intel && cp $BUILD_DIR/license.lic intel/license.lic |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 45 | #tar -zxvf $BUILD_DIR/system_studio_2020_u2_ultimate_edition_offline.tar.gz |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 46 | |
| 47 | Edit 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 | |
| 54 | Silent installation:: |
| 55 | |
| 56 | #./install.sh -s silent.cfg |
| 57 | |
| 58 | Set 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 Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 64 | Download and Build DPDK |
| 65 | ----------------------- |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 66 | - download DPDK:: |
| 67 | |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 68 | #wget http://static.dpdk.org/rel/dpdk-19.11.tar.x |
| 69 | #tar -xf dpdk-19.11.tar.xz |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 70 | #export RTE_TARGET=x86_64-native-linuxapp-icc |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 71 | #export RTE_SDK=Intallation_DIR/dpdk-19.11 |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 72 | |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 73 | - 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 Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 74 | |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 75 | - 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 Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 76 | |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 77 | |
| 78 | - build DPDK |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 79 | build DPDK:: |
Zhimin | 81a0969 | 2020-10-12 09:03:50 +0000 | [diff] [blame^] | 80 | 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 Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 81 | #./usertools/dpdk-setup.sh |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 82 | select [39] x86_64-native-linuxapp-icc |
| 83 | exit [62] Exit Script |
Zhimin | 81a0969 | 2020-10-12 09:03:50 +0000 | [diff] [blame^] | 84 | 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 |
ZhiminYuan11547620 | 331df22 | 2020-06-20 03:34:32 +0800 | [diff] [blame] | 87 | DPDK path is needed during build and run lib/app:: |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 88 | |
Zhimin | 81a0969 | 2020-10-12 09:03:50 +0000 | [diff] [blame^] | 89 | #export RTE_SDK=Installation_DIR/dpdk-19.11 |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 90 | #export DESTDIR=Installation_DIR/dpdk-19.11 |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 91 | |
| 92 | |
| 93 | Install google test |
| 94 | ------------------- |
| 95 | Download 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 Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 101 | #export GTEST_ROOT= $GTEST_DIR |
Luis Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 102 | #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 | |
| 117 | Configure FEC card |
| 118 | -------------------- |
Luis Farias | 70d9d92 | 2020-08-11 16:05:37 -0700 | [diff] [blame] | 119 | For 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 | |
| 121 | Customize a setup environment shell script |
| 122 | ------------------------------------------ |
| 123 | Using as an example the provided in the folder phy\\setupenv.sh as the starting point |
| 124 | customize this script to provide the paths to the tools and libraries that |
| 125 | are used building and running the code. |
| 126 | You can add for example the following entries based on your particular installation and the |
| 127 | following 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 | |
| 156 | Then issue:: |
| 157 | |
| 158 | - source ./setupenv.sh |
| 159 | |
| 160 | This sets up the correct environment to build the code |
| 161 | |
| 162 | Then 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 Farias | 9d66fca | 2020-05-28 19:01:58 -0700 | [diff] [blame] | 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |