Commit 90143da3 authored by 黄灏's avatar 黄灏

update cmake

parent 3c384164
......@@ -481,13 +481,6 @@ target_link_libraries(params_libconfig PRIVATE ${libconfig_LIBRARIES})
add_library(shlib_loader OBJECT common/utils/load_module_shlib.c)
target_link_libraries(shlib_loader PRIVATE CONFIG_LIB)
include_directories("${OPENAIR_DIR}/radio/DPDKRF/")
set(HWLIB_DPDKRF_SOURCE
${OPENAIR_DIR}/radio/DPDKRF/dpdkrf_oai.c
)
add_library(oai_dpdkrfdevif MODULE ${HWLIB_DPDKRF_SOURCE} )
target_link_libraries(oai_dpdkrfdevif dpdkrf)
##########################################################
......@@ -2367,7 +2360,7 @@ if (${T_TRACER})
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
#all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer oai_oxgrfdevif
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer oai_oxgrfdevif oai_dpdkrfdevif
oai_eth_transpro oai_mobipass coding HASHTABLE UTIL OMG_SUMO
SECURITY SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_VNF_LIB NFAPI_USER_LIB
......
......@@ -93,7 +93,7 @@ Options:
--UE-gen-nvram [output path]
Specify gen_nvram_path (default \"$gen_nvram_path\")
-w | --hardware
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, OXGRF, None (Default)
USRP, BLADERF, LMSSDR, IRIS, SIMU, AW2SORI, OXGRF, DPDKRF,None (Default)
Adds this RF board support (in external packages installation and in compilation)
-t | --transport
Selects the transport protocol type, options: None, Ethernet, benetel4g, benetel5g
......@@ -461,6 +461,9 @@ function main() {
echo_info "installing packages for OXGRF support"
#check_install_oxgrf_driver
fi
if [ "$HW" == "OAI_DPDKRF" ] ; then
echo_info "installing packages for DPDKRF support"
fi
if [ "$HW" == "OAI_IRIS" ] ; then
echo_info "installing packages for IRIS support"
check_install_soapy
......@@ -551,18 +554,6 @@ function main() {
echo_success "BUILD SHOULD BE SUCCESSFUL"
fi
if [ "$HW" == "OAI_DPDKRF" ] ; then
if [ ! -f "/usr/local/include/dpdkrf_lib.h" ] ; then
sudo cp $THIS_SCRIPT_PATH/../radio/DPDKRF/dpdkrf_lib.h /usr/local/include/dpdkrf_lib.h
sudo cp $THIS_SCRIPT_PATH/../radio/DPDKRF/libdpdkrf.so /usr/local/lib/libdpdkrf.so
sudo chmod +x /usr/local/lib/libdpdkrf.so
sudo ldconfig /usr/local/lib
fi
compilations $BUILD_DIR oai_dpdkrfdevif.txt oai_dpdkrfdevif
ln -sf liboai_dpdkrfdevif.so liboai_device.so
echo_info "liboai_device.so is linked to DPDKRF device library"
fi
}
main "$@"
......@@ -37,3 +37,8 @@ add_boolean_option(OAI_OXGRF OFF "Activate OAI's OXGRF driver" OFF)
if(OAI_OXGRF)
add_subdirectory(OXGRF)
endif()
add_boolean_option(OAI_DPDKRF OFF "Activate OAI's DPDKRF driver" OFF)
if(OAI_DPDKRF)
add_subdirectory(DPDKRF)
endif()
\ No newline at end of file
......@@ -44,7 +44,7 @@
#include "executables/softmodem-common.h"
const char *const devtype_names[MAX_RF_DEV_TYPE] =
{"", "USRP B200", "USRP X300", "USRP N300", "USRP X400", "BLADERF", "OXGRF", "LMSSDR", "IRIS", "No HW", "UEDv2", "RFSIMULATOR","DPDKRF"};
{"", "USRP B200", "USRP X300", "USRP N300", "USRP X400", "BLADERF", "OXGRF", "DPDKRF","LMSSDR", "IRIS", "No HW", "UEDv2", "RFSIMULATOR"};
const char *get_devname(int devtype) {
if (devtype < MAX_RF_DEV_TYPE && devtype !=MIN_RF_DEV_TYPE )
......
......@@ -95,13 +95,14 @@ typedef enum {
BLADERF_DEV,
/*!\brief device is OXGRF pcie*/
OXGRF_DEV,
DPDKRF_DEV,
/*!\brief device is LMSSDR (SoDeRa)*/
LMSSDR_DEV,
/*!\brief device is Iris */
IRIS_DEV,
/*!\brief device is NONE*/
NONE_DEV,
DPDKRF_DEV,
/*!\brief device is UEDv2 */
UEDv2_DEV,
RFSIMULATOR,
......
find_library(dpdkrf NAMES dpdkrf PATHS /usr/local/lib)
add_library(oai_dpdkrfdevif MODULE dpdkrf_oai.c)
target_link_libraries(oai_dpdkrfdevif PRIVATE dpdkrf)
target_link_libraries(oai_dpdkrfdevif PRIVATE UTIL)
set_target_properties(oai_dpdkrfdevif PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_custom_command(TARGET oai_dpdkrfdevif POST_BUILD
COMMAND ${CMAKE_COMMAND} -E create_symlink liboai_dpdkrfdevif.so liboai_device.so
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
message(STATUS "CMAKE_LIBRARY_PATH: ${CMAKE_BINARY_DIR}")
message(STATUS "Libraries linked to your_target_name: ${oai_dpdkrfdevif}")
......@@ -193,7 +193,7 @@ int trx_dpdkrf_set_freq(openair0_device* device, openair0_config_t *openair0_cfg
int trx_dpdkrf_set_gains(openair0_device* device, openair0_config_t *openair0_cfg) {
if (openair0_cfg->rx_gain[0] > 65+openair0_cfg->rx_gain_offset[0]) {
LOG_E(HW, "[oxgrf] Reduce RX Gain 0 by %f dB\n", openair0_cfg->rx_gain[0] - openair0_cfg->rx_gain_offset[0] - 65);
LOG_E(HW, "[dpdkrf] Reduce RX Gain 0 by %f dB\n", openair0_cfg->rx_gain[0] - openair0_cfg->rx_gain_offset[0] - 65);
return -1;
}
......
File mode changed from 100644 to 100755
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment