blob: 8430f62543a2165b1332f1d6a274e8e6c6a34837 [file] [log] [blame]
Andrew Geissler7e0e3c02022-02-25 20:34:39 +00001SUMMARY = "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 autotools-brokensep deploy
10
11SRCREV = "ce4c0188d96b2c20c2e08d24646a5e517fe15a4b"
12SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https \
13 "
14
15S = "${WORKDIR}/git"
16
17EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= "
18# If RISCV_SBI_PAYLOAD is set then include it as a payload
19EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
20EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
21
22# Required if specifying a custom payload
23do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
24
25do_install:append() {
26 # In the future these might be required as a dependency for other packages.
27 # At the moment just delete them to avoid warnings
28 rm -r ${D}/include
29 rm -r ${D}/lib*
30 rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
31}
32
33do_deploy () {
34 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
35 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
36 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
37}
38
39addtask deploy before do_build after do_install
40
41FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
42FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
43FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
44
45COMPATIBLE_HOST = "(riscv64|riscv32).*"
46INHIBIT_PACKAGE_STRIP = "1"
47
48SECURITY_CFLAGS = ""