Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Initial implementation of the OAI UE Rock #1

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "chore: "
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Description

Please include a summary of the change. Please also include relevant motivation and context. List any dependencies that are required for this change.

## Checklist

- [ ] I have performed a self-review of my own code.
- [ ] I have made corresponding changes to the documentation.
- [ ] I have added tests that validate the behaviour of the software.
- [ ] I validated that new and existing tests pass locally with my changes.
- [ ] Any dependent changes have been merged and published in downstream modules.
12 changes: 12 additions & 0 deletions .github/workflows/dependabot_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: "Dependabot Auto Approve and Merge"

on:
pull_request:

permissions:
pull-requests: write
contents: write

jobs:
auto-merge:
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
11 changes: 11 additions & 0 deletions .github/workflows/issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Sync Issues to JIRA

on:
issues:
types: [opened, reopened, closed]

jobs:
update:
name: Update Issue
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
secrets: inherit
20 changes: 20 additions & 0 deletions .github/workflows/lint-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Main

on:
pull_request:
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 0 * * 0'

jobs:

build-rock:
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]

scan-rock:
needs: build-rock
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]

publish-rock:
if: github.ref_name == 'main'
needs: scan-rock
uses: canonical/sdcore-github-workflows/.github/workflows/[email protected]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.rock
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contributing

## Build and deploy

```bash
rockcraft pack -v
sudo rockcraft.skopeo --insecure-policy copy oci-archive:oai-ran-ue_2.1.1_amd64.rock docker-daemon:oai-ran-ue:2.1.1
docker run -d oai-ran-ue:2.1.1
```
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# OAI RAN User Equipment (UE) ROCK

Container image for the OAI RAN User Equipment (UE).

## Usage

```console
docker pull ghcr.io/canonical/oai-ran-ue:2.1.1
docker run -it ghcr.io/canonical/oai-ran-ue:2.1.1
```
93 changes: 93 additions & 0 deletions rockcraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: oai-ran-ue
base: [email protected]
version: '2.1.1'
summary: OAI RAN UE ROCK
license: Apache-2.0
description: Container image for the OAI RAN User Equipment (UE).
platforms:
amd64:

environment:
DEBIAN_FRONTEND: noninteractive
LD_LIBRARY_PATH: "/usr/lib/x86_64-linux-gnu:/usr/local/lib"
OAI_GDBSTACKS: "1"
TZ: UTC

parts:
ue:
plugin: nil
source: https://gitlab.eurecom.fr/oai/openairinterface5g.git
source-type: git
source-branch: develop
build-environment:
- BUILD_UHD_FROM_SOURCE: "True"
- UHD_VERSION: "4.4.0.0"
overlay-packages:
- gdb
- libconfig9
- libsctp1
- libusb-1.0-0
build-packages:
- ca-certificates
- g++-12
- gcc-12
- openssl
override-build: |
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100 --slave /usr/bin/g++ g++ /usr/bin/g++-12
/bin/sh oaienv
cd cmake_targets && mkdir -p log
./build_oai -I -w USRP --install-optional-packages
./build_oai -c --ninja \
--gNB \
--build-lib "telnetsrv enbscope uescope nrscope" \
-w USRP -t Ethernet \
--build-e2 --cmake-opt -DXAPP_MULTILANGUAGE=OFF \
--noavx512 \
--cmake-opt -DCMAKE_C_FLAGS="-Werror" --cmake-opt -DCMAKE_CXX_FLAGS="-Werror"

/usr/local/lib/uhd/utils/uhd_images_downloader.py -t b2xx
/usr/local/lib/uhd/utils/uhd_images_downloader.py -t x3xx

cp -r ran_build/build $CRAFT_PART_INSTALL
cp /usr/local/bin/uhd_find_devices $CRAFT_PART_INSTALL
cp /usr/local/lib/libuhd.so.4.4.0 $CRAFT_PART_INSTALL
cp -r /usr/local/share/uhd $CRAFT_PART_INSTALL
organize:
build/liboai_device.so: usr/local/lib/liboai_device.so
build/liboai_eth_transpro.so: usr/local/lib/liboai_eth_transpro.so
build/librfsimulator.so: usr/local/lib/librfsimulator.so
build/liboai_usrpdevif.so: usr/local/lib/liboai_usrpdevif.so
build/libcoding.so: usr/local/lib/libcoding.so
build/libparams_libconfig.so: usr/local/lib/libparams_libconfig.so
build/libdfts.so: usr/local/lib/libdfts.so
build/libldpc.so: usr/local/lib/libldpc.so
build/libldpc_optim.so: usr/local/lib/libldpc_optim.so
build/libldpc_optim8seg.so: usr/local/lib/libldpc_optim8seg.so
build/libldpc_orig.so: usr/local/lib/libldpc_orig.so
build/libtelnetsrv.so: usr/local/lib/libtelnetsrv.so
build/libtelnetsrv_ci.so: usr/local/lib/libtelnetsrv_ci.so
uhd/*: usr/local/share/uhd/
libuhd.so.4.4.0: usr/local/lib/libuhd.so.4.4.0
uhd_find_devices: usr/local/bin/uhd_find_devices
build/nr-uesoftmodem: opt/oai-gnb/bin/nr-uesoftmodem
stage:
- usr/local/bin/uhd_find_devices
- usr/local/lib/*
- usr/local/share/uhd/*
- opt/oai-gnb/bin/*

tools:
after:
- ue
plugin: nil
stage-packages:
- iperf
- iperf3
- iproute2
- iputils-ping
- net-tools
- libboost-program-options1.74.0
- libboost-chrono1.74.0
- libboost-filesystem1.74.0
- libboost-serialization1.74.0
- libboost-thread1.74.0
Loading