opensbi_0.6.bb 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. require recipes-bsp/opensbi/opensbi-payloads.inc
  6. inherit autotools-brokensep deploy
  7. SRCREV = "a98258d0b537a295f517bbc8d813007336731fa9"
  8. SRC_URI = "git://github.com/riscv/opensbi.git;branch=master \
  9. "
  10. S = "${WORKDIR}/git"
  11. EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D}"
  12. # If RISCV_SBI_PAYLOAD is set then include it as a payload
  13. EXTRA_OEMAKE_append = " ${@riscv_get_extra_oemake_image(d)}"
  14. # Required if specifying a custom payload
  15. do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
  16. do_install_append() {
  17. # In the future these might be required as a dependency for other packages.
  18. # At the moment just delete them to avoid warnings
  19. rm -r ${D}/include
  20. rm -r ${D}/lib*
  21. rm -rf ${D}/platform/${RISCV_SBI_PLAT}/lib/
  22. # rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
  23. }
  24. do_deploy () {
  25. # install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
  26. install -m 755 ${D}/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
  27. # install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
  28. }
  29. addtask deploy before do_build after do_install
  30. FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
  31. # FILES_${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
  32. FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
  33. #FILES_${PN} += "/platform/${RISCV_SBI_PLAT}/lib/libplatsbi.a"
  34. COMPATIBLE_HOST = "(riscv64|riscv32|csky).*"
  35. INHIBIT_PACKAGE_STRIP = "1"
  36. SECURITY_CFLAGS = ""