Skip to content

Commit

Permalink
Merge pull request #26 from Geontech/redhawk-2-2-1
Browse files Browse the repository at this point in the history
REDHAWK 2.2.1 Support
  • Loading branch information
btgoodwin authored Jan 30, 2019
2 parents aea8833 + ad1ba05 commit 6bcb492
Show file tree
Hide file tree
Showing 124 changed files with 915 additions and 816 deletions.
4 changes: 0 additions & 4 deletions classes/redhawk-component.bbclass
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@

# We have to inherit from pythonnative if we do stuff with the system python.
# autotools-brokensep is the sasme as autotools but our build and src locations are the same since we cannot build away from our src.

inherit autotools-brokensep pkgconfig redhawk-entity
16 changes: 0 additions & 16 deletions classes/redhawk-core-cpp-softpkg.bbclass

This file was deleted.

12 changes: 9 additions & 3 deletions classes/redhawk-device.bbclass
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# autotools-brokensep is the sasme as autotools but our build and src locations are the same since we cannot build away from our src.

inherit autotools-brokensep pkgconfig redhawk-entity

DEPENDS += "omniorb-native omniorbpy-native"
DEPENDS_prepend = "omniorb-native omniorbpy-native "

NODE_CONFIG_SCRIPT ?= ""
do_nodeconfig_patch () {
if ! [ -z ${NODE_CONFIG_SCRIPT} ] ; then
sed -i "s/tmp_proc_map.get(tmp_uname_p, 'x86')/'${REDHAWK_PROCESSOR}'/g" ${S}/${NODE_CONFIG_SCRIPT}
fi
}
do_patch[postfuncs] += "do_nodeconfig_patch"
71 changes: 38 additions & 33 deletions classes/redhawk-entity.bbclass
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
# This file sets OSSIEHOME and other environment variables used by autotools
inherit redhawk-oeconf redhawk-sysroot pythonnative

# Needed so that when the python distutils is run it can get the system prefix which, since it's the build system python will be /.../x86_64-linux/usr and replace it with our host systems name.
do_configure_prepend() {
export BUILD_SYS=${BUILD_SYS}
export HOST_SYS=${HOST_SYS}
export STAGING_INCDIR=${STAGING_INCDIR}
export STAGING_LIBDIR=${STAGING_LIBDIR}
export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH}
export PATH="${OSSIEHOME_STAGED}/bin:${PATH}"
# Basic set of depends
DEPENDS_prepend = "redhawk redhawk-native "
RDEPENDS_${PN}_prepend = "redhawk "

# Common patches among device and component as noted by YLB.
# These were individual patch files but were being tacked on to many recipes.
# This is to reduce some clutter.
sed -i 's/xmldir = $(prefix)/xmldir = $(SDR_ROOT)/g' Makefile.am
sed -i 's/bindir = $(prefix)/bindir = $(SDR_ROOT)/g' Makefile.am
sed -i 's/domdir = $(prefix)/domdir = $(SDR_ROOT)/g' Makefile.am
sed -i 's,${prefix}/dom/deps,${SDR_ROOT}/dom/deps,g' configure.ac
}
# Our dynamic do_patch tasks are sensitive to REDHAWK_PROCESSOR and the
# modifications are not repeatable if that variable changes since we're
# post-patching source without patch files. My making unpack sensitive
# to the same variable, changes to it will unpack fresh source so the
# dynamic patches can run according to the change.
do_unpack[vardeps] += "REDHAWK_PROCESSOR"

