blob: 1956fbf9ffcb6bb3850617cb7c3a02166d37b167 [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."
Andrew Geissler90fd73c2021-03-05 15:25:55 -06003HOMEPAGE = "https://github.com/riscv/opensbi"
Andrew Geissler82c905d2020-04-13 13:39:40 -05004LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
6
7require opensbi-payloads.inc
8
9inherit autotools-brokensep deploy
10
Andrew Geisslerd1e89492021-02-12 15:35:20 -060011SRCREV = "234ed8e427f4d92903123199f6590d144e0d9351"
Andrew Geissler595f6302022-01-24 19:11:47 +000012SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https \
Andrew Geissler82c905d2020-04-13 13:39:40 -050013 file://0001-Makefile-Don-t-specify-mabi-or-march.patch \
14 "
15
16S = "${WORKDIR}/git"
17
Andrew Geissler09036742021-06-25 14:25:14 -050018EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n"
Andrew Geissler82c905d2020-04-13 13:39:40 -050019# If RISCV_SBI_PAYLOAD is set then include it as a payload
Patrick Williams213cb262021-08-07 19:21:33 -050020EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
21EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
Andrew Geissler82c905d2020-04-13 13:39:40 -050022
23# Required if specifying a custom payload
24do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
25
Patrick Williams213cb262021-08-07 19:21:33 -050026do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050027 # In the future these might be required as a dependency for other packages.
28 # At the moment just delete them to avoid warnings
29 rm -r ${D}/include
Andrew Geissler475cb722020-07-10 16:00:51 -050030 rm -r ${D}/lib*
31 rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
Andrew Geissler82c905d2020-04-13 13:39:40 -050032}
33
34do_deploy () {
Andrew Geissler475cb722020-07-10 16:00:51 -050035 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
36 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
37 install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
Andrew Geissler82c905d2020-04-13 13:39:40 -050038}
39
40addtask deploy before do_build after do_install
41
Patrick Williams213cb262021-08-07 19:21:33 -050042FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
43FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
44FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
Andrew Geissler82c905d2020-04-13 13:39:40 -050045
46COMPATIBLE_HOST = "(riscv64|riscv32).*"
47INHIBIT_PACKAGE_STRIP = "1"
48
49SECURITY_CFLAGS = ""