Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <sys/types.h>
  4. #include <sys/stat.h>
  5. #include <fcntl.h>
  6. #include <sys/ioctl.h>
  7. #include <unistd.h>
  8. #include <asm/arch/mxcfb.h>
  9.  
  10. int main(int argc, char **argv)
  11. {
  12. struct mxcfb_gbl_alpha alpha;
  13. int fbdev_fd;
  14.  
  15. if (argc != 2){
  16. printf("Usage: %s alpha <0-255>\n", argv[0]);
  17. printf("\t0 = fully opaque\n");
  18. return -1;
  19. }
  20.  
  21. fbdev_fd = open("/dev/fb1", O_RDWR, 0);
  22.  
  23. alpha.enable = 1;
  24. alpha.alpha = atoi(argv[1]);
  25. ioctl(fbdev_fd, MXCFB_SET_GBL_ALPHA, &alpha);
  26. close(fbdev_fd);
  27. return 0;
  28. }
  29.  
  30. recipe:
  31. DESCRIPTION = "Application to send alpha ioctl to overlay fb"
  32. LICENSE = "MIT"
  33. LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
  34.  
  35. SRC_URI = "file://fbalpha.c"
  36.  
  37. do_compile() {
  38. echo "${CC} -I ${STAGING_KERNEL_DIR}/include/linux ../fbalpha.c -o fbalpha"
  39. #${CC} -L ${STAGING_KERNEL_DIR} -L ${STAGING_KERNEL_DIR}/include/linux -I ${STAGING_KERNEL_DIR}/include/uapi/linux ../fbalpha.c -o fbalpha
  40. ${CC} -I${STAGING_KERNEL_DIR}/include ../fbalpha.c -o fbalpha
  41. }
  42.  
  43. do_install() {
  44. install -d ${D}${bindir}
  45. install -m 0755 fbalpha ${D}${bindir}
  46. }
  47.  
  48. output:
  49. | arm-poky-linux-gnueabi-gcc -march=armv7-a -mfloat-abi=hard -mfpu=neon -mtune=cortex-a9 --sysroot=/home/bodangly/devel/client.gstreamer-imx/client_brd/tmp/sysroots/edm1-cf-imx6 -I /home/bodangly/devel/client.gstreamer-imx/client_brd/tmp/work-shared/edm1-cf-imx6/kernel-source/include/linux ../fbalpha.c -o fbalpha
  50. | ../fbalpha.c:8:30: fatal error: asm/arch/mxcfb.h: No such file or directory
  51. | compilation terminated.
  52. | WARNING: exit code 1 from a shell command.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement