Skip to content

Commit

Permalink
Move from armrm override to armv7r override
Browse files Browse the repository at this point in the history
The Yocto Project now describes the cortexr5, but uses a different override
syntax then before.  Update to the new syntax.

Note there is also an armv8r override for newer cortex-r processors.

Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
  • Loading branch information
mhatle committed Dec 18, 2021
1 parent 7b389c5 commit 9821f5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
Expand Up @@ -4,18 +4,18 @@ SRCREV = "7e6ac3f659724204fd5917952fafb74478c39e43"
S = "${WORKDIR}/git"
B = "${WORKDIR}/build"

SRC_URI:armrm:xilinx-standalone = "git://gitenterprise.xilinx.com/OpenAMP/libmetal.git;branch=xlnx_decoupling"
SRC_URI:armv7r:xilinx-standalone = "git://gitenterprise.xilinx.com/OpenAMP/libmetal.git;branch=xlnx_decoupling"

OECMAKE_SOURCEPATH = "${S}/"
PROVIDES:armrm:xilinx-standalone = "libmetal "
DEPENDS:armrm:xilinx-standalone += " libxil scugic doxygen-native xilstandalone"
PROVIDES:armv7r:xilinx-standalone = "libmetal "
DEPENDS:armv7r:xilinx-standalone += " libxil scugic doxygen-native xilstandalone"
inherit cmake
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=1ff609e96fc79b87da48a837cbe5db33"

do_configure:armrm:xilinx-standalone[depends] += "device-tree-lops:do_deploy"
do_configure:armv7r:xilinx-standalone[depends] += "device-tree-lops:do_deploy"

EXTRA_OECMAKE:armrm:xilinx-standalone = " \
EXTRA_OECMAKE:armv7r:xilinx-standalone = " \
-DLIB_INSTALL_DIR=${libdir} \
-DSOC_FAMILY="${SOC_FAMILY}" \
-DWITH_EXAMPLES=ON \
Expand All @@ -24,7 +24,7 @@ EXTRA_OECMAKE:armrm:xilinx-standalone = " \

ALLOW_EMPTY:${PN}-demos = "1"

FILES:${PN}-demos:armrm:xilinx-standalone = " \
FILES:${PN}-demos:armv7r:xilinx-standalone = " \
${bindir}/libmetal_* \
${bindir}/*ocm_demo.elf \
"
Expand All @@ -39,17 +39,17 @@ def get_cross_prefix(oe_cmake_c_compiler):
if oe_cmake_c_compiler == 'arm-xilinx-eabi-gcc':
return 'arm-xilinx-eabi-'

LIBMETAL_CROSS_PREFIX:armrm:xilinx-standalone = "${@get_cross_prefix(d.getVar('OECMAKE_C_COMPILER'))}"
LIBMETAL_CROSS_PREFIX:armv7r:xilinx-standalone = "${@get_cross_prefix(d.getVar('OECMAKE_C_COMPILER'))}"

def get_libmetal_machine(soc_family):
if soc_family in ['versal']:
return 'zynqmp_r5'
return ''


LIBMETAL_MACHINE:armrm:xilinx-standalone = "${@get_libmetal_machine(d.getVar('SOC_FAMILY'))}"
LIBMETAL_MACHINE:armv7r:xilinx-standalone = "${@get_libmetal_machine(d.getVar('SOC_FAMILY'))}"

cmake_do_generate_toolchain_file:armrm:xilinx-standalone:append() {
cmake_do_generate_toolchain_file:armv7r:xilinx-standalone:append() {
cat >> ${WORKDIR}/toolchain.cmake <<EOF
set( CMAKE_SYSTEM_PROCESSOR "${TRANSLATED_TARGET_ARCH}" )
set( MACHINE "${LIBMETAL_MACHINE}" )
Expand Down
@@ -1,14 +1,14 @@
LICENSE = "BSD"
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=0e6d7bfe689fe5b0d0a89b2ccbe053fa"
SRC_URI:armrm:xilinx-standalone = "git://gitenterprise.xilinx.com/OpenAMP/open-amp.git;branch=xlnx_decoupling"
SRC_URI:armv7r:xilinx-standalone = "git://gitenterprise.xilinx.com/OpenAMP/open-amp.git;branch=xlnx_decoupling"

SRCREV = "0720f88f065f11d2223cde4c790a7f35bbcc098a"

S = "${WORKDIR}/git"
B = "${WORKDIR}/build"
OECMAKE_SOURCEPATH = "${S}/"
PROVIDES = "openamp"
DEPENDS:armrm:xilinx-standalone += " libmetal xilstandalone python3-pyyaml-native lopper-native python3-dtc-native nativesdk-xilinx-lops "
DEPENDS:armv7r:xilinx-standalone += " libmetal xilstandalone python3-pyyaml-native lopper-native python3-dtc-native nativesdk-xilinx-lops "
DTS_FILE = "/scratch/decoupling/lopper/lopper-sdt.dtb"
FILESEXTRAPATHS:append := ":${THISDIR}/overlays"
SRC_URI:append = " \
Expand All @@ -17,9 +17,9 @@ SRC_URI:append = " \

inherit cmake deploy
# We need the deployed output
do_configure:armrm:xilinx-standalone[depends] += "device-tree-lops:do_deploy lopper-native:do_install"
do_compile:armrm:xilinx-standalone[depends] += "device-tree-lops:do_deploy"
do_install:armrm:xilinx-standalone[depends] += "device-tree-lops:do_deploy"
do_configure:armv7r:xilinx-standalone[depends] += "device-tree-lops:do_deploy lopper-native:do_install"
do_compile:armv7r:xilinx-standalone[depends] += "device-tree-lops:do_deploy"
do_install:armv7r:xilinx-standalone[depends] += "device-tree-lops:do_deploy"

BB_STRICT_CHECKSUM = "0"

Expand All @@ -39,7 +39,7 @@ def get_cross_prefix(oe_cmake_c_compiler):
if oe_cmake_c_compiler == 'arm-xilinx-eabi-gcc':
return 'arm-xilinx-eabi-'

OPENAMP_CROSS_PREFIX:armrm:xilinx-standalone = "${@get_cross_prefix(d.getVar('OECMAKE_C_COMPILER'))}"
OPENAMP_CROSS_PREFIX:armv7r:xilinx-standalone = "${@get_cross_prefix(d.getVar('OECMAKE_C_COMPILER'))}"

def get_openamp_machine(soc_family):
if soc_family in ['versal']:
Expand All @@ -54,10 +54,10 @@ ALLOW_EMPTY:${PN}-demos = "1"
PACKAGES:append += "${PN}-demos"
EXTRA_OECMAKE:append = "-DWITH_APPS=ON "

REQUIRED_DISTRO_FEATURES:armrm:xilinx-standalone = "${DISTRO_FEATURES}"
PACKAGECONFIG:armrm:xilinx-standalone ?= "${DISTRO_FEATURES} ${MACHINE_FEATURES}"
REQUIRED_DISTRO_FEATURES:armv7r:xilinx-standalone = "${DISTRO_FEATURES}"
PACKAGECONFIG:armv7r:xilinx-standalone ?= "${DISTRO_FEATURES} ${MACHINE_FEATURES}"

FILES:${PN}-demos:armrm:xilinx-standalone = " \
FILES:${PN}-demos:armv7r:xilinx-standalone = " \
${base_libdir}/firmware/*\.out \
"

Expand All @@ -66,10 +66,10 @@ OVERLAY ?= "${S}/../openamp-overlay-kernel.yaml"

CHANNEL_INFO_FILE = "openamp-channel-info.txt"

PACKAGE_DEBUG_SPLIT_STYLE:armrm:xilinx-standalone='debug-file-directory'
INHIBIT_PACKAGE_STRIP:armrm:xilinx-standalone = '1'
INHIBIT_PACKAGE_DEBUG_SPLIT:armrm:xilinx-standalone = '1'
PACKAGE_MINIDEBUGINFO:armrm:xilinx-standalone = '1'
PACKAGE_DEBUG_SPLIT_STYLE:armv7r:xilinx-standalone='debug-file-directory'
INHIBIT_PACKAGE_STRIP:armv7r:xilinx-standalone = '1'
INHIBIT_PACKAGE_DEBUG_SPLIT:armv7r:xilinx-standalone = '1'
PACKAGE_MINIDEBUGINFO:armv7r:xilinx-standalone = '1'

do_run_lopper() {
cd ${WORKDIR}
Expand All @@ -91,7 +91,7 @@ addtask run_lopper before do_generate_toolchain_file
addtask run_lopper after do_prepare_recipe_sysroot


SELECTED_OPTIMIZATION:armrm:xilinx-standalone = " -g "
SELECTED_OPTIMIZATION:armv7r:xilinx-standalone = " -g "

python do_set_openamp_cmake_vars() {
def parse_channel_info( val, d ):
Expand Down

0 comments on commit 9821f5c

Please sign in to comment.