bcm2835_1.73.bb 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. DESCRIPTION = "Package that provides access to GPIO and other IO\
  2. functions on the Broadcom BCM 2835 chip, allowing access to the\
  3. GPIO pins on the 26 pin IDE plug on the RPi board"
  4. SECTION = "base"
  5. HOMEPAGE = "http://www.open.com.au/mikem/bcm2835"
  6. AUTHOR = "Mike McCauley (mikem@open.com.au)"
  7. LICENSE = "GPL-3.0-only"
  8. LIC_FILES_CHKSUM = "file://COPYING;md5=e49f4652534af377a713df3d9dec60cb"
  9. COMPATIBLE_MACHINE = "^rpi$"
  10. SRC_URI = "http://www.airspayce.com/mikem/bcm2835/bcm2835-${PV}.tar.gz"
  11. SRC_URI[sha256sum] = "e67a986462618988a5a86752e36e3ebdd7c5cae66940ff7330aea243b2762525"
  12. inherit autotools
  13. do_compile:append() {
  14. # Now compiling the examples provided by the package
  15. mkdir -p ${B}/examples/spiram
  16. for file in `ls ${S}/examples`; do
  17. example="$file"
  18. if [ "$file" = "spiram" ]; then
  19. # This includes a tiny library
  20. EXAMPLE_LDFLAGS="-L${B}/examples/spiram -lspiram"
  21. example="spiram_test"
  22. ${CC} ${CFLAGS} -c ${S}/examples/spiram/spiram.c -o ${B}/examples/spiram/libspiram.o -I${S}/src -I${S}/examples/spiram
  23. rm -f ${B}/examples/spiram/libspiram.a && ${BUILD_AR} crD ${B}/examples/spiram/libspiram.a ${B}/examples/spiram/libspiram.o
  24. fi
  25. ${CC} ${LDFLAGS} ${S}/examples/${file}/${example}.c -o ${B}/examples/${example} -Bstatic -L${B}/src -lbcm2835 ${EXAMPLE_LDFLAGS} -I${S}/src
  26. done
  27. }
  28. do_install:append() {
  29. install -d ${D}/${libdir}/${BPN}
  30. for example in $(find ${B}/examples -type f -maxdepth 1)
  31. do
  32. install -m 0755 ${example} ${D}/${libdir}/${BPN}
  33. done
  34. }
  35. PACKAGES += "${PN}-tests"
  36. RDEPENDS:${PN}-dev = ""
  37. FILES:${PN} = ""
  38. FILES:${PN}-tests = "${libdir}/${BPN}"
  39. FILES:${PN}-dbg += "${libdir}/${BPN}/.debug"