diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2022-03-08 13:20:24 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2022-03-28 13:55:03 -0700 |
commit | 215984802b9f74b724b0395e5235356b32a2bb5a (patch) | |
tree | 94f6875c7f898cb44318ee4c25109708edc74c7d /meta-xilinx-standalone-experimental/recipes-bsp | |
parent | c3124e085ccb3466f2528cb47f84f01f43b74913 (diff) | |
download | meta-xilinx-215984802b9f74b724b0395e5235356b32a2bb5a.tar.gz |
fsbl-firmware: Move to explicit psu_init settings
The location for psu_init is now explicitly set. If the psu_init files
are not available, a warning will be presented to the user.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-xilinx-standalone-experimental/recipes-bsp')
-rw-r--r-- | meta-xilinx-standalone-experimental/recipes-bsp/embeddedsw/fsbl-firmware_git.bbappend | 32 |
1 files changed, 16 insertions, 16 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 32174711..056ad990 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 | |||
@@ -15,23 +15,23 @@ ESW_COMPONENT_SRC:zynqmp = "/lib/sw_apps/zynqmp_fsbl/src" | |||
15 | 15 | ||
16 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" | 16 | DEPENDS += "xilstandalone xiltimer xilffs xilsecure xilpm" |
17 | 17 | ||
18 | do_copy_psu_init[depends] += "device-tree:do_deploy" | 18 | python() { |
19 | python do_copy_psu_init() { | 19 | psu_init_path = d.getVar('PSU_INIT_PATH') |
20 | import glob, subprocess, os | 20 | if not psu_init_path: |
21 | 21 | psu_init_path = os.path.dirname(d.getVar('SYSTEM_DTFILE')) | |
22 | system_dt = d.getVar('SYSTEM_DTFILE') | 22 | |
23 | src_dir = glob.glob(d.getVar('OECMAKE_SOURCEPATH')) | 23 | psu_init_c = os.path.join(psu_init_path, 'psu_init.c') |
24 | psu_init_src = os.path.dirname(system_dt) | 24 | psu_init_h = os.path.join(psu_init_path, 'psu_init.h') |
25 | src_file = psu_init_src + str("/psu_init.c") | 25 | |
26 | hdr_file = psu_init_src + str("/psu_init.h") | 26 | if os.path.exists(psu_init_c): |
27 | if os.path.exists(src_file): | 27 | d.appendVar('SRC_URI', ' file://%s' % psu_init_c) |
28 | command = ["install"] + ["-m"] + ["0755"] + [src_file] + [src_dir[0]] | 28 | else: |
29 | subprocess.run(command, check = True) | 29 | bb.warn("Unable to find %s, using default version" % psu_init_c) |
30 | command = ["install"] + ["-m"] + ["0755"] + [hdr_file] + [src_dir[0]] | 30 | if os.path.exists(psu_init_h): |
31 | subprocess.run(command, check = True) | 31 | d.appendVar('SRC_URI', ' file://%s' % psu_init_h) |
32 | else: | ||
33 | bb.warn("Unable to find %s, using default version" % psu_init_h) | ||
32 | } | 34 | } |
33 | addtask do_copy_psu_init before do_configure after do_prepare_recipe_sysroot | ||
34 | do_prepare_recipe_sysroot[rdeptask] = "do_unpack" | ||
35 | 35 | ||
36 | do_install() { | 36 | do_install() { |
37 | : | 37 | : |