summaryrefslogtreecommitdiffstats
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 22:59:00 +0100
commit48bc2f24796705dd7ab7fe4c74690e7e1715ddaf (patch)
tree1f616dbbffef6a3fcdff271474a7cfa761c5fd18
parentefe9f33beb053c8d645bfa5791846ffaa3cbceb4 (diff)
downloadopenembedded-core-contrib-48bc2f24796705dd7ab7fe4c74690e7e1715ddaf.tar.gz
recipes-bsp/opensbi: Add support for specifying a device tree
Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
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:
+ 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:
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"
EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n"
# If RISCV_SBI_PAYLOAD is set then include it as a payload
EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}"
+EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_fdt(d)}"
# Required if specifying a custom payload
do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"