summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mhatle@xilinx.com>2022-04-05 09:13:28 -0700
committerMark Hatle <mark.hatle@kernel.crashing.org>2022-07-23 15:59:49 -0500
commit2ad5fa3fa580c72cfe104522e2366da621cf03a9 (patch)
treed836d70c91a5b08497bf9c46e0414a4bb36702c9
parent7a7ca36d7a0148f3b75009045361083dc2c5ac36 (diff)
downloadmeta-xilinx-2ad5fa3fa580c72cfe104522e2366da621cf03a9.tar.gz
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 <mhatle@xilinx.com> (cherry picked from commit 49912c9a380bd1b472abe925e83b785b16e76dfb) Signed-off-by: Mark Hatle <mhatle@xilinx.com>
-rw-r--r--meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend20
1 files 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
8 8
9# Not compatible with Zynq 9# Not compatible with Zynq
10COMPATIBLE_MACHINE:zynq = "none" 10COMPATIBLE_MACHINE:zynq = "none"
11COMPATIBLE_MACHINE:microblaze = "none"
11 12
12ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src" 13ESW_COMPONENT_SRC = "/lib/sw_apps/undefined/src"
13ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src" 14ESW_COMPONENT_SRC:zynq = "/lib/sw_apps/zynq_fsbl/src"
@@ -23,23 +24,30 @@ python() {
23 psu_init_c = os.path.join(psu_init_path, 'psu_init.c') 24 psu_init_c = os.path.join(psu_init_path, 'psu_init.c')
24 psu_init_h = os.path.join(psu_init_path, 'psu_init.h') 25 psu_init_h = os.path.join(psu_init_path, 'psu_init.h')
25 26
27 add_path = False
26 if os.path.exists(psu_init_c): 28 if os.path.exists(psu_init_c):
27 d.appendVar('SRC_URI', ' file://%s' % psu_init_c) 29 d.appendVar('SRC_URI', ' file://psu_init.c')
28 else: 30 add_path = True
29 bb.warn("Unable to find %s, using default version" % psu_init_c) 31
30 if os.path.exists(psu_init_h): 32 if os.path.exists(psu_init_h):
31 d.appendVar('SRC_URI', ' file://%s' % psu_init_h) 33 d.appendVar('SRC_URI', ' file://psu_init.h')
32 else: 34 add_path = True
33 bb.warn("Unable to find %s, using default version" % psu_init_h) 35
36 if add_path:
37 d.prependVar('FILESEXTRAPATHS', '%s:' % psu_init_path)
34} 38}
35 39
36do_compile:prepend() { 40do_compile:prepend() {
37 if [ -e ${WORKDIR}/psu_init.c ]; then 41 if [ -e ${WORKDIR}/psu_init.c ]; then
38 install -m 0644 ${WORKDIR}/psu_init.c ${S}/${ESW_COMPONENT_SRC} 42 install -m 0644 ${WORKDIR}/psu_init.c ${S}/${ESW_COMPONENT_SRC}
43 else
44 bbwarn "Using the default psu_init.c, this may not work correctly."
39 fi 45 fi
40 46
41 if [ -e ${WORKDIR}/psu_init.h ]; then 47 if [ -e ${WORKDIR}/psu_init.h ]; then
42 install -m 0644 ${WORKDIR}/psu_init.h ${S}/${ESW_COMPONENT_SRC} 48 install -m 0644 ${WORKDIR}/psu_init.h ${S}/${ESW_COMPONENT_SRC}
49 else
50 bbwarn "Using the default psu_init.h, this may not work correctly."
43 fi 51 fi
44} 52}
45 53