visionfive2-pvr-graphics_1.17.bb 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. LICENSE="CLOSED"
  2. PROVIDES = "virtual/libgles2"
  3. COMPATIBLE_MACHINE = "starfive-visionfive2"
  4. inherit update-rc.d
  5. S = "${WORKDIR}/git"
  6. IMG_GPU_POWERVR_VERSION = "img-gpu-powervr-bin-1.17.6210866"
  7. PACKAGES += " \
  8. ${PN}-firmware \
  9. ${PN}-tools \
  10. "
  11. do_install () {
  12. tar xz --no-same-owner -f ${THISDIR}/files/${IMG_GPU_POWERVR_VERSION}.tar.gz -C ${D}
  13. # Remove .a files from tar file
  14. rm ${D}/${IMG_GPU_POWERVR_VERSION}/target/usr/local/lib/*.a
  15. rm ${D}/${IMG_GPU_POWERVR_VERSION}/target/usr/local/lib/*/*.a
  16. # Remove files that has dependency on python
  17. rm ${D}/${IMG_GPU_POWERVR_VERSION}/target/usr/local/bin/pvrlogsplit
  18. rm ${D}/${IMG_GPU_POWERVR_VERSION}/target/usr/local/bin/hwperfjsonmerge.py
  19. # Create a copy of GPU firmware at the deploy directory
  20. cp -r ${D}/${IMG_GPU_POWERVR_VERSION}/target/lib ${DEPLOY_DIR}
  21. # provided via separate arch-independent firmware package
  22. mv ${D}/${IMG_GPU_POWERVR_VERSION}/target/* ${D}
  23. rm -rf ${D}/lib/firmware
  24. rmdir ${D}/lib
  25. # cleanup unused
  26. rm -rf ${D}/${IMG_GPU_POWERVR_VERSION}
  27. }
  28. INITSCRIPT_NAME = "rc.pvr"
  29. FILES_SOLIBSDEV = ""
  30. FILES:${PN} += " \
  31. ${libdir}/*.so \
  32. /usr/local/* \
  33. /usr/lib/* \
  34. "
  35. FILES:${PN}-tools = " \
  36. ${prefix}/local/bin/ \
  37. "
  38. FILES:${PN}-firmware = " \
  39. ${base_libdir}/firmware/ \
  40. "
  41. RDEPENDS:${PN} += " \
  42. bash \
  43. libdrm \
  44. glibc \
  45. libgcc \
  46. libstdc++ \
  47. libudev \
  48. "
  49. RDEPENDS:${PN}-tools += " \
  50. python3 \
  51. "
  52. # remove warning caused by wrong lib directory
  53. INSANE_SKIP:${PN} += "libdir"
  54. INSANE_SKIP:${PN}-dbg += "libdir"
  55. INSANE_SKIP:${PN} += "already-stripped dev-so"
  56. # ignore dependency check for python scripting
  57. INSANE_SKIP:${PN}-tools += "already-stripped file-rdeps"
  58. INSANE_SKIP:${PN}-firmware += "arch"
  59. # ignore "multiple shlib providers" error
  60. EXCLUDE_FROM_SHLIBS = "1"