blob: cf37a411766b782fa63d7a0dcc68bed0712a4fe3 [file] [log] [blame]
Patrick Williamsac13d5f2023-11-24 18:59:46 -06001SUMMARY = "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
Patrick Williamsf52e3dd2024-01-26 13:04:43 -060011SRCREV = "a2b255b88918715173942f2c5e1f97ac9e90c877"
12SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https"
Patrick Williamsac13d5f2023-11-24 18:59:46 -060013
14S = "${WORKDIR}/git"
15
Patrick Williams73bd93f2024-02-20 08:07:48 -060016TARGET_CC_ARCH += "${LDFLAGS}"
17
Patrick Williamsf52e3dd2024-01-26 13:04:43 -060018EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=y CLANG_TARGET= "
Patrick Williamsac13d5f2023-11-24 18:59:46 -060019# If RISCV_SBI_PAYLOAD is set then include it as a payload
20EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
21EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
22
23# Required if specifying a custom payload
24do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
25
26do_install:append() {
27 # 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
30 rm -r ${D}/lib*
31 rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
32}
33
34do_deploy () {
35 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}/
38}
39
40addtask deploy before do_build after do_install
41
42FILES:${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.*"
45
46COMPATIBLE_HOST = "(riscv64|riscv32).*"
47INHIBIT_PACKAGE_STRIP = "1"