opensbi_0.9.bb 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. HOMEPAGE = "https://github.com/riscv/opensbi"
  4. LICENSE = "BSD-2-Clause"
  5. LIC_FILES_CHKSUM = "file://COPYING.BSD;md5=42dd9555eb177f35150cf9aa240b61e5"
  6. require opensbi-payloads.inc
  7. inherit autotools-brokensep deploy
  8. SRCREV = "234ed8e427f4d92903123199f6590d144e0d9351"
  9. SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https \
  10. file://0001-Makefile-Don-t-specify-mabi-or-march.patch \
  11. "
  12. S = "${WORKDIR}/git"
  13. EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n"
  14. # If RISCV_SBI_PAYLOAD is set then include it as a payload
  15. EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
  16. EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
  17. # Required if specifying a custom payload
  18. do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
  19. do_install:append() {
  20. # In the future these might be required as a dependency for other packages.
  21. # At the moment just delete them to avoid warnings
  22. rm -r ${D}/include
  23. rm -r ${D}/lib*
  24. rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
  25. }
  26. do_deploy () {
  27. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
  28. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
  29. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
  30. }
  31. addtask deploy before do_build after do_install
  32. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
  33. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
  34. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
  35. COMPATIBLE_HOST = "(riscv64|riscv32).*"
  36. INHIBIT_PACKAGE_STRIP = "1"
  37. SECURITY_CFLAGS = ""
  38. SRC_URI = "git://github.com/starfive-tech/opensbi.git;protocol=https;branch=starfive-v1.0-dubhe"
  39. SRCREV = "066e15f65ca1e71fecf531d0c7c9b49774d414e9"
  40. INSANE_SKIP_${PN}-dev = "ldflags"
  41. INSANE_SKIP_${PN} = "ldflags"