9b2bbe3422
Tested with RaspberryPi B+ and PiTFT Mini Kit - 320x240 2.8" TFT (see [1] and [2]) and the following target configuration changes: - cmdline.txt: add 'fbcon=map:10 fbcon=font:VGA8x8' - add /etc/modules-load.d/fbtft.conf with 'fbtft_device' - add /etc/modprobe.d/00-fbtft.conf with 'options fbtft_device name=adafruit28 rotate=90 gpios=dc:25' [1] http://h65951.serverkompetenz.net/PeterSeiderer/upload/PiTFT_2_8_ct/Image9893.jpg [2] http://h65951.serverkompetenz.net/PeterSeiderer/upload/PiTFT_2_8_ct/Image9897.jpg [Thomas: - Rename prompt of the Linux extension to "FB TFT drivers" - Remove the full name of the kernel config options in the help text. Giving their CONFIG_<foo> name is enough. - Remove the mention of CONFIG_SPI_BCM2708, since this makes the description RaspberryPi specific, while these drivers can work with any SPI controller. - Refactor the code in linux-ext-fbtft.mk to avoid duplication between the < 3.15 and >= 3.15 cases. - Make the fbtft package a promptless package, since there is no point in selecting only this package, without the kernel extension. - Change the license to GPLv2, since it's kernel code.] Signed-off-by: Peter Seiderer <ps.report@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
29 lines
948 B
Makefile
29 lines
948 B
Makefile
################################################################################
|
|
# 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
|