diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt index 8f529f80fd0ea2c496f00f0f75a26926d4abadf7..01f8a0b89f321bb24b392b7012d0f7409b0af350 100644 --- a/cmake_targets/CMakeLists.txt +++ b/cmake_targets/CMakeLists.txt @@ -1391,6 +1391,10 @@ ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/emu_transport.c ${OPENAIR1_DIR}/SIMULATION/ETH_TRANSPORT/pgm_link.c ) +add_library(OPENAIR0_LIB + ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB/openair0_lib.c +) + # System packages that are required # We use either the cmake buildin, in ubuntu are in: /usr/share/cmake*/Modules/ # or cmake provide a generic interface to pkg-config that widely used @@ -1902,3 +1906,37 @@ make_driver(xt_GTPURH ${OPENAIRCN_DIR}/GTPV1-U/GTPURH "") # add the install targets #install (TARGETS Tutorial DESTINATION bin) #install (FILES "${PROJECT_BIN_DIR}/TutorialConfig.h" DESTINATION include) + +# OCTAVE tools +############### +set(OCT_INCL -I${OPENAIR_TARGETS}/ARCH/EXMIMO/DEFS -I${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/LIB -I${OPENAIR_TARGETS}/ARCH/COMMON) +set(OCT_LIBS -L${CMAKE_CURRENT_BINARY_DIR} -lm -lOPENAIR0_LIB) +set(OCT_FLAGS -DEXMIMO) +set(OCT_DIR ${OPENAIR_TARGETS}/ARCH/EXMIMO/USERSPACE/OCTAVE) +set(OCT_FILES + oarf_config_exmimo.oct + oarf_config_exmimo.oct + oarf_get_frame.oct + oarf_stop.oct + oarf_send_frame.oct + oarf_get_num_detected_cards.oct + oarf_stop_without_reset.oct +) + +foreach(file IN ITEMS ${OCT_FILES}) + string(REGEX REPLACE "oct *$" "cc" src ${file}) + add_custom_command( + OUTPUT ${file} + DEPENDS ${OCT_DIR}/${src} OPENAIR0_LIB + COMMAND mkoctfile + ARGS ${OCT_FLAGS} ${OCT_INCL} ${OCT_LIBS} + ARGS -o ${file} ${OCT_DIR}/${src} + COMMENT "Generating ${file}" + VERBATIM + ) +endforeach(file) + +ADD_CUSTOM_TARGET(oarf + DEPENDS ${OCT_FILES} +) + diff --git a/cmake_targets/build_oai b/cmake_targets/build_oai index 1142b79960417fa60f3a543492b6dd234b9d3580..3d7a790925ff6c9ee17ef1adba892901a708432e 100755 --- a/cmake_targets/build_oai +++ b/cmake_targets/build_oai @@ -68,9 +68,9 @@ Options -h | --help Print this help --eNB - Makes the eNB LTE softmodem + Makes the LTE softmodem --UE - Makes the UE softmodem + Makes the UE specific parts (ue_ip, usim, nvram) --EPC Makes the EPC (MME-SPGW, HSS) -r | --3gpp-release @@ -142,7 +142,7 @@ function main() { shift 2;; -w | --hardware) HW="$2" #"${i#*=}" - # Use OAI_USRP as the key work USRP is used inside UHD driver + # Use OAI_USRP as the key word USRP is used inside UHD driver [ "$HW" == "USRP" ] && HW=OAI_USRP echo_info "setting hardware to: $HW" shift 2;; @@ -327,7 +327,7 @@ function main() { # EXMIMO drivers & firmware loader ############### - if [ "$HW" = "EXMIMO" -a "$UE$eNB" != "" ] ; then + if [ "$HW" = "EXMIMO" ] ; then echo_info "Compiling Express MIMO 2 board drivers" compilations \ @@ -336,6 +336,10 @@ function main() { compilations \ lte_build_oai updatefw \ updatefw $dbin/updatefw + make -C $OPENAIR_DIR/cmake_targets/lte_build_oai/build oarf > $dlog/oarf.txt 2>&1 + cp $OPENAIR_DIR/cmake_targets/lte_build_oai/build/*.oct $dbin + echo_success "oarf tools compiled" + cp $OPENAIR_DIR/cmake_targets/tools/init_exmimo2 $dbin fi if [ "$oaisim" = "1" ] ; then diff --git a/cmake_targets/tools/build_helper b/cmake_targets/tools/build_helper index 8db12f8b0c454ab06ea29d924fb5653faa73cf44..0ee03a356c4a96fe737bb79995699b667f7c6858 100755 --- a/cmake_targets/tools/build_helper +++ b/cmake_targets/tools/build_helper @@ -301,6 +301,7 @@ check_install_oai_software() { libidn2-0-dev \ libidn11-dev \ libmysqlclient-dev \ + liboctave-dev \ libpgm-5.1 \ libpgm-dev \ libsctp1 \ @@ -312,9 +313,11 @@ check_install_oai_software() { libxml2 \ libxml2-dev \ linux-headers-`uname -r` \ - mscgen \ + mscgen \ mysql-client \ mysql-server \ + octave \ + octave-signal \ openssh-client \ openssh-server \ openssl \