opensbi_1.2.bb 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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 = "df3de2f059c8c7edd1ba48ea43e6d8b93553a58a"
  9. SRC_URI = "git://git@192.168.110.45/starfive-tech/opensbi.git;protocol=ssh;branch=starfive-v1.2-dubhe"
  10. SRC_URI:remove:nezha = " \
  11. file://0001-lib-utils-fdt-Require-match-data-to-be-const.patch \
  12. file://0002-lib-utils-timer-Add-a-separate-compatible-for-the-D1.patch \
  13. "
  14. S = "${WORKDIR}/git"
  15. #EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_PIC=n CLANG_TARGET= "
  16. EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} PLATFORM_DEFCONFIG=starfive_defconfig I=${D} FW_PIC=n CLANG_TARGET= "
  17. # If RISCV_SBI_PAYLOAD is set then include it as a payload
  18. EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
  19. EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
  20. # Required if specifying a custom payload
  21. do_compile[depends] += "${@riscv_get_do_compile_depends(d)}"
  22. do_install:append() {
  23. # In the future these might be required as a dependency for other packages.
  24. # At the moment just delete them to avoid warnings
  25. rm -r ${D}/include
  26. rm -r ${D}/lib*
  27. rm -r ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/payloads
  28. }
  29. do_deploy () {
  30. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.* ${DEPLOYDIR}/
  31. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.* ${DEPLOYDIR}/
  32. install -m 755 ${D}/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.* ${DEPLOYDIR}/
  33. }
  34. addtask deploy before do_build after do_install
  35. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_jump.*"
  36. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_payload.*"
  37. FILES:${PN} += "/share/opensbi/*/${RISCV_SBI_PLAT}/firmware/fw_dynamic.*"
  38. COMPATIBLE_HOST = "(riscv64|riscv32).*"
  39. INHIBIT_PACKAGE_STRIP = "1"
  40. SECURITY_CFLAGS = ""