Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
9a90e85d
Commit
9a90e85d
authored
Mar 02, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compile most targets in one go
parent
c39861d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
95 deletions
+43
-95
cmake_targets/build_oai
cmake_targets/build_oai
+25
-81
cmake_targets/tools/build_helper
cmake_targets/tools/build_helper
+18
-14
No files found.
cmake_targets/build_oai
View file @
9a90e85d
...
@@ -502,25 +502,15 @@ function main() {
...
@@ -502,25 +502,15 @@ function main() {
fi
fi
execlist
=
""
execlist
=
""
if
[
"
$eNB
"
=
"1"
]
;
then
[[
"
$eNB
"
==
"1"
]]
&&
execlist
=
"
$execlist
lte-softmodem"
execlist
=
"
$execlist
lte-softmodem"
[[
"
$gNB
"
==
"1"
]]
&&
execlist
=
"
$execlist
nr-softmodem nr-cuup"
fi
[[
"
$RU
"
==
"1"
]]
&&
execlist
=
"
$execlist
oairu"
if
[
"
$gNB
"
=
"1"
]
;
then
[[
"
$UE
"
==
1
]]
&&
execlist
=
"
$execlist
lte-uesoftmodem"
execlist
=
"
$execlist
nr-softmodem nr-cuup"
[[
"
$nrUE
"
==
1
]]
&&
execlist
=
"
$execlist
nr-uesoftmodem"
fi
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
if
[
"
$RU
"
=
"1"
]
;
then
[[
"
$SIMUS_PHY
"
==
"1"
]]
&&
execlist
=
"
$execlist
dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
execlist
=
"
$execlist
oairu"
[[
"
$BUILD_OPTLIB
"
!=
""
]]
&&
execlist
=
"
$execlist
$BUILD_OPTLIB
"
fi
[[
"
$execlist
"
!=
""
]]
&&
execlist
=
"
$execlist
params_libconfig coding rfsimulator"
if
[
"
$UE
"
=
1
]
;
then
execlist
=
"
$execlist
lte-uesoftmodem"
fi
if
[
"
$nrUE
"
=
1
]
;
then
execlist
=
"
$execlist
nr-uesoftmodem"
fi
if
[[
"
$execlist
"
==
""
&&
"
$SIMUS_PHY
"
!=
"1"
&&
"
$HW
"
==
"None"
]]
;
then
SKIP_SHARED_LIB_FLAG
=
"True"
fi
DIR
=
$OPENAIR_DIR
/cmake_targets
DIR
=
$OPENAIR_DIR
/cmake_targets
...
@@ -537,34 +527,19 @@ function main() {
...
@@ -537,34 +527,19 @@ function main() {
echo_info
"running
$CMAKE_CMD
"
echo_info
"running
$CMAKE_CMD
"
eval
$CMAKE_CMD
eval
$CMAKE_CMD
for
f
in
$execlist
;
do
if
[[
"
$execlist
"
!=
""
]]
;
then
echo_info
"Compiling
$f
..."
echo_info
"Compiling
$execlist
..."
compilations
$BUILD_DIR
$f
compilations
$BUILD_DIR
all.txt
$execlist
done
# mandatory shared libraries common to UE and (e/g)NB
if
[
"
$SKIP_SHARED_LIB_FLAG
"
=
"False"
]
;
then
echo_info
"Building shared libraries common to UE and gNB"
# configuration module libraries, one currently available, using libconfig
config_libconfig_shlib
=
params_libconfig
compilations
$BUILD_DIR
$config_libconfig_shlib
compilations
$BUILD_DIR
coding
fi
fi
if
[
"
$UE
"
=
1
]
;
then
if
[
"
$UE
"
=
1
]
;
then
echo_info
"Compiling UE specific part"
echo_info
"Compiling UE specific part"
if
[
$UE_ip
-eq
1
]
if
[
[
$UE_ip
-eq
1
]
]
then
then
echo_info
"Building ue_ip module"
echo_info
"Building ue_ip module"
compilations
$BUILD_DIR
ue_ip
compilations
$BUILD_DIR
ue_ip
.txt ue_ip
else
else
echo_info
"Bypassing ue_ip build"
echo_info
"Bypassing ue_ip build"
fi
#IS_CONTAINER
fi
#IS_CONTAINER
...
@@ -579,9 +554,9 @@ function main() {
...
@@ -579,9 +554,9 @@ function main() {
cd
$DIR
/nas_sim_tools/build
cd
$DIR
/nas_sim_tools/build
eval
$CMAKE_CMD
..
eval
$CMAKE_CMD
..
compilations nas_sim_tools usim
compilations nas_sim_tools usim
.txt usim
compilations nas_sim_tools nvram
compilations nas_sim_tools nvram
.txt nvram
compilations nas_sim_tools conf2uedata
compilations nas_sim_tools conf2uedata
.txt conf2uedata
# generate USIM data
# generate USIM data
if
[
-f
conf2uedata
]
;
then
if
[
-f
conf2uedata
]
;
then
...
@@ -591,31 +566,6 @@ function main() {
...
@@ -591,31 +566,6 @@ function main() {
fi
fi
fi
fi
cd
$DIR
/
$BUILD_DIR
/build
##################
# PHY simulators #
##################
if
[
"
$SIMUS_PHY
"
=
"1"
]
;
then
echo_info
"Compiling physical unitary tests simulators"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
simlist
=
"dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
# simlist="ldpctest"
for
f
in
$simlist
;
do
compilations
$BUILD_DIR
$f
done
compilations
$BUILD_DIR
coding
fi
######################
# Optional libraries #
######################
if
[
!
-z
"
$BUILD_OPTLIB
"
]
;
then
for
oklib
in
$BUILD_OPTLIB
;
do
compilations
$BUILD_DIR
$oklib
done
fi
####################################################
####################################################
# Build RF device and transport protocol libraries #
# Build RF device and transport protocol libraries #
####################################################
####################################################
...
@@ -626,31 +576,31 @@ function main() {
...
@@ -626,31 +576,31 @@ function main() {
rm
-f
liboai_device.so
rm
-f
liboai_device.so
if
[
"
$HW
"
==
"OAI_USRP"
]
;
then
if
[
"
$HW
"
==
"OAI_USRP"
]
;
then
compilations
$BUILD_DIR
oai_usrpdevif
compilations
$BUILD_DIR
oai_usrpdevif
.txt oai_usrpdevif
ln
-sf
liboai_usrpdevif.so liboai_device.so
ln
-sf
liboai_usrpdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to USRP device library"
echo_info
"liboai_device.so is linked to USRP device library"
elif
[
"
$HW
"
==
"OAI_BLADERF"
]
;
then
elif
[
"
$HW
"
==
"OAI_BLADERF"
]
;
then
if
[
-f
"/usr/include/libbladeRF.h"
]
;
then
if
[
-f
"/usr/include/libbladeRF.h"
]
;
then
compilations
$BUILD_DIR
oai_bladerfdevif
compilations
$BUILD_DIR
oai_bladerfdevif
.txt oai_bladerfdevif
fi
fi
ln
-sf
liboai_bladerfdevif.so liboai_device.so
ln
-sf
liboai_bladerfdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to BLADERF device library"
echo_info
"liboai_device.so is linked to BLADERF device library"
elif
[
"
$HW
"
==
"OAI_LMSSDR"
]
;
then
elif
[
"
$HW
"
==
"OAI_LMSSDR"
]
;
then
# if [ -f "/usr/include/libbladeRF.h" ] ; then
# if [ -f "/usr/include/libbladeRF.h" ] ; then
compilations
$BUILD_DIR
oai_lmssdrdevif
compilations
$BUILD_DIR
oai_lmssdrdevif
.txt oai_lmssdrdevif
# fi
# fi
ln
-sf
liboai_lmssdrdevif.so liboai_device.so
ln
-sf
liboai_lmssdrdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to LMSSDR device library"
echo_info
"liboai_device.so is linked to LMSSDR device library"
elif
[
"
$HW
"
==
"OAI_IRIS"
]
;
then
elif
[
"
$HW
"
==
"OAI_IRIS"
]
;
then
compilations
$BUILD_DIR
oai_irisdevif
compilations
$BUILD_DIR
oai_irisdevif
.txt oai_irisdevif
ln
-s
liboai_irisdevif.so liboai_device.so
ln
-s
liboai_irisdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to IRIS device library"
echo_info
"liboai_device.so is linked to IRIS device library"
elif
[
"
$HW
"
==
"OAI_AW2SORI"
]
;
then
elif
[
"
$HW
"
==
"OAI_AW2SORI"
]
;
then
compilations
$BUILD_DIR
aw2sori_transpro
compilations
$BUILD_DIR
aw2sori_transpro
.txt aw2sori_transpro
ln
-sf
libaw2sori_transpro.so libthirdparty_transpro.so
ln
-sf
libaw2sori_transpro.so libthirdparty_transpro.so
echo_info
"build libthirdparty_transpro.so for AW2SORI fronthaul"
echo_info
"build libthirdparty_transpro.so for AW2SORI fronthaul"
...
@@ -659,28 +609,22 @@ function main() {
...
@@ -659,28 +609,22 @@ function main() {
fi
fi
fi
fi
#build simulators devices
if
[
"
$SKIP_SHARED_LIB_FLAG
"
=
"False"
]
;
then
echo_info
"Compiling rfsimulator"
compilations
$BUILD_DIR
rfsimulator
fi
#build transport protocol libraries (currently only ETHERNET is available)
#build transport protocol libraries (currently only ETHERNET is available)
if
[
"
$SKIP_SHARED_LIB_FLAG
"
=
"False"
]
;
then
if
[
"
$SKIP_SHARED_LIB_FLAG
"
=
"False"
]
;
then
echo_info
"Building transport protocol libraries"
echo_info
"Building transport protocol libraries"
rm
-f
liboai_transpro.so
rm
-f
liboai_transpro.so
if
[
"
$TP
"
==
"Ethernet"
]
;
then
if
[
"
$TP
"
==
"Ethernet"
]
;
then
compilations
$BUILD_DIR
oai_eth_transpro
compilations
$BUILD_DIR
oai_eth_transpro
.txt oai_eth_transpro
ln
-sf
liboai_eth_transpro.so liboai_transpro.so
ln
-sf
liboai_eth_transpro.so liboai_transpro.so
echo_info
"liboai_transpro.so is linked to ETHERNET transport"
echo_info
"liboai_transpro.so is linked to ETHERNET transport"
fi
fi
if
[
"
$TP
"
==
"benetel4g"
]
;
then
if
[
"
$TP
"
==
"benetel4g"
]
;
then
compilations
$BUILD_DIR
benetel_4g
compilations
$BUILD_DIR
benetel_4g
.txt benetel4g
ln
-sf
libbenetel_4g.so liboai_transpro.so
ln
-sf
libbenetel_4g.so liboai_transpro.so
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
fi
fi
if
[
"
$TP
"
==
"benetel5g"
]
;
then
if
[
"
$TP
"
==
"benetel5g"
]
;
then
compilations
$BUILD_DIR
benetel_5g
compilations
$BUILD_DIR
benetel_5g
.txt benetel_5g
ln
-sf
libbenetel_5g.so liboai_transpro.so
ln
-sf
libbenetel_5g.so liboai_transpro.so
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
fi
fi
...
...
cmake_targets/tools/build_helper
View file @
9a90e85d
...
@@ -207,8 +207,13 @@ check_errors() {
...
@@ -207,8 +207,13 @@ check_errors() {
}
}
compilations() {
compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
local dir=$1
echo_info "Log file for compilation is being written to: $dlog/$2.txt"
shift 1
local logfile=$1
shift 1
local targets=$@
cd $OPENAIR_DIR/cmake_targets/$dir/build
echo_info "Log file for compilation is being written to: $dlog/$logfile"
set +e
set +e
{
{
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
...
@@ -217,28 +222,27 @@ compilations() {
...
@@ -217,28 +222,27 @@ compilations() {
COV_SCAN_PREFIX=""
COV_SCAN_PREFIX=""
fi
fi
if [ "$MAKE_CMD" != "" ]; then
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $
2
$MAKE_CMD $
targets
else
else
if [ "$VERBOSE_COMPILE" == "1" ]; then
if [ "$VERBOSE_COMPILE" == "1" ]; then
$COV_SCAN_PREFIX make -j`nproc` $
2
VERBOSE=$VERBOSE_COMPILE
$COV_SCAN_PREFIX make -j`nproc` $
targets
VERBOSE=$VERBOSE_COMPILE
else
else
$COV_SCAN_PREFIX make -j`nproc` $
2
$COV_SCAN_PREFIX make -j`nproc` $
targets
fi
fi
fi
fi
ret=$?
ret=$?
} > $dlog/$2.txt 2>&1
} > $dlog/$logfile 2>&1
set -e
if [ "$VERBOSE_CI" == "1" ]; then
if [ "$VERBOSE_CI" == "1" ]; then
echo_info "====== Start of log for $
2.txt
======"
echo_info "====== Start of log for $
logfile
======"
cat $dlog/$
2.txt
cat $dlog/$
logfile
echo_info "====== End of log for $
2.txt
======"
echo_info "====== End of log for $
logfile
======"
fi
fi
check_warnings "$dlog/$
2.txt
"
check_warnings "$dlog/$
logfile
"
if [[ $ret -eq 0 ]]; then
if [[ $ret -eq 0 ]]; then
echo_success "$
2
compiled"
echo_success "$
targets
compiled"
else
else
check_errors "$dlog/$
2.txt
"
check_errors "$dlog/$
logfile
"
echo_error "
$2 compilation
failed"
echo_error "
compilation of $targets
failed"
exit 1
exit 1
fi
fi
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment