Browse Source

dubhe: opensbi: Update opensbi-payload.inc.

Signed-off-by: weiheng.cheng <weiheng.cheng@starfivetech.com>
weiheng.cheng 1 year ago
parent
commit
11b4006089
1 changed files with 6 additions and 4 deletions
  1. 6 4
      recipes-bsp/opensbi/opensbi-payloads.inc

+ 6 - 4
recipes-bsp/opensbi/opensbi-payloads.inc

@@ -17,18 +17,20 @@ def riscv_get_extra_oemake_fdt(d):
     return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt
 
 def riscv_get_do_compile_depends(d):
-    sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
-    sbi_fdt = d.getVar('RISCV_SBI_FDT')
+    sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
+    sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
 
-    if sbi_payload is None and sbi_fdt is None:
+    if sbi_payload == "" and sbi_fdt == "":
         return ""
 
-    if sbi_fdt is not None and 'u-boot.bin' in sbi_payload:
+    if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
         return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
 
     if 'linux' in sbi_payload or 'Image' in sbi_payload:
         return "virtual/kernel:do_deploy"
     if 'u-boot.bin' in sbi_payload:
         return "virtual/bootloader:do_deploy"
+    if sbi_fdt != "":
+        return "virtual/kernel:do_deploy"
 
     return ""