From 2ad5fa3fa580c72cfe104522e2366da621cf03a9 Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Tue, 5 Apr 2022 09:13:28 -0700 Subject: meta-xilinx-standalone-experimental: fsbl-firmware: Fix issue with fetch into wrong directory The file:// items were being placed in the same path structure in WORKDIR as they were in the original path passed into the recipe. Instead we want the files to always just show up in the WORKDIR. Move to using a simple file://psu_init.[ch] entry, but use FILESEXTRAPATHS to handle the access to the correct path. Upside is that everything works as expected, downside, if the path to the psu_init files also contain other items refered to by SRC_URI, it could pick up that version instead. With the current implementation, this is unlikely to be a problem. The code also moves the warning about using the default psu_init files to the do_compile. Unfortunately doing it in the anonymous python causes the warning to be generated for all multiconfigs, even ones that will never build the fsbl files. There is no simply way to disable this warning in those cases. Signed-off-by: Mark Hatle (cherry picked from commit 49912c9a380bd1b472abe925e83b785b16e76dfb) Signed-off-by: Mark Hatle --- .../embeddedsw/fsbl-firmware_git.bbappend | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend index 439f47f4..330f0ead 100644 --- a/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend +++ b/meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend @@ -8,6 +8,7 @@ inherit esw # Not compatible with Zynq COMPATIBLE_MACHINE:zynq = "none" +COMPATIBLE_MACHINE:microblaze = "none" ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src" ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src" @@ -23,23 +24,30 @@ python() { psu_init_c = os.path.join(psu_init_path, 'psu_init.c') psu_init_h = os.path.join(psu_init_path, 'psu_init.h') + add_path = False if os.path.exists(psu_init_c): - d.appendVar('SRC_URI', ' file://%s' % psu_init_c) - else: - bb.warn("Unable to find %s, using default version" % psu_init_c) + d.appendVar('SRC_URI', ' file://psu_init.c') + add_path = True + if os.path.exists(psu_init_h): - d.appendVar('SRC_URI', ' file://%s' % psu_init_h) - else: - bb.warn("Unable to find %s, using default version" % psu_init_h) + d.appendVar('SRC_URI', ' file://psu_init.h') + add_path = True + + if add_path: + d.prependVar('FILESEXTRAPATHS', '%s:' % psu_init_path) } do_compile:prepend() { if [ -e ${WORKDIR}/psu_init.c ]; then install -m 0644 ${WORKDIR}/psu_init.c ${S}/${ESW_COMPONENT_SRC} + else + bbwarn "Using the default psu_init.c, this may not work correctly." fi if [ -e ${WORKDIR}/psu_init.h ]; then install -m 0644 ${WORKDIR}/psu_init.h ${S}/${ESW_COMPONENT_SRC} + else + bbwarn "Using the default psu_init.h, this may not work correctly." fi } -- cgit v1.2.3-54-g00ecf