diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:19:46 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-02-15 14:19:46 +0100 |
commit | f5b42c34219ef8d01987b4d811be3bc8035e337d (patch) | |
tree | 9058d6a1b079f7d2ac5d9bff6cff24b4be5f43a2 /src/common/main.c | |
parent | f58542899a91d1db0bbe9966ae98ccdf449f45d0 (diff) | |
parent | a02bf125accedddc43b2d8ce3093c72d4e41ffc3 (diff) |
Merge branch 'laforge/phy-link'
this introduces the new phy_link / phy_instance interface, which is the
basis of clean support for all kinds of multi-trx configurations with
various BTS modules.
WARNING: This breaks configuration file compatibility. You will need to
introduce config nodes for 'phy' and 'instance', as well as the link
from the 'trx' nodes towards the phy instance.
Diffstat (limited to 'src/common/main.c')
-rw-r--r-- | src/common/main.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/common/main.c b/src/common/main.c index fabe4827..e454a28b 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -42,6 +42,7 @@ #include <osmocom/core/gsmtap.h> #include <osmo-bts/gsm_data.h> +#include <osmo-bts/phy_link.h> #include <osmo-bts/logging.h> #include <osmo-bts/abis.h> #include <osmo-bts/bts.h> @@ -284,6 +285,19 @@ int bts_main(int argc, char **argv) exit(1); } + if (!phy_link_by_num(0)) { + fprintf(stderr, "You need to configure at last phy0\n"); + exit(1); + } + + llist_for_each_entry(trx, &bts->trx_list, list) { + if (!trx->role_bts.l1h) { + fprintf(stderr, "TRX %u has no associated PHY instance\n", + trx->nr); + exit(1); + } + } + write_pid_file("osmo-bts"); bts_controlif_setup(bts); @@ -317,6 +331,12 @@ int bts_main(int argc, char **argv) exit(2); } + rc = phy_links_open(); + if (rc < 0) { + fprintf(stderr, "unable ot open PHY link(s)\n"); + exit(2); + } + if (daemonize) { rc = osmo_daemonize(); if (rc < 0) { |