summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-10-14 20:58:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-16 17:41:59 +0100
commit43e6557190915245d65cb8c8007a864ccf822548 (patch)
tree3edb160199a99f952f0b70cc6d03abdcc16f6141
parentdb22ea8dbac3bc9fff5d8e7ee06ca633c59f3e24 (diff)
downloadpoky-43e6557190915245d65cb8c8007a864ccf822548.tar.gz
opensbi-payloads.inc: Use strings for fallback
This function is evaluated during parse and some machines maynot use external payload, on such machines this fails to parse Fixes bb.data_smart.ExpansionError: Failure expanding variable do_compile[depends], expression was ${@riscv_get_do_compile_depends(d)} which triggered exception TypeError: argument of type 'NoneType' is not iterab le (From OE-Core rev: b5c93cb9a63ebd8601623f411737c0af7f7efd4a) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/opensbi/opensbi-payloads.inc8
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
index cc31ab3b1d..ce537c0587 100644
--- a/meta/recipes-bsp/opensbi/opensbi-payloads.inc
+++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -17,13 +17,13 @@ def riscv_get_extra_oemake_fdt(d):
17 return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt 17 return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt
18 18
19def riscv_get_do_compile_depends(d): 19def riscv_get_do_compile_depends(d):
20 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') 20 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
21 sbi_fdt = d.getVar('RISCV_SBI_FDT') 21 sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
22 22
23 if sbi_payload is None and sbi_fdt is None: 23 if sbi_payload == "" and sbi_fdt == "":
24 return "" 24 return ""
25 25
26 if sbi_fdt is not None and 'u-boot.bin' in sbi_payload: 26 if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
27 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy" 27 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
28 28
29 if 'linux' in sbi_payload or 'Image' in sbi_payload: 29 if 'linux' in sbi_payload or 'Image' in sbi_payload: