Commit 52cb72c0 authored by Robert Schmidt's avatar Robert Schmidt

build_oai: allow to only build radio/transport libraries

parent 47da0a02
...@@ -569,66 +569,51 @@ function main() { ...@@ -569,66 +569,51 @@ function main() {
#################################################### ####################################################
# Build RF device and transport protocol libraries # # Build RF device and transport protocol libraries #
#################################################### ####################################################
if [ "$eNB" = "1" -o "$UE" = "1" -o "$gNB" = "1" -o "$RU" = "1" -o "$nrUE" = "1" ] ; then if [ "$HW" != "None" ] ; then
rm -f liboai_device.so
# build RF device libraries if [ "$HW" == "OAI_USRP" ] ; then
if [ "$HW" != "None" ] ; then compilations $BUILD_DIR oai_usrpdevif.txt oai_usrpdevif
rm -f liboai_device.so ln -sf liboai_usrpdevif.so liboai_device.so
echo "liboai_device.so symlinks to liboai_usrpdevif.so"
if [ "$HW" == "OAI_USRP" ] ; then elif [ "$HW" == "OAI_BLADERF" ] ; then
compilations $BUILD_DIR oai_usrpdevif.txt oai_usrpdevif compilations $BUILD_DIR oai_bladerfdevif.txt oai_bladerfdevif
ln -sf liboai_bladerfdevif.so liboai_device.so
ln -sf liboai_usrpdevif.so liboai_device.so echo "liboai_device.so symlinks liboai_bladerfdevif.so"
echo_info "liboai_device.so is linked to USRP device library" elif [ "$HW" == "OAI_LMSSDR" ] ; then
elif [ "$HW" == "OAI_BLADERF" ] ; then compilations $BUILD_DIR oai_lmssdrdevif.txt oai_lmssdrdevif
if [ -f "/usr/include/libbladeRF.h" ] ; then ln -sf liboai_lmssdrdevif.so liboai_device.so
compilations $BUILD_DIR oai_bladerfdevif.txt oai_bladerfdevif echo "liboai_device.so symlinks to liboai_lmssdrdevif.so"
fi elif [ "$HW" == "OAI_IRIS" ] ; then
compilations $BUILD_DIR oai_irisdevif.txt oai_irisdevif
ln -sf liboai_bladerfdevif.so liboai_device.so ln -s liboai_irisdevif.so liboai_device.so
echo_info "liboai_device.so is linked to BLADERF device library" echo "liboai_device.so symlinks to liboai_irisdevif.so"
elif [ "$HW" == "OAI_LMSSDR" ] ; then elif [ "$HW" == "OAI_AW2SORI" ] ; then
# if [ -f "/usr/include/libbladeRF.h" ] ; then compilations $BUILD_DIR aw2sori_transpro.txt aw2sori_transpro
compilations $BUILD_DIR oai_lmssdrdevif.txt oai_lmssdrdevif ln -sf libaw2sori_transpro.so libthirdparty_transpro.so
# fi echo "libthirdparty_transpro.so symlinks to libaw2sori_transpro.so"
else
ln -sf liboai_lmssdrdevif.so liboai_device.so echo_fatal "illegal HW option $HW"
echo_info "liboai_device.so is linked to LMSSDR device library" fi
elif [ "$HW" == "OAI_IRIS" ] ; then fi
compilations $BUILD_DIR oai_irisdevif.txt oai_irisdevif
ln -s liboai_irisdevif.so liboai_device.so
echo_info "liboai_device.so is linked to IRIS device library"
elif [ "$HW" == "OAI_AW2SORI" ] ; then
compilations $BUILD_DIR aw2sori_transpro.txt aw2sori_transpro
ln -sf libaw2sori_transpro.so libthirdparty_transpro.so
echo_info "build libthirdparty_transpro.so for AW2SORI fronthaul"
else
echo_info "liboai_device.so is not linked to any device library"
fi
fi
#build transport protocol libraries (currently only ETHERNET is available) if [ "$TP" != "None" ]; then
if [ "$SKIP_SHARED_LIB_FLAG" = "False" ]; then rm -f liboai_transpro.so
echo_info "Building transport protocol libraries" if [ "$TP" == "Ethernet" ]; then
rm -f liboai_transpro.so compilations $BUILD_DIR oai_eth_transpro.txt oai_eth_transpro
if [ "$TP" == "Ethernet" ]; then ln -sf liboai_eth_transpro.so liboai_transpro.so
compilations $BUILD_DIR oai_eth_transpro.txt oai_eth_transpro echo_info "liboai_transpro.so symlinks to liboai_eth_transpro.so"
ln -sf liboai_eth_transpro.so liboai_transpro.so elif [ "$TP" == "benetel4g" ]; then
echo_info "liboai_transpro.so is linked to ETHERNET transport" compilations $BUILD_DIR benetel_4g.txt benetel4g
fi ln -sf libbenetel_4g.so liboai_transpro.so
if [ "$TP" == "benetel4g" ]; then echo_info "liboai_transpro.so symlinks to libbenetel_4g.so"
compilations $BUILD_DIR benetel_4g.txt benetel4g elif [ "$TP" == "benetel5g" ]; then
ln -sf libbenetel_4g.so liboai_transpro.so compilations $BUILD_DIR benetel_5g.txt benetel_5g
echo_info "liboai_transpro.so is linked to BENETEL4G transport" ln -sf libbenetel_5g.so liboai_transpro.so
fi echo_info "liboai_transpro.so symlinks to libbenetel_5g.so"
if [ "$TP" == "benetel5g" ]; then else
compilations $BUILD_DIR benetel_5g.txt benetel_5g echo_fatal "illegal TP option $TP"
ln -sf libbenetel_5g.so liboai_transpro.so fi
echo_info "liboai_transpro.so is linked to BENETEL4G transport"
fi
fi
fi fi
################### ###################
......
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