Advertisement
Guest User

Untitled

a guest
Sep 30th, 2022
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. SUMMARY = "Edge TPU library"
  2. LICENSE = "Proprietary"
  3. LIC_FILES_CHKSUM = "file://libedgetpu/LICENSE.txt;md5=3b9bc721e87e6fe1ca09f3c923502627"
  4.  
  5. require recipes-support/common/edgetpu-common.inc
  6.  
  7. S = "${WORKDIR}/git"
  8.  
  9. RDEPENDS_${PN} = "libusb1 libcxx"
  10.  
  11. EDGETPU_THROTTLED = "1"
  12.  
  13. python __anonymous() {
  14. tunes = d.getVar("TUNE_FEATURES", True)
  15. if not tunes:
  16. return
  17.  
  18. if "aarch64" in tunes:
  19. d.setVar("LIBEDGETPU_SUFFIX", "arm64")
  20. elif "x86_64" in tunes:
  21. d.setVar("LIBEDGETPU_SUFFIX", "x86_64")
  22. elif "callconvention-hard" in tunes:
  23. d.setVar("LIBEDGETPU_SUFFIX", "arm32")
  24. else:
  25. pkgn = d.getVar("PN", True)
  26. pkgv = d.getVar("PV", True)
  27. raise bb.parse.SkipRecipe("%s-%s: unsupported ARCH: %s" % (pkgn, pkgv, tunes))
  28.  
  29.  
  30. throttled = d.getVar("EDGETPU_THROTTLED", True)
  31. if throttled:
  32. d.setVar("LIBEDGETPU_SUFFIX", d.getVar("LIBEDGETPU_SUFFIX", True) + "_throttled")
  33. }
  34.  
  35. do_install() {
  36. install -d ${D}${sysconfdir}/udev/rules.d
  37. install -m 0644 ${S}/99-edgetpu-accelerator.rules \
  38. ${D}${sysconfdir}/udev/rules.d/99-edgetpu-accelerator.rules
  39.  
  40. install -d ${D}/${libdir}
  41. install -m 755 ${S}/libedgetpu/libedgetpu_${LIBEDGETPU_SUFFIX}.so \
  42. ${D}/${libdir}/libedgetpu.so
  43. #ln -sf ${libdir}/libedgetpu.so.1.0 ${D}/${libdir}/libedgetpu.so.1
  44. #ln -sf ${libdir}/libedgetpu.so.1.0 ${D}/${libdir}/libedgetpu.so
  45.  
  46. install -d ${D}/${includedir}
  47. install -m 755 ${S}/libedgetpu/edgetpu.h ${D}/${includedir}
  48. }
  49.  
  50. TOOLCHAIN = "clang"
  51.  
  52. INSANE_SKIP_${PN} += "already-stripped"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement