All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC] linux: add fbtft kernel extension
@ 2014-12-30 19:30 Peter Seiderer
  2014-12-30 19:30 ` Peter Seiderer
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Seiderer @ 2014-12-30 19:30 UTC (permalink / raw)
  To: buildroot

First draft of a patch adding fbtft framebuffer drivers to buildroot.

My first attempt was using the out of tree kernel modules compile
(as suggested by Yann E. MORIN [1]) which is already (partly)
supported by the fbtft source, but I failed to enable some
needed kernel configurations e.g FB_DEFERRED_IO (did not survive
the oldconfig/silentoldconfig step when not referenced in tree,
workaround is to enable a built in feature with the same
preferences [2]).

The second attempt is the linux-ext approach (as presented here).

I am unsure if the enabling of CONFIG_SPI_BCM2708 belongs into
linux.mk or should go into raspberrypi_defconfig or belongs into
the appropriate Readme?

The second question is about the 25 submodules of fbtft
(at the moment only FB_TFT_ILI9340 and FB_TFT_ILI9341 are
enabled). Should every submodule be configurable or should all
submodules be enabled by default?

There is an adafruit fork of the fbtft repository [4] with some
adfruit specific enhancements...

Regards,
Peter

Tested with RaspberryPi B+ and PiTFT Mini Kit - 320x240 2.8" TFT
(see [5] and [6]) and the following 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://lists.busybox.net/pipermail/buildroot/2014-December/115770.html
[2] https://github.com/notro/fbtft/issues/209#issuecomment-68191514
[3] http://www.adafruit.com/products/1983
[4] https://github.com/adafruit/adafruit-rpi-fbtft
[5] http://h65951.serverkompetenz.net/PeterSeiderer/upload/PiTFT_2_8_ct/Image9893.jpg
[6] http://h65951.serverkompetenz.net/PeterSeiderer/upload/PiTFT_2_8_ct/Image9897.jpg

Peter Seiderer (1):
  linux: add fbtft kernel extension

 linux/Config.ext.in     | 10 ++++++++++
 linux/linux.mk          |  9 +++++++++
 package/Config.in       |  1 +
 package/fbtft/Config.in | 13 +++++++++++++
 package/fbtft/fbtft.mk  | 11 +++++++++++
 5 files changed, 44 insertions(+)
 create mode 100644 package/fbtft/Config.in
 create mode 100644 package/fbtft/fbtft.mk

-- 
2.1.2

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] [RFC] linux: add fbtft kernel extension
  2014-12-30 19:30 [Buildroot] [RFC] linux: add fbtft kernel extension Peter Seiderer
@ 2014-12-30 19:30 ` Peter Seiderer
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Seiderer @ 2014-12-30 19:30 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 linux/Config.ext.in     | 10 ++++++++++
 linux/linux.mk          |  9 +++++++++
 package/Config.in       |  1 +
 package/fbtft/Config.in | 13 +++++++++++++
 package/fbtft/fbtft.mk  | 11 +++++++++++
 5 files changed, 44 insertions(+)
 create mode 100644 package/fbtft/Config.in
 create mode 100644 package/fbtft/fbtft.mk

diff --git a/linux/Config.ext.in b/linux/Config.ext.in
index 40c4684..583c250 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -42,4 +42,14 @@ config BR2_LINUX_KERNEL_EXT_RTAI_PATCH
 	help
 	  Optionally, explicitly specify the RTAI patch to use.
 
+# fbtft
+config BR2_LINUX_KERNEL_EXT_FBTFT
+	bool "fbtft patch"
+	select BR2_PACKAGE_FBTFT
+	help
+	  Linux Framebuffer drivers for small TFT LCD display modules,
+	  e.g. Adafruit PiTFT displays for Raspberry Pi.
+
+	  https://github.com/notro/fbtft
+
 endmenu
diff --git a/linux/linux.mk b/linux/linux.mk
index 8256641..1fc0159 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -196,6 +196,15 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
+	$(if $(BR2_LINUX_KERNEL_EXT_FBTFT),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config)
+		$(call KCONFIG_SET_OPT,CONFIG_FB_TFT,m,$(@D)/.config)
+		$(call KCONFIG_SET_OPT,CONFIG_FB_TFT_ILI9340,m,$(@D)/.config)
+		$(call KCONFIG_SET_OPT,CONFIG_FB_TFT_ILI9341,m,$(@D)/.config)
+		$(call KCONFIG_SET_OPT,CONFIG_FB_TFT_FBTFT_DEVICE,m,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SPI,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_SPI_BCM2708,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB,$(@D)/.config))
 	$(if $(BR2_PACKAGE_KTAP),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config)
diff --git a/package/Config.in b/package/Config.in
index 3b37bb2..c658a28 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -311,6 +311,7 @@ endif
 	source "package/evemu/Config.in"
 	source "package/evtest/Config.in"
 	source "package/fan-ctrl/Config.in"
+	source "package/fbtft/Config.in"
 	source "package/fconfig/Config.in"
 	source "package/fis/Config.in"
 	source "package/flashrom/Config.in"
diff --git a/package/fbtft/Config.in b/package/fbtft/Config.in
new file mode 100644
index 0000000..eceea85
--- /dev/null
+++ b/package/fbtft/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_FBTFT
+	bool "fbtft"
+	depends on BR2_LINUX_KERNEL
+	help
+	  Linux Framebuffer drivers for small TFT LCD display modules,
+	  e.g. Adafruit PiTFT displays for Raspberry Pi.
+
+	  This is only the download helper for the kernel patch.
+
+	  https://github.com/notro/fbtft
+
+comment "fbtft needs a Linux kernel to be built"
+	depends on !BR2_LINUX_KERNEL
diff --git a/package/fbtft/fbtft.mk b/package/fbtft/fbtft.mk
new file mode 100644
index 0000000..9f46bdb
--- /dev/null
+++ b/package/fbtft/fbtft.mk
@@ -0,0 +1,11 @@
+################################################################################
+#
+# fbtft
+#
+################################################################################
+
+FBTFT_VERSION = 274035404701245e7491c0c6471c5b72ade4d491
+FBTFT_SITE = $(call github,notro,fbtft,$(FBTFT_VERSION))
+FBTFT_LICENSE = GPLv2+
+
+$(eval $(generic-package))
-- 
2.1.2

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-30 19:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-30 19:30 [Buildroot] [RFC] linux: add fbtft kernel extension Peter Seiderer
2014-12-30 19:30 ` Peter Seiderer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.