pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43648?usp=email )
Change subject: library/Misc_Helpers: Introduce API f_str_oct_split()
......................................................................
library/Misc_Helpers: Introduce API f_str_oct_split()
Similar to existing f_str_split() but operating on octetstrings.
It uses the external f_strstr_oct() function to look up in an efficient
way.
This function will be used by HTTP2 code to split multipart data based
on boundary specified in the HTTP2 Header.
Change-Id: Ie26062bf00133d25be4b41424186484d34b18dce
---
M library/Misc_Helpers.ttcn
1 file changed, 21 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/48/43648/1
diff --git a/library/Misc_Helpers.ttcn b/library/Misc_Helpers.ttcn
index 967c8d1..917b718 100644
--- a/library/Misc_Helpers.ttcn
+++ b/library/Misc_Helpers.ttcn
@@ -134,4 +134,25 @@
return parts;
}
+/* Samem as f_str_split() but using octetstring */
+type record of octetstring ro_octetstring;
+function f_str_oct_split(octetstring str, octetstring delim := ''O) return ro_octetstring
+{
+ var integer pos := 0;
+ var ro_octetstring parts := {};
+ var integer delim_pos;
+ var integer end := lengthof(str);
+ while (pos < end) {
+ delim_pos := f_strstr_oct(str, delim, pos);
+ if (delim_pos < 0) {
+ delim_pos := end;
+ }
+ if (delim_pos > pos) {
+ parts := parts & { substr(str, pos, delim_pos - pos) };
+ }
+ pos := delim_pos + lengthof(delim);
+ }
+ return parts;
+}
+
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43648?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie26062bf00133d25be4b41424186484d34b18dce
Gerrit-Change-Number: 43648
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43650?usp=email )
Change subject: deps/Makefile: Depend on osmo-ttcn3-openapi-generator.git to support 5G SBI types
......................................................................
deps/Makefile: Depend on osmo-ttcn3-openapi-generator.git to support 5G SBI types
The osmo-ttcn3-openapi-generator.git repository contains a set of .ttcn
files providing TTCN-3 types for 5G SBI interfaces, generated from
OpenAPI yaml descriptions of the related 3GPP specs.
The generated TTCN-3 code makes use of dependency
titan.ProtocolModules.JSON_v07_2006, so also import it.
The upcoming SMF_Tests patches testing 5G interfaces will make use of
these files, so make them already available.
Change-Id: I10753fde79fddcf1c64a2a8b6eb6a2e1af708081
---
M deps/Makefile
1 file changed, 4 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/50/43650/1
diff --git a/deps/Makefile b/deps/Makefile
index 10c343c..ad0f260 100644
--- a/deps/Makefile
+++ b/deps/Makefile
@@ -21,6 +21,7 @@
titan.ProtocolModules.ICMPv6 \
titan.ProtocolModules.IP \
titan.ProtocolModules.ISUP_Q.762 \
+ titan.ProtocolModules.JSON_v07_2006 \
titan.ProtocolModules.L2TP \
titan.ProtocolModules.LLC_v7.1.0 \
titan.ProtocolModules.M3UA \
@@ -59,6 +60,7 @@
OSMOGERRIT_REPOS= osmo-uecups
OSMOGITEA_REPOS= nas \
+ osmo-ttcn3-openapi-generator \
titan.ProtocolModules.BSSMAP \
titan.ProtocolModules.MAP \
titan.TestPorts.AF_PACKET \
@@ -73,6 +75,7 @@
# Use tag names from 'git describe --tags' or commit hashes. This way we get
# exact commits of deps when doing regression testing.
nas_commit= 8915a3b55bf21349a116eb8b4395e10e38d72135
+osmo-ttcn3-openapi-generator_commit= 47a66af829eba96dbc4c145bd15270c3a8f9d086
titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
titan.ProtocolEmulations.M3UA_commit= a70095b9113b23d2ea2405a5775befec18dd0fe0
titan.ProtocolEmulations.SCCP_commit= 744f3eeb58d7b5bc372c9fd01db737a20bae069a
@@ -88,6 +91,7 @@
titan.ProtocolModules.ICMPv6_commit= 46f4d9b6e1e3c794294a92588401a81e4881dd27
titan.ProtocolModules.IP_commit= 1be86705f39ae38f3c04b2109806ee20d25e91d0
titan.ProtocolModules.ISUP_Q.762_commit= R.8.A-5-g42d428b
+titan.ProtocolModules.JSON_v07_2006_commit= R.2.A
titan.ProtocolModules.L2TP_commit= 17e76d3662bd0bb815158e8a9de1ec413f21b530
titan.ProtocolModules.LLC_v7.1.0_commit= 09817f113255d7fb56f1d45d3dd629a093d9248d
titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/43650?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I10753fde79fddcf1c64a2a8b6eb6a2e1af708081
Gerrit-Change-Number: 43650
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: crypto_utils: log EID instead of the entire EUM certificate
......................................................................
crypto_utils: log EID instead of the entire EUM certificate
When a profile download happens, the eIM automatically tries to check
the EUM and the eUICC certificate. This is done in order to cache the
public key of the eUICC certificate. For the check, a suitable root
certificate is required. If none is found, an error is logged with the
entire EUM certificate as context. Let's instead log the EID of the
eUICC that caused the problem, which is much more helpful then just
a certificate dump that is barely readable.
Related: SYS#8100
Change-Id: I33c19fee0bec31b4c6b3c8052976625f3213aac1
---
M src/crypto_utils.erl
1 file changed, 8 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/47/43647/2
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I33c19fee0bec31b4c6b3c8052976625f3213aac1
Gerrit-Change-Number: 43647
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email )
Change subject: crypto_utils: log EID instead of entire EUM certificate
......................................................................
crypto_utils: log EID instead of entire EUM certificate
When a profile download happens, the eIM automatically tries to check
the EUM and the eUICC certificate. This is done in order to cache the
public key of the eUICC certificate. For the check, a suitable root
certificate is required. If none is found, an error is logged with the
entire EUM certificate as context. Let's instead log the EID of the
eUICC that caused the problem, which is much more helpful then just
a certificate dump that is barely readable.
Related: SYS#8100
Change-Id: I33c19fee0bec31b4c6b3c8052976625f3213aac1
---
M src/crypto_utils.erl
1 file changed, 7 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/47/43647/1
diff --git a/src/crypto_utils.erl b/src/crypto_utils.erl
index 49f5a25..0097074 100644
--- a/src/crypto_utils.erl
+++ b/src/crypto_utils.erl
@@ -205,14 +205,12 @@
error
end.
-get_root_cert(EumCertificate, []) ->
+get_root_cert(_, EidValue, []) ->
logger:error(
- "Certificate verification failed, no root certificate found,~nEumCertificate=~p~n", [
- EumCertificate
- ]
+ "unable to verify eUICC/EUM certificate, no suitable root certificate found,~nEidValue=~p~n", [EidValue]
),
error;
-get_root_cert(EumCertificate, RootCiCerts) ->
+get_root_cert(EumCertificate, EidValue, RootCiCerts) ->
[RootCiCert | RootCiCertsTail] = RootCiCerts,
{ok, RootCiCertPath} = utils:get_priv_file_path(onomondo_eim, RootCiCert),
{ok, RootCiCertPem} = file:read_file(RootCiCertPath),
@@ -222,12 +220,12 @@
true ->
{ok, RootCiCertPem};
_ ->
- get_root_cert(EumCertificate, RootCiCertsTail)
+ get_root_cert(EumCertificate, EidValue, RootCiCertsTail)
end.
-verify_euicc_cert(EumCertificate, EuiccCertificate) ->
+verify_euicc_cert(EumCertificate, EuiccCertificate, EidValue) ->
{ok, RootCiCerts} = application:get_env(onomondo_eim, root_ci_certs),
- case get_root_cert(EumCertificate, RootCiCerts) of
+ case get_root_cert(EumCertificate, EidValue, RootCiCerts) of
{ok, RootCiCertPem} ->
[{'Certificate', RootCiCertBer, not_encrypted}] = public_key:pem_decode(RootCiCertPem),
{ok, RootCiCert} = 'PKIX1Explicit88':decode('Certificate', RootCiCertBer),
@@ -264,7 +262,7 @@
end.
store_euicc_pubkey(EumCertificate, EuiccCertificate, EidValue) ->
- case verify_euicc_cert(EumCertificate, EuiccCertificate) of
+ case verify_euicc_cert(EumCertificate, EuiccCertificate, EidValue) of
ok ->
{{'ECPoint', SignPubKey}, {namedCurve, NamedCurve}} = pubkey_from_cert(
EuiccCertificate
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/43647?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I33c19fee0bec31b4c6b3c8052976625f3213aac1
Gerrit-Change-Number: 43647
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/43645?usp=email )
Change subject: README tweaks
......................................................................
README tweaks
Change-Id: I6e5fc98a42f50aa971f7750ccd6baafed2d83ec9
---
M README.md
1 file changed, 49 insertions(+), 23 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/README.md b/README.md
index af26d84..29c5524 100644
--- a/README.md
+++ b/README.md
@@ -3,18 +3,18 @@
## Overview
The main purpose of this project is building the Osmocom stack (and related
-projects such as Open5GS) from source with `gen_makefile.py`. This is described
-in more detail below.
+projects such as Open5GS) from source with a top-level Makefile produced by
+`gen_makefile.py`. This is described in more detail below.
### Additional scripts
-* `net`: quickly configure, launch and tear down an entire Osmocom core network
+* `net/`: quickly configure, launch and tear down an entire Osmocom core network
on your box (see `net/README`).
* `ttcn3/tmux`: start a tmux session with a TTCN-3 testsuite and related
binaries (see `ttcn3/tmux/README.md`).
-* `src`: other useful scripts related to git and gerrit (see `src/README`).
+* `src/`: scripts to sync local git clones with upstream gerrit (see `src/README`).
* `osmo-uninstall.sh`: remove installed binaries, libraries and headers from a
given prefix, the default is `/usr/local`.
@@ -63,7 +63,19 @@
### Make targets
-Other make targets exist for specific use cases:
+Single projects can be built by name. The following example builds only
+libosmo-abis, and its dependencies libosmocore and libosmo-netif:
+
+```
+make libosmo-abis
+```
+This can be used for any project in `all.deps`, e.g. `make osmo-msc`,
+`make osmo-bsc` etc.
+
+Top-level make targets exist for specific use cases:
+
+* `cn`: core network components: OsmoMSC, OsmoSGSN, osmo-iuh, OsmoGGSN, OsmoHLR, OsmoMGW,
+ OsmoSIPConnector, OsmoSMLC, including all of their dependencies.
* `usrp`:
Build the CN, OsmoBSC, OsmoBTS and OsmoTRX (default, e.g. when connecting
@@ -72,29 +84,34 @@
* `cn-bsc`:
Build the CN and OsmoBSC (e.g. when connecting to an external sysmoBTS)
-* `osmo-msc`:
- Build only the OsmoMSC project and its dependencies (this can be used for
- any project in `all.deps`).
-
* `.make.osmo-ttcn3-hacks.clone`:
Clone the osmo-ttcn3-hacks git repository (it cannot be built by osmo-dev,
but cloning it is still useful.)
-If you modify the `all.deps` or `*.opts` file, you can easily run `make regen`
-in a `make*` subdir to regenerate the `Makefile` from the same files, with the
-same options for `gen_makefile.py`.
+* You will find many other (hidden) `.make.*` files in your `make*/` dir.
+ These control the top-level Makefile: removing a file makes sure that the
+ given step is rebuilt, including all of its dependencies.
+ For example, if you `rm .make.libosmocore.autoconf`, libosmocore and all
+ projects depending on libosmocore will be rebuilt from scratch.
-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.
+### Modify configuration
+
+If you modify the `all.deps` or `*.opts` file, update your `make*` subdir with:
+
+```
+make regen
+```
+
+This keeps the options intact that were first passed to `gen_makefile.py`.
+(They are listed near the top of the generated `make*/Makefile`, convenient to
+edit.)
### Configuration files
### all.deps
Whitespace-separated listing of:
+
```
project_name depends_on_project_1 depends_on_project_2 ...
```
@@ -103,6 +120,7 @@
Projects that are not developed at `gerrit.osmocom.org/$project` are listed
here in the following format:
+
```
project_name URL
```
@@ -111,6 +129,7 @@
Projects that are not using `autotools` need an entry in this file in the
form of:
+
```
project_name BUILDSYSTEM
```
@@ -131,10 +150,14 @@
project_name OPTION(S)
```
-If `project_name` is `ALL`, the option gets added to all projects using the
-`autotools` build system. This is because `./configure` just ignores any
-options it does not understand and initially only `autotools` was supported by
-`gen_makefile.py`.
+Options can be added to all `./configure` steps of builds that use `autotools`
+using the `ALL` keyword, for example:
+
+```
+ALL --prefix=/usr
+```
+
+(Note that `./configure` just ignores any options it does not understand.)
Find more information about specific `*.opts` files below.
@@ -179,7 +202,10 @@
export PATH="$PATH:/usr/local/bin"
```
+WARNING: setting `LD_LIBRARY_PATH` can have adverse effects.
+
### sanitize.opts and osmo-trx
-When using sanitize.opts, osmo-trx is not built with the address sanitizer
-enabled. Linking a sanitizer-enabled libosmocore will not work.
+osmo-trx is never built with the address sanitizer enabled. If you intend to
+build osmo-trx, you should not use sanitize.opts, because linking a
+sanitizer-enabled libosmocore will not work.
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/43645?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: I6e5fc98a42f50aa971f7750ccd6baafed2d83ec9
Gerrit-Change-Number: 43645
Gerrit-PatchSet: 3
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email )
Change subject: README: modernize
......................................................................
README: modernize
Change-Id: Ie653062d43c486ce977ed772f0d06f0199952188
---
D README
A README.md
A ttcn3/tmux/README.md
3 files changed, 191 insertions(+), 156 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
neels: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
diff --git a/README b/README
deleted file mode 100644
index e425c8e..0000000
--- a/README
+++ /dev/null
@@ -1,156 +0,0 @@
-=== 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 \
- libsctp-dev sqlite3 libusb-1.0-0-dev libmnl-dev libsofia-sip-ua-glib-dev
-
-./gen_makefile.py default.opts iu.opts no_dahdi.opts -I -m make
-
-cd make
-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
-
- - 'ldconfig':
- echo "$USER ALL= NOPASSWD: /sbin/ldconfig" > /etc/sudoers.d/ldconfig
-
-
-=== gen_makefile.py
-
-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 choice of configure options.
-
-
-Examples:
-
-CN with full 2G and 3G support:
-
- ./gen_makefile.py default.opts iu.opts -m make
- cd make
- make cn
-
-Other make targets exist for specific use cases:
-
- - 'usrp':
- Build the CN, OsmoBSC, OsmoBTS and OsmoTRX (default, e.g. when connecting
- to an USRP)
-
- - 'cn-bsc':
- Build the CN and OsmoBSC (e.g. when connecting to an external sysmoBTS)
-
- - 'osmo-msc':
- Build only the OsmoMSC project and its dependencies (this can be used for
- any project in all.deps).
-
- - '.make.osmo-ttcn3-hacks.clone'
- Clone the osmo-ttcn3-hacks git repository (it cannot be built by osmo-dev,
- but cloning it is still useful.)
-
-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
-all.deps).
-
-If you modify the all.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 all.deps syntax, read the docs at the top of
-./gen_makefile.py.
-
-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:
-
- https://osmocom.org/projects/cellular-infrastructure/wiki/Build_from_Source
-
-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:
-
- export LD_LIBRARY_PATH="/usr/local/lib"
-
-and
-
- export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
-
-to your environment. To use the installed binaries after installation, also
-
- export PATH="$PATH:/usr/local/bin"
-
-
-=== osmo-uninstall.sh
-
-Remove osmocom built binaries and headers from given prefix,
-default is /usr/local.
-
-
-=== src/*
-
-Find other useful scripts in src/, see src/README.
-
-=== ttcn3/tmux
-
-It's possible to run TTCN-3 test cases without using Docker. This directory
-contains scripts for starting a testsuite and the related binaries in a tmux
-session. For example, ttcn3-bsc-test.sh does the following:
-
-* Starts osmo-bsc, osmo-stp, and three instances of osmo-bts-omldummy.
-* Prepares a command for execuring the test suite.
-
-=== Troubleshooting
-
-When using sanitize.opts, osmo-trx is not built with the address sanitizer
-enabled. Linking a sanitizer-enabled libosmocore will not work.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..af26d84
--- /dev/null
+++ b/README.md
@@ -0,0 +1,185 @@
+# osmo-dev
+
+## Overview
+
+The main purpose of this project is building the Osmocom stack (and related
+projects such as Open5GS) from source with `gen_makefile.py`. This is described
+in more detail below.
+
+### Additional scripts
+
+* `net`: quickly configure, launch and tear down an entire Osmocom core network
+ on your box (see `net/README`).
+
+* `ttcn3/tmux`: start a tmux session with a TTCN-3 testsuite and related
+ binaries (see `ttcn3/tmux/README.md`).
+
+* `src`: other useful scripts related to git and gerrit (see `src/README`).
+
+* `osmo-uninstall.sh`: remove installed binaries, libraries and headers from a
+ given prefix, the default is `/usr/local`.
+
+## `gen_makefile.py`
+
+This script generates a `Makefile` that was originally intended to build the
+Osmocom core network components, but has since been extended to also build
+Open5GS, PyHSS and more. See `all.deps` for a list of supported projects.
+
+The idea is to have all your git clones in `./src`, while keeping one or more
+separate build trees in `./make*` dirs.
+
+`gen_makefile.py` gets used by
+[`testenv.py`](https://gitea.osmocom.org/ttcn3/osmo-ttcn3-hacks/src/branch/master/_testenv/README.md)
+in `osmo-ttcn3-hacks.git` to build projects from source when running without
+the `--binary-repo` argument.
+
+### Dependencies
+
+Install required packages first. To have enough dependencies for building and
+installing most Osmocom programs, you can run this on Debian-based systems:
+
+```
+$ 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 \
+ libsctp-dev sqlite3 libusb-1.0-0-dev libmnl-dev libsofia-sip-ua-glib-dev
+```
+
+### Example usage
+
+Build the Osmocom core network with full 2G and 3G support:
+
+```
+$ ./gen_makefile.py default.opts iu.opts no_dahdi.opts no_systemd.opts -I -m make
+$ cd make
+$ make cn
+```
+
+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
+`all.deps`). It is also easily possible to keep sources and build trees in
+various configurations, see the command line options of `gen_makefile.py`.
+
+### Make targets
+
+Other make targets exist for specific use cases:
+
+* `usrp`:
+ Build the CN, OsmoBSC, OsmoBTS and OsmoTRX (default, e.g. when connecting
+ to an USRP)
+
+* `cn-bsc`:
+ Build the CN and OsmoBSC (e.g. when connecting to an external sysmoBTS)
+
+* `osmo-msc`:
+ Build only the OsmoMSC project and its dependencies (this can be used for
+ any project in `all.deps`).
+
+* `.make.osmo-ttcn3-hacks.clone`:
+ Clone the osmo-ttcn3-hacks git repository (it cannot be built by osmo-dev,
+ but cloning it is still useful.)
+
+If you modify the `all.deps` or `*.opts` file, you can easily run `make regen`
+in a `make*` subdir to regenerate the `Makefile` from the same files, with the
+same options for `gen_makefile.py`.
+
+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.
+
+### Configuration files
+
+### all.deps
+
+Whitespace-separated listing of:
+```
+project_name depends_on_project_1 depends_on_project_2 ...
+```
+
+### all.urls
+
+Projects that are not developed at `gerrit.osmocom.org/$project` are listed
+here in the following format:
+```
+project_name URL
+```
+
+### all.buildsystems
+
+Projects that are not using `autotools` need an entry in this file in the
+form of:
+```
+project_name BUILDSYSTEM
+```
+
+Supported buildsystems are:
+* `autotools`
+* `cmake`
+* `erlang`
+* `meson`
+* `python`
+
+#### `*.opts` files
+
+The `*.opts` files provide options that are passed to `./configure`,
+`meson setup` and `cmake`. They have the following format:
+
+```
+project_name OPTION(S)
+```
+
+If `project_name` is `ALL`, the option gets added to all projects using the
+`autotools` build system. This is because `./configure` just ignores any
+options it does not understand and initially only `autotools` was supported by
+`gen_makefile.py`.
+
+Find more information about specific `*.opts` files below.
+
+##### `prefix_usr.opts`
+
+By default, the Osmocom install prefix is `/usr/local`, while the systemd
+`*.service` files expect binaries installed in `/usr/bin`. To install to `/usr`
+instead, it is possible to add `prefix_usr.opts` to the `gen_makefile.py`
+arguments, which sets `--prefix=/usr`. Be aware that this will cause problems
+with distribution packages.
+
+##### `no_systemd.opts`
+
+`no_systemd.opts` disables installing `*.service` files, which is useful
+because these files get installed to `/usr/lib/systemd/system` even if the
+prefix is not `/usr`. Using `no_systemd.opts` is required for running
+`gen_makefile.py` without the `-I` (`--sudo-make-install`) argument.
+
+### Run without sudo prompts
+
+`make` will ask for the sudo password to run `make install` and `ldconfig`. To
+run non-interactively:
+
+```
+$ sudo chown -R $USER: /usr/local
+$ echo "$USER ALL= NOPASSWD: $(command -v ldconfig)" | sudo tee /etc/sudoers.d/ldconfig
+```
+
+Then call `gen_makefile.py` once without `-I` (`--sudo-make-install`).
+
+## Troubleshooting
+
+### Environment variables
+
+If your system can't find installed libraries (e.g. if you run
+`gen_makefile.py` with `--no-ldconfig`), pkg-config files or binaries then
+setting these environment variables should help:
+
+```
+export LD_LIBRARY_PATH="/usr/local/lib"
+export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
+export PATH="$PATH:/usr/local/bin"
+```
+
+### sanitize.opts and osmo-trx
+
+When using sanitize.opts, osmo-trx is not built with the address sanitizer
+enabled. Linking a sanitizer-enabled libosmocore will not work.
diff --git a/ttcn3/tmux/README.md b/ttcn3/tmux/README.md
new file mode 100644
index 0000000..0d09976
--- /dev/null
+++ b/ttcn3/tmux/README.md
@@ -0,0 +1,6 @@
+It's possible to run TTCN-3 test cases without using Docker. This directory
+contains scripts for starting a testsuite and the related binaries in a tmux
+session. For example, ttcn3-bsc-test.sh does the following:
+
+* Starts osmo-bsc, osmo-stp, and three instances of osmo-bts-omldummy.
+* Prepares a command for execuring the test suite.
--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/43641?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ie653062d43c486ce977ed772f0d06f0199952188
Gerrit-Change-Number: 43641
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>