Enable gNB configuration through YAML file

This commit is contained in:
Bartosz Podrygajlo
2024-10-07 09:10:42 +02:00
parent d8a6c5c9d5
commit 8e6234a2f5
14 changed files with 278 additions and 26 deletions
+19 -5
View File
@@ -9,14 +9,29 @@ echo "=================================="
echo "/proc/sys/kernel/core_pattern=$(cat /proc/sys/kernel/core_pattern)"
if [ ! -f $CONFIGFILE ]; then
echo "No configuration file found: please mount at $CONFIGFILE"
exit 255
echo "No configuration file $CONFIGFILE found: attempting to find YAML config"
YAML_CONFIGFILE=$PREFIX/etc/gnb.yaml
if [ ! -f $YAML_CONFIGFILE ]; then
echo "No configuration file $YAML_CONFIGFILE found. Please mount either at $CONFIGFILE or $YAML_CONFIGFILE"
exit 255
fi
CONFIGFILE=$YAML_CONFIGFILE
fi
echo "=================================="
echo "== Configuration file:"
cat $CONFIGFILE
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
done
new_args+=("-O")
new_args+=("$CONFIGFILE")
# Load the USRP binaries
echo "=================================="
echo "== Load USRP binaries"
@@ -35,7 +50,6 @@ echo "=================================="
echo "== Starting gNB soft modem"
if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "Additional option(s): ${USE_ADDITIONAL_OPTIONS}"
new_args=()
while [[ $# -gt 0 ]]; do
new_args+=("$1")
shift
@@ -46,6 +60,6 @@ if [[ -v USE_ADDITIONAL_OPTIONS ]]; then
echo "${new_args[@]}"
exec "${new_args[@]}"
else
echo "$@"
exec "$@"
echo "${new_args[@]}"
exec "${new_args[@]}"
fi