blob: e590a2757318bbcdd1387c8eb1f6cf8c2b9b5965 [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
Andrew Geissler09036742021-06-25 14:25:14 -050010def riscv_get_extra_oemake_fdt(d):
11 sbi_fdt = d.getVar('RISCV_SBI_FDT')
12 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
13
14 if sbi_fdt is None:
15 return ""
16
17 return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt
18
Brad Bishopf3fd2882019-06-21 08:06:37 -040019def riscv_get_do_compile_depends(d):
Andrew Geisslereff27472021-10-29 15:35:00 -050020 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
21 sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
Brad Bishopf3fd2882019-06-21 08:06:37 -040022
Andrew Geisslereff27472021-10-29 15:35:00 -050023 if sbi_payload == "" and sbi_fdt == "":
Brad Bishopf3fd2882019-06-21 08:06:37 -040024 return ""
25
Andrew Geisslereff27472021-10-29 15:35:00 -050026 if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
Andrew Geissler09036742021-06-25 14:25:14 -050027 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
28
Brad Bishopf3fd2882019-06-21 08:06:37 -040029 if 'linux' in sbi_payload or 'Image' in sbi_payload:
30 return "virtual/kernel:do_deploy"
Brad Bishopc8f47122019-06-24 09:36:18 -040031 if 'u-boot.bin' in sbi_payload:
Andrew Geissler82c905d2020-04-13 13:39:40 -050032 return "virtual/bootloader:do_deploy"
Andrew Geisslereff27472021-10-29 15:35:00 -050033 if sbi_fdt != "":
34 return "virtual/kernel:do_deploy"
Brad Bishopf3fd2882019-06-21 08:06:37 -040035
36 return ""