Move radio CMakeLists.txt to subdirectory

- move following radios: AW2S, BladeRF, IRIS, LMSSDR, RFsimulator, USRP
- move following transports: Ethernet, benetel4g, benetel5g
- for each: create independent cmake variable to switch compilation
  on/off, in order: OAI_AW2S, OAI_BLADERF, OAI_IRIS, OAI_LMSSDR,
  OAI_SIMU, OAI_USRP, OAI_ETHERNET, OAI_BENETEL4G, OAI_BENETEL5G
- Remove RF_BOARD variable, allows to compile multiple boards at once
- where applicable: remove USERSPACE/LIB in path, i.e., move files up to
  directories, as all are userspace libraries

Note that with the above, it is now mandatory to enable a radio
implementation before compiling it, e.g., for USRP:

./build_oai -w USRP
cmake .. -DOAI_USRP=ON && ninja oai_usrpdevif
This commit is contained in:
Robert Schmidt
2023-07-07 08:35:28 +02:00
parent 52cb72c0ee
commit ddf549b1f3
42 changed files with 166 additions and 178 deletions
+13 -25
View File
@@ -282,19 +282,27 @@ function main() {
case "$2" in
"USRP" | "BLADERF" | "LMSSDR" | "IRIS" | "SIMU" | "AW2SORI")
HW="OAI_"$2
CMAKE_CMD="$CMAKE_CMD -DOAI_$2=ON"
;;
"None")
HW="None"
;;
*)
echo_fatal "Unknown HW type $HW: exit..."
echo_fatal "Unknown HW type $2: exit..."
esac
echo_info "Setting hardware to: $HW"
#CMAKE_CMD="$CMAKE_CMD -DRF_BOARD=\"${HW}\""
CMAKE_CMD="$CMAKE_CMD -DRF_BOARD=${HW}"
shift 2;;
-t | --transport)
TP=$2
case "$2" in
"Ethernet" | "benetel4g" | "benetel5g")
TP=$2
CMAKE_CMD="$CMAKE_CMD -DOAI_${2^^}=ON" # ^^ makes uppercase
;;
"None")
HW="None"
;;
*)
echo_fatal "Unknown TP type $2; exit..."
esac
shift 2;;
-P | --phy_simulators)
SIMUS_PHY=1
@@ -436,26 +444,6 @@ function main() {
fi
fi
########################################################
# Check validity of HW and TP parameters for eNB / gNB #
########################################################
# to be discussed
if [ "$eNB" = "1" -o "$gNB" = "1" ] ; then
if [ "$HW" = "None" -a "$TP" = "None" ] ; then
echo_info "No local radio head and no transport protocol selected"
fi
if [ "$HW" = "None" ] ; then
echo_info "No radio head has been selected (HW set to $HW)"
fi
if [ "$TP" = "None" ] ; then
echo_info "No transport protocol has been selected (TP set to $TP)"
fi
fi
echo_info "RF HW set to $HW"
# If the user doesn't specify the Linux scheduler to use, we set a value
#######################################################
# Setting and printing OAI envs, we should check here #
#######################################################