summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2023-03-01 02:24:28 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-03-03 18:03:56 +0000
commitbc74029debb7253323783a2f481812b2793a4c5c (patch)
tree07dec6364f7754e9792fab4890490870e8312557 /meta/recipes-bsp
parentb5556c9fc64fe40c01d0fb8585730bb54ee50bd8 (diff)
downloadpoky-bc74029debb7253323783a2f481812b2793a4c5c.tar.gz
opensbi: Do not add dependencies if RISCV_SBI_FDT is not set
Dependencies only make sense when opensbi is being used to deliver payload which maybe an artifact of kernel or u-boot, otherwise it should be not added. This avoids circular dependencies when RISCV machines do not define RISCV_SBI_PAYLOAD but do define RISCV_SBI_FDT (From OE-Core rev: 83a986fcac535415108caf70a9fdee8edc59f7d5) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/opensbi/opensbi-payloads.inc12
1 files changed, 7 insertions, 5 deletions
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
index e590a27573..a55679632e 100644
--- a/meta/recipes-bsp/opensbi/opensbi-payloads.inc
+++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -1,13 +1,15 @@
1def riscv_get_extra_oemake_image(d): 1def riscv_get_extra_oemake_image(d):
2 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') 2 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
3 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
4
5 if sbi_payload is None: 3 if sbi_payload is None:
6 return "" 4 return ""
7 5
6 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
7
8 return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload 8 return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
9 9
10def riscv_get_extra_oemake_fdt(d): 10def riscv_get_extra_oemake_fdt(d):
11 if d.getVar('RISCV_SBI_PAYLOAD') is None:
12 return ""
11 sbi_fdt = d.getVar('RISCV_SBI_FDT') 13 sbi_fdt = d.getVar('RISCV_SBI_FDT')
12 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE') 14 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
13 15
@@ -18,11 +20,11 @@ def riscv_get_extra_oemake_fdt(d):
18 20
19def riscv_get_do_compile_depends(d): 21def riscv_get_do_compile_depends(d):
20 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or "" 22 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
21 sbi_fdt = d.getVar('RISCV_SBI_FDT') or "" 23 if sbi_payload == "":
22
23 if sbi_payload == "" and sbi_fdt == "":
24 return "" 24 return ""
25 25
26 sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
27
26 if sbi_fdt != "" and 'u-boot.bin' in sbi_payload: 28 if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
27 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy" 29 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
28 30