New version

Resolves: rhbz#1606606
Dropped sdcc-3-fix patch (upstreamed)
Dropped boost-gcc8-compile-fix patch (not needed)
Packaged wireshark dissectors
This commit is contained in:
Jaroslav Škarvada 2018-07-22 01:44:41 +02:00
parent 2b7eeda2e1
commit 1c1fbfd088
5 changed files with 63 additions and 1785 deletions

2
.gitignore vendored
View File

@ -1,2 +1,2 @@
uhd-*.tar.gz
uhd-images_*-release.tar.xz
uhd-images_*.tar.xz

View File

@ -1,2 +1,2 @@
SHA512 (uhd-images_003.010.003.000-release.tar.xz) = 49ee14093d356494af228b0ad55b7e61d176091341988f4de986e00dd3b23d8ab941365731f0af816c96099cc858229b2919b1d2f818bd59ce6ceaaf1970a876
SHA512 (uhd-release_003_010_003_000.tar.gz) = 398fdaa29daf4a0d49172afce46ec57a8a96861a8d3262fdd19f78a29dc7d17ae7cb3731639950784420eca50c0a2f0dc8bf83da7be0b63af208b7bf0b382f6b
SHA512 (uhd-3.12.0.0.tar.gz) = 33efcb913a40fcceaf21460eeb7b8fe7fdd9066cefc1f6ae7d4f436532965b3fe55557d551a8e95c3823418ffec4c0e2804e200c9222b5bf5735622cc2cb1389
SHA512 (uhd-images_3.12.0.0.tar.xz) = 7bba0d87580413e2843c7e71938c5d5bfeaf7aa3bc58d058c1c80d5e1397443bcec637e378b2e9582752b97b11e57110299231c4ad3ae81cdd629251f49e84d8

View File

