Skip to content

Commit 4e8e612

Browse files
Merge pull request #36 from microsoft/matt/Open5GS
Matt/open5 gs
2 parents a35e0ac + 4248521 commit 4e8e612

6 files changed

Lines changed: 1160 additions & 0 deletions

File tree

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
[submodule "containers/Docker/srsRAN_4G"]
1111
path = containers/Docker/srsRAN_4G
1212
url = https://github.com/srsran/srsRAN_4G.git
13+
[submodule "Open5GS/p3/open5gs"]
14+
path = Open5GS/p3/open5gs
15+
url = https://github.com/open5gs/open5gs.git

Open5GS/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
- [1. Introduction](#1-introduction)
2+
- [2. Helper scripts](#2-helper-scripts)
3+
4+
5+
# 1. Introduction
6+
7+
To use the [dashboard](../jrtc_apps/dashboard) application, subscriber information must be sent from the Core to the app.
8+
9+
MSR uses the [Open5GS core](https://github.com/open5gs/open5gs.git) for this purpose. This folder contains the Open5GS submodule pinned to the tested Git commit, along with the corresponding patch that must be applied so the Core AMF entity can forward subscriber information.
10+
11+
12+
# 2. Helper scripts
13+
14+
To apply the patch:-
15+
```bash
16+
./apply_patch.sh
17+
```
18+
19+
If you mqke updates to the core and need to generate a new patch file:-
20+
```bash
21+
./create_patch.sh
22+
```

Open5GS/apply_patch.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
## Copyright (c) Microsoft Corporation. All rights reserved.
3+
# shellcheck disable=SC1091
4+
5+
PATCH_FILE="msr.Open5GS.patch"
6+
SUBM="p3/open5gs"
7+
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
8+
9+
pushd .
10+
cd "$HERE" || exit 1
11+
12+
sudo rm -rf $SUBM
13+
pushd .
14+
cd ..
15+
git submodule update --init --recursive Open5GS/$SUBM
16+
popd || exit 1
17+
18+
cp $PATCH_FILE $SUBM
19+
20+
cd $SUBM
21+
git apply $PATCH_FILE
22+
23+
rm $PATCH_FILE
24+
25+
popd || exit 1
26+
27+
exit 0

Open5GS/create_patch.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
#!/bin/bash
3+
## Copyright (c) Microsoft Corporation. All rights reserved.
4+
# shellcheck disable=SC1091
5+
6+
set -x
7+
8+
PATCH_FILE="msr.Open5GS.patch"
9+
SUBM="p3/open5gs"
10+
11+
# Ensure debugging is turned off on script exit
12+
trap 'set +x' EXIT
13+
14+
HERE="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)"
15+
16+
pushd .
17+
cd "$HERE" || exit 1
18+
19+
pushd .
20+
cd $SUBM
21+
find . -type d -name ".venv" |xargs rm -rf
22+
find . -type d -name "__pycache__" |xargs rm -rf
23+
git add -A
24+
git diff --cached > $HERE/$PATCH_FILE
25+
popd || exit 1
26+
27+
popd || exit 1
28+
29+
exit 0

0 commit comments

Comments
 (0)