All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
@ 2015-01-10 20:36 Peter Seiderer
  2015-01-10 21:58 ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Seiderer @ 2015-01-10 20:36 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Sat, Jan 10, 2015 at 12:03:01PM +0100, Yann E. MORIN wrote:
> Peter, All,
> 
> On 2015-01-10 02:13 +0100, Peter Seiderer spake thusly:
> [--SNIP--]
> > Thanks, great work. My RaspberryPi B+ booted with the new linux-kernel/DT support.
> 
> Thanks for the report. Great! :-)
> 
> > The only thing I had to change is the kernel compression standard
> > (in the kernel config file) from CONFIG_KERNEL_XZ=y to CONFIG_KERNEL_GZIP=y
> > because otherweise the script mkknlimg failed with:
> > "* Is this a valid kernel? In pass-through mode."
> 
> Weird, it is working for me... 
> 
> > Maybe some uncompress tool is missing or is to old on my host?
> 
> My xz is:
> 
>     $ xz --version
>     xz (XZ Utils) 5.1.0alpha
>     liblzma 5.1.0alpha
>

$  xz --version
xz (XZ Utils) 5.0.7
liblzma 5.0.7

> Can you check that your xz supports the --single-stream option?
> 

$ unxz --single-stream
unxz: unrecognized option '--single-stream'
unxz: Try `unxz --help' for more information.

Seems xz package on openSUSE 13.2 is not up to date....

> > Is
> > it possible to run mkknlimg automatically (with buildroot host/usr/bin path)
> > to avoid such errors (and avoid someone installing zImage without running
> > mkknlimg)?
> 
> OK, so it seems you do not have xz on your host, and that you rely on
> the one built by Buildroot, right?
> 
> And no, it is not possible to do it in the current Buildroot
> infrastructure:
> 
>   - there's no way a package can declare hook (whichever) for another
>     package,
> 
>   - we do not want to add anything platform-specific to the kernel.
>

But for other tools buildroot provides host support packages?

Would something like the following be feasible with buildroot (host-xz
has to be done, totally untested):

--- a/package/rpi-firmware/rpi-firmware.mk
+++ b/package/rpi-firmware/rpi-firmware.mk
@@ -12,7 +12,7 @@ RPI_FIRMWARE_INSTALL_TARGET = NO
 RPI_FIRMWARE_INSTALL_IMAGES = YES
 
 ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
-RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware
+RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware host-xz linux
 # Override the version in this case.
 RPI_FIRMWARE_VERSION = e42ddc0b04353cc292ce5215eea81484d72c5d09
 define RPI_FIRMWARE_INSTALL_DTB
@@ -40,6 +40,7 @@ HOST_RPI_FIRMWARE_DEPENDENCIES =
 
 define HOST_RPI_FIRMWARE_INSTALL_CMDS
        $(INSTALL) -D -m 0755 package/rpi-firmware/mkknlimg $(HOST_DIR)/usr/bin/mkknlimg
+       $(HOST_DIR)/usr/bin/mkknlimg $(BINARIES_DIR)/zImage $(BINARIES_DIR)/rpi_zImage
 endef
 
 $(eval $(generic-package))

Regards,
Peter

> Regards,
> Yann E. MORIN.
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  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.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
  2015-01-10 20:36 [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller Peter Seiderer
@ 2015-01-10 21:58 ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2015-01-10 21:58 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2015-01-10 21:36 +0100, Peter Seiderer spake thusly:
> On Sat, Jan 10, 2015 at 12:03:01PM +0100, Yann E. MORIN wrote:
> >     $ xz --version
> >     xz (XZ Utils) 5.1.0alpha
> >     liblzma 5.1.0alpha
> $  xz --version
> xz (XZ Utils) 5.0.7
> liblzma 5.0.7
> 
> $ unxz --single-stream
> unxz: unrecognized option '--single-stream'
> unxz: Try `unxz --help' for more information.
> 
> Seems xz package on openSUSE 13.2 is not up to date....

Damn, then you need to build host-xz in Buidroot.

> > > it possible to run mkknlimg automatically (with buildroot host/usr/bin path)
> > > to avoid such errors (and avoid someone installing zImage without running
> > > mkknlimg)?
> > 
> > OK, so it seems you do not have xz on your host, and that you rely on
> > the one built by Buildroot, right?
> > 
> > And no, it is not possible to do it in the current Buildroot
> > infrastructure:
> > 
> >   - there's no way a package can declare hook (whichever) for another
> >     package,
> > 
> >   - we do not want to add anything platform-specific to the kernel.
> >
> 
> But for other tools buildroot provides host support packages?
> 
> Would something like the following be feasible with buildroot (host-xz
> has to be done, totally untested):

