diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-24 18:49:03 +0200 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-04-24 19:17:22 +0200 |
commit | f3d7f443a01e2a021a32cdbb402a38fdcedd2fee (patch) | |
tree | 7a2823c8395e719867e6b5da11c040cbd1bc0d31 | |
parent | e564f0fd846a359944e050a92a5b50c4f2bdf3d0 (diff) |
Build one osmo-trx binary for each device support enabled
Same way as we do in osmo-bts. After this commit, osmo-trx no longer
exists. Instead, osmo-trx-uhd and osmo-trx-usrp1 are generated based on
configure flags enabled.
A new flag --with(out)-uhd has been added to enable/disable build of
osmo-trx with UHD backend. It is left enabled by default to keep
compatibility with older build scripts. Binary with USRP1 backend must
still be manually enabled with --with-usrp1 flag.
Change-Id: Iea8c0d7434762713a53440d29bf3ebd84accb262
-rw-r--r-- | Transceiver52M/Makefile.am | 25 | ||||
-rw-r--r-- | Transceiver52M/device/Makefile.am | 4 | ||||
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | debian/control | 41 | ||||
-rw-r--r-- | debian/osmo-trx-uhd.install | 1 | ||||
-rw-r--r-- | debian/osmo-trx-usrp1.install | 1 | ||||
-rw-r--r-- | debian/osmo-trx.install | 1 |
7 files changed, 64 insertions, 18 deletions
diff --git a/Transceiver52M/Makefile.am b/Transceiver52M/Makefile.am index ae4a5bc..3a872ef 100644 --- a/Transceiver52M/Makefile.am +++ b/Transceiver52M/Makefile.am @@ -80,19 +80,24 @@ COMMON_LDADD = \ $(LIBOSMOCTRL_LIBS) \ $(LIBOSMOVTY_LIBS) -bin_PROGRAMS = osmo-trx -osmo_trx_SOURCES = osmo-trx.cpp +bin_PROGRAMS = + +if DEVICE_UHD +bin_PROGRAMS += osmo-trx-uhd +osmo_trx_uhd_SOURCES = osmo-trx.cpp +osmo_trx_uhd_LDADD = \ + $(COMMON_LDADD) \ + $(UHD_LIBS) \ + $(builddir)/device/uhd/libdevice.la +osmo_trx_uhd_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS) +endif if DEVICE_USRP1 -osmo_trx_LDADD = \ +bin_PROGRAMS += osmo-trx-usrp1 +osmo_trx_usrp1_SOURCES = osmo-trx.cpp +osmo_trx_usrp1_LDADD = \ $(COMMON_LDADD) \ $(USRP_LIBS) \ $(builddir)/device/usrp1/libdevice.la -osmo_trx_CPPFLAGS = $(AM_CPPFLAGS) $(USRP_CFLAGS) -else -osmo_trx_LDADD = \ - $(COMMON_LDADD) \ - $(UHD_LIBS) \ - $(builddir)/device/uhd/libdevice.la -osmo_trx_CPPFLAGS = $(AM_CPPFLAGS) $(UHD_CFLAGS) +osmo_trx_usrp1_CPPFLAGS = $(AM_CPPFLAGS) $(USRP_CFLAGS) endif diff --git a/Transceiver52M/device/Makefile.am b/Transceiver52M/device/Makefile.am index f0675b0..2788eaa 100644 --- a/Transceiver52M/device/Makefile.am +++ b/Transceiver52M/device/Makefile.am @@ -6,6 +6,8 @@ SUBDIRS = if DEVICE_USRP1 SUBDIRS += usrp1 -else +endif + +if DEVICE_UHD SUBDIRS += uhd endif diff --git a/configure.ac b/configure.ac index 70a8f4b..2b2dab7 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,11 @@ then LDFLAGS="$LDFLAGS -fsanitize=address -fsanitize=undefined" fi +AC_ARG_WITH(uhd, [ + AS_HELP_STRING([--with-uhd], + [enable UHD based transceiver]) +]) + AC_ARG_WITH(usrp1, [ AS_HELP_STRING([--with-usrp1], [enable USRP1 gnuradio based transceiver]) @@ -128,7 +133,7 @@ AS_IF([test "x$with_usrp1" = "xyes"], [ PKG_CHECK_MODULES(USRP, usrp >= 3.3) ]) -AS_IF([test "x$with_usrp1" != "xyes"],[ +AS_IF([test "x$with_uhd" != "xno"],[ PKG_CHECK_MODULES(UHD, uhd >= 003.011, [AC_DEFINE(USE_UHD_3_11, 1, UHD version 3.11.0 or higher)], [PKG_CHECK_MODULES(UHD, uhd >= 003.009, @@ -136,7 +141,6 @@ AS_IF([test "x$with_usrp1" != "xyes"],[ [PKG_CHECK_MODULES(UHD, uhd >= 003.005)] )] ) - AC_DEFINE(USE_UHD, 1, All UHD versions) ]) AS_IF([test "x$with_singledb" = "xyes"], [ @@ -178,6 +182,7 @@ dnl Check if the compiler supports runtime SIMD detection CHECK_BUILTIN_SUPPORT([__builtin_cpu_supports], [Runtime SIMD detection will be disabled]) +AM_CONDITIONAL(DEVICE_UHD, [test "x$with_uhd" != "xno"]) AM_CONDITIONAL(DEVICE_USRP1, [test "x$with_usrp1" = "xyes"]) AM_CONDITIONAL(ARCH_ARM, [test "x$with_neon" = "xyes" || test "x$with_neon_vfpv4" = "xyes"]) AM_CONDITIONAL(ARCH_ARM_A15, [test "x$with_neon_vfpv4" = "xyes"]) diff --git a/debian/control b/debian/control index b3d63a7..cae44d4 100644 --- a/debian/control +++ b/debian/control @@ -19,9 +19,42 @@ Vcs-Git: git://git.osmocom.org/osmo-trx Homepage: https://projects.osmocom.org/projects/osmotrx Package: osmo-trx +Maintainer: Ivan Klyuchnikov <ivan.kluchnikov@fairwaves.ru> +Depends: osmo-trx-uhd +Architecture: all +Description: Virtual package for osmo-trx-uhd + +Package: osmo-trx-uhd +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: SDR transceiver that implements Layer 1 of a GSM BTS (UHD) + OsmoTRX is a software-defined radio transceiver that implements the Layer 1 + physical layer of a BTS comprising the following 3GPP specifications: + . + TS 05.01 "Physical layer on the radio path" + TS 05.02 "Multiplexing and Multiple Access on the Radio Path" + TS 05.04 "Modulation" + TS 05.10 "Radio subsystem synchronization" + . + In this context, BTS is "Base transceiver station". It's the stations that + connect mobile phones to the mobile network. + . + 3GPP is the "3rd Generation Partnership Project" which is the collaboration + between different telecommunication associations for developing new + generations of mobile phone networks. (post-2G/GSM) + +Package: osmo-trx-uhd-dbg +Architecture: any +Section: debug +Priority: extra +Depends: osmo-trx-uhd (= ${binary:Version}), ${misc:Depends} +Description: Debug symbols for the osmo-trx-uhd + Make debugging possible + +Package: osmo-trx-usrp1 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Description: SDR transceiver that implements Layer 1 of a GSM BTS +Description: SDR transceiver that implements Layer 1 of a GSM BTS (USRP1) OsmoTRX is a software-defined radio transceiver that implements the Layer 1 physical layer of a BTS comprising the following 3GPP specifications: . @@ -37,10 +70,10 @@ Description: SDR transceiver that implements Layer 1 of a GSM BTS between different telecommunication associations for developing new generations of mobile phone networks. (post-2G/GSM) -Package: osmo-trx-dbg +Package: osmo-trx-usrp1-dbg Architecture: any Section: debug Priority: extra -Depends: osmo-trx (= ${binary:Version}), ${misc:Depends} -Description: Debug symbols for the osmo-trx +Depends: osmo-trx-usrp1 (= ${binary:Version}), ${misc:Depends} +Description: Debug symbols for the osmo-trx-usrp1 Make debugging possible diff --git a/debian/osmo-trx-uhd.install b/debian/osmo-trx-uhd.install new file mode 100644 index 0000000..0005b76 --- /dev/null +++ b/debian/osmo-trx-uhd.install @@ -0,0 +1 @@ +/usr/bin/osmo-trx-uhd diff --git a/debian/osmo-trx-usrp1.install b/debian/osmo-trx-usrp1.install new file mode 100644 index 0000000..1b76249 --- /dev/null +++ b/debian/osmo-trx-usrp1.install @@ -0,0 +1 @@ +/usr/bin/osmo-trx-usrp1 diff --git a/debian/osmo-trx.install b/debian/osmo-trx.install index 574e915..e69de29 100644 --- a/debian/osmo-trx.install +++ b/debian/osmo-trx.install @@ -1 +0,0 @@ -/usr/bin/osmo-trx |