inherit check_sdt_enabled python3native xlnx-embeddedsw pkgconfig cmake # Poky always tries to enable EXPORT_COMPILE_COMMANDS, but ESW changes # behavior when this is enabled and will generate: # -isystem /usr/include # which will cause a build failures. OECMAKE_ARGS:remove = "-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON" SRCREV_FORMAT = "src_decouple" OECMAKE_SOURCEPATH = "${S}/${ESW_COMPONENT_SRC}" LICFILENAME = "license.txt" SPECFILE_PATH:arm = "${S}/scripts/specs/arm/Xilinx.spec" SPECFILE_PATH:aarch64 = "${S}/scripts/specs/arm/Xilinx.spec" SPECFILE_PATH:microblaze = "${S}/scripts/specs/microblaze/Xilinx.spec" ESW_MACHINE ?= "${MACHINE}" ESW_CFLAGS += "-specs=${SPECFILE_PATH}" inherit ccmake COMPATIBLE_HOST = ".*-elf" COMPATIBLE_HOST:arm = "[^-]*-[^-]*-eabi" CONFIG_DTFILE ??= "" DTS_FILE = "${DEPLOY_DIR_IMAGE}/devicetree/${@os.path.basename(d.getVar('CONFIG_DTFILE').replace('.dts','.dtb'))}" DEPENDS += "python3-pyyaml-native lopper-native device-tree python3-dtc-native" # We need the deployed output 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_processor(tune, machine, d): cmake_processor = tune if tune.startswith('microblaze'): if (machine == 'psu_pmu_0'): cmake_processor = 'pmu_microblaze' elif (machine in [ 'psv_pmc_0', 'psx_pmc_0' ]): cmake_processor = 'plm_microblaze' else: cmake_processor = 'microblaze' elif (tune in [ 'cortexr5', 'cortexr5hf' ]): cmake_processor = 'cortexr5' elif (tune in [ 'cortexr52', 'cortexr52hf' ]): 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' elif tune == 'cortexa78': cmake_processor = 'cortexa78' return cmake_processor XLNX_CMAKE_MACHINE = "undefined" XLNX_CMAKE_MACHINE:zynq = "Zynq" XLNX_CMAKE_MACHINE:zynqmp = "ZynqMP" XLNX_CMAKE_MACHINE:versal = "Versal" XLNX_CMAKE_MACHINE:versal-net = "VersalNet" XLNX_CMAKE_PROCESSOR = "${@get_xlnx_cmake_processor(d.getVar('DEFAULTTUNE'), d.getVar('ESW_MACHINE'), d)}" XLNX_CMAKE_SYSTEM_NAME ?= "Generic" XLNX_CMAKE_BSP_VARS ?= "" cmake_do_generate_toolchain_file:append() { cat >> ${WORKDIR}/toolchain.cmake <