Well, we already have host-xz.

> --- a/package/rpi-firmware/rpi-firmware.mk
> +++ b/package/rpi-firmware/rpi-firmware.mk
> @@ -12,7 +12,7 @@ RPI_FIRMWARE_INSTALL_TARGET = NO
>  RPI_FIRMWARE_INSTALL_IMAGES = YES
>  
>  ifeq ($(BR2_PACKAGE_RPI_FIRMWARE_INSTALL_DTBS),y)
> -RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware
> +RPI_FIRMWARE_DEPENDENCIES += host-rpi-firmware host-xz linux
>  # Override the version in this case.
>  RPI_FIRMWARE_VERSION = e42ddc0b04353cc292ce5215eea81484d72c5d09
>  define RPI_FIRMWARE_INSTALL_DTB
> @@ -40,6 +40,7 @@ HOST_RPI_FIRMWARE_DEPENDENCIES =
>  
>  define HOST_RPI_FIRMWARE_INSTALL_CMDS
>         $(INSTALL) -D -m 0755 package/rpi-firmware/mkknlimg $(HOST_DIR)/usr/bin/mkknlimg
> +       $(HOST_DIR)/usr/bin/mkknlimg $(BINARIES_DIR)/zImage $(BINARIES_DIR)/rpi_zImage
>  endef

That does not work, because the kernel may well be built outside of
Buildroot, in which case the user would have to do it all by himself
anyway.

So, I'd prefer we do not dwelve too much on the side of what can easily
be done in a post-build script.

Script which we could provide, of course. ;-) I'll propose something
shortly...

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
  2015-01-10  1:13 Peter Seiderer
@ 2015-01-10 11:03 ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2015-01-10 11:03 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2015-01-10 02:13 +0100, Peter Seiderer spake thusly:
[--SNIP--]
> Thanks, great work. My RaspberryPi B+ booted with the new linux-kernel/DT support.

Thanks for the report. Great! :-)

> The only thing I had to change is the kernel compression standard
> (in the kernel config file) from CONFIG_KERNEL_XZ=y to CONFIG_KERNEL_GZIP=y
> because otherweise the script mkknlimg failed with:
> "* Is this a valid kernel? In pass-through mode."

Weird, it is working for me... 

> Maybe some uncompress tool is missing or is to old on my host?

My xz is:

    $ xz --version
    xz (XZ Utils) 5.1.0alpha
    liblzma 5.1.0alpha

Can you check that your xz supports the --single-stream option?

> Is
> it possible to run mkknlimg automatically (with buildroot host/usr/bin path)
> to avoid such errors (and avoid someone installing zImage without running
> mkknlimg)?

OK, so it seems you do not have xz on your host, and that you rely on
the one built by Buildroot, right?

And no, it is not possible to do it in the current Buildroot
infrastructure:

  - there's no way a package can declare hook (whichever) for another
    package,

  - we do not want to add anything platform-specific to the kernel.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
@ 2015-01-10  1:13 Peter Seiderer
  2015-01-10 11:03 ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Seiderer @ 2015-01-10  1:13 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Fri, Jan 09, 2015 at 11:48:14PM +0100, Yann E. MORIN wrote:
> Peter, All,
> 
> On 2015-01-09 22:40 +0100, Yann E. MORIN spake thusly:
> > On 2015-01-09 21:21 +0100, Peter Seiderer spake thusly:
> [--SNIP--]
> > > Maybe the way to go is to wait (or add?) for raspberry pi linux-3.18
> > > kernel support in buildroot with device tree overlay support (see [1],[2])?
> > 
> > I'm working on it, and should be able to submit it shortly. You can see
> > the previous attempt in that thread:
> >     http://lists.busybox.net/pipermail/buildroot/2015-January/116241.html
> 
> I've updated my branch, and have now submitted the series:
>     http://lists.busybox.net/pipermail/buildroot/2015-January/116919.html
> 

Thanks, great work. My RaspberryPi B+ booted with the new linux-kernel/DT support.

The only thing I had to change is the kernel compression standard
(in the kernel config file) from CONFIG_KERNEL_XZ=y to CONFIG_KERNEL_GZIP=y
because otherweise the script mkknlimg failed with:
"* Is this a valid kernel? In pass-through mode."

