Skip to content

Commit

Permalink
Merge pull request #18 from Geontech/pyro
Browse files Browse the repository at this point in the history
Pyro update
  • Loading branch information
btgoodwin authored Mar 13, 2018
2 parents 3e64a19 + 06ff489 commit 2e0ae53
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 145 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ Alternatively, you can clone this layer into your own Yocto source tree:
cd <your work director where other meta* are loaded>
git clone git://github.com/geontech/meta-redhawk-sdr.git

Then edit your `build/conf/bblayers.conf` to include a reference to `meta-redhawk-sdr` at the end of the list. See our `meta-redhawk-sdr/conf/bblayers.conf.sample` as an example.
Then edit your `build/conf/bblayers.conf` to include a reference to `meta-redhawk-sdr` at the end of the list. See our `meta-redhawk-sdr/conf/bblayers.conf.sample` as an example.

> Note: The processor architecture is set to `armv7l` by default. If you need a different processor architecture, set the `REDHAWK_PROCESSOR` variable in your `build/conf/local.conf`.
Finishing the Build
-------------------
Expand Down
1 change: 1 addition & 0 deletions classes/redhawk-device.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@

inherit autotools-brokensep pkgconfig redhawk-entity

DEPENDS += "omniorb-native omniorbpy-native"
23 changes: 10 additions & 13 deletions classes/redhawk-entity.bbclass
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,19 @@ do_install_prepend() {
export PYTHONPATH=${OSSIEHOME_STAGED}/lib/python:${PYTHONPATH}
}

# Dynamic architecture patch for whatever is in OSSIEHOME/share/uname_machine, which is set by the
# 'uname-machine' recipe (that pulls the value from the kernel config).
#
# Dynamic architecture patch for whatever ${REDHAWK_PROCESSOR} is set to.
# 1. This takes whatever is ${NODE_CONFIG_SCRIPT} and find where it hard-codes the architecture look-up,
# replacing it for ${UNAME_MACHINE}
# 2. This changes processor name x86_64 and replaces it with ${UNAME_MACHINE}.
# replacing it for ${REDHAWK_PROCESSOR}
# 2. This changes processor name x86_64 and replaces it with ${REDHAWK_PROCESSOR}.
# 3. This removes processor name x86.
REDHAWK_PROCESSOR ?= "armv7l"
NODE_CONFIG_SCRIPT ?= ""
DEPENDS += "uname-machine"
do_dynamic_arch_patch () {
UNAME_MACHINE=`cat ${OSSIEHOME_STAGED}/share/uname_machine`
if ! [ -z ${NODE_CONFIG_SCRIPT} ] ; then
sed -i "s/tmp_proc_map.get(tmp_uname_p, 'x86')/'${UNAME_MACHINE}'/g" ${S}/${NODE_CONFIG_SCRIPT}
fi
sed -i "s/<processor name=\"x86_64\"\/>/<processor name=\"${UNAME_MACHINE}\"\/>/g" ${S}/../*.spd.xml
sed -i "s/<processor name=\"x86\"\/>//g" ${S}/../*.spd.xml
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" {} \;
}
addtask dynamic_arch_patch after do_patch before do_configure
do_dynamic_arch_patch[depends] += "uname-machine:do_populate_sysroot"

2 changes: 1 addition & 1 deletion conf/local.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ DISTRO ?= "poky"
# - 'package_rpm' for rpm style packages
# E.g.: PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
# We default to rpm:
PACKAGE_CLASSES ?= "package_rpm"
PACKAGE_CLASSES ?= "package_ipk"

#
# SDK target architecture
Expand Down
41 changes: 19 additions & 22 deletions contrib/scripts/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,48 +25,45 @@
echo MACHINE: "${MACHINE:?Need to set to an available machine}"
echo BUILD_IMAGE: "${BUILD_IMAGE:?Need to set, e.g., 'redhawk-base-image'}"

META_REDHAWK=`find .. -path ./${PWD##*/} -prune -o -name meta-redhawk-sdr -type d`
echo Meta-REDHAWK-SDR Root found: ${META_REDHAWK}
if [ -d "../poky/meta-redhawk-sdr" ]; then
META_REDHAWK="../poky/meta-redhawk-sdr"
else
META_REDHAWK=`find .. -path ./${PWD##*/} -prune -o -name meta-redhawk-sdr -type d`
fi
echo "Meta-REDHAWK-SDR Root found: ${META_REDHAWK}"
if ! [[ -n "${META_REDHAWK}" ]]; then
echo "Could not find meta-redhawk-sdr folder beginning at the parent directory."
echo "This will be necessary for calling WKS later."
exit 1
fi

echo STEP 1 - Starting Bit Bake
echo "STEP 1 - Starting Bit Bake ${BUILD_IMAGE}"
if ! bitbake ${BUILD_IMAGE}; then
echo Bitbake build image failed
echo "Bitbake build image failed"
exit 1
fi

# File system building dependencies
if ! bitbake dosfstools-native mtools-native parted-native; then
echo Failed to install tools for building the SD image.
echo "STEP 2 - Building tools to run wic"
if ! bitbake wic-tools; then
echo "Failed to install tools for building the SD image."
exit 1
fi

echo STEP 2 - Building SD Card Image
echo "STEP 3 - Building SD Card Image"
rm -rf images/${MACHINE}/build
if ! wic create ${META_REDHAWK}/contrib/wks/sdimage-8G.wks -e ${BUILD_IMAGE} -o images/${MACHINE}; then
echo Bitbake build image to SD Card build failed
exit 1
fi

echo STEP 3 - Building tools to run wic
if ! bitbake parted-native mtools-native dosfstools-native; then
echo Failed to build tools needed to run wic.
exit 1
echo "Bitbake build image to SD Card build failed"
exit 1
fi

echo STEP 4 - Packaging image
export IMAGE_NAME=`ls images/${MACHINE}/build/sdimage*mmcblk.direct`
echo "STEP 4 - Packaging image"
export IMAGE_NAME=`ls images/${MACHINE}/sdimage*mmcblk.direct`
xz -k ${IMAGE_NAME}
mv ${IMAGE_NAME}.xz images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct.xz
mv ${IMAGE_NAME} images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct
md5sum images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct.xz > images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct.xz.md5

echo FINISHED:
echo Archive is at: images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct.xz
echo Next: sudo dd if=images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct of=SD CARD bs=1M

echo "FINISHED:"
echo "Archive is at: images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct.xz"
echo "Next: sudo dd if=images/${MACHINE}/sdimage-${BUILD_IMAGE}.direct of=SD CARD bs=1M"

Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ diff -Nuar src/control/sdr/devmgr/DeviceManager.Linux.embedded.prf.xml src/contr
+ <description>
+ SCA required property describing the CPU type
+ </description>
+ <value>BB_UNAME_MACHINE</value>
+ <value>BB_REDHAWK_PROCESSOR</value>
+ <kind kindtype="allocation"/>
+ <action type="eq"/>
+ </simple>
Expand All @@ -108,7 +108,7 @@ diff -Nuar src/control/sdr/devmgr/DeviceManager.spd.xml src/control/sdr/devmgr/D
<processor name="x86_64"/>
</implementation>
+ <implementation id="DCE:4e93fddd-c570-4b85-816c-393f6ae92fe6">
+ <description>BB_UNAME_MACHINE Implementation of a Device Manager</description>
+ <description>BB_REDHAWK_PROCESSOR Implementation of a Device Manager</description>
+ <propertyfile>
+ <localfile name="DeviceManager.Linux.embedded.prf.xml"/>
+ </propertyfile>
Expand All @@ -117,7 +117,7 @@ diff -Nuar src/control/sdr/devmgr/DeviceManager.spd.xml src/control/sdr/devmgr/D
+ <entrypoint>DeviceManager</entrypoint>
+ </code>
+ <os name="Linux" />
+ <processor name="BB_UNAME_MACHINE"/>
+ <processor name="BB_REDHAWK_PROCESSOR"/>
+ </implementation>
</softpkg>
diff -Nuar src/control/sdr/devmgr/Makefile.am src/control/sdr/devmgr/Makefile.am
Expand All @@ -141,7 +141,7 @@ diff -Nuar src/control/sdr/dommgr/DomainManager.spd.xml src/control/sdr/dommgr/D
</code>
- <processor name="x86_64"/>
- <processor name="x86"/>
+ <processor name="BB_UNAME_MACHINE"/>
+ <processor name="BB_REDHAWK_PROCESSOR"/>
<os name="Linux"/>
</implementation>
</softpkg>
13 changes: 6 additions & 7 deletions recipes-core-framework/redhawk/redhawk_2.0.6.bb
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ DESCRIPTION = "REDHAWK Core Framework"

PR = "r2"

DEPENDS += "uname-machine omniorbpy log4cxx xsd-native omniorb omnievents e2fsprogs apr-util apr zip expat boost boost-native python-numpy python-threading python-numbers python-resource ossp-uuid"
DEPENDS += "omniorbpy log4cxx xsd-native omniorb omnievents e2fsprogs apr-util apr zip expat boost boost-native python-numpy python-threading python-numbers python-resource ossp-uuid"
RDEPENDS_${PN} = "python omniorbpy omniorb omnievents e2fsprogs apr-util apr zip expat boost python-numpy python-threading python-subprocess python-numbers python-xml python-resource ossp-uuid"
RDEPENDS_${PN}-python = "${PN} omniorb-python omniorbpy python-numpy python-threading python-numbers python-resource python-xml python-lxml"

PREFERRED_VERSION_omniorb = "4.2.0"

SRC_URI_append = "\
file://uuid_python_package.patch \
file://uname_machine.patch \
file://redhawk_processor.patch \
file://Fix_Idl_prefix.patch \
file://OSSIEHOME_global_prefix.patch \
file://Remove_Tests.patch \
Expand Down Expand Up @@ -79,12 +79,11 @@ FILES_${PN} += " \
"

# Patch for lack of support in specifying an alternative to armv7l and various x86 options.
do_package_arch_patch () {
UNAME_MACHINE=`cat ${OSSIEHOME_STAGED}/share/uname_machine`
find ${S} -type f -exec sed -i "s/BB_UNAME_MACHINE/${UNAME_MACHINE}/g" {} \;
REDHAWK_PROCESSOR ?= "armv7l"
do_redhawk_processor_patch () {
find ${S} -type f -exec sed -i "s/BB_REDHAWK_PROCESSOR/${REDHAWK_PROCESSOR}/g" {} \;
}
addtask package_arch_patch after do_patch before do_configure
do_package_arch_patch[depends] += "uname-machine:do_populate_sysroot"
addtask redhawk_processor_patch after do_patch before do_configure

# Get the things from /etc (sysconfdir)
redhawk_core_etc_sysroot () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,14 @@ LICENSE = "LGPL3"
# along with this program. If not, see http://www.gnu.org/licenses/.
#


inherit packagegroup

PACKAGES = "\
packagegroup-redhawk-core \
packagegroup-redhawk-node \
packagegroup-redhawk-basic-components \
packagegroup-redhawk-basic-softpkgs \
"

PROVIDES = "${PACKAGES}"

# This package is the bare essentials for the core framework on a device. The result is
# actually enough to standup a Domain manager (nodeBooter -D), however its purpose is to
# collect the basics for a REDHAWK system.

SUMMARY_packagegroup-redhawk-core = "Basic packages for the REDHAWK Core Framework (enough to be a Domain)."
RDEPENDS_packagegroup-redhawk-core = "\
redhawk \
redhawk-python \
frontendinterfaces \
frontendinterfaces-python \
bulkiointerfaces \
bulkiointerfaces-python \
burstiointerfaces \
burstiointerfaces-python \
redhawk-codegen \
"

# This package group includes extras for creating a node definition based on whatever
# devices the user has installed as part of their own IMAGE_FEATURES. See the possibilities

SUMMARY_packagegroup-redhawk-node = "Packages for deploying a node using installed devices."
RDEPENDS_packagegroup-redhawk-node = "\
packagegroup-redhawk-core \
node-deployer \
"

# This package group builds all of the avilable components (which may incidentally
# install some softpkg dependencies).
# TODO: Patch in Python and Java implementations where applicable
Expand Down Expand Up @@ -86,13 +56,3 @@ RDEPENDS_packagegroup-redhawk-basic-components = "\
rh-sourcevita49 \
rh-tunefilterdecimate \
"

# This package group builds all of the avilable softpkg libraries.
SUMMARY_packagegroup-redhawk-basic-softpkgs = "All available REDHAWK softpkg dependencies"
RDEPENDS_packagegroup-redhawk-basic-softpkgs = "\
rh-bluefilelib \
rh-dsp \
rh-fftlib \
rh-redhawkdevutils \
rh-vita49 \
"
40 changes: 40 additions & 0 deletions recipes-core/packagegroups/packagegroup-redhawk-basic-softpkgs.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Package group definitions for REDHAWK builds

LICENSE = "LGPL3"
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file distributed
# with this source distribution.
#
# This file is part of Geon Technology's meta-redhawk-sdr.
#
# Geon Technology's meta-redhawk-sdr is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Geon Technology's meta-redhawk-sdr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#

inherit packagegroup

PACKAGES = "\
packagegroup-redhawk-basic-softpkgs \
"

PROVIDES = "${PACKAGES}"

# This package group builds all of the avilable softpkg libraries.
SUMMARY_packagegroup-redhawk-basic-softpkgs = "All available REDHAWK softpkg dependencies"
RDEPENDS_packagegroup-redhawk-basic-softpkgs = "\
rh-bluefilelib \
rh-dsp \
rh-fftlib \
rh-redhawkdevutils \
rh-vita49 \
"
48 changes: 48 additions & 0 deletions recipes-core/packagegroups/packagegroup-redhawk-core.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Package group definitions for REDHAWK builds

LICENSE = "LGPL3"
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file distributed
# with this source distribution.
#
# This file is part of Geon Technology's meta-redhawk-sdr.
#
# Geon Technology's meta-redhawk-sdr is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Geon Technology's meta-redhawk-sdr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#

inherit packagegroup

PACKAGES = "\
packagegroup-redhawk-core \
"

PROVIDES = "${PACKAGES}"

# This package is the bare essentials for the core framework on a device. The result is
# actually enough to standup a Domain manager (nodeBooter -D), however its purpose is to
# collect the basics for a REDHAWK system.

SUMMARY_packagegroup-redhawk-core = "Basic packages for the REDHAWK Core Framework (enough to be a Domain)."
RDEPENDS_packagegroup-redhawk-core = "\
redhawk \
redhawk-python \
frontendinterfaces \
frontendinterfaces-python \
bulkiointerfaces \
bulkiointerfaces-python \
burstiointerfaces \
burstiointerfaces-python \
redhawk-codegen \
"

40 changes: 40 additions & 0 deletions recipes-core/packagegroups/packagegroup-redhawk-node.bb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Package group definitions for REDHAWK builds

LICENSE = "LGPL3"
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file distributed
# with this source distribution.
#
# This file is part of Geon Technology's meta-redhawk-sdr.
#
# Geon Technology's meta-redhawk-sdr is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# Geon Technology's meta-redhawk-sdr is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see http://www.gnu.org/licenses/.
#

inherit packagegroup

PACKAGES = "\
packagegroup-redhawk-node \
"

PROVIDES = "${PACKAGES}"

# This package group includes extras for creating a node definition based on whatever
# devices the user has installed as part of their own IMAGE_FEATURES. See the possibilities

SUMMARY_packagegroup-redhawk-node = "Packages for deploying a node using installed devices."
RDEPENDS_packagegroup-redhawk-node = "\
packagegroup-redhawk-core \
node-deployer \
"

Loading

0 comments on commit 2e0ae53

Please sign in to comment.