Files
openairinterface5g/doc/packages.md
T
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

142 lines
4.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
# OpenAirInterface Packages
This document describes how to build Deb/RPM packages with OAI's build system, cmake.
[[_TOC_]]
## Create packages
Packages are created by running `cpack` after configuring OAI with the appropriate options and building the executables.
First, configure the project with `cmake` and select which type of package you want to build. Then, compile, and finally run `cpack`:
```bash
cd ~/openairinterface5g
mkdir build && cd build
cmake .. -GNinja <options>
ninja
cpack
```
where `<options>` is for:
- packaging **USRP**: `-DOAI_USRP=ON -DPACKAGING_USRP=ON`
- packaging **LTE**: `-DPACKAGING_LTE=ON`
- packaging **NR**: `-DPACKAGING_NR=ON`
- packaging **COMMON**: `-DPACKAGING_COMMON=ON -DENABLE_TELNETSRV=ON`
- packaging **PHYSIM**: `-DPACKAGING_PHYSIM=ON`
By default, deb packages are built. If you want to build for RPM, also provide `-DPACKAGING_RPM=ON`
For example, to package all available packages, run:
```bash
cmake .. -GNinja -DOAI_USRP=ON -DPACKAGING_USRP=ON -DPACKAGING_LTE=ON -DPACKAGING_NR=ON -DPACKAGING_COMMON=ON -DENABLE_TELNETSRV=ON -DPACKAGING_PHYSIM=ON
ninja
cpack
```
## Package installation
In order to install the packages, run:
### Ubuntu/Debian
dpkg -i liboai-common.deb liboai-usrp.deb oai-lte.deb oai-nr.deb oai-physim.deb
### Rhel/Fedora
rpm -i liboai-common.rpm liboai-usrp.rpm oai-lte.rpm oai-nr.rpm oai-physim.rpm
**NOTE**: After oai-nr and oai-lte installation, you'll have services running in systemd, for more information check Systemd paragraph.
## Usage
### Use debug symbols
- Install gdb with `apt` or `dnf`
- Install both stripped package and the corresponding debug symbol one
- Use gbd on you executable, example: ```gdb --args /usr/bin/nr-softmodem -O
/etc/openairinterface/nr/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E
--continuous-tx -A -2 --device.name oai_usrpdevif```
- Then use ```run```
### Systemd
Once installed, oai-nr and oai-lte have **services** which run in systemd
(`nr-softmodem` and `nr-cuup` for oai-nr and `lte-softmodem` for oai-lte),
here is a list of useful **commands**:
- start
- stop
- restart
- reload
- status
- enable (enable service at boot)
- disable (disable service at boot)
- is-enabled
To use them:
sudo systemctl [command] [service]
By default, following configuration files are selected:
- **nr-softmodem**: `gnb.sa.band78.fr1.106PRB.usrpb210.conf`
- **nr-cuup**: `gnb-cuup.sa.f1.conf`
- **lte-softmodem**: `enb.band7.tm1.50PRB.usrpb210.conf`
To modify the configuration:
- Select the configuration file you wish from the following locations:
- `/etc/openairinterface/nr`
- `/etc/openairinterface/lte`
- Or any custom configuration file you have created.
- Edit the service configuration under `/lib/systemd/system`.
Main lines to be modified are
ExecStart=/usr/bin/nr-softmodem -O /etc/openairinterface/nr/gnb.sa.band78.fr1.106PRB.usrpb210.conf -E --continuous-tx -A -2 --device.name oai_usrpdevif
This line specifies the command and its parameters that the service will execute.
Restart=on-failure
RestartSec=5s
These directives define the service’s behavior in case of failure, including whether it should restart and the delay before restarting.
**NOTE**: Additional configuration options are available for further customization.
For full customization please check [systemd services documentation](https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html)
After making your changes, apply them by running:
sudo systemctl daemon-reload && sudo systemctl restart nr-softmodem.service
For instructions on using a custom configuration file, see the [setup documentation](./gNB_frequency_setup.md).
To access service logs:
sudo journalctl -u [service] --since "today"
To follow service logs:
sudo journalctl -u [service] --follow
## Purge
To uninstall packages and automatically stop and remove services in systemd, run:
### Ubuntu/Debian
dpkg -r liboai-common liboai-usrp oai-lte oai-nr oai-physim
### Rhel/Fedora
rpm -e liboai-common liboai-usrp oai-lte oai-nr oai-physim