From 4394448e27be7564263dc40e9d0d69fdacc3013b Mon Sep 17 00:00:00 2001
From: turletti <turletti@gmail.com>
Date: Thu, 4 Apr 2024 16:27:18 +0200
Subject: [PATCH] update

---
 charts/oai-5g-ran/oai-cu/values.yaml               |  4 ++--
 charts/oai-5g-ran/oai-du/templates/deployment.yaml | 11 +++++++++++
 charts/oai-5g-ran/oai-du/values.yaml               |  2 +-
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/charts/oai-5g-ran/oai-cu/values.yaml b/charts/oai-5g-ran/oai-cu/values.yaml
index 1cf4a939..62d0f73a 100644
--- a/charts/oai-5g-ran/oai-cu/values.yaml
+++ b/charts/oai-5g-ran/oai-cu/values.yaml
@@ -84,8 +84,8 @@ config:
   n3IfName: "@GNB_CU_N3IFNAME@" # if multus.n3Interface.create is true then use n3 or you can only use 1 interface n2 or eth0
   f1IfName: "@GNB_CU_F1IFNAME@" # "eth0"   #if multus.f1Interface.create is true then use f1
   cuHost: "@GNB_CU_HOST@" # "oai-cu" ## Ip-address or hostname
-  f1cuPort: "@GNB_F1_CU_PORT@"# "2153"   #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
-  f1duPort: "@GNB_F1_DU_PORT@"# "2153"   #2153 if using same interface for f1 and n3 else standard port 2152 should be use if f1 and n3 interface are different
+  f1cuPort: "@GNB_F1_CU_PORT@" # 2153 if using same interface for f1 and n3 else standard port 2152 should be used if f1 and n3 interface are different
+  f1duPort: "@GNB_F1_DU_PORT@" # 2153 if using same interface for f1 and n3 else standard port 2152 should be used if f1 and n3 interface are different
   
 ## Debugging section
 podSecurityContext:
diff --git a/charts/oai-5g-ran/oai-du/templates/deployment.yaml b/charts/oai-5g-ran/oai-du/templates/deployment.yaml
index 7de16055..acb2d5f2 100644
--- a/charts/oai-5g-ran/oai-du/templates/deployment.yaml
+++ b/charts/oai-5g-ran/oai-du/templates/deployment.yaml
@@ -66,7 +66,11 @@ spec:
       - name: gnbdu
         image: "{{ .Values.nfimage.repository }}:{{ .Values.nfimage.version }}"
         volumeMounts:
+        {{- if if eq .Values.config.usrp "aw2s" }}
+          - mountPath: /opt/oai-gnb-aw2s/etc
+        {{- else }}
           - mountPath: /opt/oai-gnb/etc
+        {{- end }}
             name: configuration
         {{- if .Values.resources.define}}
         resources:
@@ -95,6 +99,12 @@ spec:
             CU_IP_ADDRESS=$(getent hosts $CU_HOST | awk '{print $1}')
             CU_IP_ADDRESS=$(if [[ $CU_IP_ADDRESS ]]; then echo $CU_IP_ADDRESS; else echo $CU_HOST;fi)
             F1_DU_IP_ADDRESS=$(ip -f inet addr show $F1_IF_NAME | grep -o "inet [0-9]*\.[0-9]*\.[0-9]*\.[0-9]*" | grep -o "[0-9]*\.[0-9]*\.[0-9]*\.[0-9]*");
+         {{- if if eq .Values.config.usrp "aw2s" }}
+            sed -e s/@F1_DU_IP_ADDRESS@/$F1_DU_IP_ADDRESS/g
+                -e s/@CU_IP_ADDRESS@/$CU_IP_ADDRESS/g
+                /opt/oai-gnb-aw2s/etc/du.conf | tee /tmp/du.conf;
+            exec /opt/oai-gnb-aw2s/bin/nr-softmodem -O /tmp/du.conf $USE_ADDITIONAL_OPTIONS;
+         {{- else }}
             sed -e s/@F1_DU_IP_ADDRESS@/$F1_DU_IP_ADDRESS/g
                 -e s/@CU_IP_ADDRESS@/$CU_IP_ADDRESS/g
                 /opt/oai-gnb/etc/du.conf | tee /tmp/du.conf;
@@ -106,6 +116,7 @@ spec:
             /opt/oai-gnb/bin/uhd_images_downloader.py -t x3xx;
           {{- end }}
             exec /opt/oai-gnb/bin/nr-softmodem -O /tmp/du.conf $USE_ADDITIONAL_OPTIONS;
+         {{- end }}
         {{- else}}
         command:
           - /bin/sleep
diff --git a/charts/oai-5g-ran/oai-du/values.yaml b/charts/oai-5g-ran/oai-du/values.yaml
index b4f6dd70..3c106a7f 100644
--- a/charts/oai-5g-ran/oai-du/values.yaml
+++ b/charts/oai-5g-ran/oai-du/values.yaml
@@ -79,7 +79,7 @@ config:
   mnc: "@MNC@" # check the information with AMF, SMF, UPF
   tac: "@TAC@" # check the information with AMF
   #sst: "1"  #currently only 4 standard values are allowed 1,2,3,4 # set via sed configmap
-  usrp: "@RRU_TYPE@"   #allowed values rfsim, b2xx, n3xx or x3xx
+  usrp: "@RRU_TYPE@"   #allowed values rfsim, aw2s, b2xx, n3xx or x3xx
 
   f1IfName: "@GNB_DU_F1IFNAME@" # "eth0"   #if multus.f1Interface.create is true then use f1
   cuHost: "@GNB_CU_HOST@" # "oai-cu" ## Ip-address or hostname
-- 
GitLab