opensbi_1.2.bb 2.8 KB

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