bcm2835_1.71.bb 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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[md5sum] = "9bd2d39bf4b3a9e81dce799ca51c826a"
  12. SRC_URI[sha256sum] = "564920d205977d7e2846e434947708455d468d3a952feca9faef643abd03a227"
  13. inherit autotools
  14. do_compile:append() {
  15. # Now compiling the examples provided by the package
  16. mkdir -p ${B}/examples/spiram
  17. for file in `ls ${S}/examples`; do
  18. example="$file"
  19. if [ "$file" = "spiram" ]; then
  20. # This includes a tiny library
  21. EXAMPLE_LDFLAGS="-L${B}/examples/spiram -lspiram"
  22. example="spiram_test"
  23. ${CC} ${CFLAGS} -c ${S}/examples/spiram/spiram.c -o ${B}/examples/spiram/libspiram.o -I${S}/src -I${S}/examples/spiram
  24. rm -f ${B}/examples/spiram/libspiram.a && ${BUILD_AR} crD ${B}/examples/spiram/libspiram.a ${B}/examples/spiram/libspiram.o
  25. fi
  26. ${CC} ${LDFLAGS} ${S}/examples/${file}/${example}.c -o ${B}/examples/${example} -Bstatic -L${B}/src -lbcm2835 ${EXAMPLE_LDFLAGS} -I${S}/src
  27. done
  28. }
  29. do_install:append() {
  30. install -d ${D}/${libdir}/${BPN}
  31. for example in $(find ${B}/examples -type f -maxdepth 1)
  32. do
  33. install -m 0755 ${example} ${D}/${libdir}/${BPN}
  34. done
  35. }
  36. PACKAGES += "${PN}-tests"
  37. RDEPENDS:${PN}-dev = ""
  38. FILES:${PN} = ""
  39. FILES:${PN}-tests = "${libdir}/${BPN}"
  40. FILES:${PN}-dbg += "${libdir}/${BPN}/.debug"