From 7d719ff7cce9f406eead2639aade01d631764661 Mon Sep 17 00:00:00 2001 From: Onkar Harsh Date: Mon, 5 Feb 2024 17:56:40 +0530 Subject: standalone: Add support for Versal Net specific CMAKE variables CMAKE_MACHINE and CMAKE_SYSTEM_PROCESSOR values are different for Versal Net than that of Versal. Update the same using the SOC_VARIANT as the SOC_FAMILY is same for both. In addition, update the SOC specific flags (defined in-house to segragate execution of some part of the boot code and the drivers) for versal and versal-net. Signed-off-by: Onkar Harsh Signed-off-by: Mark Hatle --- meta-xilinx-standalone-experimental/classes/esw.bbclass | 16 +++++++++++----- meta-xilinx-standalone/conf/distro/xilinx-standalone.inc | 2 ++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/meta-xilinx-standalone-experimental/classes/esw.bbclass b/meta-xilinx-standalone-experimental/classes/esw.bbclass index 53accd52..f9373b7a 100644 --- a/meta-xilinx-standalone-experimental/classes/esw.bbclass +++ b/meta-xilinx-standalone-experimental/classes/esw.bbclass @@ -32,37 +32,43 @@ do_configure[depends] += "device-tree:do_deploy" do_compile[depends] += "device-tree:do_deploy" do_install[depends] += "device-tree:do_deploy" -def get_xlnx_cmake_machine(fam, d): +def get_xlnx_cmake_machine(fam, variant, d): cmake_machine = fam if (fam == 'zynqmp'): cmake_machine = 'ZynqMP' elif (fam == 'versal'): cmake_machine = 'Versal' + if (variant == 'net'): + cmake_machine = 'VersalNet' elif (fam == 'zynq'): cmake_machine = 'Zynq' return cmake_machine -def get_xlnx_cmake_processor(tune, machine, d): +def get_xlnx_cmake_processor(tune, machine, variant, d): cmake_processor = tune if tune.startswith('microblaze'): if (machine == 'psu_pmu_0'): cmake_processor = 'pmu_microblaze' - elif (machine == 'psv_pmc_0'): + elif (machine in [ 'psv_pmc_0', 'psx_pmc_0' ]): cmake_processor = 'plm_microblaze' else: cmake_processor = 'microblaze' elif tune == 'cortexr5': cmake_processor = 'cortexr5' + elif tune == 'cortexr52': + cmake_processor = 'cortexr52' elif tune.startswith('cortexa9'): cmake_processor = 'cortexa9' elif (tune in [ 'cortexa53', 'cortexa72-cortexa53' ]): cmake_processor = 'cortexa53' elif tune == 'cortexa72': cmake_processor = 'cortexa72' + if (variant == 'net'): + cmake_processor = 'cortexa78' return cmake_processor -XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d)}" -XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d)}" +XLNX_CMAKE_MACHINE = "${@get_xlnx_cmake_machine(d.getVar('SOC_FAMILY'), d.getVar('SOC_VARIANT'), d)}" +XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d.getVar('SOC_VARIANT'), d)}" XLNX_CMAKE_SYSTEM_NAME ?= "Generic" XLNX_CMAKE_BSP_VARS ?= "" diff --git a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc index 27c19081..62c5a211 100644 --- a/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc +++ b/meta-xilinx-standalone/conf/distro/xilinx-standalone.inc @@ -15,6 +15,8 @@ ESW_CFLAGS ?= "" # Cortex R5 requires an additional cflag to be passed for compatibility with the embeddedsw TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexr5', ' -DARMR5', '', d)}" +TUNE_CCARGS:append:versal = " -Dversal" +TUNE_CCARGS:append:versal-net = " -DVERSAL_NET" # Make sure all regular recipes are excluded from compatibility # Avoid using this for native, nativesdk or cross recipes -- cgit v1.2.3-54-g00ecf