summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2021-06-06 10:05:33 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-06-07 23:00:22 +0100
commit139fb42023e6884a73ca99cb226402de985c658b (patch)
treea361e7ac8e1ebd0f351eced9c57c496c7bc0388a /meta/recipes-bsp
parent984066eb13798701349436cb32b52faaccbec5e7 (diff)
downloadpoky-139fb42023e6884a73ca99cb226402de985c658b.tar.gz
recipes-bsp/opensbi: Add support for specifying a device tree
(From OE-Core rev: 48bc2f24796705dd7ab7fe4c74690e7e1715ddaf) Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/opensbi/opensbi-payloads.inc15
-rw-r--r--meta/recipes-bsp/opensbi/opensbi_0.9.bb1
2 files changed, 15 insertions, 1 deletions
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
index 2e32943245..cc31ab3b1d 100644
--- a/meta/recipes-bsp/opensbi/opensbi-payloads.inc
+++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -7,12 +7,25 @@ def riscv_get_extra_oemake_image(d):
7 7
8 return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload 8 return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
9 9
10def 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
10def riscv_get_do_compile_depends(d): 19def riscv_get_do_compile_depends(d):
11 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD') 20 sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
21 sbi_fdt = d.getVar('RISCV_SBI_FDT')
12 22
13 if sbi_payload is None: 23 if sbi_payload is None and sbi_fdt is None:
14 return "" 24 return ""
15 25
26 if sbi_fdt is not None and 'u-boot.bin' in sbi_payload:
27 return "virtual/kernel:do_deploy virtual/bootloader:do_deploy"
28
16 if 'linux' in sbi_payload or 'Image' in sbi_payload: 29 if 'linux' in sbi_payload or 'Image' in sbi_payload:
17 return "virtual/kernel:do_deploy" 30 return "virtual/kernel:do_deploy"
18 if 'u-boot.bin' in sbi_payload: 31 if 'u-boot.bin' in sbi_payload:
diff --git a/meta/recipes-bsp/opensbi/opensbi_0.9.bb b/meta/recipes-bsp/opensbi/opensbi_0.9.bb
index 52965abda5..5fee52136d 100644
--- a/meta/recipes-bsp/opensbi/opensbi_0.9.bb
+++ b/meta/recipes-bsp/opensbi/opensbi_0.9.bb
@@ -18,6 +18,7 @@ S = "${WORKDIR}/git"
18EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n" 18EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n"
19# If RISCV_SBI_PAYLOAD is set then include it as a payload 19# If RISCV_SBI_PAYLOAD is set then include it as a payload
20EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}" 20EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}"
21EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_fdt(d)}"
21 22
22# Required if specifying a custom payload 23# Required if specifying a custom payload
23do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" 24do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"