Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[usrp] init #3565

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions U/USRPHardwareDriver/build_tarballs.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

name = "USRPHardwareDriver"
version = v"4.1.0"

# Collection of sources required to complete build
sources = [
GitSource("https://github.com/EttusResearch/uhd.git", "f633b497ff931c3c180d00148fc66e4feb8b8b6a")
]

dependencies = [
Dependency("boost_jll"; compat="=1.76.0"), # max gcc7
staticfloat marked this conversation as resolved.
Show resolved Hide resolved
Dependency("libusb_jll", compat="1.0.24"),
]

# Bash recipe for building across all platforms
script = raw"""
cd uhd/host

#code generators, only needed at build time
apk add py3-mako py3-ruamel.yaml

mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=${prefix} \
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TARGET_TOOLCHAIN} \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_EXAMPLES=OFF \
-DENABLE_TESTS=OFF \
-DENABLE_PYTHON_API=OFF \
..
make -j${nproc}
make install
"""

# These are the platforms we will build for by default, unless further
# platforms are passed in on the command line
# TODO: Windows has several issues with boost threads. There is a WIP branch:
# https://github.com/JuliaTelecom/uhd/tree/juliatelecom/patch-v4.1.0.1
platforms = expand_cxxstring_abis(filter!(p -> !Sys.iswindows(p) && !in(arch(p),("armv7l","armv6l")), supported_platforms(;experimental=true)))

# The products that we will ensure are always built
products = Product[
ExecutableProduct("uhd_cal_rx_iq_balance", :uhd_cal_rx_iq_balance),
ExecutableProduct("uhd_cal_tx_iq_balance", :uhd_cal_tx_iq_balance),
ExecutableProduct("uhd_find_devices", :uhd_find_devices),
ExecutableProduct("uhd_adc_self_cal", :uhd_adc_self_cal),
ExecutableProduct("uhd_cal_tx_dc_offset", :uhd_cal_tx_dc_offset),
ExecutableProduct("uhd_config_info", :uhd_config_info),
ExecutableProduct("uhd_image_loader", :uhd_image_loader),
ExecutableProduct("uhd_usrp_probe", :uhd_usrp_probe),
LibraryProduct("libuhd", :libuhd)
]

# Build the tarballs, and possibly a `build.jl` as well.
# gcc7 constraint from boost
build_tarballs(ARGS, name, version, sources, script, platforms, products, dependencies; julia_compat="1.6", preferred_gcc_version=v"7")