blob: b9714a7acbb3675fed8317fed8aba4fb9c4e0cc5 [file] [log] [blame]
Brad Bishopf3fd2882019-06-21 08:06:37 -04001def riscv_get_extra_oemake_image(d):
2 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
3 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
4
5 if sbi_payload is None:
6 return ""
7
Brad Bishop96ff1982019-08-19 13:50:42 -04008 return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
Brad Bishopf3fd2882019-06-21 08:06:37 -04009
10def riscv_get_extra_oemake_fdt(d):
11 sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
12 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
13
14 if sbi_fdt_payload is None:
15 return ""
16
Brad Bishop96ff1982019-08-19 13:50:42 -040017 return "FW_PAYLOAD_FDT_PATH=" + deploy_dir + "/" + sbi_fdt_payload
Brad Bishopf3fd2882019-06-21 08:06:37 -040018
19def riscv_get_do_compile_depends(d):
20 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
Brad Bishop96ff1982019-08-19 13:50:42 -040021 sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
Brad Bishopf3fd2882019-06-21 08:06:37 -040022
23 if sbi_payload is None:
24 return ""
25
26 if 'linux' in sbi_payload or 'Image' in sbi_payload:
27 return "virtual/kernel:do_deploy"
Brad Bishopc8f47122019-06-24 09:36:18 -040028 if 'u-boot.bin' in sbi_payload:
Brad Bishop96ff1982019-08-19 13:50:42 -040029 # If we want U-Boot and a FDT then we need to depend on U-Boot and
30 # the kernel
31 if sbi_fdt_payload is not None:
32 return "virtual/bootloader:do_deploy virtual/kernel:do_deploy"
33 else:
34 return "virtual/bootloader:do_deploy"
35 # If we want a custom FDT then we need to depend on the kernel
36 if sbi_fdt_payload is not None:
37 return "virtual/kernel:do_deploy"
Brad Bishopf3fd2882019-06-21 08:06:37 -040038
39 return ""