Skip to contentSkip to conversation

Various upgrade/fixes from Technux

PATCH Superseded Petter Mabäcker 2 participants 13 messages Jan 14, 2016 – Feb 29, 2016 Broadcom BCM2711/BCM2835 Arm architecture

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover Various upgrade/fixes from Technux

Various fixes from Technux, with focus on PiTFT support.

Major changes from v1 is that after feedback, MACHINE_FEATURES is used to enable/disable pitft support instead of MACHINEOVERRIDES.

Petter Mabäcker (7):
README: Add SPI bus chapter to content
.gitignore: Ignore .swp files
linux-raspberrypi: Update 4.1 recipe to 4.1.15
rpi-config: I2C support
rpi-base.inc: Allow MACHINE_FEATURES appends
pitft: Add basic support for PiTFT
pitft: Add PiTFT22 support

 .gitignore                                         |   1 +
 README                                             |  55 ++++++++---
 conf/machine/include/rpi-base.inc                  |   3 +-
 recipes-bsp/bootfiles/rpi-config_git.bb            |  17 +++-
 .../rpi/xorg.conf.d/99-pitft.conf                  |   5 +
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  |  11 ++-
 recipes-kernel/linux/linux-raspberrypi.inc         |   6 +-
 ...dts-add-overlay-for-pitft22-in-linux-3.18.patch | 110 +++++++++++++++++++++
 .../0001-dts-add-overlay-for-pitft22.patch         | 110 +++++++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_3.18.bb     |   5 +-
 recipes-kernel/linux/linux-raspberrypi_4.1.bb      |   8 +-
 11 files changed, 308 insertions(+), 23 deletions(-)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
Signature · 1 line
1.9.1
#1 lore raw

PATCH v2 1/7 README: Add SPI bus chapter to content

The optional SPI bus chapter was missing in the content list.

While at it also place it together with the other "optional" chapters, instead of in the end.

---
 README | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
README +15 -13
index 16ac1cb..a168692 100644
@@ -20,10 +20,11 @@ Contents:
     2.F. Optional - Video camera support with V4L2 drivers
     2.G. Optional - Enable offline compositing support
     2.H. Optional - Enable kgdb over console support
-    2.I. Images
-    2.J. Boot to U-Boot
-    2.K. Image with Initramfs
-    2.L. Device tree support
+    2.I. Optional - Enable SPI bus
+    2.J. Images
+    2.K. Boot to U-Boot
+    2.L. Image with Initramfs
+    2.M. Device tree support
 3. Extra apps
     3.A. omxplayer
 4. Source code and mirrors
@@ -145,7 +146,13 @@ To add the kdbg over console (kgdboc) parameter to the kernel command line,
 set this variable in local.conf:
 ENABLE_KGDB = "1"
 
-2.I. Images
+2.I. Optional - Enable SPI bus
+==============================
+When using device tree kernels, set this variable to enable the SPI bus
+ENABLE_SPI_BUS = "1"
+
+
+2.J. Images
 ===========
 * rpi-hwup-image
     Hardware up image
@@ -155,7 +162,7 @@ ENABLE_KGDB = "1"
     Image based on rpi-basic-image which includes most of the packages in this
     layer and some media samples.
 
-2.J. Boot to U-Boot
+2.K. Boot to U-Boot
 ===================
 To have u-boot load kernel image, set in your local.conf
 KERNEL_IMAGETYPE = "uImage"
@@ -163,7 +170,7 @@ KERNEL_IMAGETYPE = "uImage"
 This will make kernel.img be u-boot image which will load uImage.
 By default, kernel.img is the actual kernel image (ex. Image).
 
-2.K. Image with Initramfs
+2.L. Image with Initramfs
 =========================
 To build an initramfs image :
     * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -176,7 +183,7 @@ To build an initramfs image :
     * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
         - KERNEL_INITRAMFS = "-initramfs"
 
-2.L. Device tree support
+2.M. Device tree support
 =========================
 Device tree for RPi is only supported when using linux-raspberrypi 3.18+
 kernels.
@@ -189,11 +196,6 @@ kernels.
 NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
       older kernel versions.
 
