All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
@ 2015-01-10 20:48 Peter Seiderer
  2015-01-10 21:00 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2015-01-10 20:48 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sat, Jan 10, 2015 at 03:27:40PM +0100, Thomas Petazzoni wrote:
> Dear Peter Seiderer,
> 
> On Sat,  3 Jan 2015 21:01:47 +0100, Peter Seiderer wrote:
> > 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
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> 
> Thanks, applied, after doing a bunch of (hopefully) improvements:
> 
>     [Thomas:
>       - Rename prompt of the Linux extension to "FB TFT drivers"

Looks much better...

>       - Remove the full name of the kernel config options in the help
>         text. Giving their CONFIG_<foo> name is enough.

O.k.

>       - Remove the mention of CONFIG_SPI_BCM2708, since this makes the
>         description RaspberryPi specific, while these drivers can work
>         with any SPI controller.

Maybe add some hint to not forget to enable platform specific spi driver
would be helpful?

>       - Refactor the code in linux-ext-fbtft.mk to avoid duplication
>         between the < 3.15 and >= 3.15 cases.

Thanks, your solution is a lot better...

>       - Make the fbtft package a promptless package, since there is no
>         point in selecting only this package, without the kernel
>         extension.

O.k.

>       - Change the license to GPLv2, since it's kernel code.]

Mhhh, in some way your are right, but it seems wrong for me that the
buildroot license entry does not reflect what the package author stated
in his own files....what would be the right buildroot entry in case
of dual-license files?

Thanks for committing...

Regards,
Peter

> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
  2015-01-10 20:48 [Buildroot] [PATCH v3] linux: add fbtft kernel extension Peter Seiderer
@ 2015-01-10 21:00 ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-01-10 21:00 UTC (permalink / raw)
  To: buildroot

Dear Peter Seiderer,

On Sat, 10 Jan 2015 21:48:32 +0100, Peter Seiderer wrote:

> >       - Remove the mention of CONFIG_SPI_BCM2708, since this makes the
> >         description RaspberryPi specific, while these drivers can work
> >         with any SPI controller.
> 
> Maybe add some hint to not forget to enable platform specific spi driver
> would be helpful?

Sure, feel free to send some follow-up patch.


> >       - Change the license to GPLv2, since it's kernel code.]
> 
> Mhhh, in some way your are right, but it seems wrong for me that the
> buildroot license entry does not reflect what the package author stated
> in his own files....what would be the right buildroot entry in case
> of dual-license files?

That's a good question. I really wonder how the original author can
license those files under GPLv2+, while the kernel license is GPLv2
only. I think the original author is wrong on this.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
  2015-01-11 13:16 Peter Seiderer
@ 2015-01-11 14:00 ` Richard Fergusson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Fergusson @ 2015-01-11 14:00 UTC (permalink / raw)
  To: buildroot

You're welcome. Your patch does indeed look better than my edit. It was 
just something I threw together to check my theory. I'm definitely no 
export on writing makefiles or shell scripts.

- Richard

On 11/01/15 23:46, Peter Seiderer wrote:
> Hello Richard,
>
> On Sun, Jan 11, 2015 at 04:04:42PM +1030, Richard Fergusson wrote:
>> Not sure I'm doing this right, but here goes. With this extension
>> enabled the kernel will not build. It gives the error below. The
>> problem seems to be with line 21 of linux-ext-fbtft.mk. I have
>> edited the file to make it work and have attached the changed file.
>
> Many thanks for testing and reporting this bug (introduced by Thomas
> on beautifying by original patch and I did not catch the bug on
> review), patch will follow soon (a little different from yours to
> avoid the double if statement)...
>
> Regards,
> Peter
>
>>
>> - Richard
>>
>> $ make linux
>>>>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Download
>> additional patches
>>>>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Extracting
>> gzip -d -c /home/richard/buildroot/dl/linux-c256eb9968c8997dce47350d2075e42f1b3991d3.tar.gz
>> | tar --strip-components=1 -C /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
>> -xf -
>>>>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Patching
>> if [ -e /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev
>> ]; then dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev
>> ; else dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/
>> ; fi ; mkdir -p ${dest}/fbtft; cp -dpfr /home/richard/buildroot/output/build/fbtft-274035404701245e7491c0c6471c5b72ade4d491/*
>> ${dest}/fbtft/ ; echo 'source "drivers/video/fbdev/fbtft/Kconfig"'
>>>> ${dest}/Kconfig ; echo 'obj-y += fbtft/' >> ${dest}/Makefile
>> for p in board/raspi/kernel-patches/ ; do if echo $p | grep -q -E
>> "^ftp://|^http://" ; then support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
>> /home/richard/buildroot/dl `basename $p` ; elif test -d $p ; then
>> support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
>> $p linux-\*.patch ; else support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
>> `dirname $p` `basename $p` ; fi done
>>>>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Configuring
>> /usr/bin/install -m 0644 "board/raspi/linux.config" /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/arch/arm/configs/buildroot_defconfig
>> PATH="/home/richard/buildroot/output/host/bin:/home/richard/buildroot/output/host/sbin:/home/richard/buildroot/output/host/usr/bin:/home/richard/buildroot/output/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools"
>> /usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
>> INSTALL_MOD_PATH=/home/richard/buildroot/output/target
>> CROSS_COMPILE=" /home/richard/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-"
>> DEPMOD=/home/richard/buildroot/output/host/sbin/depmod -C /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
>> buildroot_defconfig
>> make[1]: Entering directory '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
>>    HOSTCC  scripts/basic/fixdep
>>    HOSTCC  scripts/kconfig/conf.o
>>    SHIPPED scripts/kconfig/zconf.tab.c
>>    SHIPPED scripts/kconfig/zconf.lex.c
>>    SHIPPED scripts/kconfig/zconf.hash.c
>>    HOSTCC  scripts/kconfig/zconf.tab.o
>>    HOSTLD  scripts/kconfig/conf
>> drivers/video/Kconfig:2525: can't open file
>> "drivers/video/fbdev/fbtft/Kconfig"
>> /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/scripts/kconfig/Makefile:105:
>> recipe for target 'buildroot_defconfig' failed
>> make[2]: *** [buildroot_defconfig] Error 1
>> Makefile:503: recipe for target 'buildroot_defconfig' failed
>> make[1]: *** [buildroot_defconfig] Error 2
>> make[1]: Leaving directory '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
>> package/pkg-generic.mk:172: recipe for target '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured'
>> failed
>> make: *** [/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured]
>> Error 2
>>

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
@ 2015-01-11 13:16 Peter Seiderer
  2015-01-11 14:00 ` Richard Fergusson
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2015-01-11 13:16 UTC (permalink / raw)
  To: buildroot

Hello Richard,

On Sun, Jan 11, 2015 at 04:04:42PM +1030, Richard Fergusson wrote:
> Not sure I'm doing this right, but here goes. With this extension
> enabled the kernel will not build. It gives the error below. The
> problem seems to be with line 21 of linux-ext-fbtft.mk. I have
> edited the file to make it work and have attached the changed file.

Many thanks for testing and reporting this bug (introduced by Thomas
on beautifying by original patch and I did not catch the bug on
review), patch will follow soon (a little different from yours to
avoid the double if statement)...

Regards,
Peter

> 
> - Richard
> 
> $ make linux
> >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Download
> additional patches
> >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Extracting
> gzip -d -c /home/richard/buildroot/dl/linux-c256eb9968c8997dce47350d2075e42f1b3991d3.tar.gz
> | tar --strip-components=1 -C /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
> -xf -
> >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Patching
> if [ -e /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev
> ]; then dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev
> ; else dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/
> ; fi ; mkdir -p ${dest}/fbtft; cp -dpfr /home/richard/buildroot/output/build/fbtft-274035404701245e7491c0c6471c5b72ade4d491/*
> ${dest}/fbtft/ ; echo 'source "drivers/video/fbdev/fbtft/Kconfig"'
> >> ${dest}/Kconfig ; echo 'obj-y += fbtft/' >> ${dest}/Makefile
> for p in board/raspi/kernel-patches/ ; do if echo $p | grep -q -E
> "^ftp://|^http://" ; then support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
> /home/richard/buildroot/dl `basename $p` ; elif test -d $p ; then
> support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
> $p linux-\*.patch ; else support/scripts/apply-patches.sh /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
> `dirname $p` `basename $p` ; fi done
> >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Configuring
> /usr/bin/install -m 0644 "board/raspi/linux.config" /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/arch/arm/configs/buildroot_defconfig
> PATH="/home/richard/buildroot/output/host/bin:/home/richard/buildroot/output/host/sbin:/home/richard/buildroot/output/host/usr/bin:/home/richard/buildroot/output/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools"
> /usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm
> INSTALL_MOD_PATH=/home/richard/buildroot/output/target
> CROSS_COMPILE=" /home/richard/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-"
> DEPMOD=/home/richard/buildroot/output/host/sbin/depmod -C /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3
> buildroot_defconfig
> make[1]: Entering directory '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
>   HOSTCC  scripts/basic/fixdep
>   HOSTCC  scripts/kconfig/conf.o
>   SHIPPED scripts/kconfig/zconf.tab.c
>   SHIPPED scripts/kconfig/zconf.lex.c
>   SHIPPED scripts/kconfig/zconf.hash.c
>   HOSTCC  scripts/kconfig/zconf.tab.o
>   HOSTLD  scripts/kconfig/conf
> drivers/video/Kconfig:2525: can't open file
> "drivers/video/fbdev/fbtft/Kconfig"
> /home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/scripts/kconfig/Makefile:105:
> recipe for target 'buildroot_defconfig' failed
> make[2]: *** [buildroot_defconfig] Error 1
> Makefile:503: recipe for target 'buildroot_defconfig' failed
> make[1]: *** [buildroot_defconfig] Error 2
> make[1]: Leaving directory '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
> package/pkg-generic.mk:172: recipe for target '/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured'
> failed
> make: *** [/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured]
> Error 2
> 

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

* [Buildroot]  [PATCH v3] linux: add fbtft kernel extension
@ 2015-01-11  5:34 Richard Fergusson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Fergusson @ 2015-01-11  5:34 UTC (permalink / raw)
  To: buildroot

Not sure I'm doing this right, but here goes. With this extension 
enabled the kernel will not build. It gives the error below. The problem 
seems to be with line 21 of linux-ext-fbtft.mk. I have edited the file 
to make it work and have attached the changed file.

- Richard

$ make linux
 >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Download additional 
patches
 >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Extracting
gzip -d -c 
/home/richard/buildroot/dl/linux-c256eb9968c8997dce47350d2075e42f1b3991d3.tar.gz 
| tar --strip-components=1 -C 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 
-xf -
 >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Patching
if [ -e 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev 
]; then 
dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/fbdev 
; else 
dest=/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/drivers/video/ 
; fi ; mkdir -p ${dest}/fbtft; cp -dpfr 
/home/richard/buildroot/output/build/fbtft-274035404701245e7491c0c6471c5b72ade4d491/* 
${dest}/fbtft/ ; echo 'source "drivers/video/fbdev/fbtft/Kconfig"' >> 
${dest}/Kconfig ; echo 'obj-y += fbtft/' >> ${dest}/Makefile
for p in board/raspi/kernel-patches/ ; do if echo $p | grep -q -E 
"^ftp://|^http://" ; then support/scripts/apply-patches.sh 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 
/home/richard/buildroot/dl `basename $p` ; elif test -d $p ; then 
support/scripts/apply-patches.sh 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 
$p linux-\*.patch ; else support/scripts/apply-patches.sh 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 
`dirname $p` `basename $p` ; fi done
 >>> linux c256eb9968c8997dce47350d2075e42f1b3991d3 Configuring
/usr/bin/install -m 0644 "board/raspi/linux.config" 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/arch/arm/configs/buildroot_defconfig
PATH="/home/richard/buildroot/output/host/bin:/home/richard/buildroot/output/host/sbin:/home/richard/buildroot/output/host/usr/bin:/home/richard/buildroot/output/host/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools:/home/richard/Android/adt-bundle-linux-x86-20130514/sdk/platform-tools" 
/usr/bin/make -j1 HOSTCC="/usr/bin/gcc" HOSTCFLAGS="" ARCH=arm 
INSTALL_MOD_PATH=/home/richard/buildroot/output/target CROSS_COMPILE=" 
/home/richard/buildroot/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-" 
DEPMOD=/home/richard/buildroot/output/host/sbin/depmod -C 
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 
buildroot_defconfig
make[1]: Entering directory 
'/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
   HOSTCC  scripts/basic/fixdep
   HOSTCC  scripts/kconfig/conf.o
   SHIPPED scripts/kconfig/zconf.tab.c
   SHIPPED scripts/kconfig/zconf.lex.c
   SHIPPED scripts/kconfig/zconf.hash.c
   HOSTCC  scripts/kconfig/zconf.tab.o
   HOSTLD  scripts/kconfig/conf
drivers/video/Kconfig:2525: can't open file 
"drivers/video/fbdev/fbtft/Kconfig"
/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/scripts/kconfig/Makefile:105: 
recipe for target 'buildroot_defconfig' failed
make[2]: *** [buildroot_defconfig] Error 1
Makefile:503: recipe for target 'buildroot_defconfig' failed
make[1]: *** [buildroot_defconfig] Error 2
make[1]: Leaving directory 
'/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3'
package/pkg-generic.mk:172: recipe for target 
'/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured' 
failed
make: *** 
[/home/richard/buildroot/output/build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3/.stamp_configured] 
Error 2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-ext-fbtft.mk
Type: text/x-makefile
Size: 1093 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150111/12b9dd32/attachment.bin>

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
  2015-01-03 20:01 Peter Seiderer
@ 2015-01-10 14:27 ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-01-10 14:27 UTC (permalink / raw)
  To: buildroot

Dear Peter Seiderer,

On Sat,  3 Jan 2015 21:01:47 +0100, Peter Seiderer wrote:
> 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
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Thanks, applied, after doing a bunch of (hopefully) improvements:

    [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.]

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
@ 2015-01-05 13:45 Peter Seiderer
  0 siblings, 0 replies; 8+ messages in thread
From: Peter Seiderer @ 2015-01-05 13:45 UTC (permalink / raw)
  To: buildroot

Hello 'thebestofall007',

first: please use e-mail with a real name, its much nicer to answer
to real persons ;-)

second: please keep  buildroot at busybox.net on CC, others will be interested
in the answers too (or will answer with useful hints)...

and last some real answers ;-)
 
On Mon, Jan 05, 2015 at 01:48:32AM -0600, thebestofall007 . wrote:
> I found the patch and am in the process of applying it to buildroot. I
> added the path to the patch on my system to the BR2_LINUX_KERNEL_PATCH
> field in the make xconfig/menuconfig setup (is that how you applied the
> patch and got it to work?). Furthermore, fergie4000 was able to apply the
> patch to the build and got the modules to build against buildroot, as per
> here: https://github.com/notro/fbtft/issues/209#issuecomment-68645175. I'm
> scratching my head to figure out the steps to reproduce fergie's successful
> build for my application, but I figure once I do, I bet it will be super
> easy.
> 

The following sequence of commands should work:

- prepare buildroot (or use your already downloaded version):
        $ mkdir tmp
        $ cd tmp/
        $ wget http://buildroot.uclibc.org/downloads/buildroot-2014.11.tar.bz2
        $ tar -xvjf buildroot-2014.11.tar.bz2

- download my latest patch from patchwork:
        $ wget -O v3-linux-add-fbtft-kernel-extension.patch https://patchwork.ozlabs.org/patch/425126/mbox/

- patch the buildroot package:
        $ cd buildroot-2014.11/
        $ patch -p 1 < ../v3-linux-add-fbtft-kernel-extension.patch
        $ cd ..

- start a fresch build
        $ mkdir build_rpi_001
        $ cd build_rpi_001/
        $ make O=$PWD -C ../buildroot-2014.11 raspberrypi_defconfig

- and go to buildroot menuconfig, enable Kernel --> Linux Kernel Extensions --> fbtft patch
        $ make menuconfig
        $ make

- the linux source under build/linux-c256eb9968c8997dce47350d2075e42f1b3991d3 will be with fbtft support,
so enable it in the linux config as described in the fbtft help text (see v3-linux-add-fbtft-kernel-extension.patch):
        $ make linux-menuconfig

- rebuild linux kernel and the new modules
        $ make

...install it to sd card as described in buildroot-2014.11/board/raspberrypi/readme.txt and test it...

Hope the description is helpful enough?

> Nice pictures, btw.

...thanks...

Regards,
Peter

> 
> On Sat, Jan 3, 2015 at 2:01 PM, Peter Seiderer <ps.report@gmx.net> wrote:
> 
> > 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
> >
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - added missing linux/linux-ext-fbtft.mk file
> >
> > Changes v2 -> v3:
> >   - removed automatic kernel configurations changes
> >   - added kernel configuration hint to linux/Config.ext.in help text
> >   - added second installation directory for linux >= 3.15
> > ---
> >  linux/Config.ext.in      | 25 +++++++++++++++++++++++++
> >  linux/linux-ext-fbtft.mk | 41 +++++++++++++++++++++++++++++++++++++++++
> >  package/Config.in        |  1 +
> >  package/fbtft/Config.in  | 13 +++++++++++++
> >  package/fbtft/fbtft.mk   | 11 +++++++++++
> >  5 files changed, 91 insertions(+)
> >  create mode 100644 linux/linux-ext-fbtft.mk
> >  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..c31628a 100644
> > --- a/linux/Config.ext.in
> > +++ b/linux/Config.ext.in
> > @@ -42,4 +42,29 @@ 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.
> > +
> > +         To enable fbtft, e.g. for Adafruit 2.8 PiTFT, enable the
> > +         following kernel configuarations:
> > +         - CONFIG_SPI: Device Drivers ---> SPI support
> > +         - CONFIG_SPI_BCM2708: Device Drivers ---> SPI support
> > +                                  ---> BCM2708 SPI controller driver
> > +         - CONFIG_GPIOLIB: Device Drivers ---> GPIO Support
> > +         - CONFIG_FB: Device Drives ---> Graphics support
> > +                         ---> Support for frame buffer devices
> > +         - CONFIG_FB_TFT: Device Drivers --->
> > +                            Support for small TFT LCD display modules
> > +         - CONFIG_FB_TFT_ILI9341: Device Drivers --->
> > +                            Support for small TFT LCD display modules --->
> > +                              FB driver for the ILI9341 LCD Controller
> > +         or another FB_TFT submodule corresponding to your display.
> > +
> > +         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 0000000..d555a3f
> > --- /dev/null
> > +++ b/linux/linux-ext-fbtft.mk
> > @@ -0,0 +1,41 @@
> >
> > +################################################################################
> > +# 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
> > +
> > +define FBTFT_PREPARE_KERNEL
> > +       # for linux >= 3.15 install to drivers/video/fbdev/fbtft
> > +       # for linux < 3.15 install to drivers/video/fbtft
> > +       if [ -e $(LINUX_DIR)/drivers/video/fbdev ]; then \
> > +               mkdir $(LINUX_DIR)/drivers/video/fbdev/fbtft; \
> > +               $(INSTALL) $(FBTFT_DIR)/*.h \
> > +                       $(FBTFT_DIR)/*.c \
> > +                       $(FBTFT_DIR)/Makefile \
> > +                       $(FBTFT_DIR)/Kconfig \
> > +                       $(FBTFT_DIR)/README \
> > +                       $(LINUX_DIR)/drivers/video/fbdev/fbtft; \
> > +               echo 'source "drivers/video/fbdev/fbtft/Kconfig"' \
> > +                       >> $(LINUX_DIR)/drivers/video/fbdev/Kconfig; \
> > +               echo 'obj-y += fbtft/' >>
> > $(LINUX_DIR)/drivers/video/fbdev/Makefile; \
> > +       else \
> > +               mkdir $(LINUX_DIR)/drivers/video/fbtft; \
> > +               $(INSTALL) $(FBTFT_DIR)/*.h \
> > +                       $(FBTFT_DIR)/*.c \
> > +                       $(FBTFT_DIR)/Makefile \
> > +                       $(FBTFT_DIR)/Kconfig \
> > +                       $(FBTFT_DIR)/README \
> > +                       $(LINUX_DIR)/drivers/video/fbtft; \
> > +               echo 'source "drivers/video/fbtft/Kconfig"' \
> > +                       >> $(LINUX_DIR)/drivers/video/Kconfig; \
> > +               echo 'obj-y += fbtft/' >>
> > $(LINUX_DIR)/drivers/video/Makefile; \
> > +       fi
> > +endef
> > +
> > +LINUX_PRE_PATCH_HOOKS += FBTFT_PREPARE_KERNEL
> > +
> > +endif #BR2_LINUX_KERNEL_EXT_FBTFT
> > 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
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> >

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

* [Buildroot] [PATCH v3] linux: add fbtft kernel extension
@ 2015-01-03 20:01 Peter Seiderer
  2015-01-10 14:27 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Seiderer @ 2015-01-03 20:01 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - added missing linux/linux-ext-fbtft.mk file

Changes v2 -> v3:
  - removed automatic kernel configurations changes
  - added kernel configuration hint to linux/Config.ext.in help text
  - added second installation directory for linux >= 3.15
---
 linux/Config.ext.in      | 25 +++++++++++++++++++++++++
 linux/linux-ext-fbtft.mk | 41 +++++++++++++++++++++++++++++++++++++++++
 package/Config.in        |  1 +
 package/fbtft/Config.in  | 13 +++++++++++++
 package/fbtft/fbtft.mk   | 11 +++++++++++
 5 files changed, 91 insertions(+)
 create mode 100644 linux/linux-ext-fbtft.mk
 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..c31628a 100644
--- a/linux/Config.ext.in
+++ b/linux/Config.ext.in
@@ -42,4 +42,29 @@ 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.
+
+	  To enable fbtft, e.g. for Adafruit 2.8 PiTFT, enable the
+	  following kernel configuarations:
+	  - CONFIG_SPI: Device Drivers ---> SPI support
+	  - CONFIG_SPI_BCM2708: Device Drivers ---> SPI support
+	                           ---> BCM2708 SPI controller driver
+	  - CONFIG_GPIOLIB: Device Drivers ---> GPIO Support
+	  - CONFIG_FB: Device Drives ---> Graphics support
+	                  ---> Support for frame buffer devices
+	  - CONFIG_FB_TFT: Device Drivers ---> 
+	                     Support for small TFT LCD display modules
+	  - CONFIG_FB_TFT_ILI9341: Device Drivers --->
+	                     Support for small TFT LCD display modules --->
+	                       FB driver for the ILI9341 LCD Controller
+	  or another FB_TFT submodule corresponding to your display.
+
+	  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 0000000..d555a3f
--- /dev/null
+++ b/linux/linux-ext-fbtft.mk
@@ -0,0 +1,41 @@
+################################################################################
+# 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
+
+define FBTFT_PREPARE_KERNEL
+	# for linux >= 3.15 install to drivers/video/fbdev/fbtft
+	# for linux < 3.15 install to drivers/video/fbtft
+	if [ -e $(LINUX_DIR)/drivers/video/fbdev ]; then \
+		mkdir $(LINUX_DIR)/drivers/video/fbdev/fbtft; \
+		$(INSTALL) $(FBTFT_DIR)/*.h \
+			$(FBTFT_DIR)/*.c \
+			$(FBTFT_DIR)/Makefile \
+			$(FBTFT_DIR)/Kconfig \
+			$(FBTFT_DIR)/README \
+			$(LINUX_DIR)/drivers/video/fbdev/fbtft; \
+		echo 'source "drivers/video/fbdev/fbtft/Kconfig"' \
+			>> $(LINUX_DIR)/drivers/video/fbdev/Kconfig; \
+		echo 'obj-y += fbtft/' >> $(LINUX_DIR)/drivers/video/fbdev/Makefile; \
+	else \
+		mkdir $(LINUX_DIR)/drivers/video/fbtft; \
+		$(INSTALL) $(FBTFT_DIR)/*.h \
+			$(FBTFT_DIR)/*.c \
+			$(FBTFT_DIR)/Makefile \
+			$(FBTFT_DIR)/Kconfig \
+			$(FBTFT_DIR)/README \
+			$(LINUX_DIR)/drivers/video/fbtft; \
+		echo 'source "drivers/video/fbtft/Kconfig"' \
+			>> $(LINUX_DIR)/drivers/video/Kconfig; \
+		echo 'obj-y += fbtft/' >> $(LINUX_DIR)/drivers/video/Makefile; \
+	fi
+endef
+
+LINUX_PRE_PATCH_HOOKS += FBTFT_PREPARE_KERNEL
+
+endif #BR2_LINUX_KERNEL_EXT_FBTFT
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] 8+ messages in thread

end of thread, other threads:[~2015-01-11 14:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 20:48 [Buildroot] [PATCH v3] linux: add fbtft kernel extension Peter Seiderer
2015-01-10 21:00 ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2015-01-11 13:16 Peter Seiderer
2015-01-11 14:00 ` Richard Fergusson
2015-01-11  5:34 Richard Fergusson
2015-01-05 13:45 Peter Seiderer
2015-01-03 20:01 Peter Seiderer
2015-01-10 14:27 ` Thomas Petazzoni

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.