@ -1,23 +0,0 @@
diff --git a/host/lib/usrp/common/max287x.hpp b/host/lib/usrp/common/max287x.hpp
index 839ed77..1fca880 100644
--- a/host/lib/usrp/common/max287x.hpp
+++ b/host/lib/usrp/common/max287x.hpp
@@ -30,6 +30,7 @@
#include <boost/math/special_functions/round.hpp>
#include <stdint.h>
#include <vector>
+#include <string>
#include "max2870_regs.hpp"
#include "max2871_regs.hpp"
@@ -642,8 +643,8 @@ double max287x<max287x_regs_t>::set_frequency(
<< boost::format("MAX287x: Intermediates: ref=%0.2f, outdiv=%f, fbdiv=%f"
) % ref_freq % double(RFdiv*2) % double(N + double(FRAC)/double(MOD)) << std::endl
<< boost::format("MAX287x: tune: R=%d, BS=%d, N=%d, FRAC=%d, MOD=%d, T=%d, D=%d, RFdiv=%d, type=%s"
- ) % R % BS % N % FRAC % MOD % T % D % RFdiv % ((is_int_n) ? "Integer-N" : "Fractional") << std::endl
- << boost::format("MAX287x: Frequencies (MHz): REQ=%0.2f, ACT=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f"
+ ) % R % BS % N % FRAC % MOD % T % D % RFdiv % ((is_int_n) ? std::string("Integer-N") : std::string("Fractional"))
+ << std::endl << boost::format("MAX287x: Frequencies (MHz): REQ=%0.2f, ACT=%0.2f, VCO=%0.2f, PFD=%0.2f, BAND=%0.2f"
) % (target_freq/1e6) % (actual_freq/1e6) % (vco_freq/1e6) % (pfd_freq/1e6) % (pfd_freq/BS/1e6) << std::endl;
//load the register values

File diff suppressed because it is too large Load Diff

View File

@ -7,14 +7,7 @@
# building with --with=neon will enable auto detection
%bcond_with neon
%global ver_1 3
%global ver_2 10
%global ver_3 3
%global ver_4 0
%global ver %(printf "%03d.%03d.%03d.%03d" %{ver_1} %{ver_2} %{ver_3} %{ver_4})
%global ver_ %(printf "%03d_%03d_%03d_%03d" %{ver_1} %{ver_2} %{ver_3} %{ver_4})
%global wireshark_dissectors chdr zpu octoclock
%global wireshark_ver %((%{__awk} '/^#define VERSION[ \t]+/ { print $NF }' /usr/include/wireshark/config.h 2>/dev/null||echo none)|/usr/bin/tr -d '"')
%ifarch %{arm} aarch64
@ -24,15 +17,15 @@
%endif
Name: uhd
URL: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
Version: %{ver_1}.%{ver_2}.%{ver_3}.%{ver_4}
Release: 4%{?dist}
URL: http://github.com/EttusResearch/uhd
Version: 3.12.0.0
Release: 1%{?dist}
License: GPLv3+
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: boost-devel, libusb1-devel, python2-cheetah, ncurses-devel
BuildRequires: python2-docutils, doxygen, pkgconfig, libpcap-devel, wireshark-devel
BuildRequires: python2-mako
BuildRequires: python2-mako, python2-requests, python2-devel, tar
%if ! %{with binary_firmware}
BuildRequires: sdcc sed
%endif
@ -40,13 +33,9 @@ Requires(pre): shadow-utils
Requires: python2-tkinter
Group: Applications/Engineering
Summary: Universal Hardware Driver for Ettus Research products
Source0: http://github.com/EttusResearch/uhd/archive/release_%{ver_}.tar.gz#/uhd-release_%{ver_}.tar.gz
Source0: %{url}/archive/v%{version}/uhd-%{version}.tar.gz
Source1: %{name}-limits.conf
Source2: http://files.ettus.com/binaries/images/uhd-images_%{ver}-release.tar.xz
# Fix firmware build with sdcc-3
Patch0: uhd-3.4.2-sdcc-3-fix.patch
# Workaround for building with gcc-8 (rhbz#1542187)
Patch1: uhd-3.1.3.0-boost-gcc8-compile-fix.patch
Source2: %{url}/releases/download/v%{version}/uhd-images_%{version}.tar.xz
%description
The UHD is the universal hardware driver for Ettus Research products.
@ -78,22 +67,33 @@ Documentation for the Universal Hardware Driver (UHD).
%package tools
Summary: Tools for working with / debugging USRP device
Requires: %{name} = %{version}-%{release}
#Requires: wireshark = %{wireshark_ver}
%description tools
Tools that are useful for working with and/or debugging USRP device.
%package wireshark
Summary: Wireshark dissector plugins
Requires: %{name} = %{version}-%{release}
Requires: wireshark = %{wireshark_ver}
%description wireshark
Wireshark dissector plugins.
%prep
%setup -q -n uhd-release_%{ver_}
%patch0 -p1 -b .sdcc-3-fix
%patch1 -p1 -b .boost-gcc8-compile-fix
%setup -q
# firmware
%if %{with binary_firmware}
# extract binary firmware
mkdir -p images/images
tar -xJf %{SOURCE2} -C images/images --strip-components=4
tar -xJf %{SOURCE2} -C images/images --strip-components=1
rm -f images/images/{LICENSE.txt,*.tag}
# remove Windows drivers
rm -rf images/winusb_driver
# fix python shebangs
find . -type f -name "*.py" -exec sed -i '/^#!/ s|.*|#!%{__python2}|' {} \;
%endif
%build
@ -109,7 +109,8 @@ popd
mkdir -p host/build
pushd host/build
%cmake %{?have_neon} ../
%cmake %{?have_neon} -DPYTHON_EXECUTABLE="%{__python2}" \
-DUHD_VERSION="%{version}" ../
make %{?_smp_mflags}
popd
@ -118,14 +119,17 @@ pushd tools/uhd_dump
make %{?_smp_mflags} CFLAGS="%{optflags}" LDFLAGS="%{?__global_ldflags}"
popd
# tools wireshark plugin
# currenty disabled due to rhbz#1129419
#pushd tools/chdr-dissector
#mkdir build
#cd build
#%%cmake ../
#make %{?_smp_mflags}
#popd
# wireshark dissectors
pushd tools/dissectors
for d in %{wireshark_dissectors}
do
mkdir "build_$d"
pushd "build_$d"
%cmake -DETTUS_DISSECTOR_NAME="$d" ../
make %{?_smp_mflags}
popd
done
popd
%check
cd host/build
@ -163,10 +167,10 @@ rm -rf %{buildroot}%{_datadir}/uhd/images/winusb_driver
# convert hardlinks to symlinks (to not package the file twice)
pushd %{buildroot}%{_bindir}
for f in usrp_n2xx_simple_net_burner usrp_x3xx_fpga_burner;
for f in uhd_images_downloader usrp2_card_burner
do
unlink $f
ln -s ../..%{_libexecdir}/uhd/$f
ln -s ../..%{_libexecdir}/uhd/${f}.py $f
done
popd
@ -174,6 +178,17 @@ popd
install -Dpm 0755 tools/usrp_x3xx_fpga_jtag_programmer.sh %{buildroot}%{_bindir}/usrp_x3xx_fpga_jtag_programmer.sh
install -Dpm 0755 tools/uhd_dump/chdr_log %{buildroot}%{_bindir}/chdr_log
# wireshark dissectors
pushd tools/dissectors
for d in %{wireshark_dissectors}
do
pushd "build_$d"
%make_install
popd
done
popd
mv %{buildroot}${HOME}/.wireshark %{buildroot}%{_libdir}/wireshark
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
@ -183,10 +198,7 @@ install -Dpm 0755 tools/uhd_dump/chdr_log %{buildroot}%{_bindir}/chdr_log
%exclude %{_datadir}/uhd/images
%doc _tmpdoc/*
%{_bindir}/uhd_*
%{_bindir}/usrp2*
%{_bindir}/usrp_n2xx_simple_net_burner
%{_bindir}/usrp_x3xx_fpga_burner
%{_bindir}/octoclock_firmware_burner
%{_bindir}/usrp2_*
%{_prefix}/lib/udev/rules.d/10-usrp-uhd.rules
%config(noreplace) %{_sysconfdir}/security/limits.d/*.conf
%{_libdir}/lib*.so.*
@ -212,7 +224,17 @@ install -Dpm 0755 tools/uhd_dump/chdr_log %{buildroot}%{_bindir}/chdr_log
%{_bindir}/usrp_x3xx_fpga_jtag_programmer.sh
%{_bindir}/chdr_log
%files wireshark
%{_libdir}/wireshark/plugins/*
%changelog
* Fri Jul 20 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 3.12.0.0-1
- New version
Resolves: rhbz#1606606
- Dropped sdcc-3-fix patch (upstreamed)
- Dropped boost-gcc8-compile-fix patch (not needed)
- Packaged wireshark dissectors
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.10.3.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild