summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/opensbi/opensbi_1.7.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-bsp/opensbi/opensbi_1.7.bb')
-rw-r--r--meta/recipes-bsp/opensbi/opensbi_1.7.bb53
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-bsp/opensbi/opensbi_1.7.bb b/meta/recipes-bsp/opensbi/opensbi_1.7.bb
new file mode 100644
index 0000000000..a460062e93
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/opensbi_1.7.bb
@@ -0,0 +1,53 @@
1SUMMARY = "RISC-V Open Source Supervisor Binary Interface (OpenSBI)"
2DESCRIPTION = "OpenSBI aims to provide an open-source and extensible implementation of the RISC-V SBI specification for a platform specific firmware (M-mode) and a general purpose OS, hypervisor or bootloader (S-mode or HS-mode). OpenSBI implementation can be easily extended by RISC-V platform or System-on-Chip vendors to fit a particular hadware configuration."
3HOMEPAGE = "https://github.com/riscv/opensbi"
4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
6
7require opensbi-payloads.inc
8
9inherit deploy
10
11SRCREV = "a32a91069119e7a5aa31e6bc51d5e00860be3d80"
12SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https"
13
14TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/"
15
16TARGET_CC_ARCH += "${LDFLAGS}"
17
18RISCV_SBI_FW_TEXT_START ??= "0x80000000"
19EXTRA_OEMAKE += "REPRODUCIBLE=y CROSS_COMPILE=${HOST_PREFIX} ELFFLAGS="${LDFLAGS}" PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}"
20EXTRA_OEMAKE:append:toolchain-clang = " LLVM=y"
21# If RISCV_SBI_PAYLOAD is set then include it as a payload
22EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
23EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
24
25# Required if specifying a custom payload
26do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
27
28do_compile() {
29 oe_runmake
30}
31
32do_install() {
33 oe_runmake DESTDIR=${D} install
34 # In the future these might be required as a dependency for other packages.
35 # At the moment just delete them to avoid warnings
36 rm -r ${D}/include
37 rm -r ${D}/lib*
38 rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
39}
40
41do_deploy () {
42 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
43 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
44 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
45}
46
47addtask deploy before do_build after do_install
48
49FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
50FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
51FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
52
53COMPATIBLE_HOST = "(riscv64|riscv32).*"