]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
opensbi: Do not add dependencies if RISCV_SBI_FDT is not set
authorKhem Raj <raj.khem@gmail.com>
Wed, 1 Mar 2023 10:24:28 +0000 (02:24 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 2 Mar 2023 22:05:06 +0000 (22:05 +0000)
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

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
meta/recipes-bsp/opensbi/opensbi-payloads.inc

index e590a2757318bbcdd1387c8eb1f6cf8c2b9b5965..a55679632e0cd3f17c7b35874afe8d8b6e6af06f 100644 (file)
@@ -1,13 +1,15 @@
 def riscv_get_extra_oemake_image(d):
     sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
-    deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
-
     if sbi_payload is None:
         return ""
 
+    deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
+
     return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
 
 def riscv_get_extra_oemake_fdt(d):
+    if d.getVar('RISCV_SBI_PAYLOAD') is None:
+        return ""
     sbi_fdt = d.getVar('RISCV_SBI_FDT')
     deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
 
@@ -18,11 +20,11 @@ def riscv_get_extra_oemake_fdt(d):
 
 def riscv_get_do_compile_depends(d):
     sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
-    sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
-
-    if sbi_payload == "" and sbi_fdt == "":
+    if sbi_payload == "":
         return ""
 
+    sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
+
     if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
         return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"