do_autotools_patch () {
# Common patches among device and component as noted by YLB.
# These were individual patch files but were being tacked on to many recipes.
# This is to reduce some clutter.
sed -i 's/xmldir = $(prefix)/xmldir = $(SDR_ROOT)/g' ${S}/Makefile.am
sed -i 's/bindir = $(prefix)/bindir = $(SDR_ROOT)/g' ${S}/Makefile.am
sed -i 's/domdir = $(prefix)/domdir = $(SDR_ROOT)/g' ${S}/Makefile.am
sed -i 's,${prefix}/dom/deps,${SDR_ROOT}/dom/deps,g' ${S}/configure.ac

# Needed so that when the python distutils is run it can get the system prefix.
do_install_prepend() {
export BUILD_SYS=${BUILD_SYS}
export HOST_SYS=${HOST_SYS}
export STAGING_INCDIR=${STAGING_INCDIR}
export STAGING_LIBDIR=${STAGING_LIBDIR}
export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH}
# Patch the bindir to match what the spd patch will do to the entrypoint
sed -i -r "s,(bindir = .+?cpp)/,\1-${REDHAWK_PROCESSOR}/,g" ${S}/Makefile.am

# Patch the relationship to any softpkg dependencies
sed -i -r "s/(^RH_SOFTPKG_CXX.+?\[cpp)(\])(.+$)/\1-${REDHAWK_PROCESSOR}\2\3/g" ${S}/configure.ac
}
do_patch[postfuncs] += "do_autotools_patch"

NODE_CONFIG_SCRIPT ?= ""
do_dynamic_arch_patch () {
if ! [ -z ${NODE_CONFIG_SCRIPT} ] ; then
sed -i "s/tmp_proc_map.get(tmp_uname_p, 'x86')/'${REDHAWK_PROCESSOR}'/g" ${S}/${NODE_CONFIG_SCRIPT}
fi
find ${S}/../ -name *.spd.xml -exec sed -i "s/<processor name=\"x86_64\"\/>/<processor name=\"${REDHAWK_PROCESSOR}\"\/>/g" {} \;
find ${S}/../ -name *.spd.xml -exec sed -i "s/<processor name=\"x86\"\/>//g" {} \;
do_configure_prepend () {
export BUILD_SYS=${BUILD_SYS}
export HOST_SYS=${HOST_SYS}
export STAGING_INCDIR=${STAGING_INCDIR}
export STAGING_LIBDIR=${STAGING_LIBDIR}
export PKG_CONFIG_PATH="${OSSIEHOME_STAGED}/lib/pkgconfig:${PKG_CONFIG_PATH}"
export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH}
export PATH="${OSSIEHOME_STAGED}/bin:${PATH}"
}
addtask dynamic_arch_patch after do_patch before do_configure

do_spd_implementation_patch () {
export PYTHONPATH=${OSSIEHOME_STAGED_NATIVE}/lib/python:${PYTHONPATH}
spd_utility -n "${REDHAWK_PROCESSOR}" "${S}/.."
}
do_spd_implementation_patch[cleandirs] += "${S}/../cpp-${REDHAWK_PROCESSOR}"
addtask spd_implementation_patch after do_compile before do_install
3 changes: 3 additions & 0 deletions classes/redhawk-env.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ SDRROOT = "${localstatedir}/redhawk-sdr/sdr"
# libs, etc.)
OSSIEHOME_STAGED="${STAGING_DIR_TARGET}${OSSIEHOME}"
SDRROOT_STAGED="${STAGING_DIR_TARGET}${SDRROOT}"

OSSIEHOME_STAGED_NATIVE="${STAGING_DIR_NATIVE}${OSSIEHOME}"
SDRROOT_STAGED_NATIVE="${STAGING_DIR_NATIVE}${SDRROOT}"
11 changes: 8 additions & 3 deletions classes/redhawk-oeconf.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@ EXTRA_OECONF += "\
"

# Patches common to nearly every REDHAWK source
do_configure_prepend () {
touch ./NEWS ./README ./AUTHORS ./ChangeLog
sed -i 's/ACLOCAL_AMFLAGS = .\+$/ACLOCAL_AMFLAGS = -I m4/g' Makefile.am
ac_meta_files () {
touch ${S}/NEWS ${S}/README ${S}/AUTHORS ${S}/ChangeLog
}
do_unpack[postfuncs] += "ac_meta_files"

aclocal_amflags () {
sed -i 's/ACLOCAL_AMFLAGS = .\+$/ACLOCAL_AMFLAGS = -I m4/g' ${S}/Makefile.am
}
do_patch[postfuncs] += "aclocal_amflags"

# Include the ossie autoconf macros
EXTRA_AUTORECONF += "-I ${OSSIEHOME_STAGED}/share/aclocal/ossie"
Expand Down
12 changes: 6 additions & 6 deletions classes/redhawk-softpkg.bbclass
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
inherit redhawk-entity
inherit autotools-brokensep pkgconfig redhawk-entity

# Basic set of depends
DEPENDS = "redhawk"
RDEPENDS_${PN} = "redhawk"
do_autotools_patch_append () {
sed -i -r "s/(^RH_SOFTPKG_PREFIX.+?\[cpp)(\])/\1-${REDHAWK_PROCESSOR}\2/g" ${S}/configure.ac
}

# Set/append SOFTPKG_PREFIX to the installation directory of your softpkg.
# Standard REDHAWK Deps install with a package config as:
Expand All @@ -14,7 +14,7 @@ RDEPENDS_${PN} = "redhawk"
SOFTPKG_BASE = "${SDRROOT}/dom/deps"
SOFTPKG_PREFIX ?= "${SOFTPKG_BASE}"
SOFTPKG_INCLUDEDIR ?= "${SOFTPKG_PREFIX}/include"
SOFTPKG_EPREFIX ?= "${SOFTPKG_PREFIX}/cpp"
SOFTPKG_EPREFIX ?= "${SOFTPKG_PREFIX}/cpp-${REDHAWK_PROCESSOR}"
SOFTPKG_LIBDIR ?= "${SOFTPKG_EPREFIX}/lib"

EXTRA_OECONF += "\
Expand All @@ -35,6 +35,6 @@ FILES_${PN}-dev += "\
FILES_${PN}-staticdev += "${SOFTPKG_LIBDIR}/*.a"

# Move the xml to be at the base of SOFTPKG_PREFIX.
do_install_append () {
fakeroot do_install_append () {
find ${D} -name "*.spd.xml" -exec mv {} ${D}${SOFTPKG_PREFIX} \;
}
4 changes: 2 additions & 2 deletions classes/redhawk-sysroot.bbclass
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
inherit redhawk-env

redhawk_core_ossie_sysroot () {
fakeroot redhawk_core_ossie_sysroot () {
sysroot_stage_dir ${D}${OSSIEHOME} \
${SYSROOT_DESTDIR}${OSSIEHOME}
}
redhawk_core_sdrroot_sysroot () {
fakeroot redhawk_core_sdrroot_sysroot () {
sysroot_stage_dir ${D}${SDRROOT} \
${SYSROOT_DESTDIR}${SDRROOT}
}
Expand Down
10 changes: 10 additions & 0 deletions conf/layer.conf
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,13 @@ LAYERDEPENDS_redhawk-sdr = "\
networking-layer \
meta-python \
"

# #####################################################
# Set this in your local.conf to override the version #
# (if available in this layer). #
# #####################################################
REDHAWK_VERSION ?= "2.2.1"
require conf/versions/redhawk.inc

# Utility scripts for REDHAWK
PATH =. "${LAYERDIR}/scripts:"
3 changes: 3 additions & 0 deletions conf/versions/omniorb-4.2.3.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PREFERRED_VERSION_omniorb = "4.2.3"
PREFERRED_VERSION_omniorbpy = "4.2.3"
PREFERRED_VERSION_omnievents = "2.8.1"
44 changes: 44 additions & 0 deletions conf/versions/redhawk-2.2.1.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Core Framework
PREFERRED_VERSION_redhawk = "2.2.1"
PREFERRED_VERSION_bulkiointerfaces = "2.2.1"
PREFERRED_VERSION_burstiointerfaces = "2.2.1"
PREFERRED_VERSION_frontendinterfaces = "2.4.4"
PREFERRED_VERSION_redhawk-codegen = "2.2.1"

# Components
PREFERRED_VERSION_rh-agc = "2.0.0"
PREFERRED_VERSION_rh-amfmpmbasebanddemod = "2.0.0"
PREFERRED_VERSION_rh-arbitraryrateresampler = "2.0.1"
PREFERRED_VERSION_rh-autocorrelate = "2.0.0"
PREFERRED_VERSION_rh-fastfilter = "2.0.2"
PREFERRED_VERSION_rh-filereader = "4.1.0"
PREFERRED_VERSION_rh-filewriter = "4.1.0"
PREFERRED_VERSION_rh-hardlimit = "2.0.0"
PREFERRED_VERSION_rh-psd = "2.0.2"
PREFERRED_VERSION_rh-psk-soft = "2.0.1"
PREFERRED_VERSION_rh-rbdsdecoder = "2.0.1"
PREFERRED_VERSION_rh-siggen = "2.0.1"
PREFERRED_VERSION_rh-sinksdds = "1.0.0"
PREFERRED_VERSION_rh-sinksocket = "2.0.1"
PREFERRED_VERSION_rh-sinkvita49 = "3.1.0"
PREFERRED_VERSION_rh-sourcesdds = "1.1.1"
PREFERRED_VERSION_rh-sourcesocket = "2.1.1"
PREFERRED_VERSION_rh-sourcevita49 = "3.1.0"
PREFERRED_VERSION_rh-tunefilterdecimate = "2.0.1"

# SoftPkgs
PREFERRED_VERSION_rh-bluefilelib = "2.1.0"
PREFERRED_VERSION_rh-dsp = "2.0.0"
PREFERRED_VERSION_rh-fftlib = "2.1.0"
PREFERRED_VERSION_rh-redhawkdevutils = "4.0.1"
PREFERRED_VERSION_rh-vita49 = "5.0.0"

# Devices
PREFERRED_VERSION_gpp = "2.2.1"
PREFERRED_VERSION_rtl2832u = "2.1.0"
PREFERRED_VERSION_usrp-uhd = "6.1.0"

# Other deps
PREFERRED_VERSION_rtlsdr = "0.5.2"
PREFERRED_VERSION_xsd = "4.0.0"
require omniorb-4.2.3.inc
9 changes: 9 additions & 0 deletions conf/versions/redhawk.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require redhawk-${REDHAWK_VERSION}.inc

# In several places, the processor architecture may not match any available variable, but
# will need to match the response of uname in the running system. Patches in this layer
# address that need using this variable, which can be overridden as needed.
REDHAWK_PROCESSOR ?= "${HOST_ARCH}"
REDHAWK_PROCESSOR_rpi ?= "armv7l"
REDHAWK_PROCESSOR_zynq ?= "armv7l"
REDHAWK_PROCESSOR_zynqmp ?= "aarch64"
8 changes: 0 additions & 8 deletions recipes-components/RBDSDecoder/rh-rbdsdecoder_2.0.1.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/SigGen/rh-siggen_2.0.1.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/SinkSDDS/rh-sinksdds_1.0.0.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/SourceSDDS/rh-sourcesdds_1.1.0.bb

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/autocorrelate/rh-autocorrelate_2.0.0.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/fastfilter/rh-fastfilter_2.0.1.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/psd/rh-psd_2.0.2.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/psk_soft/rh-psk-soft_2.0.1.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/sinksocket/rh-sinksocket_2.0.1.bb

This file was deleted.

8 changes: 0 additions & 8 deletions recipes-components/sourcesocket/rh-sourcesocket_2.1.0.bb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Inherit the core repo references, etc.
include recipes-core/include/redhawk-repo.inc
require recipes-core/core-framework/core-framework.inc

# Inherit the base component class
inherit redhawk-component

# Derive the component's parent directory name which (should) be the installed component name and location in the
# core repo.
COMPONENT_NAME="${@'${THISDIR}'.split('/')[-1]}"
COMPONENT_NAME ?= "${@'${PN}'.split('rh-')[-1]}"

S = "${WORKDIR}/git/redhawk-components/${COMPONENT_NAME}/cpp"
SRC_URI = "git://github.com/redhawksdr/${COMPONENT_NAME};protocol=https;tag=${PV}-${PR}"
S = "${WORKDIR}/git/cpp"

FILES_${PN} += "${SDRROOT}/*"
FILES_${PN}-dbg += "${SDRROOT}/dom/components/rh/${COMPONENT_NAME}/cpp/.debug"
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
DESCRIPTION = "REDHAWK AGC Component (CPP)"

inherit redhawk-core-cpp-component

DEPENDS = "bulkiointerfaces rh-dsp"
RDEPENDS_${PN} = "bulkiointerfaces rh-dsp"

PR = "r1"
PR = "5"

require core-cpp-component.inc
Loading

0 comments on commit 6bcb492

Please sign in to comment.