linux-ext-fbtft.mk 948 B

12345678910111213141516171819202122232425262728
  1. ################################################################################
  2. # Linux fbtft extensions
  3. #
  4. # Patch the linux kernel with fbtft extension
  5. ################################################################################
  6. ifeq ($(BR2_LINUX_KERNEL_EXT_FBTFT),y)
  7. # Add dependency to fbtft package (download helper for the fbtft source)
  8. LINUX_DEPENDENCIES += fbtft
  9. # for linux >= 3.15 install to drivers/video/fbdev/fbtft
  10. # for linux < 3.15 install to drivers/video/fbtft
  11. define FBTFT_PREPARE_KERNEL
  12. if [ -e $(LINUX_DIR)/drivers/video/fbdev ]; then \
  13. dest=$(LINUX_DIR)/drivers/video/fbdev ; \
  14. else \
  15. dest=$(LINUX_DIR)/drivers/video/ ; \
  16. fi ; \
  17. mkdir -p $${dest}/fbtft; \
  18. cp -dpfr $(FBTFT_DIR)/* $${dest}/fbtft/ ; \
  19. echo 'source "drivers/video/fbdev/fbtft/Kconfig"' \
  20. >> $${dest}/Kconfig ; \
  21. echo 'obj-y += fbtft/' >> $${dest}/Makefile
  22. endef
  23. LINUX_PRE_PATCH_HOOKS += FBTFT_PREPARE_KERNEL
  24. endif #BR2_LINUX_KERNEL_EXT_FBTFT