From patchwork Tue Dec 30 23:00:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 424706 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 5E40C1400B7 for ; Wed, 31 Dec 2014 10:01:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id A01FD31158; Tue, 30 Dec 2014 23:01:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3j8ew5RVnC3k; Tue, 30 Dec 2014 23:01:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E33D230183; Tue, 30 Dec 2014 23:01:04 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 240201CE51E for ; Tue, 30 Dec 2014 23:01:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id E88528A277 for ; Tue, 30 Dec 2014 23:01:03 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bu212LxR8kb2 for ; Tue, 30 Dec 2014 23:01:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.17.20]) by whitealder.osuosl.org (Postfix) with ESMTPS id B4B598A276 for ; Tue, 30 Dec 2014 23:01:02 +0000 (UTC) Received: from [178.2.19.21] by 3capp-gmx-bs39.server.lan (via HTTP); Wed, 31 Dec 2014 00:00:58 +0100 MIME-Version: 1.0 Message-ID: From: "Peter Seiderer" To: "Yann E. MORIN" Date: Wed, 31 Dec 2014 00:00:58 +0100 Importance: normal Sensitivity: Normal In-Reply-To: <20141230223603.GC3928@free.fr> References: <1419969494-9615-1-git-send-email-ps.report@gmx.net>, <20141230223603.GC3928@free.fr> X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K0:Pn8GVi0K1vfn808ranwBRlV0sUIrlvaA+sehPHFYsl9 Ivab2iFSuUxawkkEC6RTaaQLTdJAggPGJhO/yohDCPpnXkUfY4 nkeoolTsLzw/TubFQV6wxxMR12VF8yJgWy3lfZfaX6ITAMN2ka koVKTfH2pxJF4OTZVcZpS9gcenupKxA9PB+7gESjFjIV2RYIHK zyFRMvV6mXO431oSzW8ezCUVW2DrrGHhTc3sALB0wc/x9GolwO JZpCTnQa/60pc8Vszgj72Wul4QIkRd1f3mJomrB/wbVEmEJJLz W/LE2o= X-UI-Out-Filterresults: notjunk:1; Cc: buildroot@busybox.net, Thomas Petazzoni Subject: Re: [Buildroot] [RFC v2] linux: add fbtft kernel extension X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Hello Yann, > Gesendet: Dienstag, 30. Dezember 2014 um 23:36 Uhr > Von: "Yann E. MORIN" > An: "Peter Seiderer" > Cc: buildroot@busybox.net, loucrittenden63@gmail.com, "Thomas Petazzoni" > Betreff: Re: [RFC v2] linux: add fbtft kernel extension > > Peter, All, > > On 2014-12-30 20:58 +0100, Peter Seiderer spake thusly: > > ... sorry for the resend, file linux/linux-ext-fbtft.mk was missing. > > No problem, I've marked the first iteration as "Syuperseded" in our > Patchwork. > > > First draft of a patch adding fbtft framebuffer drivers to buildroot. > > Thanks! :-) > > > 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]). > > OK, I'll be looking at it, to see why it fails. Don't expect much before > next week-end (actually, that will be next year, too! :-) ) because, > well, New Year celebrations, boring stuff like that, which I'm socially > obliged to attend... ;-) > ...as a little help my patch file for the first attempt (after the duplication of the KCONFIG_ENABLE_OPT calls after the call to oldconfig I gave up and tried the second approach)... Regards, Peter > Regards, > Yann E. MORIN. > > > 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-ext-fbtft.mk | 25 +++++++++++++++++++++++++ > > linux/linux.mk | 9 +++++++++ > > package/Config.in | 1 + > > package/fbtft/Config.in | 13 +++++++++++++ > > package/fbtft/fbtft.mk | 11 +++++++++++ > > 6 files changed, 69 insertions(+) > > create mode 100644 linux/linux-ext-fbtft.mk > > create mode 100644 package/fbtft/Config.in > > create mode 100644 package/fbtft/fbtft.mk > > > > -- > > 2.1.2 > > > > -- > .-----------------.--------------------.------------------.--------------------. > | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | > | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | > | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | > | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | > '------------------------------^-------^------------------^--------------------' > commit a3501eba4688d8438714c4dd9b0d99b4189f26b3 Author: Peter Seiderer Date: Tue Dec 30 14:52:05 2014 +0100 fbtft: new package (out of tree compile) diff --git a/linux/linux.mk b/linux/linux.mk index 8256641..058f5cf 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -196,6 +196,17 @@ 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_PACKAGE_FBTFT), + $(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_FILLRECT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_COPYAREA,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_IMAGEBLIT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_FOPS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_DEFERRED_IO,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_BACKLIGHT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI_BCM2708,$(@D)/.config)) $(if $(BR2_PACKAGE_KTAP), $(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config) $(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config) @@ -215,6 +226,17 @@ define LINUX_CONFIGURE_CMDS $(if $(BR2_LINUX_KERNEL_APPENDED_DTB), $(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config)) yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig + $(if $(BR2_PACKAGE_FBTFT), + $(call KCONFIG_ENABLE_OPT,CONFIG_FB,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_FILLRECT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_COPYAREA,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_IMAGEBLIT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_SYS_FOPS,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_DEFERRED_IO,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_FB_BACKLIGHT,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_GPIOLIB,$(@D)/.config) + $(call KCONFIG_ENABLE_OPT,CONFIG_SPI_BCM2708,$(@D)/.config)) endef ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y) 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..c66b189 --- /dev/null +++ b/package/fbtft/Config.in @@ -0,0 +1,11 @@ +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. + + 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..93b759c --- /dev/null +++ b/package/fbtft/fbtft.mk @@ -0,0 +1,22 @@ +################################################################################ +# +# fbtft +# +################################################################################ + +FBTFT_VERSION = 274035404701245e7491c0c6471c5b72ade4d491 +FBTFT_SITE = $(call github,notro,fbtft,$(FBTFT_VERSION)) +FBTFT_LICENSE = GPLv2+ + +FBTFT_DEPENDENCIES = linux + +define FBTFT_BUILD_CMDS + cd $(@D); $(MAKE) .config + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M=$(@D) +endef + +define FBTFT_INSTALL_TARGET_CMDS + $(MAKE) -C $(LINUX_DIR) $(LINUX_MAKE_FLAGS) M="$(@D)" modules_install +endef + +$(eval $(generic-package))