summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog16
-rw-r--r--debian/compat1
-rw-r--r--debian/control8
-rw-r--r--debian/patches/0007-Option-for-disabling-NEON-on-arm.patch2
-rw-r--r--debian/patches/0008-Bladerf2.patch30
-rw-r--r--debian/patches/0009-uhd-3.14.patch52
-rw-r--r--debian/patches/series2
-rw-r--r--lib/src/phy/rf/rf_blade_imp.c4
-rw-r--r--lib/src/phy/rf/rf_uhd_imp.c12
9 files changed, 115 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index 631415a..8b40076 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
+srslte (18.06.1-9) unstable; urgency=medium
+
+ [ Peter Michael Green ]
+ * Add patches to fix build with libbladerf2 and uhd 3.14 (Closes: #940131)
+ * Bump build-dependencies on libbladerf-dev and libuhd-dev
+ because aforementioned patches will break build with
+ older versions.
+
+ [ Ruben Undheim ]
+ * Thanks Peter Michael Green !
+ * Use debhelper-compat
+ * Set DH level to 12
+ * New standards version 4.5.0 - no changes
+
+ -- Ruben Undheim <ruben.undheim@gmail.com> Sun, 22 Mar 2020 10:05:35 +0100
+
srslte (18.06.1-8) unstable; urgency=medium
* debian/rules:
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index b4de394..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-11
diff --git a/debian/control b/debian/control
index 6956939..8fec625 100644
--- a/debian/control
+++ b/debian/control
@@ -3,20 +3,20 @@ Section: net
Priority: optional
Maintainer: Debian Mobcom Maintainers <Debian-mobcom-maintainers@lists.alioth.debian.org>
Uploaders: Ruben Undheim <ruben.undheim@gmail.com>
-Build-Depends: debhelper (>= 11),
+Build-Depends: debhelper-compat (= 12),
cmake,
libfftw3-dev,
libmbedtls-dev,
libboost-program-options-dev,
libconfig++-dev,
libsctp-dev,
- libuhd-dev,
+ libuhd-dev (>= 3.14),
uhd-host,
txt2man,
libpcsclite-dev,
- libbladerf-dev,
+ libbladerf-dev (>= 0.2019.07),
libsoapysdr-dev
-Standards-Version: 4.2.1
+Standards-Version: 4.5.0
Homepage: http://www.softwareradiosystems.com
Vcs-Git: https://salsa.debian.org/debian-mobcom-team/srslte.git
Vcs-Browser: https://salsa.debian.org/debian-mobcom-team/srslte
diff --git a/debian/patches/0007-Option-for-disabling-NEON-on-arm.patch b/debian/patches/0007-Option-for-disabling-NEON-on-arm.patch
index 05fa412..7634f09 100644
--- a/debian/patches/0007-Option-for-disabling-NEON-on-arm.patch
+++ b/debian/patches/0007-Option-for-disabling-NEON-on-arm.patch
@@ -7,7 +7,7 @@ Subject: Option for disabling NEON on arm
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e83977c..e5faa80 100644
+index e83977c..ddade72 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -308,14 +308,17 @@ if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
diff --git a/debian/patches/0008-Bladerf2.patch b/debian/patches/0008-Bladerf2.patch
new file mode 100644
index 0000000..9880d02
--- /dev/null
+++ b/debian/patches/0008-Bladerf2.patch
@@ -0,0 +1,30 @@
+From: Peter Michael Green <plugwash@raspbian.org>
+Date: Sun, 22 Mar 2020 08:18:54 +0000
+Subject: Fix build with bladerf 2
+
+---
+ lib/src/phy/rf/rf_blade_imp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/lib/src/phy/rf/rf_blade_imp.c b/lib/src/phy/rf/rf_blade_imp.c
+index 4f624f8..1e88ff3 100644
+--- a/lib/src/phy/rf/rf_blade_imp.c
++++ b/lib/src/phy/rf/rf_blade_imp.c
+@@ -360,7 +360,7 @@ srslte_rf_info_t *rf_blade_get_info(void *h)
+ double rf_blade_set_rx_freq(void *h, double freq)
+ {
+ rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
+- uint32_t f_int = (uint32_t) round(freq);
++ bladerf_frequency f_int = (uint32_t) round(freq);
+ int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_RX, f_int);
+ if (status != 0) {
+ fprintf(stderr, "Failed to set samplerate = %u: %s\n",
+@@ -377,7 +377,7 @@ double rf_blade_set_rx_freq(void *h, double freq)
+ double rf_blade_set_tx_freq(void *h, double freq)
+ {
+ rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
+- uint32_t f_int = (uint32_t) round(freq);
++ bladerf_frequency f_int = (uint32_t) round(freq);
+ int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_TX, f_int);
+ if (status != 0) {
+ fprintf(stderr, "Failed to set samplerate = %u: %s\n",
diff --git a/debian/patches/0009-uhd-3.14.patch b/debian/patches/0009-uhd-3.14.patch
new file mode 100644
index 0000000..2150685
--- /dev/null
+++ b/debian/patches/0009-uhd-3.14.patch
@@ -0,0 +1,52 @@
+From: Peter Michael Green <plugwash@raspbian.org>
+Date: Sun, 22 Mar 2020 08:18:54 +0000
+Subject: Fix build with uhd 3.14
+
+---
+ lib/src/phy/rf/rf_uhd_imp.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c
+index 7fe2914..8021f9f 100644
+--- a/lib/src/phy/rf/rf_uhd_imp.c
++++ b/lib/src/phy/rf/rf_uhd_imp.c
+@@ -647,7 +647,7 @@ double rf_uhd_set_rx_srate(void *h, double freq)
+ {
+ rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
+ if (handler->nof_rx_channels > 1) {
+- time_t full;
++ int64_t full;
+ double frac;
+ uhd_usrp_get_time_now(handler->usrp, 0, &full, &frac);
+ frac += 0.100;
+@@ -666,7 +666,7 @@ double rf_uhd_set_tx_srate(void *h, double freq)
+ {
+ rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
+ if (handler->nof_tx_channels > 1) {
+- time_t full;
++ int64_t full;
+ double frac;
+ uhd_usrp_get_time_now(handler->usrp, 0, &full, &frac);
+ frac += 0.100;
+@@ -759,7 +759,9 @@ double rf_uhd_set_tx_freq(void *h, double freq)
+
+ void rf_uhd_get_time(void *h, time_t *secs, double *frac_secs) {
+ rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
+- uhd_usrp_get_time_now(handler->usrp, 0, secs, frac_secs);
++ uint64_t secs64;
++ uhd_usrp_get_time_now(handler->usrp, 0, &secs64, frac_secs);
++ *secs = secs64;
+ }
+
+ int rf_uhd_recv_with_time(void *h,
+@@ -831,7 +833,9 @@ int rf_uhd_recv_with_time_multi(void *h,
+ }
+ }
+ if (secs && frac_secs) {
+- uhd_rx_metadata_time_spec(handler->rx_md_first, secs, frac_secs);
++ uint64_t secs64;
++ uhd_rx_metadata_time_spec(handler->rx_md_first, &secs64, frac_secs);
++ *secs = secs64;
+ }
+ return nsamples;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 49dac6f..5181b1f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,5 @@
0005-Check-whether-code-compiles-instead-of-whether-it-ru.patch
0006-No-native-in-build.patch
0007-Option-for-disabling-NEON-on-arm.patch
+0008-Bladerf2.patch
+0009-uhd-3.14.patch
diff --git a/lib/src/phy/rf/rf_blade_imp.c b/lib/src/phy/rf/rf_blade_imp.c
index 4f624f8..1e88ff3 100644
--- a/lib/src/phy/rf/rf_blade_imp.c
+++ b/lib/src/phy/rf/rf_blade_imp.c
@@ -360,7 +360,7 @@ srslte_rf_info_t *rf_blade_get_info(void *h)
double rf_blade_set_rx_freq(void *h, double freq)
{
rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
- uint32_t f_int = (uint32_t) round(freq);
+ bladerf_frequency f_int = (uint32_t) round(freq);
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_RX, f_int);
if (status != 0) {
fprintf(stderr, "Failed to set samplerate = %u: %s\n",
@@ -377,7 +377,7 @@ double rf_blade_set_rx_freq(void *h, double freq)
double rf_blade_set_tx_freq(void *h, double freq)
{
rf_blade_handler_t *handler = (rf_blade_handler_t*) h;
- uint32_t f_int = (uint32_t) round(freq);
+ bladerf_frequency f_int = (uint32_t) round(freq);
int status = bladerf_set_frequency(handler->dev, BLADERF_MODULE_TX, f_int);
if (status != 0) {
fprintf(stderr, "Failed to set samplerate = %u: %s\n",
diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c
index 7fe2914..8021f9f 100644
--- a/lib/src/phy/rf/rf_uhd_imp.c
+++ b/lib/src/phy/rf/rf_uhd_imp.c
@@ -647,7 +647,7 @@ double rf_uhd_set_rx_srate(void *h, double freq)
{
rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
if (handler->nof_rx_channels > 1) {
- time_t full;
+ int64_t full;
double frac;
uhd_usrp_get_time_now(handler->usrp, 0, &full, &frac);
frac += 0.100;
@@ -666,7 +666,7 @@ double rf_uhd_set_tx_srate(void *h, double freq)
{
rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
if (handler->nof_tx_channels > 1) {
- time_t full;
+ int64_t full;
double frac;
uhd_usrp_get_time_now(handler->usrp, 0, &full, &frac);
frac += 0.100;
@@ -759,7 +759,9 @@ double rf_uhd_set_tx_freq(void *h, double freq)
void rf_uhd_get_time(void *h, time_t *secs, double *frac_secs) {
rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
- uhd_usrp_get_time_now(handler->usrp, 0, secs, frac_secs);
+ uint64_t secs64;
+ uhd_usrp_get_time_now(handler->usrp, 0, &secs64, frac_secs);
+ *secs = secs64;
}
int rf_uhd_recv_with_time(void *h,
@@ -831,7 +833,9 @@ int rf_uhd_recv_with_time_multi(void *h,
}
}
if (secs && frac_secs) {
- uhd_rx_metadata_time_spec(handler->rx_md_first, secs, frac_secs);
+ uint64_t secs64;
+ uhd_rx_metadata_time_spec(handler->rx_md_first, &secs64, frac_secs);
+ *secs = secs64;
}
return nsamples;
}