-2.M. Optional - enable SPI bus
-==============================
-When using device tree kernels, set this variable to enable the SPI bus
-ENABLE_SPI_BUS = "1"
-
 3. Extra apps
 =============
 
Signature · 1 line
1.9.1
#3 lore raw

PATCH v2 3/7 linux-raspberrypi: Update 4.1 recipe to 4.1.15

In reply to Petter Mabäcker

[Support #69]

---
 recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-kernel/linux/linux-raspberrypi_4.1.bb +2 -2
index 3a3cf40..cae459a 100644
@@ -1,6 +1,6 @@
-LINUX_VERSION ?= "4.1.10"
+LINUX_VERSION ?= "4.1.15"
 
-SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771"
+SRCREV = "02a8ee530e32b08e5df44f10e24d5fd82bb960e3"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"
 
 require linux-raspberrypi.inc
Signature · 1 line
1.9.1
#4 lore raw

Re: [meta-raspberrypi][PATCH v2 3/7] linux-raspberrypi: Update 4.1 recipe to 4.1.15

2016-01-14 17:40 skrev Petter Mabäcker:

Quoted 3 lines

[Support #69]

Quoted 2 lines

---

recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++--

Quoted 1 line
1 file changed,

2 insertions(+), 2 deletions(-)

Quoted 2 lines

diff --git

a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
b/recipes-kernel/linux/linux-raspberrypi_4.1.bb

Quoted 1 line

index 3a3cf40..cae459a

100644

Quoted 2 lines

--- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
+++

b/recipes-kernel/linux/linux-raspberrypi_4.1.bb

Review line 1

Quoted 2 lines
(quoted diff) +0 -0
@@ -1,6 +1,6 @@
 

-LINUX_VERSION ?= "4.1.10"

recipes-kernel/linux/linux-raspberrypi_4.1.bb

Quoted 3 lines
recipes-kernel/linux/linux-raspberrypi_4.1.bb +1 -1
+LINUX_VERSION ?= "4.1.15"
 
-SRCREV =

"b74df9228c27f55361c065bc5dbfba88861cc771"

Review line 4

Quoted 1 line
(quoted diff) +1 -0
+SRCREV =

"02a8ee530e32b08e5df44f10e24d5fd82bb960e3"

Quoted 1 line

SRC_URI =

"git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"

Quoted 3 lines

require linux-raspberrypi.inc

Hi Andrei,

This commit can be
skipped, since Khem have done an even newer update of the 4.1 kernel (4.1.10 --> 4.1.17) in the large series of commits from yesterday
(https://lists.yoctoproject.org/pipermail/yocto/2016-February/028754.html).
Do you want me to send an updated version of this series of commit without it or not?

BR Petter

#5 lore raw

Re: [meta-raspberrypi][PATCH v2 3/7] linux-raspberrypi: Update 4.1 recipe to 4.1.15

Quoted 34 lines · Petter Mabäcker
   2016-01-14 17:40 skrev Petter Mab�cker:

[Support #69]

---
 recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-kernel/linu renamed from recipes-kernel/linux/linux-raspberrypi_4.1.bb +0 -0

x/linux-raspberrypi_4.1.bb
index 3a3cf40..cae459a 100644

recipes-kernel/linux/linux-raspberrypi_4.1.bb +2 -2
@@ -1,6 +1,6 @@
-LINUX_VERSION ?= "4.1.10"
+LINUX_VERSION ?= "4.1.15"
 
-SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771"
+SRCREV = "02a8ee530e32b08e5df44f10e24d5fd82bb960e3"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y

"

require linux-raspberrypi.inc

Hi Andrei,

This commit can be skipped, since Khem have done an even newer update of the 4.1 kernel (4.1.10 --> 4.1.17) in the large series of commits from yesterday
(https://lists.yoctoproject.org/pipermail/yocto/2016-February/028754.ht
ml). Do you want me to send an updated version of this series of commit without it or not?

Quoted 5 lines

BR Petter

References

1. mailto:[email protected]

Thanks Peter. No need to bother. I'll keep in mind not to pull this patch.

Signature · 1 line
Andrei Gherzan
#6 lore raw

Re: [meta-raspberrypi][PATCH v2 3/7] linux-raspberrypi: Update 4.1 recipe to 4.1.15

Quoted 35 lines · Andrei Gherzan
Quoted 34 lines · Petter Mabäcker
   2016-01-14 17:40 skrev Petter Mab?cker:

[Support #69]

---
 recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-kernel/linu renamed from recipes-kernel/linux/linux-raspberrypi_4.1.bb +0 -0

x/linux-raspberrypi_4.1.bb
index 3a3cf40..cae459a 100644

recipes-kernel/linux/linux-raspberrypi_4.1.bb +2 -2
@@ -1,6 +1,6 @@
-LINUX_VERSION ?= "4.1.10"
+LINUX_VERSION ?= "4.1.15"
 
-SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771"
+SRCREV = "02a8ee530e32b08e5df44f10e24d5fd82bb960e3"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y

"

require linux-raspberrypi.inc

Hi Andrei,

This commit can be skipped, since Khem have done an even newer update of the 4.1 kernel (4.1.10 --> 4.1.17) in the large series of commits from yesterday
(https://lists.yoctoproject.org/pipermail/yocto/2016-February/028754.ht
ml). Do you want me to send an updated version of this series of commit without it or not?

Quoted 7 lines
Quoted 5 lines

BR Petter

References

1. mailto:[email protected]

Thanks Peter. No need to bother. I'll keep in mind not to pull this patch.

Petter,

Actually I do have a request. Could you please send the v2 again (or a v3) cause even if they are on the ml archive I don't have it in my mailbox (this kinda worries me). Sorry for this and thank you in advance.

--
Andrei Gherzan

#7 lore raw

Re: [meta-raspberrypi][PATCH v2 3/7] linux-raspberrypi: Update 4.1 recipe to 4.1.15

2016-02-28 12:02 skrev Andrei Gherzan:

Quoted 1 line

On Sun, Feb 28, 2016 at

Quoted 2 lines · Andrei Gherzan
Quoted 2 lines

On Sun, Feb 28, 2016 at

Quoted 2 lines · Petter Mabäcker
Quoted 2 lines
Quoted 2 lines

2016-01-14 17:40 skrev

Petter Mab?cker: [Support #69] Signed-off-by: Petter Mab?cker <[1][email protected]> --- recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-raspberrypi_4.1.bb b/recipes-kernel/linu x/linux-raspberrypi_4.1.bb index 3a3cf40..cae459a 100644 --- a/recipes-kernel/linux/linux-raspberrypi_4.1.bb +++ b/recipes-kernel/linux/linux-raspberrypi_4.1.bb @@ -1,6 +1,6 @@ -LINUX_VERSION ?= "4.1.10" +LINUX_VERSION ?= "4.1.15" -SRCREV = "b74df9228c27f55361c065bc5dbfba88861cc771" +SRCREV = "02a8ee530e32b08e5df44f10e24d5fd82bb960e3" SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y " require linux-raspberrypi.inc Hi Andrei, This commit can be skipped, since Khem have done an even newer update of the 4.1 kernel (4.1.10 --> 4.1.17) in the large series of commits from yesterday
(https://lists.yoctoproject.org/pipermail/yocto/2016-February/028754.ht
[1] ml). Do you want me to send an updated version of this series of commit without it or not? BR Petter References 1. mailto:[email protected]

Quoted 1 line
Quoted 1 line

Thanks Peter. No need to bother. I'll keep

in mind not to pull this patch.

Quoted 4 lines

Petter,

Actually I do have a

request. Could you please send the v2 again (or a v3)

Quoted 1 line

cause even if

they are on the ml archive I don't have it in my mailbox (this

Quoted 1 line

kinda

worries me). Sorry for this and thank you in advance.

Quoted 3 lines

--
Andrei

Gherzan

I will send up a v3 with the kernel bump commit removed (and also a fix for a minor typo in the README..).

BR Petter

Petter
Mabäcker

Technux <[email protected]>
www.technux.se

Links:
------
[1]
https://lists.yoctoproject.org/pipermail/yocto/2016-February/028754.ht

#8 lore raw

Re: [meta-raspberrypi][PATCH v2 3/7] linux-raspberrypi: Update 4.1 recipe to 4.1.15

Quoted 36 lines · Petter Mabäcker
   2016-02-28 12:02 skrev Andrei Gherzan:

On Sun, Feb 28, 2016 at 11:51:58AM +0100, Andrei Gherzan wrote:

     On Sun, Feb 28, 2016 at 08:56:33AM +0100, Petter Mab�cker wrote:

     2016-01-14 17:40 skrev Petter Mab?cker: [Support #69] Signed-off-by:
     Petter Mab?cker <[1][1][email protected]> ---
     recipes-kernel/linux/linux-raspberrypi_4.1.bb | 4 ++-- 1 file
     changed, 2 insertions(+), 2 deletions(-) diff --git
     a/recipes-kernel/linux/linux-raspberrypi_4.1.bb
     b/recipes-kernel/linu x/linux-raspberrypi_4.1.bb index
     3a3cf40..cae459a 100644 ---
     a/recipes-kernel/linux/linux-raspberrypi_4.1.bb +++
     b/recipes-kernel/linux/linux-raspberrypi_4.1.bb @@ -1,6 +1,6 @@
     -LINUX_VERSION ?= "4.1.10" +LINUX_VERSION ?= "4.1.15" -SRCREV =
     "b74df9228c27f55361c065bc5dbfba88861cc771" +SRCREV =
     "02a8ee530e32b08e5df44f10e24d5fd82bb960e3" SRC_URI =
     "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.
     y " require linux-raspberrypi.inc Hi Andrei, This commit can be
     skipped, since Khem have done an even newer update of the 4.1 kernel
     (4.1.10 --> 4.1.17) in the large series of commits from yesterday
     ([2]https://lists.yoctoproject.org/pipermail/yocto/2016-February/028
     754.ht ml). Do you want me to send an updated version of this series
     of commit without it or not? BR Petter References 1.
     mailto:[3][email protected]

     Thanks Peter. No need to bother. I'll keep in mind not to pull this
     patch.

Petter,

Actually I do have a request. Could you please send the v2 again (or a v3) cause even if they are on the ml archive I don't have it in my mailbox (this kinda worries me). Sorry for this and thank you in advance.

Quoted 7 lines

--
Andrei Gherzan

I will send up a v3 with the kernel bump commit removed (and also a fix for a minor typo in the README..).

BR Petter

Thank you Peter. This is the next one in line for testing and merging.

--
Andrei Gherzan

#9 lore raw

PATCH v2 4/7 rpi-config: I2C support

In reply to Petter Mabäcker

With newer kernels (>=3.18) that supports device-trees I2C should be enabled with device-trees.

This is now support by adding:
ENABLE_I2C = "1"
in local.conf

This will enable the dtparams:
i2c1
i2c_arm

---
 README                                  | 21 +++++++++++++--------
 recipes-bsp/bootfiles/rpi-config_git.bb |  6 ++++++
 2 files changed, 19 insertions(+), 8 deletions(-)
README +13 -8
index a168692..8ef4e7a 100644
@@ -21,10 +21,11 @@ Contents:
     2.G. Optional - Enable offline compositing support
     2.H. Optional - Enable kgdb over console support
     2.I. Optional - Enable SPI bus
-    2.J. Images
-    2.K. Boot to U-Boot
-    2.L. Image with Initramfs
-    2.M. Device tree support
+    2.J. Optional - Enable I2C
+    2.K. Images
+    2.L. Boot to U-Boot
+    2.M. Image with Initramfs
+    2.N. Device tree support
 3. Extra apps
     3.A. omxplayer
 4. Source code and mirrors
@@ -151,8 +152,12 @@ ENABLE_KGDB = "1"
 When using device tree kernels, set this variable to enable the SPI bus
 ENABLE_SPI_BUS = "1"
 
+2.J. Optional - Enable I2C
+==========================
+When using device tree kernels, set this variable to enable I2C
+ENABLE_I2C = "1"
 
-2.J. Images
+2.K. Images
 ===========
 * rpi-hwup-image
     Hardware up image
@@ -162,7 +167,7 @@ ENABLE_SPI_BUS = "1"
     Image based on rpi-basic-image which includes most of the packages in this
     layer and some media samples.
 
-2.K. Boot to U-Boot
+2.L. Boot to U-Boot
 ===================
 To have u-boot load kernel image, set in your local.conf
 KERNEL_IMAGETYPE = "uImage"
@@ -170,7 +175,7 @@ KERNEL_IMAGETYPE = "uImage"
 This will make kernel.img be u-boot image which will load uImage.
 By default, kernel.img is the actual kernel image (ex. Image).
 
-2.L. Image with Initramfs
+2.M. Image with Initramfs
 =========================
 To build an initramfs image :
     * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -183,7 +188,7 @@ To build an initramfs image :
     * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
         - KERNEL_INITRAMFS = "-initramfs"
 
-2.M. Device tree support
+2.N. Device tree support
 =========================
 Device tree for RPi is only supported when using linux-raspberrypi 3.18+
 kernels.
recipes-bsp/bootfiles/rpi-config_git.bb +6 -0
index aa11b25..ccb9b7f 100644
@@ -72,6 +72,12 @@ do_deploy() {
         echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    if [ -n "${ENABLE_I2C}" ]; then
+        echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 addtask deploy before do_package after do_install
Signature · 1 line
1.9.1
#10 lore raw

PATCH v2 5/7 rpi-base.inc: Allow MACHINE_FEATURES appends

In reply to Petter Mabäcker

Ensure that it's possible to add MACHINE_FEATURES from places that will be executed before rpi-base.inc (like e.g. local.conf), without having them overrided.

---
 conf/machine/include/rpi-base.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
conf/machine/include/rpi-base.inc +1 -1
index e097702..c8f6cd6 100644
@@ -37,7 +37,7 @@ KERNEL_DEVICETREE ?= " \
     "
 KERNEL_IMAGETYPE ?= "Image"
 
-MACHINE_FEATURES = "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
+MACHINE_FEATURES += "kernel26 apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
 
 # Raspberry Pi has no hardware clock
 MACHINE_FEATURES_BACKFILL_CONSIDERED = "rtc"
Signature · 1 line
1.9.1
#11 lore raw

PATCH v2 6/7 pitft: Add basic support for PiTFT

In reply to Petter Mabäcker

Add basic support for PiTFT display by using device-trees.

In order get it working below configurations must be active in local.conf:

MACHINE_FEATURES += "pitft"
- This will enable SPI bus and i2c device-trees, it will also setup framebuffer for console and x server on PiTFT.

[Support #70]

---
 README                                             | 29 ++++++++++++++++------
 recipes-bsp/bootfiles/rpi-config_git.bb            |  6 +++--
 .../rpi/xorg.conf.d/99-pitft.conf                  |  5 ++++
 .../xorg-xserver/xserver-xf86-config_0.1.bbappend  | 11 ++++++--
 recipes-kernel/linux/linux-raspberrypi.inc         |  6 ++++-
 5 files changed, 44 insertions(+), 13 deletions(-)
 create mode 100644 recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf
README +21 -8
index 8ef4e7a..6a6c398 100644
@@ -22,10 +22,11 @@ Contents:
     2.H. Optional - Enable kgdb over console support
     2.I. Optional - Enable SPI bus
     2.J. Optional - Enable I2C
-    2.K. Images
-    2.L. Boot to U-Boot
-    2.M. Image with Initramfs
-    2.N. Device tree support
+    2.K. Optional - Enable PiTFT support
+    2.L. Images
+    2.M. Boot to U-Boot
+    2.N. Image with Initramfs
+    2.O. Device tree support
 3. Extra apps
     3.A. omxplayer
 4. Source code and mirrors
@@ -157,7 +158,19 @@ ENABLE_SPI_BUS = "1"
 When using device tree kernels, set this variable to enable I2C
 ENABLE_I2C = "1"
 
-2.K. Images
+2.K. Optional - Enable PiTFT support
+====================================
+Basic support for using PiTFT screens can be enabled by adding
+below in local.conf:
+
+MACHINE_FEATURES += "pitft"
+  - This will enable SPI bus and i2c device-trees, it will also setup
+    framebuffer for console and x server on PiTFT.
+
+NOTE: To get this working the overlay for the PiTFT model must be build,
+      added and specified as well (dtoverlay=<driver> in config.txt)
+
+2.L. Images
 ===========
 * rpi-hwup-image
     Hardware up image
@@ -167,7 +180,7 @@ ENABLE_I2C = "1"
     Image based on rpi-basic-image which includes most of the packages in this
     layer and some media samples.
 
-2.L. Boot to U-Boot
+2.M. Boot to U-Boot
 ===================
 To have u-boot load kernel image, set in your local.conf
 KERNEL_IMAGETYPE = "uImage"
@@ -175,7 +188,7 @@ KERNEL_IMAGETYPE = "uImage"
 This will make kernel.img be u-boot image which will load uImage.
 By default, kernel.img is the actual kernel image (ex. Image).
 
-2.M. Image with Initramfs
+2.N. Image with Initramfs
 =========================
 To build an initramfs image :
     * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
@@ -188,7 +201,7 @@ To build an initramfs image :
     * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
         - KERNEL_INITRAMFS = "-initramfs"
 
-2.N. Device tree support
+2.O. Device tree support
 =========================
 Device tree for RPi is only supported when using linux-raspberrypi 3.18+
 kernels.
recipes-bsp/bootfiles/rpi-config_git.bb +4 -2
index ccb9b7f..236a359 100644
@@ -15,6 +15,8 @@ S = "${WORKDIR}/git"
 
 PR = "r4"
 
+PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+
 inherit deploy
 
 do_deploy() {
@@ -68,12 +70,12 @@ do_deploy() {
     fi
 
     # SPI bus support
-    if [ -n "${ENABLE_SPI_BUS}" ]; then
+    if [ -n "${ENABLE_SPI_BUS}" ] || [ "${PITFT}" = "1" ]; then
         echo "# Enable SPI bus" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=spi=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
 
-    if [ -n "${ENABLE_I2C}" ]; then
+    if [ -n "${ENABLE_I2C}" ] || [ "${PITFT}" = "1" ]; then
         echo "# Enable I2C" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
recipes-graphics/xorg-xserver/xserver-xf86-config/rpi/xorg.conf.d/99-pitft.conf new file +5 -0
new file mode 100644
index 0000000..0d2b36b
@@ -0,0 +1,5 @@
+Section "Device"
+    Identifier "Adafruit PiTFT"
+    Driver "fbdev"
+    Option "fbdev" "/dev/fb1"
+EndSection
recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend +9 -2
index 2cf40f8..0ae2ee0 100644
@@ -1,10 +1,17 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf "
+SRC_URI_append_rpi = " file://xorg.conf.d/10-evdev.conf \
+                       file://xorg.conf.d/99-pitft.conf \
+                     "
 
 do_install_append_rpi () {
 	install -d ${D}/${sysconfdir}/X11/xorg.conf.d/
-	install -m 0644 ${WORKDIR}/xorg.conf.d/* ${D}/${sysconfdir}/X11/xorg.conf.d/
+	install -m 0644 ${WORKDIR}/xorg.conf.d/10-evdev.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+
+	PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+	if [ "${PITFT}" = "1" ]; then
+		install -m 0644 ${WORKDIR}/xorg.conf.d/99-pitft.conf ${D}/${sysconfdir}/X11/xorg.conf.d/
+	fi
 }
 
 FILES_${PN}_rpi += "${sysconfdir}/X11/xorg.conf ${sysconfdir}/X11/xorg.conf.d/*"
recipes-kernel/linux/linux-raspberrypi.inc +5 -1
index 70e8bfe..e0de462 100644
@@ -53,7 +53,11 @@ do_install_prepend() {
 do_deploy_append() {
     # Deploy cmdline.txt
     install -d ${DEPLOYDIR}/bcm2835-bootfiles
-    echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
+    PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+    if [ ${PITFT} = "1" ]; then
+        PITFT_PARAMS="fbcon=map:10 fbcon=font:VGA8x8"
+    fi
+    echo "${CMDLINE}${PITFT_PARAMS}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
 }
 
 do_rpiboot_mkimage() {
Signature · 1 line
1.9.1
#12 lore raw

PATCH v2 7/7 pitft: Add PiTFT22 support

In reply to Petter Mabäcker

- Add support to build overlays for PiTFT22 in the kernel.
- Setup a basic configuration for the driver

The PiTFT22 support is optional and can be enabled by adding below in local.conf:

MACHINE_FEATURES += "pitft pitft22"

[Support #70]

---
 README                                             |   9 ++
 conf/machine/include/rpi-base.inc                  |   1 +
 recipes-bsp/bootfiles/rpi-config_git.bb            |   7 ++
 ...dts-add-overlay-for-pitft22-in-linux-3.18.patch | 110 +++++++++++++++++++++
 .../0001-dts-add-overlay-for-pitft22.patch         | 110 +++++++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_3.18.bb     |   5 +-
 recipes-kernel/linux/linux-raspberrypi_4.1.bb      |   4 +-
 7 files changed, 243 insertions(+), 3 deletions(-)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch
README +9 -0
index 6a6c398..f5b155f 100644
@@ -170,6 +170,15 @@ MACHINE_FEATURES += "pitft"
 NOTE: To get this working the overlay for the PiTFT model must be build,
       added and specified as well (dtoverlay=<driver> in config.txt)
 
+Below is a list of currently supported PiTFT models in meta-raspberrypi,
+the modelname should be added as a MACHINE_FEATURES in local.conf like below:
+
+   - MACHINE_FEATURES .= "pitft <modelname>"
+
+List of currently supported models
+-----------------------------------
+pitft22
+
 2.L. Images
 ===========
 * rpi-hwup-image
conf/machine/include/rpi-base.inc +1 -0
index c8f6cd6..27f09ad 100644
@@ -31,6 +31,7 @@ KERNEL_DEVICETREE ?= " \
     overlays/iqaudio-dac-overlay.dtb \
     overlays/iqaudio-dacplus-overlay.dtb \
     overlays/lirc-rpi-overlay.dtb \
+    overlays/pitft22-overlay.dtb \
     overlays/pps-gpio-overlay.dtb \
     overlays/w1-gpio-overlay.dtb \
     overlays/w1-gpio-pullup-overlay.dtb \
recipes-bsp/bootfiles/rpi-config_git.bb +7 -0
index 236a359..631ff42 100644
@@ -16,6 +16,7 @@ S = "${WORKDIR}/git"
 PR = "r4"
 
 PITFT="${@bb.utils.contains("MACHINE_FEATURES", "pitft", "1", "0", d)}"
+PITFT22="${@bb.utils.contains("MACHINE_FEATURES", "pitft22", "1", "0", d)}"
 
 inherit deploy
 
@@ -80,6 +81,12 @@ do_deploy() {
         echo "dtparam=i2c1=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
         echo "dtparam=i2c_arm=on" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
     fi
+
+    # PiTFT22 display support
+    if [ "${PITFT22}" = "1" ]; then
+        echo "# Enable PITFT22 display" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+        echo "dtoverlay=pitft22,rotate=270,speed=32000000,txbuflen=32768" >>${DEPLOYDIR}/bcm2835-bootfiles/config.txt
+    fi
 }
 
 addtask deploy before do_package after do_install
recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch new file +110 -0

110 lines not on this page · raw message

recipes-kernel/linux/linux-raspberrypi/0001-dts-add-overlay-for-pitft22.patch new file +110 -0

110 lines not on this page · raw message

recipes-kernel/linux/linux-raspberrypi_3.18.bb +3 -2
index a1fe6b4..9234f70 100644
@@ -1,8 +1,9 @@
 LINUX_VERSION ?= "3.18.16"
 
 SRCREV = "1bb18c8f721ef674a447f3622273f2e2de7a205c"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y"
-
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.18.y \
+           file://0001-dts-add-overlay-for-pitft22-in-linux-3.18.patch \
+          "
 require linux-raspberrypi.inc
 
 # Create missing out of tree 'overlays' directory prior to install step
recipes-kernel/linux/linux-raspberrypi_4.1.bb +3 -1
index cae459a..7e78693 100644
@@ -1,6 +1,8 @@
 LINUX_VERSION ?= "4.1.15"
 
 SRCREV = "02a8ee530e32b08e5df44f10e24d5fd82bb960e3"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y"
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.1.y \
+           file://0001-dts-add-overlay-for-pitft22.patch \
+          "
 
 require linux-raspberrypi.inc
Signature · 1 line
1.9.1