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." |
| 3 | LICENSE = "BSD-2-Clause" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5" |
| 5 | |
| 6 | require opensbi-payloads.inc |
| 7 | |
| 8 | inherit autotools-brokensep deploy |
| 9 | |
| 10 | SRCREV = "ac5e821d50be631f26274765a59bc1b444ffd862" |
| 11 | SRC_URI = "git://github.com/riscv/opensbi.git \ |
| 12 | file://0001-Makefile-Don-t-specify-mabi-or-march.patch \ |
| 13 | " |
| 14 | |
| 15 | S = "${WORKDIR}/git" |
| 16 | |
| 17 | EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}" |
| 18 | # If RISCV_SBI_PAYLOAD is set then include it as a payload |
| 19 | EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}" |
| 20 | |
| 21 | # Required if specifying a custom payload |
| 22 | do_compile[depends] += "${@riscv_get_do_compile_depends(d)}" |
| 23 | |
| 24 | do_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 |
| 28 | rm -r ${D}/platform/${RISCV_SBI_PLAT}/lib |
| 29 | rm -r ${D}/platform/${RISCV_SBI_PLAT}/firmware/payloads |
| 30 | rm -r ${D}/lib |
| 31 | } |
| 32 | |
| 33 | do_deploy () { |
| 34 | install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/ |
| 35 | install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/ |
| 36 | install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/ |
| 37 | } |
| 38 | |
| 39 | addtask deploy before do_build after do_install |
| 40 | |
| 41 | FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.*" |
| 42 | FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_payload.*" |
| 43 | FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*" |
| 44 | |
| 45 | COMPATIBLE_HOST = "(riscv64|riscv32).*" |
| 46 | INHIBIT_PACKAGE_STRIP = "1" |
| 47 | |
| 48 | SECURITY_CFLAGS = "" |