Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SUMMARY = "RISC-V Open Source Supervisor Binary Interface (OpenSBI)" |
| 2 | DESCRIPTION = "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 Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 3 | HOMEPAGE = "https://github.com/riscv/opensbi" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 4 | LICENSE = "BSD-2-Clause" |
| 5 | LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5" |
| 6 | |
| 7 | require opensbi-payloads.inc |
| 8 | |
| 9 | inherit autotools-brokensep deploy |
| 10 | |
Andrew Geissler | d1e8949 | 2021-02-12 15:35:20 -0600 | [diff] [blame] | 11 | SRCREV = "234ed8e427f4d92903123199f6590d144e0d9351" |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 12 | SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | file://0001-Makefile-Don-t-specify-mabi-or-march.patch \ |
| 14 | " |
| 15 | |
| 16 | S = "${WORKDIR}/git" |
| 17 | |
Andrew Geissler | 0903674 | 2021-06-25 14:25:14 -0500 | [diff] [blame] | 18 | EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | # If RISCV_SBI_PAYLOAD is set then include it as a payload |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 20 | EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}" |
| 21 | EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 22 | |
| 23 | # Required if specifying a custom payload |
| 24 | do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" |
| 25 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 26 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 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 |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 30 | rm -r ${D}/lib* |
| 31 | rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | do_deploy () { |
Andrew Geissler | 475cb72 | 2020-07-10 16:00:51 -0500 | [diff] [blame] | 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}/ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | addtask deploy before do_build after do_install |
| 41 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 42 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*" |
| 43 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*" |
| 44 | FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 45 | |
| 46 | COMPATIBLE_HOST = "(riscv64|riscv32).*" |
| 47 | INHIBIT_PACKAGE_STRIP = "1" |
| 48 | |
| 49 | SECURITY_CFLAGS = "" |