openairinterface 中手动安装编译 UHD, Ubuntu 16.04

使用openairinterface过程中发现,OAI脚本里自动安装的UHD版本不能控制,UHD版本的差异可能导致OAI运行出错;此外在"./build_oai -w USRP -I"中,由于源的问题可能导致,无法定位软件包:uhd。于是选择手动安装UHD,过程如下:

1.git下载源码,并选择版本。目前OAI支持的UHD版本有: 3.9.2/3.9.3/3.9.4/3.10.0   详情参考 https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/HowToConnectCOTSUEwithOAIeNBNew

git clone https://github.com/EttusResearch/uhd.git
cd uhd
git checkout release release_003_010_001_001

2.安装UHD依赖

sudo apt-get -y install git swig cmake doxygen build-essential libboost-all-dev libtool libusb-1.0-0 libusb-1.0-0-dev libudev-dev libncurses5-dev libfftw3-bin libfftw3-dev libfftw3-doc libcppunit-1.13-0v5 libcppunit-dev libcppunit-doc ncurses-bin cpufrequtils python-numpy python-numpy-doc python-numpy-dbg python-scipy python-docutils qt4-bin-dbg qt4-default qt4-doc libqt4-dev libqt4-dev-bin python-qt4 python-qt4-dbg python-qt4-dev python-qt4-doc python-qt4-doc libqwt6abi1 libfftw3-bin libfftw3-dev libfftw3-doc ncurses-bin libncurses5 libncurses5-dev libncurses5-dbg libfontconfig1-dev libxrender-dev libpulse-dev swig g++ automake autoconf libtool python-dev libfftw3-dev libcppunit-dev libboost-all-dev libusb-dev libusb-1.0-0-dev fort77 libsdl1.2-dev python-wxgtk3.0 git-core libqt4-dev python-numpy ccache python-opengl libgsl-dev python-cheetah python-mako python-lxml doxygen qt4-default qt4-dev-tools libusb-1.0-0-dev libqwt5-qt4-dev libqwtplot3d-qt4-dev pyqt4-dev-tools python-qwt5-qt4 cmake git-core wget libxi-dev gtk2-engines-pixbuf r-base-dev python-tk liborc-0.4-0 liborc-0.4-dev libasound2-dev python-gtk2 libzmq-dev libzmq1 python-requests python-sphinx libcomedi-dev python-zmq python-setuptools

3.编译并下载镜像


cd uhd/host/
mkdir build
cd build
cmake ../
make 
sudo make install
sudo ldconfig    #更新动态链接库
sudo uhd_images_downloader

4.测试是否安装成功

//查找设备 
sudo uhd_find_devices
//查看设备信息 
sudo uhd_usrp_probe

5.配置OAI默认路径。由于OAI默认的UHD安装路径是 /usr/include/,而我们安装的uhd路径可能不是这个。因此将安装好的UHD库移动到 /usr/include/ 即可。我这里是 从 /usr/local/include/ 到/usr/inlcude/

sudo mv  /usr/local/include/uhd/ /usr/include/

6. 安装OAI 包,编译

cd ~/openairinterface5g/cmake_targets/
source oaienv
sudo ./build_oai -I   #安装OAI需要的包
sudo ./build_oai --eNB -x -w USRP  #不要加-I

手动安装UHD成功,OAI 可以运行。

你可能感兴趣的:(linux)