From f3236528e124ff16b8300a749b1313392e16bb2c Mon Sep 17 00:00:00 2001 From: Sandeep Gundlupet Raju Date: Thu, 11 Jan 2024 14:46:54 -0700 Subject: device-tree: Fix string trailing character strip issue Multiconfig freertos device-tree do configure task fails with below errors: ERROR: mc:cortexa53-0-zynqmp-freertos:device-tree-1.0-r0 do_configure: Unable to find cortexa53-0-zynqmp-freerto.dts, to use EXTRA_OVERLAYS you must set a valid CONFIG_DTFILE or use system-top.dts ERROR: mc:cortexa53-0-zynqmp-freertos:device-tree-1.0-r0 do_configure: ExecutionError('/scratch/sandeep/yocto/2024.1/yp-dev/build-sdt/tmp-cortexa53-0-zynqmp-freertos/work/xlnx_zynqmp_zcu102_rev1_0-xilinx-elf/device-tree/1.0-r0/temp/run.do_configure.3127586', 1, None, None) ERROR: Logfile of failure stored in: /scratch/sandeep/yocto/2024.1/yp-dev/build-sdt/tmp-cortexa53-0-zynqmp-freertos/work/xlnx_zynqmp_zcu102_rev1_0-xilinx-elf/device-tree/1.0-r0/temp/log.do_configure.3127586 ERROR: Task (mc:cortexa53-0-zynqmp-freertos:/scratch/sandeep/yocto/2024.1/yp-dev/sources/poky/../meta-xilinx/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb:do_configure) failed with exit code '1' NOTE: Tasks Summary: Attempted 851 tasks of which 769 didn't need to be rerun and 1 failed. Using python rstrip operations it will strip all the combinations of its values. For example in below code BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" if CONFIG_DTFILE name is cortexa53-0-zynqmp-baremetald or cortexa53-0-zynqmp-freertos resulting output with rstrip will be cortexa53-0-zynqmp-baremetal cortexa53-0-zynqmp-freerto Hence instead of using rstrip use os.path.splitext to remove .dtb or .dts extension from file name. Signed-off-by: Sandeep Gundlupet Raju Signed-off-by: Mark Hatle --- meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meta-xilinx-core/recipes-bsp/device-tree') diff --git a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb index 8d7211f5..1f8ae2e3 100644 --- a/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb +++ b/meta-xilinx-core/recipes-bsp/device-tree/device-tree.bb @@ -23,7 +23,7 @@ inherit devicetree image-artifact-names SYSTEM_DTFILE ??= "" CONFIG_DTFILE ??= "${SYSTEM_DTFILE}" -BASE_DTS ?= "${@os.path.basename(d.getVar('CONFIG_DTFILE') or '').rstrip('.dtb').rstrip('.dts') or 'system-top'}" +BASE_DTS ?= "${@os.path.splitext(os.path.basename(d.getVar('CONFIG_DTFILE') or ''))[0] or 'system-top'}" EXTRA_DT_FILES ?= "" EXTRA_DTFILE_PREFIX ?= "system-top" -- cgit v1.2.3-54-g00ecf