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
lizhongxiao
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() {
fi
execlist
=
""
if
[
"
$eNB
"
=
"1"
]
;
then
execlist
=
"
$execlist
lte-softmodem"
fi
if
[
"
$gNB
"
=
"1"
]
;
then
execlist
=
"
$execlist
nr-softmodem nr-cuup"
fi
if
[
"
$RU
"
=
"1"
]
;
then
execlist
=
"
$execlist
oairu"
fi
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
[[
"
$eNB
"
==
"1"
]]
&&
execlist
=
"
$execlist
lte-softmodem"
[[
"
$gNB
"
==
"1"
]]
&&
execlist
=
"
$execlist
nr-softmodem nr-cuup"
[[
"
$RU
"
==
"1"
]]
&&
execlist
=
"
$execlist
oairu"
[[
"
$UE
"
==
1
]]
&&
execlist
=
"
$execlist
lte-uesoftmodem"
[[
"
$nrUE
"
==
1
]]
&&
execlist
=
"
$execlist
nr-uesoftmodem"
# TODO: fix: dlsim_tm4 pucchsim prachsim pdcchsim pbchsim mbmssim
[[
"
$SIMUS_PHY
"
==
"1"
]]
&&
execlist
=
"
$execlist
dlsim ulsim ldpctest polartest smallblocktest nr_pbchsim nr_dlschsim nr_ulschsim nr_dlsim nr_ulsim nr_pucchsim nr_prachsim"
[[
"
$BUILD_OPTLIB
"
!=
""
]]
&&
execlist
=
"
$execlist
$BUILD_OPTLIB
"
[[
"
$execlist
"
!=
""
]]
&&
execlist
=
"
$execlist
params_libconfig coding rfsimulator"
DIR
=
$OPENAIR_DIR
/cmake_targets
...
...
@@ -537,34 +527,19 @@ function main() {
echo_info
"running
$CMAKE_CMD
"
eval
$CMAKE_CMD
for
f
in
$execlist
;
do
echo_info
"Compiling
$f
..."
compilations
$BUILD_DIR
$f
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
if
[[
"
$execlist
"
!=
""
]]
;
then
echo_info
"Compiling
$execlist
..."
compilations
$BUILD_DIR
all.txt
$execlist
fi
if
[
"
$UE
"
=
1
]
;
then
echo_info
"Compiling UE specific part"
if
[
$UE_ip
-eq
1
]
if
[
[
$UE_ip
-eq
1
]
]
then
echo_info
"Building ue_ip module"
compilations
$BUILD_DIR
ue_ip
compilations
$BUILD_DIR
ue_ip
.txt ue_ip
else
echo_info
"Bypassing ue_ip build"
fi
#IS_CONTAINER
...
...
@@ -579,9 +554,9 @@ function main() {
cd
$DIR
/nas_sim_tools/build
eval
$CMAKE_CMD
..
compilations nas_sim_tools usim
compilations nas_sim_tools nvram
compilations nas_sim_tools conf2uedata
compilations nas_sim_tools usim
.txt usim
compilations nas_sim_tools nvram
.txt nvram
compilations nas_sim_tools conf2uedata
.txt conf2uedata
# generate USIM data
if
[
-f
conf2uedata
]
;
then
...
...
@@ -591,31 +566,6 @@ function main() {
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 #
####################################################
...
...
@@ -626,31 +576,31 @@ function main() {
rm
-f
liboai_device.so
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
echo_info
"liboai_device.so is linked to USRP device library"
elif
[
"
$HW
"
==
"OAI_BLADERF"
]
;
then
if
[
-f
"/usr/include/libbladeRF.h"
]
;
then
compilations
$BUILD_DIR
oai_bladerfdevif
compilations
$BUILD_DIR
oai_bladerfdevif
.txt oai_bladerfdevif
fi
ln
-sf
liboai_bladerfdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to BLADERF device library"
elif
[
"
$HW
"
==
"OAI_LMSSDR"
]
;
then
# if [ -f "/usr/include/libbladeRF.h" ] ; then
compilations
$BUILD_DIR
oai_lmssdrdevif
compilations
$BUILD_DIR
oai_lmssdrdevif
.txt oai_lmssdrdevif
# fi
ln
-sf
liboai_lmssdrdevif.so liboai_device.so
echo_info
"liboai_device.so is linked to LMSSDR device library"
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
echo_info
"liboai_device.so is linked to IRIS device library"
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
echo_info
"build libthirdparty_transpro.so for AW2SORI fronthaul"
...
...
@@ -659,28 +609,22 @@ function main() {
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)
if
[
"
$SKIP_SHARED_LIB_FLAG
"
=
"False"
]
;
then
echo_info
"Building transport protocol libraries"
rm
-f
liboai_transpro.so
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
echo_info
"liboai_transpro.so is linked to ETHERNET transport"
fi
if
[
"
$TP
"
==
"benetel4g"
]
;
then
compilations
$BUILD_DIR
benetel_4g
compilations
$BUILD_DIR
benetel_4g
.txt benetel4g
ln
-sf
libbenetel_4g.so liboai_transpro.so
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
fi
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
echo_info
"liboai_transpro.so is linked to BENETEL4G transport"
fi
...
...
cmake_targets/tools/build_helper
View file @
9a90e85d
...
...
@@ -207,8 +207,13 @@ check_errors() {
}
compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
echo_info "Log file for compilation is being written to: $dlog/$2.txt"
local dir=$1
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
{
if [ "$BUILD_COVERITY_SCAN" == "1" ]; then
...
...
@@ -217,28 +222,27 @@ compilations() {
COV_SCAN_PREFIX=""
fi
if [ "$MAKE_CMD" != "" ]; then
$MAKE_CMD $
2
$MAKE_CMD $
targets
else
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
$COV_SCAN_PREFIX make -j`nproc` $
2
$COV_SCAN_PREFIX make -j`nproc` $
targets
fi
fi
ret=$?
} > $dlog/$2.txt 2>&1
set -e
} > $dlog/$logfile 2>&1
if [ "$VERBOSE_CI" == "1" ]; then
echo_info "====== Start of log for $
2.txt
======"
cat $dlog/$
2.txt
echo_info "====== End of log for $
2.txt
======"
echo_info "====== Start of log for $
logfile
======"
cat $dlog/$
logfile
echo_info "====== End of log for $
logfile
======"
fi
check_warnings "$dlog/$
2.txt
"
check_warnings "$dlog/$
logfile
"
if [[ $ret -eq 0 ]]; then
echo_success "$
2
compiled"
echo_success "$
targets
compiled"
else
check_errors "$dlog/$
2.txt
"
echo_error "
$2 compilation
failed"
check_errors "$dlog/$
logfile
"
echo_error "
compilation of $targets
failed"
exit 1
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