diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/Config.ext.in | 18 | ||||
-rw-r--r-- | linux/linux-ext-fbtft.mk | 28 |
2 files changed, 46 insertions, 0 deletions
diff --git a/linux/Config.ext.in b/linux/Config.ext.in index 40c468424a..8f156874f0 100644 --- a/linux/Config.ext.in +++ b/linux/Config.ext.in @@ -42,4 +42,22 @@ config BR2_LINUX_KERNEL_EXT_RTAI_PATCH help Optionally, explicitly specify the RTAI patch to use. +# fbtft +config BR2_LINUX_KERNEL_EXT_FBTFT + bool "FB TFT drivers" + select BR2_PACKAGE_FBTFT + help + Linux Framebuffer drivers for small TFT LCD display modules, + e.g. Adafruit PiTFT displays for Raspberry Pi. + + To enable fbtft, e.g. for Adafruit 2.8 PiTFT, enable the + following kernel configurations: + - CONFIG_SPI + - CONFIG_GPIOLIB + - CONFIG_FB + - CONFIG_FB_TFT + - CONFIG_FB_TFT_ILI9341 + + https://github.com/notro/fbtft + endmenu diff --git a/linux/linux-ext-fbtft.mk b/linux/linux-ext-fbtft.mk new file mode 100644 index 0000000000..36f4fd22dd --- /dev/null +++ b/linux/linux-ext-fbtft.mk @@ -0,0 +1,28 @@ +################################################################################ +# Linux fbtft extensions +# +# Patch the linux kernel with fbtft extension +################################################################################ + +ifeq ($(BR2_LINUX_KERNEL_EXT_FBTFT),y) +# Add dependency to fbtft package (download helper for the fbtft source) +LINUX_DEPENDENCIES += fbtft + +# for linux >= 3.15 install to drivers/video/fbdev/fbtft +# for linux < 3.15 install to drivers/video/fbtft +define FBTFT_PREPARE_KERNEL + if [ -e $(LINUX_DIR)/drivers/video/fbdev ]; then \ + dest=$(LINUX_DIR)/drivers/video/fbdev ; \ + else \ + dest=$(LINUX_DIR)/drivers/video/ ; \ + fi ; \ + mkdir -p $${dest}/fbtft; \ + cp -dpfr $(FBTFT_DIR)/* $${dest}/fbtft/ ; \ + echo 'source "drivers/video/fbdev/fbtft/Kconfig"' \ + >> $${dest}/Kconfig ; \ + echo 'obj-y += fbtft/' >> $${dest}/Makefile +endef + +LINUX_PRE_PATCH_HOOKS += FBTFT_PREPARE_KERNEL + +endif #BR2_LINUX_KERNEL_EXT_FBTFT |