summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/opensbi/opensbi-payloads.inc
diff options
context:
space:
mode:
authorAlistair Francis <alistair.francis@wdc.com>2019-06-18 17:55:39 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-19 13:10:27 +0100
commit112ca2174dd97f5ca9ea25f83007d44054abc487 (patch)
tree62e79a458dd08a7f87d9ed4c17936fc4de3d34ad /meta/recipes-bsp/opensbi/opensbi-payloads.inc
parent24f4b2a8f2a0ed52fd791a5c393dea7d02f45116 (diff)
downloadopenembedded-core-contrib-112ca2174dd97f5ca9ea25f83007d44054abc487.tar.gz
opensbi: Initial commit of OpenSBI
This is used as a bootloader for RISC-V QEMU machines. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-bsp/opensbi/opensbi-payloads.inc')
-rw-r--r--meta/recipes-bsp/opensbi/opensbi-payloads.inc37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-bsp/opensbi/opensbi-payloads.inc b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
new file mode 100644
index 0000000000..7df168325a
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/opensbi-payloads.inc
@@ -0,0 +1,37 @@
+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 ""
+
+ if d.getVar('RISCV_SBI_PAYLOAD'):
+ return "FW_PAYLOAD_PATH=" + deploy_dir + "/" + sbi_payload
+
+ return ""
+
+def riscv_get_extra_oemake_fdt(d):
+ sbi_fdt_payload = d.getVar('RISCV_SBI_FDT')
+ deploy_dir = d.getVar('DEPLOY_DIR_IMAGE')
+
+ if sbi_fdt_payload is None:
+ return ""
+
+ if d.getVar('RISCV_SBI_PAYLOAD'):
+ # This is internal to openSBI, not a full path
+ return "FW_PAYLOAD_FDT=" + sbi_fdt_payload
+
+ return ""
+
+def riscv_get_do_compile_depends(d):
+ sbi_payload = d.getVar('RISCV_SBI_PAYLOAD')
+
+ if sbi_payload is None:
+ return ""
+
+ if 'linux' in sbi_payload or 'Image' in sbi_payload:
+ return "virtual/kernel:do_deploy"
+ if 'u-boot' in sbi_payload:
+ return "virtual/bootloader:do_deploy"
+
+ return ""