From 1d98f8981e3157aa265ca141a0fc9e6e2640394f Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Sun, 24 Nov 2024 16:58:53 -0700 Subject: meta-xilinx-standalone: Rework embeddedsw integration Introduce a new embeddedsw-source recipe that is a single point for unpack, and patch of the sources. This will allow someone to universally patch (via a bbappend or similar) the esw sources. As part of this work, we transfered the various patches for fsbl, pmu, plm, and psm to the universe source recipe. Most of this is transparent to any recipe using xlnx-embeddedsw. The class automaticaly detects if the recipe is a user our the special embeddedsw-source recipe and enables the correct behavior. Since the esw sources expect the S and B to be the same, the cmake objects get written into S, we are not able to follow the gcc-source example. Instead recipes that use the xlnx-embeddedsw class will hard link or copy the source files to their working directory. This avoid the penalty for fetch, unpack and patch. Note these recipes may also add their own SRC_URI which WILL be processed as normal. This is often used to introduce special tcl scripts. See the do_copy_shared_src task injected by the xlnx-embeddedsw.bbclass for technical details. Additionally, correct some of the existing patch Upstream-Status entries to conform to current YP guidelines. For 2024.2 introduce a special Xil_Assert fix for the current toolchain which is more strict on type conversion.. See the patch itself for more details. Signed-off-by: Mark Hatle --- meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass | 2 -- .../recipes-bsp/embeddedsw/esw-conf_2024.1.bb | 3 --- .../recipes-bsp/embeddedsw/esw-conf_2024.2.bb | 3 --- .../recipes-libraries/xilstandalone_2024.2.bb | 19 +++++++++---------- 4 files changed, 9 insertions(+), 18 deletions(-) (limited to 'meta-xilinx-standalone-sdt') diff --git a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass index 644f3b49..7619c029 100644 --- a/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass +++ b/meta-xilinx-standalone-sdt/classes-recipe/esw.bbclass @@ -8,8 +8,6 @@ OECMAKE_ARGS:remove = "-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON" SRCREV_FORMAT = "src_decouple" -S = "${UNPACKDIR}/git" -B = "${WORKDIR}/build" OECMAKE_SOURCEPATH = "${S}/${ESW_COMPONENT_SRC}" LICFILENAME = "license.txt" diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.1.bb b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.1.bb index dbcbbc11..bd62913f 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.1.bb +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.1.bb @@ -1,9 +1,6 @@ # Can't depend on esw since this is needed for setup! inherit xlnx-embeddedsw -S = "${UNPACKDIR}/git" -B = "${WORKDIR}/build" - INHIBIT_DEFAULT_DEPS = "1" # Installing this recipe should install the lopper tools and such diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb index dbcbbc11..bd62913f 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/esw-conf_2024.2.bb @@ -1,9 +1,6 @@ # Can't depend on esw since this is needed for setup! inherit xlnx-embeddedsw -S = "${UNPACKDIR}/git" -B = "${WORKDIR}/build" - INHIBIT_DEFAULT_DEPS = "1" # Installing this recipe should install the lopper tools and such diff --git a/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb b/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb index a4b0037b..ac2064ff 100644 --- a/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb +++ b/meta-xilinx-standalone-sdt/recipes-libraries/xilstandalone_2024.2.bb @@ -5,17 +5,16 @@ ESW_COMPONENT_NAME = "libxilstandalone.a" DEPENDS += "libgloss" +S = "${B}" + do_configure:prepend() { # This script should also not rely on relative paths and such - ( - cd ${S} - lopper ${DTS_FILE} -- baremetal_bspconfig_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} - install -m 0755 MemConfig.cmake ${S}/${ESW_COMPONENT_SRC}/ - install -m 0755 *.c ${S}/${ESW_COMPONENT_SRC} - lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${S}/${ESW_COMPONENT_SRC} hwcmake_metadata ${S} - install -m 0755 StandaloneExample.cmake ${S}/${ESW_COMPONENT_SRC}/common/ - LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${S} - install -m 0755 xparameters.h ${S}/${ESW_COMPONENT_SRC}/common/ - ) + lopper ${DTS_FILE} -- baremetal_bspconfig_xlnx ${ESW_MACHINE} ${B}/${ESW_COMPONENT_SRC} + install -m 0755 MemConfig.cmake ${B}/${ESW_COMPONENT_SRC}/ + install -m 0755 *.c ${B}/${ESW_COMPONENT_SRC} + lopper ${DTS_FILE} -- bmcmake_metadata_xlnx ${ESW_MACHINE} ${B}/${ESW_COMPONENT_SRC} hwcmake_metadata ${B} + install -m 0755 StandaloneExample.cmake ${B}/${ESW_COMPONENT_SRC}/common/ + LOPPER_DTC_FLAGS="-b 0 -@" lopper ${DTS_FILE} -- baremetal_xparameters_xlnx.py ${ESW_MACHINE} ${B} + install -m 0755 xparameters.h ${B}/${ESW_COMPONENT_SRC}/common/ } -- cgit v1.2.3-54-g00ecf