blob: 9f17258edba619d8e1162a31b47d52a951ee4dbe [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SUMMARY = "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."
3LICENSE = "BSD-2-Clause"
4LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
5
6require opensbi-payloads.inc
7
8inherit autotools-brokensep deploy
9
Andrew Geisslerd1e89492021-02-12 15:35:20 -060010SRCREV = "234ed8e427f4d92903123199f6590d144e0d9351"
Andrew Geissler475cb722020-07-10 16:00:51 -050011SRC_URI = "git://github.com/riscv/opensbi.git;branch=master \
Andrew Geissler82c905d2020-04-13 13:39:40 -050012 file://0001-Makefile-Don-t-specify-mabi-or-march.patch \
13 "
14
15S = "${WORKDIR}/git"
16
17EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}"
18# If RISCV_SBI_PAYLOAD is set then include it as a payload
19EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}"
20
21# Required if specifying a custom payload
22do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
23
24do_install_append() {
25 # In the future these might be required as a dependency for other packages.
26 # At the moment just delete them to avoid warnings
27 rm -r ${D}/include
Andrew Geissler475cb722020-07-10 16:00:51 -050028 rm -r ${D}/lib*
29 rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
Andrew Geissler82c905d2020-04-13 13:39:40 -050030}
31
32do_deploy () {
Andrew Geissler475cb722020-07-10 16:00:51 -050033 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
34 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
35 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
Andrew Geissler82c905d2020-04-13 13:39:40 -050036}
37
38addtask deploy before do_build after do_install
39
Andrew Geissler475cb722020-07-10 16:00:51 -050040FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
41FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
42FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
Andrew Geissler82c905d2020-04-13 13:39:40 -050043
44COMPATIBLE_HOST = "(riscv64|riscv32).*"
45INHIBIT_PACKAGE_STRIP = "1"
46
47SECURITY_CFLAGS = ""