summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/opensbi/opensbi-payloads.inc
blob: cc31ab3b1d322ddedfcfffddcb3ebf04376dd8aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 ""

    return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload

def riscv_get_extra_oemake_fdt(d):
    sbi_fdt = d.getVar('RISCV_SBI_FDT')
    deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')

    if sbi_fdt is None:
        return ""

    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')

    if sbi_payload is None and sbi_fdt is None:
        return ""

    if sbi_fdt is not None 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"

    return ""