Maybe some uncompress tool is missing or is to old on my host? Is
it possible to run mkknlimg automatically (with buildroot host/usr/bin path)
to avoid such errors (and avoid someone installing zImage without running
mkknlimg)?

No DT overlays tested so far (will do soon to enable the buttons on my adafruit28
which need gpios configured to input with pull-up)...

So far:

Tested-by: Peter Seiderer <ps.report@gmx.net>

Regards,
Peter

> Regards,
> Yann E. MORIN.
> 
> -- 
> .-----------------.--------------------.------------------.--------------------.
> |  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.  |
> '------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
  2015-01-09 21:40 ` Yann E. MORIN
@ 2015-01-09 22:48   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2015-01-09 22:48 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2015-01-09 22:40 +0100, Yann E. MORIN spake thusly:
> On 2015-01-09 21:21 +0100, Peter Seiderer spake thusly:
[--SNIP--]
> > Maybe the way to go is to wait (or add?) for raspberry pi linux-3.18
> > kernel support in buildroot with device tree overlay support (see [1],[2])?
> 
> I'm working on it, and should be able to submit it shortly. You can see
> the previous attempt in that thread:
>     http://lists.busybox.net/pipermail/buildroot/2015-January/116241.html

I've updated my branch, and have now submitted the series:
    http://lists.busybox.net/pipermail/buildroot/2015-January/116919.html

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
  2015-01-09 20:21 Peter Seiderer
@ 2015-01-09 21:40 ` Yann E. MORIN
  2015-01-09 22:48   ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Yann E. MORIN @ 2015-01-09 21:40 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2015-01-09 21:21 +0100, Peter Seiderer spake thusly:
[--SNIP--]
> Maybe the way to go is to wait (or add?) for raspberry pi linux-3.18
> kernel support in buildroot with device tree overlay support (see [1],[2])?

I'm working on it, and should be able to submit it shortly. You can see
the previous attempt in that thread:
    http://lists.busybox.net/pipermail/buildroot/2015-January/116241.html

(Unfortunately, the archives for the ML does not sort the mails properly
as a thread.)

You can see the current state of my work by browsing the yem/rpi-dt
branch on my Buildroot tree:
    http://git.buildroot.org/~ymorin/git/buildroot/log/?h=yem/rpi-dt

> > I don't know what the policy of Buildroot should be about accepting
> > crap, but on my side, I will not add such a package to Buildroot.
> Anyone with pro/con opinion?

I concur with Thomas.

[--SNIP--]
> My decision for raspberry pi was because of support for (hopefully)
> good audio out (using the hifiberry dac, but not yet delivered)...

And the overlays for those devices I take care in my patchset. ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
@ 2015-01-09 20:21 Peter Seiderer
  2015-01-09 21:40 ` Yann E. MORIN
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Seiderer @ 2015-01-09 20:21 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

> Gesendet: Donnerstag, 08. Januar 2015 um 21:24 Uhr
> Von: "Thomas Petazzoni" <thomas.petazzoni@free-electrons.com>
> An: "Peter Seiderer" <ps.report@gmx.net>
> Cc: buildroot at busybox.net
> Betreff: Re: [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
>
> Dear Peter Seiderer,
> 
> On Thu,  8 Jan 2015 21:09:55 +0100, Peter Seiderer wrote:
> > This kernel module enables the (easy?) using of the ADS7846 SPI touch controller
> > on Waveshare 3.2 LCD (B) modules.
> > 
> > Alternatives would be:
> > - the old way: add device definition/register call to arch/arm/mach-bcm2708/bcm2708.c
> > - the new way: use device tree support and add an entrie for ads7846
> 
> I'm sorry, this is not your fault, but this ads7846_device thing is an
> absolute abomination. Why is RaspberryPi *THE* platform propagating all
> the worst possible abominations? Why is it *THE* platform doing all the
> non-standard stuff? Why is it so crappy.
> 
> People, please read this: if you want to learn embedded Linux, don't
> buy Raspberry Pi. It is the worst platform ever in terms of embedded
> Linux development best practices. Ever.
> 
> Do yourself a favor, and buy properly supported stuff: the Atmel
> Xplained comes to mind, the BeagleBone Black as well of course.
> 
> Sorry, but this ads7846_device is just pure crap. The alternatives you
> mentioned are the only good solutions: change your board file if you're
> using an old style ARM kernel, or change your Device Tree if you're
> using a new style ARM kernel.
> 

No strong opinion for this patch from my side, primary goal was to
support Lou to get his waveshare32b running with buildroot...

The fbtft patch is more important (for me), because I use it myself
for my adafruit28 display (with uses an ft6x06 touchscreen for which
I added an old way arch/arm/mach-bcm2708/bcm2708.c board file patch)...

Maybe the way to go is to wait (or add?) for raspberry pi linux-3.18
kernel support in buildroot with device tree overlay support (see [1],[2])?

> I don't know what the policy of Buildroot should be about accepting
> crap, but on my side, I will not add such a package to Buildroot.
> 

Anyone with pro/con opinion?

> Again: don't take this personally, this is absolutely not against you.
> Just me being fed up with Raspberry Pi crap.
> 

No problem, was astonished too about the creative solutions (instead of
prober solutions) found for raspberry pi ;-)

But are other manufacturers so much better, TI/Freescale like to fork
kernel trees with proprietary extensions too (including closed source
libraries)?

My decision for raspberry pi was because of support for (hopefully)
good audio out (using the hifiberry dac, but not yet delivered)...

Regards,
Peter

[1] http://www.raspberrypi.org/documentation/configuration/pin-configuration.md
[2] http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=93015

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

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
  2015-01-08 20:09 Peter Seiderer
@ 2015-01-08 20:24 ` Thomas Petazzoni
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2015-01-08 20:24 UTC (permalink / raw)
  To: buildroot

