blob: a55679632e0cd3f17c7b35874afe8d8b6e6af06f [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')
Brad Bishopf3fd2882019-06-21 08:06:37 -04003 if sbi_payload is None:
4 return ""
5
Andrew Geissler6aa7eec2023-03-03 12:41:14 -06006 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
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):
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060011 if d.getVar('RISCV_SBI_PAYLOAD') is None:
12 return ""
Andrew Geissler09036742021-06-25 14:25:14 -050013 sbi_fdt = d.getVar('RISCV_SBI_FDT')
14 deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
15
16 if sbi_fdt is None:
17 return ""
18
19 return "FW_FDT_PATH=" + deploy_dir + "/" + sbi_fdt
20
Brad Bishopf3fd2882019-06-21 08:06:37 -040021def riscv_get_do_compile_depends(d):
Andrew Geisslereff27472021-10-29 15:35:00 -050022 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') or ""
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060023 if sbi_payload == "":
Brad Bishopf3fd2882019-06-21 08:06:37 -040024 return ""
25
Andrew Geissler6aa7eec2023-03-03 12:41:14 -060026 sbi_fdt = d.getVar('RISCV_SBI_FDT') or ""
27
Andrew Geisslereff27472021-10-29 15:35:00 -050028 if sbi_fdt != "" and 'u-boot.bin' in sbi_payload:
Andrew Geissler09036742021-06-25 14:25:14 -050029 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
30
Brad Bishopf3fd2882019-06-21 08:06:37 -040031 if 'linux' in sbi_payload or 'Image' in sbi_payload:
32 return "virtual/kernel:do_deploy"
Brad Bishopc8f47122019-06-24 09:36:18 -040033 if 'u-boot.bin' in sbi_payload:
Andrew Geissler82c905d2020-04-13 13:39:40 -050034 return "virtual/bootloader:do_deploy"
Andrew Geisslereff27472021-10-29 15:35:00 -050035 if sbi_fdt != "":
36 return "virtual/kernel:do_deploy"
Brad Bishopf3fd2882019-06-21 08:06:37 -040037
38 return ""