This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1258 to look at the new patch set (#5). Use system-installed pcuif_proto.h instead of local copy The pcuif_proto.h file is now maintained (and installed) by osmo-pcu, at least after Change-Id I60976c9be5488256d1ff55fdc5aa548e3705400d has been merged to osmo-pcu.git. You must either install osmo-pcu or disable the pcu socket support by using --disable-pcu-socket. Adjust jenkins build scripts: add osmo-pcu for the pcuif_proto.h header and pass --with-osmo-pcu to 'configure'. While at it, avoid dup by defining the configure options once and re-using for 'make distcheck'. Tweaked-by: nhofmeyr Change-Id: I4dd2537aeef60c7d154e90f279dc4e7c2392ff76 --- M configure.ac M contrib/jenkins_oct.sh M contrib/jenkins_sysmobts.sh M include/osmo-bts/Makefile.am D include/osmo-bts/pcuif_proto.h M src/common/Makefile.am M src/common/pcu_sock.c 7 files changed, 109 insertions(+), 165 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/58/1258/5 diff --git a/configure.ac b/configure.ac index 3fd6b8a..9ee22e4 100644 --- a/configure.ac +++ b/configure.ac @@ -114,6 +114,26 @@ [#include <osmo-bts/tx_power.h>]) CPPFLAGS=$oldCPPFLAGS +AC_ARG_ENABLE([pcu-socket], + AC_HELP_STRING([--disable-pcu-socket], + [disable support for the PCU socket [default=yes]]), + [enable_pcu="no"],[enable_pcu="yes"]) +AC_ARG_WITH([osmo-pcu], + [AC_HELP_STRING([--with-osmo-pcu=INCLUDE_DIR], + [OsmoPCU include directory for osmocom/pcu/pcuif_proto.h])], + [pcu_incdir="$withval"], + [pcu_incdir="$incdir"]) +AC_SUBST([PCU_INCDIR], $pcu_incdir) + +if test "$enable_pcu" = "yes"; then + oldCPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS -I$PCU_INCDIR $LIBOSMOCORE_CFLAGS" + AC_CHECK_HEADER([osmocom/pcu/pcuif_proto.h], + [AC_DEFINE(HAVE_PCUIF_PROTO_H, 1, [Define if pcuif_proto.h exists])], + [AC_MSG_ERROR([osmocom/pcu/pcuif_proto.h can not be found, please install osmo-pcu or use --disable-pcu-socket])]) + CPPFLAGS=$oldCPPFLAGS +fi + # Check for the sbts2050_header.h that was added after the 3.6 release oldCPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS -I$OPENBSC_INCDIR $LIBOSMOCORE_CFLAGS" diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh index 4fecd0a..a796755 100755 --- a/contrib/jenkins_oct.sh +++ b/contrib/jenkins_oct.sh @@ -39,6 +39,10 @@ git reset --hard $FIRMWARE_VERSION fi +# Get osmo-pcu for pcuif_proto.h +cd "$deps" +osmo-deps.sh osmo-pcu + cd "$base" set +x @@ -50,10 +54,16 @@ set -x autoreconf --install --force -./configure --with-openbsc="$deps/openbsc/openbsc/include" --with-octsdr-2g="$deps/layer1-api/" --enable-octphy +configure_flags=" + --with-openbsc=$deps/openbsc/openbsc/include + --with-osmo-pcu=$deps/osmo-pcu/include + --with-octsdr-2g=$deps/layer1-api/ + --enable-octphy + " +./configure $configure_flags $MAKE $PARALLEL_MAKE $MAKE check \ || cat-testlogs.sh -DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-api/ --with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \ +DISTCHECK_CONFIGURE_FLAGS="$configure_flags" \ $MAKE distcheck \ || cat-testlogs.sh diff --git a/contrib/jenkins_sysmobts.sh b/contrib/jenkins_sysmobts.sh index be544a7..e2523d3 100755 --- a/contrib/jenkins_sysmobts.sh +++ b/contrib/jenkins_sysmobts.sh @@ -41,6 +41,10 @@ mkdir -p "$inst/include/sysmocom/femtobts" cp include/*.h "$inst/include/sysmocom/femtobts/" +# Get osmo-pcu for pcuif_proto.h +cd "$deps" +osmo-deps.sh osmo-pcu + cd "$base" set +x @@ -52,11 +56,16 @@ set -x autoreconf --install --force -./configure --enable-sysmocom-bts --with-openbsc="$deps/openbsc/openbsc/include" +configure_flags=" + --with-openbsc=$deps/openbsc/openbsc/include + --with-osmo-pcu=$deps/osmo-pcu/include + --enable-sysmocom-bts + " +./configure $configure_flags $MAKE $PARALLEL_MAKE $MAKE check \ || cat-testlogs.sh -DISTCHECK_CONFIGURE_FLAGS="--enable-sysmocom-bts --with-openbsc=$deps/openbsc/openbsc/include" \ +DISTCHECK_CONFIGURE_FLAGS="$configure_flags" \ $MAKE distcheck \ || cat-testlogs.sh diff --git a/include/osmo-bts/Makefile.am b/include/osmo-bts/Makefile.am index ef4165f..4c2f814 100644 --- a/include/osmo-bts/Makefile.am +++ b/include/osmo-bts/Makefile.am @@ -1,5 +1,5 @@ noinst_HEADERS = abis.h bts.h bts_model.h gsm_data.h logging.h measurement.h \ - oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h pcuif_proto.h \ + oml.h paging.h rsl.h signal.h vty.h amr.h pcu_if.h \ handover.h msg_utils.h tx_power.h control_if.h cbch.h l1sap.h \ power_control.h scheduler.h scheduler_backend.h phy_link.h \ dtx_dl_amr_fsm.h diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h deleted file mode 100644 index 5527238..0000000 --- a/include/osmo-bts/pcuif_proto.h +++ /dev/null @@ -1,158 +0,0 @@ -#ifndef _PCUIF_PROTO_H -#define _PCUIF_PROTO_H - -#define PCU_IF_VERSION 0x07 - -/* msg_type */ -#define PCU_IF_MSG_DATA_REQ 0x00 /* send data to given channel */ -#define PCU_IF_MSG_DATA_CNF 0x01 /* confirm (e.g. transmission on PCH) */ -#define PCU_IF_MSG_DATA_IND 0x02 /* receive data from given channel */ -#define PCU_IF_MSG_RTS_REQ 0x10 /* ready to send request */ -#define PCU_IF_MSG_RACH_IND 0x22 /* receive RACH */ -#define PCU_IF_MSG_INFO_IND 0x32 /* retrieve BTS info */ -#define PCU_IF_MSG_ACT_REQ 0x40 /* activate/deactivate PDCH */ -#define PCU_IF_MSG_TIME_IND 0x52 /* GSM time indication */ -#define PCU_IF_MSG_PAG_REQ 0x60 /* paging request */ - -/* sapi */ -#define PCU_IF_SAPI_RACH 0x01 /* channel request on CCCH */ -#define PCU_IF_SAPI_AGCH 0x02 /* assignment on AGCH */ -#define PCU_IF_SAPI_PCH 0x03 /* paging/assignment on PCH */ -#define PCU_IF_SAPI_BCCH 0x04 /* SI on BCCH */ -#define PCU_IF_SAPI_PDTCH 0x05 /* packet data/control/ccch block */ -#define PCU_IF_SAPI_PRACH 0x06 /* packet random access channel */ -#define PCU_IF_SAPI_PTCCH 0x07 /* packet TA control channel */ - -/* flags */ -#define PCU_IF_FLAG_ACTIVE (1 << 0)/* BTS is active */ -#define PCU_IF_FLAG_SYSMO (1 << 1)/* access PDCH of sysmoBTS directly */ -#define PCU_IF_FLAG_CS1 (1 << 16) -#define PCU_IF_FLAG_CS2 (1 << 17) -#define PCU_IF_FLAG_CS3 (1 << 18) -#define PCU_IF_FLAG_CS4 (1 << 19) -#define PCU_IF_FLAG_MCS1 (1 << 20) -#define PCU_IF_FLAG_MCS2 (1 << 21) -#define PCU_IF_FLAG_MCS3 (1 << 22) -#define PCU_IF_FLAG_MCS4 (1 << 23) -#define PCU_IF_FLAG_MCS5 (1 << 24) -#define PCU_IF_FLAG_MCS6 (1 << 25) -#define PCU_IF_FLAG_MCS7 (1 << 26) -#define PCU_IF_FLAG_MCS8 (1 << 27) -#define PCU_IF_FLAG_MCS9 (1 << 28) - -struct gsm_pcu_if_data { - uint8_t sapi; - uint8_t len; - uint8_t data[162]; - uint32_t fn; - uint16_t arfcn; - uint8_t trx_nr; - uint8_t ts_nr; - uint8_t block_nr; - int8_t rssi; - uint16_t ber10k; /*!< \brief BER in units of 0.01% */ - int16_t ta_offs_qbits; /* !< \brief Burst TA Offset in quarter bits */ - int16_t lqual_cb; /* !< \brief Link quality in centiBel */ -} __attribute__ ((packed)); - -struct gsm_pcu_if_rts_req { - uint8_t sapi; - uint8_t spare[3]; - uint32_t fn; - uint16_t arfcn; - uint8_t trx_nr; - uint8_t ts_nr; - uint8_t block_nr; -} __attribute__ ((packed)); - -struct gsm_pcu_if_rach_ind { - uint8_t sapi; - uint16_t ra; - int16_t qta; - uint32_t fn; - uint16_t arfcn; - uint8_t is_11bit; - uint8_t burst_type; -} __attribute__ ((packed)); - -struct gsm_pcu_if_info_trx { - uint16_t arfcn; - uint8_t pdch_mask; /* PDCH channels per TS */ - uint8_t spare; - uint8_t tsc[8]; /* TSC per channel */ - uint32_t hlayer1; -} __attribute__ ((packed)); - -struct gsm_pcu_if_info_ind { - uint32_t version; - uint32_t flags; - struct gsm_pcu_if_info_trx trx[8]; /* TRX infos per BTS */ - uint8_t bsic; - /* RAI */ - uint16_t mcc, mnc, lac, rac; - /* NSE */ - uint16_t nsei; - uint8_t nse_timer[7]; - uint8_t cell_timer[11]; - /* cell */ - uint16_t cell_id; - uint16_t repeat_time; - uint8_t repeat_count; - uint16_t bvci; - uint8_t t3142; - uint8_t t3169; - uint8_t t3191; - uint8_t t3193_10ms; - uint8_t t3195; - uint8_t n3101; - uint8_t n3103; - uint8_t n3105; - uint8_t cv_countdown; - uint16_t dl_tbf_ext; - uint16_t ul_tbf_ext; - uint8_t initial_cs; - uint8_t initial_mcs; - /* NSVC */ - uint16_t nsvci[2]; - uint16_t local_port[2]; - uint16_t remote_port[2]; - uint32_t remote_ip[2]; -} __attribute__ ((packed)); - -struct gsm_pcu_if_act_req { - uint8_t activate; - uint8_t trx_nr; - uint8_t ts_nr; - uint8_t spare; -} __attribute__ ((packed)); - -struct gsm_pcu_if_time_ind { - uint32_t fn; -} __attribute__ ((packed)); - -struct gsm_pcu_if_pag_req { - uint8_t sapi; - uint8_t chan_needed; - uint8_t identity_lv[9]; -} __attribute__ ((packed)); - -struct gsm_pcu_if { - /* context based information */ - uint8_t msg_type; /* message type */ - uint8_t bts_nr; /* bts number */ - uint8_t spare[2]; - - union { - struct gsm_pcu_if_data data_req; - struct gsm_pcu_if_data data_cnf; - struct gsm_pcu_if_data data_ind; - struct gsm_pcu_if_rts_req rts_req; - struct gsm_pcu_if_rach_ind rach_ind; - struct gsm_pcu_if_info_ind info_ind; - struct gsm_pcu_if_act_req act_req; - struct gsm_pcu_if_time_ind time_ind; - struct gsm_pcu_if_pag_req pag_req; - } u; -} __attribute__ ((packed)); - -#endif /* _PCUIF_PROTO_H */ diff --git a/src/common/Makefile.am b/src/common/Makefile.am index dd368d0..3e86d81 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -1,4 +1,5 @@ -AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) +AM_CPPFLAGS = $(all_includes) -I$(top_srcdir)/include -I$(OPENBSC_INCDIR) \ + $(PCU_INCDIR) AM_CFLAGS = -Wall $(LIBOSMOCORE_CFLAGS) $(LIBOSMOTRAU_CFLAGS) $(LIBOSMOCODEC_CFLAGS) LDADD = $(LIBOSMOCORE_LIBS) $(LIBOSMOTRAU_LIBS) $(LIBOSMOCODEC_LIBS) diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 62f18a7..ff3fe73 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -33,14 +33,19 @@ #include <osmocom/core/talloc.h> #include <osmocom/core/select.h> #include <osmocom/core/socket.h> + #include <osmo-bts/logging.h> #include <osmo-bts/gsm_data.h> #include <osmo-bts/pcu_if.h> -#include <osmo-bts/pcuif_proto.h> #include <osmo-bts/bts.h> #include <osmo-bts/rsl.h> #include <osmo-bts/signal.h> #include <osmo-bts/l1sap.h> + +#include "btsconfig.h" + +#if defined(HAVE_PCUIF_PROTO_H) +#include <osmocom/pcu/pcuif_proto.h> uint32_t trx_get_hlayer1(struct gsm_bts_trx *trx); @@ -916,3 +921,60 @@ return false; return true; } + +#else /* defined(HAVE_PCUIF_PROTO_H) */ + +int pcu_tx_pag_req(const uint8_t *identity_lv, uint8_t chan_needed) +{ + return 0; +} + +int pcu_tx_time_ind(uint32_t fn) +{ + return 0; +} + +int pcu_tx_rach_ind(struct gsm_bts *bts, int16_t qta, uint16_t ra, uint32_t fn, + uint8_t is_11bit, enum ph_burst_type burst_type) +{ + return 0; +} + +int pcu_tx_data_ind(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr, uint8_t *data, uint8_t len, + int8_t rssi, uint16_t ber10k, int16_t bto, int16_t lqual) +{ + return 0; +} + +int pcu_tx_rts_req(struct gsm_bts_trx_ts *ts, uint8_t is_ptcch, uint32_t fn, + uint16_t arfcn, uint8_t block_nr) +{ + return 0; +} + +int pcu_tx_info_ind(void) +{ + return 0; +} + +int pcu_tx_pch_data_cnf(uint32_t fn, uint8_t *data, uint8_t len) +{ + return 0; +} + +int pcu_sock_init(const char *path) +{ + return 0; +} + +void pcu_sock_exit(void) +{ +} + +bool pcu_connected(void) +{ + return false; +} + +#endif /* defined(HAVE_PCUIF_PROTO_H) */ -- To view, visit https://gerrit.osmocom.org/1258 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: I4dd2537aeef60c7d154e90f279dc4e7c2392ff76 Gerrit-PatchSet: 5 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>