Dear Peter Seiderer,

On Thu,  8 Jan 2015 21:09:55 +0100, Peter Seiderer wrote:
> This kernel module enables the (easy?) using of the ADS7846 SPI touch controller
> on Waveshare 3.2 LCD (B) modules.
> 
> Alternatives would be:
> - the old way: add device definition/register call to arch/arm/mach-bcm2708/bcm2708.c
> - the new way: use device tree support and add an entrie for ads7846

I'm sorry, this is not your fault, but this ads7846_device thing is an
absolute abomination. Why is RaspberryPi *THE* platform propagating all
the worst possible abominations? Why is it *THE* platform doing all the
non-standard stuff? Why is it so crappy.

People, please read this: if you want to learn embedded Linux, don't
buy Raspberry Pi. It is the worst platform ever in terms of embedded
Linux development best practices. Ever.

Do yourself a favor, and buy properly supported stuff: the Atmel
Xplained comes to mind, the BeagleBone Black as well of course.

Sorry, but this ads7846_device is just pure crap. The alternatives you
mentioned are the only good solutions: change your board file if you're
using an old style ARM kernel, or change your Device Tree if you're
using a new style ARM kernel.

I don't know what the policy of Buildroot should be about accepting
crap, but on my side, I will not add such a package to Buildroot.

Again: don't take this personally, this is absolutely not against you.
Just me being fed up with Raspberry Pi crap.

Best regards,

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

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

* [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller
@ 2015-01-08 20:09 Peter Seiderer
  2015-01-08 20:24 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Seiderer @ 2015-01-08 20:09 UTC (permalink / raw)
  To: buildroot

This kernel module enables the (easy?) using of the ADS7846 SPI touch controller
on Waveshare 3.2 LCD (B) modules.

Alternatives would be:
- the old way: add device definition/register call to arch/arm/mach-bcm2708/bcm2708.c
- the new way: use device tree support and add an entrie for ads7846

Peter Seiderer (1):
  ads7846-device: new package

 linux/linux.mk                           |  6 ++++++
 package/Config.in                        |  1 +
 package/ads7846-device/Config.in         | 11 +++++++++++
 package/ads7846-device/ads7846-device.mk | 21 +++++++++++++++++++++
 4 files changed, 39 insertions(+)
 create mode 100644 package/ads7846-device/Config.in
 create mode 100644 package/ads7846-device/ads7846-device.mk

-- 
2.1.2

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

end of thread, other threads:[~2015-01-10 21:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-10 20:36 [Buildroot] [PATCH] Linux kernel module for Waveshare 3.2inch RPi LCD (B) V3 touch controller Peter Seiderer
2015-01-10 21:58 ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2015-01-10  1:13 Peter Seiderer
2015-01-10 11:03 ` Yann E. MORIN
2015-01-09 20:21 Peter Seiderer
2015-01-09 21:40 ` Yann E. MORIN
2015-01-09 22:48   ` Yann E. MORIN
2015-01-08 20:09 Peter Seiderer
2015-01-08 20:24 ` 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.