You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|4 years ago|
|net||4 years ago|
|src||4 years ago|
|.gitignore||4 years ago|
|.gitreview||4 years ago|
|2G.deps||4 years ago|
|3G+2G.deps||4 years ago|
|README||4 years ago|
|all-tests.opts||4 years ago|
|default.opts||5 years ago|
|gen_makefile.py||4 years ago|
|iu.opts||5 years ago|
|manuals.opts||4 years ago|
|no_doxygen.opts||4 years ago|
|no_optimization.opts||4 years ago|
|no_systemd.opts||4 years ago|
|openbsc.deps||5 years ago|
|osmo-uninstall.sh||4 years ago|
|prefix_usr.opts||4 years ago|
|sanitize.opts||4 years ago|
|transcoding.opts||6 years ago|
|werror.opts||5 years ago|
=== WHAT IS THIS?
* quickly build the entire Osmocom core network stack from source, with a
generated top-level makefile (see the rest of this README file below).
* quickly configure, launch and tear down an entire Osmocom core network on
your box (see net/README).
=== Quick Start
sudo apt install \
build-essential gcc g++ make automake autoconf libtool pkg-config \
libtalloc-dev libpcsclite-dev libortp-dev libsctp-dev libssl-dev libdbi-dev \
libdbd-sqlite3 libsqlite3-dev libpcap-dev libc-ares-dev libgnutls28-dev \
./gen_makefile.py 3G+2G.deps default.opts iu.opts -I -m make
- 'make' will ask for sudo password to run 'make install' and 'ldconfig'.
To run non-interactively:
- 'make install':
chown $USER: /usr/local
Then call gen_makefile.py once without the -I option
echo "$USER ALL= NOPASSWD: /sbin/ldconfig" > /etc/sudoers.d/ldconfig
This provides a set of top-level makefiles to build variants of the Osmocom
source trees. It is inteded for the core network components and related
projects, but works generically.
The idea is to have all your Osmocom git clones in ./src, while keeping one or
more separate build trees in ./make-*.
Run ./gen_makefile.py with a choice of projects (2G only or also 3G?)
and a choice of configure options.
Full 2G and 3G support:
./gen_makefile.py 3G+2G.deps default.opts iu.opts -m make
2G only, and a custom dir name of 'make-2G':
./gen_makefile.py 2G.deps default.opts -m make-2G
If you make modifications in one of the source trees, this Makefile will pick
it up, rebuild the project and also rebuild all dependencies (according to the
*.deps file the Makefile was generated from).
If you modify the *.deps or *.opts file, you can easily run 'make regen' in a
make-* subdir to regenerate the Makefile from the same files.
In your make-* subdir there are empty status files that are touched for every
completed make target. From these, 'make' can detect what needs to be rebuilt.
You can manually remove them to force a rebuild of a specific target.
For example, if you 'rm .make.libosmocore.autoconf', libosmocore and all
projects depending on libosmocore will be rebuilt from scratch.
For more details on the *.opts and *.deps syntax, read the docs at the top of
It is also easily possible to keep sources and build trees in various
configurations, see the command line options of ./gen_makefile.py.
=== Install in /usr
By default, the Osmocom install prefix is /usr/local, while (currently) the
default systemd *.service files expect binaries installed in /usr/bin. To
install in /usr instead, use prefix_usr.opts, which sets --prefix=/usr.
=== Systemd Service Files
If you encounter problems installing *.service files, no_systemd.opts may help:
Systemd recommends installing service files in the distribution's single
service file location; that may sound sane, but if that location is
/lib/systemd/system, that means even a --prefix=/home/private/prefix ends up
trying to install service files system-wide in /lib/systemd/system, making all
attempts to install to a user-writable location fail.
no_systemd.opts disables installing *.service files.
=== Build Environment
For dependencies, see the "External dependencies" on:
If /usr/local/ is not writable by your user, pass the --sudo-make-install
option to gen_makefile.py above (a custom --prefix is not yet supported).
If your system doesn't have this by default, you will need:
to your environment. To use the installed binaries after installation, also
Remove osmocom built binaries and headers from given prefix,
default is /usr/local.
Find other useful scripts in src/, see src/README.
When using sanitize.opts, osmo-trx is not built with the address sanitizer
enabled. Linking a sanitizer-enabled libosmocore will not work.