mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
bump version to 2022.02.9
add miyoo_defconfig
This commit is contained in:
113
package/uhd/0003-add-RISC-V-endian-detection.patch
Normal file
113
package/uhd/0003-add-RISC-V-endian-detection.patch
Normal file
@@ -0,0 +1,113 @@
|
||||
From d4717a38d2287c2f583fefb2a0ed273337a92bb6 Mon Sep 17 00:00:00 2001
|
||||
From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
Date: Mon, 11 Jan 2021 18:18:26 +0100
|
||||
Subject: [PATCH] msgpack/predef: add riscV support
|
||||
|
||||
When the target CPU is riscV, msgpack is unable to detect endianness with a list of errors like:
|
||||
|
||||
uhd/host/lib/deps/rpclib/include/rpc/msgpack/pack.hpp:190:2: error: #error msgpack-c supports only big endian and little endian
|
||||
190 | #error msgpack-c supports only big endian and little endian
|
||||
| ^~~~~
|
||||
|
||||
and with subsequent errors:
|
||||
|
||||
uhd0/host/lib/deps/rpclib/include/rpc/msgpack/pack.hpp:236:46: error: there are no arguments to 'take8_8' that depend on a template parameter, so a declaration of 'take8_8' must be available [-fpermissive]
|
||||
236 | char buf[2] = {static_cast<char>(0xccu), take8_8(d)};
|
||||
|
|
||||
|
||||
This is due to a missing support for this architecture in msgpack.
|
||||
This patch adapt commit from https://github.com/boostorg/predef
|
||||
|
||||
[backported from https://github.com/EttusResearch/uhd/pull/400]
|
||||
|
||||
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
---
|
||||
.../include/rpc/msgpack/predef/architecture.h | 1 +
|
||||
.../rpc/msgpack/predef/architecture/riscv.h | 48 +++++++++++++++++++
|
||||
.../include/rpc/msgpack/predef/other/endian.h | 3 +-
|
||||
3 files changed, 51 insertions(+), 1 deletion(-)
|
||||
create mode 100644 host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h
|
||||
|
||||
diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h
|
||||
index 4a0ce2749..1bd998c59 100644
|
||||
--- a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h
|
||||
+++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture.h
|
||||
@@ -18,6 +18,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <rpc/msgpack/predef/architecture/parisc.h>
|
||||
#include <rpc/msgpack/predef/architecture/ppc.h>
|
||||
#include <rpc/msgpack/predef/architecture/pyramid.h>
|
||||
+#include <rpc/msgpack/predef/architecture/riscv.h>
|
||||
#include <rpc/msgpack/predef/architecture/rs6k.h>
|
||||
#include <rpc/msgpack/predef/architecture/sparc.h>
|
||||
#include <rpc/msgpack/predef/architecture/superh.h>
|
||||
diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h
|
||||
new file mode 100644
|
||||
index 000000000..8b819d77e
|
||||
--- /dev/null
|
||||
+++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/architecture/riscv.h
|
||||
@@ -0,0 +1,48 @@
|
||||
+/*
|
||||
+Copyright Andreas Schwab 2019
|
||||
+Distributed under the Boost Software License, Version 1.0.
|
||||
+(See accompanying file LICENSE_1_0.txt or copy at
|
||||
+http://www.boost.org/LICENSE_1_0.txt)
|
||||
+*/
|
||||
+
|
||||
+#ifndef BOOST_PREDEF_ARCHITECTURE_RISCV_H
|
||||
+#define BOOST_PREDEF_ARCHITECTURE_RISCV_H
|
||||
+
|
||||
+#include <boost/predef/version_number.h>
|
||||
+#include <boost/predef/make.h>
|
||||
+
|
||||
+/* tag::reference[]
|
||||
+= `BOOST_ARCH_RISCV`
|
||||
+
|
||||
+http://en.wikipedia.org/wiki/RISC-V[RISC-V] architecture.
|
||||
+
|
||||
+[options="header"]
|
||||
+|===
|
||||
+| {predef_symbol} | {predef_version}
|
||||
+
|
||||
+| `+__riscv+` | {predef_detection}
|
||||
+|===
|
||||
+*/ // end::reference[]
|
||||
+
|
||||
+#define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
+
|
||||
+#if defined(__riscv)
|
||||
+# undef BOOST_ARCH_RISCV
|
||||
+# define BOOST_ARCH_RISCV BOOST_VERSION_NUMBER_AVAILABLE
|
||||
+#endif
|
||||
+
|
||||
+#if BOOST_ARCH_RISCV
|
||||
+# define BOOST_ARCH_RISCV_AVAILABLE
|
||||
+#endif
|
||||
+
|
||||
+#if BOOST_ARCH_RISCV
|
||||
+# undef BOOST_ARCH_WORD_BITS_32
|
||||
+# define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_AVAILABLE
|
||||
+#endif
|
||||
+
|
||||
+#define BOOST_ARCH_RISCV_NAME "RISC-V"
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
+#include <boost/predef/detail/test.h>
|
||||
+BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_RISCV,BOOST_ARCH_RISCV_NAME)
|
||||
diff --git a/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h b/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h
|
||||
index 3f367b3d4..a7c1fb4dc 100644
|
||||
--- a/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h
|
||||
+++ b/host/lib/deps/rpclib/include/rpc/msgpack/predef/other/endian.h
|
||||
@@ -127,7 +127,8 @@ information and acquired knowledge:
|
||||
defined(__AARCH64EL__) || \
|
||||
defined(_MIPSEL) || \
|
||||
defined(__MIPSEL) || \
|
||||
- defined(__MIPSEL__)
|
||||
+ defined(__MIPSEL__) || \
|
||||
+ defined(__riscv)
|
||||
# undef MSGPACK_ENDIAN_LITTLE_BYTE
|
||||
# define MSGPACK_ENDIAN_LITTLE_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
--
|
||||
2.26.2
|
||||
|
||||
28
package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch
Normal file
28
package/uhd/0004-lib-Fix-missing-includes-in-rpc-hpp.patch
Normal file
@@ -0,0 +1,28 @@
|
||||
From 9c4d9d826a6f40f199c526afd5ec168d5d088591 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Braun <martin.braun@ettus.com>
|
||||
Date: Fri, 29 Jan 2021 12:23:50 +0100
|
||||
Subject: [PATCH] lib: Fix missing includes in rpc.hpp
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/EttusResearch/uhd/commit/9c4d9d826a6f40f199c526afd5ec168d5d088591]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
host/lib/include/uhdlib/utils/rpc.hpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/host/lib/include/uhdlib/utils/rpc.hpp b/host/lib/include/uhdlib/utils/rpc.hpp
|
||||
index e87a2ee324..ca89c10547 100644
|
||||
--- a/host/lib/include/uhdlib/utils/rpc.hpp
|
||||
+++ b/host/lib/include/uhdlib/utils/rpc.hpp
|
||||
@@ -12,7 +12,11 @@
|
||||
#include <rpc/client.h>
|
||||
#include <rpc/rpc_error.h>
|
||||
#include <boost/format.hpp>
|
||||
+#include <chrono>
|
||||
#include <memory>
|
||||
+#include <mutex>
|
||||
+#include <string>
|
||||
+#include <thread>
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
From dc187b5597779b14d0de4087db4aa54752a15d07 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Dickens <michael.dickens@ettus.com>
|
||||
Date: Fri, 2 Jul 2021 16:43:41 -0400
|
||||
Subject: [PATCH] core: remove boost::math in favor of std cmath
|
||||
|
||||
YA Boost removal!!!
|
||||
|
||||
Justification
|
||||
---
|
||||
const int if_freq_sign = boost::math::sign(fe_conn.get_if_freq());
|
||||
_dsp_freq_offset = if_freq * (-if_freq_sign);
|
||||
// boost::math::sign : 1 if x > 0, -1 if x < 0, and 0 if x is zero.
|
||||
// ==> if if_freq_sign > 0 then * by -1 else +1 (effectively)
|
||||
|
||||
// std::signbit : true if arg is negative, false otherwise
|
||||
// ==> need 'not' of input argument to invert for same result as prior algorithm
|
||||
double fe_if_freq = fe_conn.get_if_freq();
|
||||
if (!std::signbit(fe_if_freq)) {
|
||||
if_freq *= -1.0;
|
||||
}
|
||||
---
|
||||
The above should result in the same algorithm except possibly
|
||||
if fe_if_freq is exactly 0.0 in which case the results might be
|
||||
off by the sign (+0.0 versus -0.0).
|
||||
|
||||
[Retrieved from:
|
||||
https://github.com/EttusResearch/uhd/commit/dc187b5597779b14d0de4087db4aa54752a15d07]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
host/lib/usrp/cores/rx_dsp_core_3000.cpp | 15 ++++++++-------
|
||||
host/lib/usrp/cores/rx_frontend_core_3000.cpp | 14 ++++++++------
|
||||
2 files changed, 16 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/host/lib/usrp/cores/rx_dsp_core_3000.cpp b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
|
||||
index 879748fa2..1c15180ae 100644
|
||||
--- a/host/lib/usrp/cores/rx_dsp_core_3000.cpp
|
||||
+++ b/host/lib/usrp/cores/rx_dsp_core_3000.cpp
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <uhd/exception.hpp>
|
||||
#include <uhd/types/dict.hpp>
|
||||
#include <uhd/utils/log.hpp>
|
||||
-#include <uhd/utils/math.hpp>
|
||||
#include <uhd/utils/safe_call.hpp>
|
||||
#include <uhdlib/usrp/cores/dsp_core_utils.hpp>
|
||||
#include <uhdlib/usrp/cores/rx_dsp_core_3000.hpp>
|
||||
@@ -81,19 +80,21 @@ class rx_dsp_core_3000_impl : public rx_dsp_core_3000
|
||||
_iface->poke32(REG_DSP_RX_MUX, reg_val);
|
||||
|
||||
if (fe_conn.get_sampling_mode() == uhd::usrp::fe_connection_t::HETERODYNE) {
|
||||
- // 1. Remember the sign of the IF frequency.
|
||||
- // It will be discarded in the next step
|
||||
- int if_freq_sign = boost::math::sign(fe_conn.get_if_freq());
|
||||
+ // 1. Remember the IF frequency
|
||||
+ const double fe_if_freq = fe_conn.get_if_freq();
|
||||
// 2. Map IF frequency to the range [0, _tick_rate)
|
||||
- double if_freq = std::abs(std::fmod(fe_conn.get_if_freq(), _tick_rate));
|
||||
- // 3. Map IF frequency to the range [-_tick_rate/2, _tick_rate/2)
|
||||
+ double if_freq = std::abs(std::fmod(fe_if_freq, _tick_rate));
|
||||
+ // 3. Map IF frequency to the range [-_tick_rate/2, _tick_rate/2]
|
||||
// This is the aliased frequency
|
||||
if (if_freq > (_tick_rate / 2.0)) {
|
||||
if_freq -= _tick_rate;
|
||||
}
|
||||
// 4. Set DSP offset to spin the signal in the opposite
|
||||
// direction as the aliased frequency
|
||||
- _dsp_freq_offset = if_freq * (-if_freq_sign);
|
||||
+ if (!std::signbit(fe_if_freq)) {
|
||||
+ if_freq *= -1.0;
|
||||
+ }
|
||||
+ _dsp_freq_offset = if_freq;
|
||||
} else {
|
||||
_dsp_freq_offset = 0.0;
|
||||
}
|
||||
diff --git a/host/lib/usrp/cores/rx_frontend_core_3000.cpp b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
|
||||
index eef25f27d..b9d908534 100644
|
||||
--- a/host/lib/usrp/cores/rx_frontend_core_3000.cpp
|
||||
+++ b/host/lib/usrp/cores/rx_frontend_core_3000.cpp
|
||||
@@ -119,19 +119,21 @@ class rx_frontend_core_3000_impl : public rx_frontend_core_3000
|
||||
|
||||
UHD_ASSERT_THROW(_adc_rate != 0.0)
|
||||
if (fe_conn.get_sampling_mode() == fe_connection_t::HETERODYNE) {
|
||||
- // 1. Remember the sign of the IF frequency.
|
||||
- // It will be discarded in the next step
|
||||
- const int if_freq_sign = boost::math::sign(fe_conn.get_if_freq());
|
||||
+ // 1. Remember the IF frequency
|
||||
+ const double fe_if_freq = fe_conn.get_if_freq();
|
||||
// 2. Map IF frequency to the range [0, _adc_rate)
|
||||
- double if_freq = std::abs(std::fmod(fe_conn.get_if_freq(), _adc_rate));
|
||||
- // 3. Map IF frequency to the range [-_adc_rate/2, _adc_rate/2)
|
||||
+ double if_freq = std::abs(std::fmod(fe_if_freq, _adc_rate));
|
||||
+ // 3. Map IF frequency to the range [-_adc_rate/2, _adc_rate/2]
|
||||
// This is the aliased frequency
|
||||
if (if_freq > (_adc_rate / 2.0)) {
|
||||
if_freq -= _adc_rate;
|
||||
}
|
||||
// 4. Set DSP offset to spin the signal in the opposite
|
||||
// direction as the aliased frequency
|
||||
- const double cordic_freq = if_freq * (-if_freq_sign);
|
||||
+ if (!std::signbit(fe_if_freq)) {
|
||||
+ if_freq *= -1.0;
|
||||
+ }
|
||||
+ const double cordic_freq = if_freq;
|
||||
UHD_ASSERT_THROW(uhd::math::fp_compare::fp_compare_epsilon<double>(4.0)
|
||||
== std::abs(_adc_rate / cordic_freq));
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 3796175f32f0cc24c16809d8175d423bc7053de9 Mon Sep 17 00:00:00 2001
|
||||
From: StefanBruens <stefan.bruens@rwth-aachen.de>
|
||||
Date: Wed, 5 May 2021 18:24:58 +0200
|
||||
Subject: [PATCH] usrp2: Replace boost::math::iround/math::sign with std::lround
|
||||
|
||||
Instead of multiplying zone with the sign repeatedly just make
|
||||
the zone a signed value.
|
||||
|
||||
See #437, #438
|
||||
|
||||
Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
|
||||
[gwenhael.goavec-merou@trabucayre.com: backport from upstream]
|
||||
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
---
|
||||
host/lib/usrp/usrp2/usrp2_impl.cpp | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
index 1be4c7339..c0719a316 100644
|
||||
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <boost/asio/ip/address_v4.hpp>
|
||||
#include <boost/asio.hpp> //used for htonl and ntohl
|
||||
#include <boost/thread.hpp>
|
||||
+#include <cmath>
|
||||
|
||||
using namespace uhd;
|
||||
using namespace uhd::usrp;
|
||||
@@ -844,20 +845,19 @@ double usrp2_impl::set_tx_dsp_freq(
|
||||
_tree->access<double>("/mboards/"+mb+"/tick_rate").get();
|
||||
|
||||
//calculate the DAC shift (multiples of rate)
|
||||
- const int sign = boost::math::sign(new_freq);
|
||||
- const int zone = std::min(boost::math::iround(new_freq/tick_rate), 2);
|
||||
- const double dac_shift = sign*zone*tick_rate;
|
||||
+ const int zone = std::max(std::min(std::lround(new_freq / tick_rate), 2), -2);
|
||||
+ const double dac_shift = zone * tick_rate;
|
||||
new_freq -= dac_shift; //update FPGA DSP target freq
|
||||
UHD_LOG_TRACE("USRP2",
|
||||
"DSP Tuning: Requested " + std::to_string(freq_/1e6) + " MHz, Using "
|
||||
- "Nyquist zone " + std::to_string(sign*zone) + ", leftover DSP tuning: "
|
||||
+ "Nyquist zone " + std::to_string(zone) + ", leftover DSP tuning: "
|
||||
+ std::to_string(new_freq/1e6) + " MHz.");
|
||||
|
||||
//set the DAC shift (modulation mode)
|
||||
if (zone == 0) {
|
||||
_mbc[mb].codec->set_tx_mod_mode(0); //no shift
|
||||
} else {
|
||||
- _mbc[mb].codec->set_tx_mod_mode(sign*4/zone); //DAC interp = 4
|
||||
+ _mbc[mb].codec->set_tx_mod_mode(4 / zone); // DAC interp = 4
|
||||
}
|
||||
|
||||
return _mbc[mb].tx_dsp->set_freq(new_freq) + dac_shift; //actual freq
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
From d1c6290fe9c8b01068abfca6f272e2a1e031b9de Mon Sep 17 00:00:00 2001
|
||||
From: StefanBruens <stefan.bruens@rwth-aachen.de>
|
||||
Date: Wed, 5 May 2021 18:49:40 +0200
|
||||
Subject: [PATCH] usrp2: Use explicit template type for std::min<T>
|
||||
|
||||
Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
|
||||
[gwenhael.goavec-merou@trabucayre.com: backport from upstream]
|
||||
Signed-off-by: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
|
||||
---
|
||||
host/lib/usrp/usrp2/usrp2_impl.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
index 59fd9849c..e82a9fa71 100644
|
||||
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
|
||||
@@ -845,7 +845,7 @@ double usrp2_impl::set_tx_dsp_freq(
|
||||
_tree->access<double>("/mboards/"+mb+"/tick_rate").get();
|
||||
|
||||
//calculate the DAC shift (multiples of rate)
|
||||
- const int zone = std::max(std::min(std::lround(new_freq / tick_rate), 2), -2);
|
||||
+ const int zone = std::max(std::min<int>(std::lround(new_freq / tick_rate), 2), -2);
|
||||
const double dac_shift = zone * tick_rate;
|
||||
new_freq -= dac_shift; //update FPGA DSP target freq
|
||||
UHD_LOG_TRACE("USRP2",
|
||||
--
|
||||
2.32.0
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
comment "uhd needs a toolchain w/ C++, NPTL, wchar, dynamic library"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS_NPTL || BR2_STATIC_LIBS
|
||||
|
||||
@@ -10,6 +11,7 @@ config BR2_PACKAGE_UHD
|
||||
bool "uhd"
|
||||
depends on BR2_INSTALL_LIBSTDCPP
|
||||
depends on !BR2_STATIC_LIBS
|
||||
depends on BR2_TOOLCHAIN_SUPPORTS_ALWAYS_LOCKFREE_ATOMIC_INTS # boost-atomic, boost-filesystem
|
||||
depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # boost-thread
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
|
||||
depends on BR2_USE_MMU # use fork()
|
||||
@@ -19,6 +21,7 @@ config BR2_PACKAGE_UHD
|
||||
select BR2_PACKAGE_BOOST_CHRONO
|
||||
select BR2_PACKAGE_BOOST_DATE_TIME
|
||||
select BR2_PACKAGE_BOOST_FILESYSTEM
|
||||
select BR2_PACKAGE_BOOST_MATH
|
||||
select BR2_PACKAGE_BOOST_PROGRAM_OPTIONS
|
||||
select BR2_PACKAGE_BOOST_REGEX
|
||||
select BR2_PACKAGE_BOOST_SERIALIZATION
|
||||
@@ -33,16 +36,24 @@ if BR2_PACKAGE_UHD
|
||||
|
||||
config BR2_PACKAGE_UHD_B100
|
||||
bool "b100 support"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
|
||||
select BR2_PACKAGE_UHD_USB
|
||||
help
|
||||
enable B100 support
|
||||
|
||||
comment "B100 support needs a toolchain w/ gcc >= 4.9"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_PACKAGE_UHD_B200
|
||||
bool "b200 support"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
|
||||
select BR2_PACKAGE_UHD_USB
|
||||
help
|
||||
enable B200 support
|
||||
|
||||
comment "B200 support needs a toolchain w/ gcc >= 4.9"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_PACKAGE_UHD_E300
|
||||
bool "E300 support"
|
||||
select BR2_PACKAGE_UHD_MPMD
|
||||
@@ -65,6 +76,43 @@ config BR2_PACKAGE_UHD_MPMD
|
||||
help
|
||||
enable MPMD support
|
||||
|
||||
config BR2_PACKAGE_UHD_N230
|
||||
bool "N230 support"
|
||||
help
|
||||
enable N230 support
|
||||
|
||||
config BR2_PACKAGE_UHD_N300
|
||||
bool "N300 support"
|
||||
select BR2_PACKAGE_UHD_MPMD
|
||||
help
|
||||
enable N300 support
|
||||
|
||||
config BR2_PACKAGE_UHD_N320
|
||||
bool "N320 support"
|
||||
select BR2_PACKAGE_UHD_MPMD
|
||||
help
|
||||
enable N320 support
|
||||
|
||||
config BR2_PACKAGE_UHD_OCTOCLOCK
|
||||
bool "OctoClock support"
|
||||
help
|
||||
enable OctoClock support
|
||||
|
||||
comment "uhd python API needs python3 and a toolchain w/ glibc or musl"
|
||||
depends on !BR2_PACKAGE_PYTHON3
|
||||
depends on !BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
|
||||
depends on !(BR2_TOOLCHAIN_USES_GLIBC && BR2_TOOLCHAIN_USES_MUSL) # python-numpy
|
||||
|
||||
config BR2_PACKAGE_UHD_PYTHON
|
||||
bool "python API support"
|
||||
depends on BR2_PACKAGE_PYTHON3
|
||||
depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy
|
||||
select BR2_PACKAGE_PYTHON_NUMPY
|
||||
select BR2_PACKAGE_PYTHON_REQUESTS
|
||||
help
|
||||
enable python API support
|
||||
|
||||
config BR2_PACKAGE_UHD_RFNOC
|
||||
bool "RFNoC support"
|
||||
help
|
||||
@@ -72,8 +120,42 @@ config BR2_PACKAGE_UHD_RFNOC
|
||||
|
||||
config BR2_PACKAGE_UHD_USB
|
||||
bool "USB support"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
help
|
||||
enable UHD USB support
|
||||
|
||||
comment "USB support needs a toolchain w/ gcc >= 4.9"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_PACKAGE_UHD_USRP1
|
||||
bool "USRP1 support"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
|
||||
select BR2_PACKAGE_UHD_USB
|
||||
help
|
||||
enable USRP1 support
|
||||
|
||||
comment "USRP1 support needs a toolchain w/ gcc >= 4.9"
|
||||
depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
|
||||
config BR2_PACKAGE_UHD_USRP2
|
||||
bool "USRP2 support"
|
||||
help
|
||||
enable USRP2 support
|
||||
|
||||
comment "uhd utils depends on python API support"
|
||||
depends on !BR2_PACKAGE_UHD_PYTHON
|
||||
|
||||
config BR2_PACKAGE_UHD_UTILS
|
||||
bool "uhd-utils"
|
||||
depends on BR2_PACKAGE_UHD_PYTHON
|
||||
select BR2_PACKAGE_PYTHON_SIX
|
||||
help
|
||||
uhd-utils
|
||||
|
||||
config BR2_PACKAGE_UHD_X300
|
||||
bool "X300 support"
|
||||
help
|
||||
enable X300 support
|
||||
|
||||
endif
|
||||
|
||||
@@ -15,28 +15,29 @@ UHD_INSTALL_STAGING = YES
|
||||
|
||||
UHD_DEPENDENCIES = \
|
||||
boost \
|
||||
$(if $(BR2_PACKAGE_PYTHON),host-python,host-python3) \
|
||||
host-python3 \
|
||||
host-python-mako
|
||||
|
||||
UHD_CONF_OPTS = \
|
||||
-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python \
|
||||
-DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3 \
|
||||
-DRUNTIME_PYTHON_EXECUTABLE=/usr/bin/python \
|
||||
-DENABLE_C_API=ON \
|
||||
-DENABLE_DOXYGEN=OFF \
|
||||
-DENABLE_DPKD=OFF \
|
||||
-DENABLE_DPDK=OFF \
|
||||
-DENABLE_LIBUHD=ON \
|
||||
-DENABLE_N230=OFF \
|
||||
-DENABLE_N300=OFF \
|
||||
-DENABLE_N320=OFF \
|
||||
-DENABLE_MANUAL=OFF \
|
||||
-DENABLE_MAN_PAGES=OFF \
|
||||
-DENABLE_OCTOCLOCK=OFF \
|
||||
-DENABLE_PYTHON_API=OFF \
|
||||
-DENABLE_TESTS=OFF \
|
||||
-DENABLE_USRP1=OFF \
|
||||
-DENABLE_USRP2=OFF \
|
||||
-DENABLE_UTILS=OFF \
|
||||
-DENABLE_X300=OFF
|
||||
-DENABLE_TESTS=OFF
|
||||
|
||||
# As soon as architecture is ARM, uhd will try to use NEON.
|
||||
# But not all ARM cores have NEON support.
|
||||
# When CPU support NEON -mfpu=neon must be added to CXX_FLAGS
|
||||
ifeq ($(BR2_ARM_CPU_HAS_NEON),y)
|
||||
UHD_CONF_OPTS += -DCMAKE_CXX_FLAGS="$(TARGET_CXXFLAGS) -mfpu=neon"
|
||||
UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DNEON_SIMD_ENABLE=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ORC),y)
|
||||
UHD_DEPENDENCIES += orc
|
||||
@@ -78,12 +79,44 @@ else
|
||||
UHD_CONF_OPTS += -DENABLE_MPMD=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_N230),y)
|
||||
UHD_CONF_OPTS += -DENABLE_N230=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_N230=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_N300),y)
|
||||
UHD_CONF_OPTS += -DENABLE_N300=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_N300=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_N320),y)
|
||||
UHD_CONF_OPTS += -DENABLE_N320=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_N320=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_OCTOCLOCK),y)
|
||||
UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_OCTOCLOCK=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_RFNOC),y)
|
||||
UHD_CONF_OPTS += -DENABLE_RFNOC=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_RFNOC=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_PYTHON),y)
|
||||
UHD_DEPENDENCIES += host-python-numpy host-python-requests \
|
||||
python-numpy python-requests
|
||||
UHD_CONF_OPTS += -DENABLE_PYTHON_API=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_PYTHON_API=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_USB),y)
|
||||
UHD_DEPENDENCIES += libusb
|
||||
UHD_CONF_OPTS += -DENABLE_USB=ON
|
||||
@@ -91,4 +124,29 @@ else
|
||||
UHD_CONF_OPTS += -DENABLE_USB=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_USRP1),y)
|
||||
UHD_CONF_OPTS += -DENABLE_USRP1=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_USRP1=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_USRP2),y)
|
||||
UHD_CONF_OPTS += -DENABLE_USRP2=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_USRP2=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_UTILS),y)
|
||||
UHD_DEPENDENCIES += python-six
|
||||
UHD_CONF_OPTS += -DENABLE_UTILS=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_UTILS=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UHD_X300),y)
|
||||
UHD_CONF_OPTS += -DENABLE_X300=ON
|
||||
else
|
||||
UHD_CONF_OPTS += -DENABLE_X300=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
|
||||
Reference in New Issue
Block a user