Skip to contentSkip to conversation

kernel fixes

PATCH Superseded Petter Mabäcker 2 participants 15 messages May 8, 2015 – May 25, 2015 Broadcom BCM2711/BCM2835 Arm architecture

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover kernel fixes

The following changes since commit c9f29df249b80ab488e4ea6eddc01a6522a28c09:

linux-raspberrypi: Update 3.18 branch to 3.18.11 (2015-04-30 21:55:02 +0200)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib petmab/rpi_kernel_fixes_dts
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=petmab/rpi_kernel_fixes_dts

Petter Mabäcker (5):
devicetree: auto-disable dts for old kernels
README: fix outdated device tree info
linux-raspberrypi: Add 3.14 support
linux-raspberrypi: Drop support for old kernel versions
linux-raspberrypi: Update 3.12 branch to latest

 README                                             |   3 +-
 classes/linux-raspberrypi-base.bbclass             |  29 +++
 classes/sdcard_image-rpi.bbclass                   |   6 +-
 recipes-kernel/linux/linux-raspberrypi.inc         |   4 +-
 .../0001-ASoC-Add-BCM2708-fixes.patch              | 263 +++++++++++++++++++++
 ...ng-lock-from-atomic-context-in-i2c-driver.patch | 235 ++++++++++++++++++
 .../sl030raspberrypii2ckernel.patch                |  32 ---
 recipes-kernel/linux/linux-raspberrypi_3.10.bb     |   8 -
 recipes-kernel/linux/linux-raspberrypi_3.12.bb     |   3 +-
 recipes-kernel/linux/linux-raspberrypi_3.14.bb     |   9 +
 recipes-kernel/linux/linux-raspberrypi_3.16.bb     |   8 -
 recipes-kernel/linux/linux-raspberrypi_3.6.bb      |   8 -
 recipes-kernel/linux/linux-raspberrypi_3.8.bb      |   8 -
 13 files changed, 546 insertions(+), 70 deletions(-)
 create mode 100644 classes/linux-raspberrypi-base.bbclass
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi/sl030raspberrypii2ckernel.patch
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.10.bb
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_3.14.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.16.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.6.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.8.bb
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/5 devicetree: auto-disable dts for old kernels

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was introduced, kernel versions < 3.18 might not be buildable. Since full device tree support was introduced in 3.18 this change ensures that all kernel < 3.18 will automatically disable device tree.

---
 classes/linux-raspberrypi-base.bbclass     | 29 +++++++++++++++++++++++++++++
 classes/sdcard_image-rpi.bbclass           |  6 ++++--
 recipes-kernel/linux/linux-raspberrypi.inc |  4 +++-
 3 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 classes/linux-raspberrypi-base.bbclass
classes/linux-raspberrypi-base.bbclass new file +29 -0
new file mode 100644
index 0000000..4bcadd0
@@ -0,0 +1,29 @@
+inherit linux-kernel-base
+
+
+def get_dts(d, ver):
+    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
+    dts = d.getVar("KERNEL_DEVICETREE", True)
+
+    # d.getVar() might return 'None' as a normal string
+    # leading to 'is None' check isn't enough.
+    # TODO: Investigate if this is a bug in bitbake
+    if ver is None or ver == "None":
+        ''' if 'ver' isn't set try to grab the kernel version
+        from the kernel staging '''
+        ver = get_kernelversion_file(staging_dir)
+
+    if ver is not None:
+        min_ver = ver.split('.', 3)
+    else:
+        return dts
+
+    # Always turn off device tree support for kernel's < 3.18
+    try:
+        if int(min_ver[0]) <= 3:
+            if int(min_ver[1]) < 18:
+                dts = ""
+    except IndexError:
+        min_ver = None
+
+    return dts
classes/sdcard_image-rpi.bbclass +4 -2
index 1ff664d..ca94566 100644
@@ -1,4 +1,5 @@
 inherit image_types
+inherit linux-raspberrypi-base
 
 #
 # Create an image that can by written onto a SD card using dd.
@@ -88,7 +89,8 @@ IMAGE_CMD_rpi-sdimg () {
 	ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} - ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
 	SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} + ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
 
-	echo "Creating filesystem with Boot partition ${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"
+	# Check if we are building with device tree support
+	DTS="${@get_dts(d, None)}"
 
 	# Initialize sdcard image file
 	dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
@@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () {
 		mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
 		;;
 	*)
-		if test -n "${KERNEL_DEVICETREE}"; then
+		if test -n "${DTS}"; then
 			# Copy board device trees to root folder
 			for DTB in ${DT_ROOT}; do
 				DTB_BASE_NAME=`basename ${DTB} .dtb`
recipes-kernel/linux/linux-raspberrypi.inc +3 -1
index 84d4f9e..7e36408 100644
@@ -1,4 +1,5 @@
 require linux.inc
+inherit linux-raspberrypi-base
 
 DESCRIPTION = "Linux Kernel for Raspberry Pi"
 SECTION = "kernel"
@@ -26,7 +27,8 @@ UDEV_GE_141 ?= "1"
 # See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
 python __anonymous () {
     kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
-    kerneldt = d.getVar('KERNEL_DEVICETREE', True)
+    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))
+    d.setVar("KERNEL_DEVICETREE", kerneldt)
 
     # Add dependency to 'rpi-mkimage-native' package only if RPi bootloader is used with DT-enable kernel
     if kerneldt:
Signature · 1 line
1.9.1
#2 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

Hello Petter,

Quoted 68 lines · Petter Mabäcker

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was introduced, kernel versions < 3.18 might not be buildable. Since full device tree support was introduced in 3.18 this change ensures that all kernel < 3.18 will automatically disable device tree.

---
 classes/linux-raspberrypi-base.bbclass     | 29
+++++++++++++++++++++++++++++
 classes/sdcard_image-rpi.bbclass           |  6 ++++--
 recipes-kernel/linux/linux-raspberrypi.inc |  4 +++-
 3 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 classes/linux-raspberrypi-base.bbclass
classes/linux-raspberrypi-base.bbclass new file +29 -0
new file mode 100644
index 0000000..4bcadd0
@@ -0,0 +1,29 @@
+inherit linux-kernel-base
+
+
+def get_dts(d, ver):
+    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
+    dts = d.getVar("KERNEL_DEVICETREE", True)
+
+    # d.getVar() might return 'None' as a normal string
+    # leading to 'is None' check isn't enough.
+    # TODO: Investigate if this is a bug in bitbake
+    if ver is None or ver == "None":
+        ''' if 'ver' isn't set try to grab the kernel version
+        from the kernel staging '''
+        ver = get_kernelversion_file(staging_dir)
+
+    if ver is not None:
+        min_ver = ver.split('.', 3)
+    else:
+        return dts
+
+    # Always turn off device tree support for kernel's < 3.18
+    try:
+        if int(min_ver[0]) <= 3:
+            if int(min_ver[1]) < 18:
+                dts = ""
+    except IndexError:
+        min_ver = None
+
+    return dts
classes/sdcard_image-rpi.bbclass +1 -1
index 1ff664d..ca94566 100644
@@ -1,4 +1,5 @@
 inherit image_types
+inherit linux-raspberrypi-base
 
 #
 # Create an image that can by written onto a SD card using dd.
@@ -88,7 +89,8 @@ IMAGE_CMD_rpi-sdimg () {
        ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} -
 ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
        SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
 ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
 
-       echo "Creating filesystem with Boot partition
Quoted 2 lines

${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"

Why do you remove this line? Maybe by mistake?

classes/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 93

Quoted 3 lines
classes/sdcard_image-rpi.bbclass +2 -0
+       # Check if we are building with device tree support
+       DTS="${@get_dts(d, None)}"

Aren't we able to use the same variable name, KERNEL_DEVICETREE? What that be a little clearer?

Quoted 46 lines

# Initialize sdcard image file
dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}

classes/sdcard_image-rpi.bbclass +0 -0
@@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () {
                mcopy -i ${WORKDIR}/boot.img -s

${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage

                ;;
        *)
classes/sdcard_image-rpi.bbclass +1 -1
-               if test -n "${KERNEL_DEVICETREE}"; then
+               if test -n "${DTS}"; then
                        # Copy board device trees to root folder
                        for DTB in ${DT_ROOT}; do
                                DTB_BASE_NAME=`basename ${DTB} .dtb`
recipes-kernel/linux/linux-raspberrypi.inc +1 -0
index 84d4f9e..7e36408 100644
@@ -1,4 +1,5 @@
 require linux.inc
+inherit linux-raspberrypi-base
 
 DESCRIPTION = "Linux Kernel for Raspberry Pi"
 SECTION = "kernel"
@@ -26,7 +27,8 @@ UDEV_GE_141 ?= "1"
 # See

http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
python __anonymous () {
kerneltype = d.getVar('KERNEL_IMAGETYPE', True)

recipes-kernel/linux/linux-raspberrypi.inc +2 -1
-    kerneldt = d.getVar('KERNEL_DEVICETREE', True)
+    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))
+    d.setVar("KERNEL_DEVICETREE", kerneldt)
 
     # Add dependency to 'rpi-mkimage-native' package only if RPi

bootloader is used with DT-enable kernel
if kerneldt:
--
1.9.1

--
_______________________________________________
yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/yocto

Signature · 3 lines
*Andrei Gherzan*
*e: **[email protected] <[email protected]>*
*w: *www.gherzan.ro
#3 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

Hi Andrei,

See answers inline.

BR,
Petter

Quoted 73 lines · Andrei Gherzan

Hello Petter,

On Fri, May 8, 2015 at 11:49 PM, Petter Mabäcker <[email protected] <mailto:[email protected]>> wrote:

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was introduced, kernel versions < 3.18 might not be buildable. Since full device tree support was introduced in 3.18 this change ensures that all
kernel < 3.18 will automatically disable device tree.

<mailto:[email protected]>>
---
classes/linux-raspberrypi-base.bbclass | 29
+++++++++++++++++++++++++++++
classes/sdcard_image-rpi.bbclass | 6 ++++--
recipes-kernel/linux/linux-raspberrypi.inc | 4 +++- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 classes/linux-raspberrypi-base.bbclass

diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass new file mode 100644
index 0000000..4bcadd0
--- /dev/null
+++ b/classes/linux-raspberrypi-base.bbclass @@ -0,0 +1,29 @@
+inherit linux-kernel-base
+
+
+def get_dts(d, ver):
+ staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
+ dts = d.getVar("KERNEL_DEVICETREE", True)
+
+ # d.getVar() might return 'None' as a normal string
+ # leading to 'is None' check isn't enough.
+ # TODO: Investigate if this is a bug in bitbake
+ if ver is None or ver == "None":
+ ''' if 'ver' isn't set try to grab the kernel version
+ from the kernel staging '''
+ ver = get_kernelversion_file(staging_dir)
+
+ if ver is not None:
+ min_ver = ver.split('.', 3)
+ else:
+ return dts
+
+ # Always turn off device tree support for kernel's < 3.18
+ try:
+ if int(min_ver[0]) <= 3:
+ if int(min_ver[1]) < 18:
+ dts = ""
+ except IndexError:
+ min_ver = None
+
+ return dts
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 1ff664d..ca94566 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -1,4 +1,5 @@
inherit image_types
+inherit linux-raspberrypi-base

#
# Create an image that can by written onto a SD card using dd.
@@ -88,7 +89,8 @@ IMAGE_CMD_rpi-sdimg () {
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} -
${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})

Quoted 5 lines

- echo "Creating filesystem with Boot partition
${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"

Why do you remove this line? Maybe by mistake?

Yes this is by mistake, thanks for finding it. Will send up a new version with this fixed.

Quoted 6 lines

+ # Check if we are building with device tree support
+ DTS="${@get_dts(d, None)}"

Aren't we able to use the same variable name, KERNEL_DEVICETREE? What that be a little clearer?

No, at least i couldn't get this working. When trying to set the environment variable KERNEL_DEVICETREE in this context the values was only ignored. Don't know if the image recipe (or at least the IMAGE_CMD func) are doing something special. Perhaps it's possible to use 'eval' or something similar to enforce the expansion of the variable. If you have any good advice please share them, otherwise I can at least write some comment about this.

Quoted 54 lines

            # Initialize sdcard image file
            dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}
    @@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () {
                    mcopy -i ${WORKDIR}/boot.img -s
    ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin
    ::uImage
                    ;;
            *)
    -               if test -n "${KERNEL_DEVICETREE}"; then
    +               if test -n "${DTS}"; then
                            # Copy board device trees to root folder
                            for DTB in ${DT_ROOT}; do
                                    DTB_BASE_NAME=`basename ${DTB} .dtb`
    diff --git a/recipes-kernel/linux/linux-raspberrypi.inc
    b/recipes-kernel/linux/linux-raspberrypi.inc
    index 84d4f9e..7e36408 100644
    --- a/recipes-kernel/linux/linux-raspberrypi.inc
    +++ b/recipes-kernel/linux/linux-raspberrypi.inc
    @@ -1,4 +1,5 @@
     require linux.inc
    +inherit linux-raspberrypi-base

     DESCRIPTION = "Linux Kernel for Raspberry Pi"
     SECTION = "kernel"
    @@ -26,7 +27,8 @@ UDEV_GE_141 ?= "1"
     # See
    http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
     python __anonymous () {
         kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
    -    kerneldt = d.getVar('KERNEL_DEVICETREE', True)
    +    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))
    +    d.setVar("KERNEL_DEVICETREE", kerneldt)

         # Add dependency to 'rpi-mkimage-native' package only if RPi
    bootloader is used with DT-enable kernel
         if kerneldt:
    --
    1.9.1

    --
    _______________________________________________
    yocto mailing list
    [email protected] <mailto:[email protected]>
    https://lists.yoctoproject.org/listinfo/yocto
Signature · 3 lines
*Andrei Gherzan*
*e: */[email protected] <mailto:[email protected]>/
/*w:* /www.gherzan.ro <http://www.gherzan.ro>
#4 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

Quoted 102 lines · Petter Mabäcker

Hi Andrei,

See answers inline.

BR,
Petter

On 05/10/2015 12:16 PM, Andrei Gherzan wrote:

Hello Petter,

Quoted 68 lines · Petter Mabäcker

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was introduced, kernel versions < 3.18 might not be buildable. Since full device tree support was introduced in 3.18 this change ensures that all kernel < 3.18 will automatically disable device tree.

---
 classes/linux-raspberrypi-base.bbclass     | 29
+++++++++++++++++++++++++++++
 classes/sdcard_image-rpi.bbclass           |  6 ++++--
 recipes-kernel/linux/linux-raspberrypi.inc |  4 +++-
 3 files changed, 36 insertions(+), 3 deletions(-)
 create mode 100644 classes/linux-raspberrypi-base.bbclass
classes/linux-raspberrypi-base.bbclass new file +29 -0
new file mode 100644
index 0000000..4bcadd0
@@ -0,0 +1,29 @@
+inherit linux-kernel-base
+
+
+def get_dts(d, ver):
+    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
+    dts = d.getVar("KERNEL_DEVICETREE", True)
+
+    # d.getVar() might return 'None' as a normal string
+    # leading to 'is None' check isn't enough.
+    # TODO: Investigate if this is a bug in bitbake
+    if ver is None or ver == "None":
+        ''' if 'ver' isn't set try to grab the kernel version
+        from the kernel staging '''
+        ver = get_kernelversion_file(staging_dir)
+
+    if ver is not None:
+        min_ver = ver.split('.', 3)
+    else:
+        return dts
+
+    # Always turn off device tree support for kernel's < 3.18
+    try:
+        if int(min_ver[0]) <= 3:
+            if int(min_ver[1]) < 18:
+                dts = ""
+    except IndexError:
+        min_ver = None
+
+    return dts
classes/sdcard_image-rpi.bbclass +1 -1
index 1ff664d..ca94566 100644
@@ -1,4 +1,5 @@
 inherit image_types
+inherit linux-raspberrypi-base
 
 #
 # Create an image that can by written onto a SD card using dd.
@@ -88,7 +89,8 @@ IMAGE_CMD_rpi-sdimg () {
        ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} -
 ${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
        SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
 ${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})
 
-       echo "Creating filesystem with Boot partition
Quoted 2 lines

${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"

Why do you remove this line? Maybe by mistake?

Yes this is by mistake, thanks for finding it. Will send up a new version with this fixed.

Don't bother. I'll fix it before merging.

classes/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 93

Quoted 3 lines
classes/sdcard_image-rpi.bbclass +2 -0
+       # Check if we are building with device tree support
+       DTS="${@get_dts(d, None)}"

Aren't we able to use the same variable name, KERNEL_DEVICETREE? What
that be a little clearer?

Quoted 8 lines

No, at least i couldn't get this working. When trying to set the environment variable KERNEL_DEVICETREE in this context the values was only ignored. Don't know if the image recipe (or at least the IMAGE_CMD func) are doing something special. Perhaps it's possible to use 'eval' or something similar to enforce the expansion of the variable. If you have any good advice please share them, otherwise I can at least write some comment about this.

I'll try it a little. But I didn't expect this. Will see. Otherwise this is fine.

Signature · 3 lines
*Andrei Gherzan*
*e: **[email protected] <[email protected]>*
*w: *www.gherzan.ro
#5 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

Quoted 93 lines · Andrei Gherzan

On Sun, May 10, 2015 at 4:20 PM, Petter Mabäcker <[email protected] <mailto:[email protected]>> wrote:

    Hi Andrei,

    See answers inline.

    BR,
    Petter


    On 05/10/2015 12:16 PM, Andrei Gherzan wrote:
Quoted 80 lines

Hello Petter,

On Fri, May 8, 2015 at 11:49 PM, Petter Mabäcker <[email protected] <mailto:[email protected]>> wrote:

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was
introduced, kernel versions < 3.18 might not be buildable. Since full
device tree support was introduced in 3.18 this change ensures that all
kernel < 3.18 will automatically disable device tree.

<mailto:[email protected]>>
---
classes/linux-raspberrypi-base.bbclass | 29
+++++++++++++++++++++++++++++
classes/sdcard_image-rpi.bbclass | 6 ++++-- recipes-kernel/linux/linux-raspberrypi.inc | 4 +++- 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 classes/linux-raspberrypi-base.bbclass

diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-raspberrypi-base.bbclass new file mode 100644
index 0000000..4bcadd0
--- /dev/null
+++ b/classes/linux-raspberrypi-base.bbclass @@ -0,0 +1,29 @@
+inherit linux-kernel-base
+
+
+def get_dts(d, ver):
+ staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
+ dts = d.getVar("KERNEL_DEVICETREE", True)
+
+ # d.getVar() might return 'None' as a normal string
+ # leading to 'is None' check isn't enough.
+ # TODO: Investigate if this is a bug in bitbake
+ if ver is None or ver == "None":
+ ''' if 'ver' isn't set try to grab the kernel version
+ from the kernel staging '''
+ ver = get_kernelversion_file(staging_dir)
+
+ if ver is not None:
+ min_ver = ver.split('.', 3)
+ else:
+ return dts
+
+ # Always turn off device tree support for kernel's < 3.18
+ try:
+ if int(min_ver[0]) <= 3:
+ if int(min_ver[1]) < 18:
+ dts = ""
+ except IndexError:
+ min_ver = None
+
+ return dts
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 1ff664d..ca94566 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -1,4 +1,5 @@
inherit image_types
+inherit linux-raspberrypi-base

#
# Create an image that can by written onto a SD card using dd.
@@ -88,7 +89,8 @@ IMAGE_CMD_rpi-sdimg () {
ROOTFS_SIZE_ALIGNED=$(expr ${ROOTFS_SIZE_ALIGNED} -
${ROOTFS_SIZE_ALIGNED} % ${IMAGE_ROOTFS_ALIGNMENT})
SDIMG_SIZE=$(expr ${IMAGE_ROOTFS_ALIGNMENT} +
${BOOT_SPACE_ALIGNED} + ${ROOTFS_SIZE_ALIGNED})

- echo "Creating filesystem with Boot partition
${BOOT_SPACE_ALIGNED} KiB and RootFS ${ROOTFS_SIZE_ALIGNED} KiB"

Quoted 5 lines
Quoted 1 line

Why do you remove this line? Maybe by mistake?

Yes this is by mistake, thanks for finding it. Will send up a new version with this fixed.

Don't bother. I'll fix it before merging.

Ok, thanks.

Quoted 16 lines
Quoted 7 lines

+ # Check if we are building with device tree support
+ DTS="${@get_dts(d, None)}"

Aren't we able to use the same variable name, KERNEL_DEVICETREE? What that be a little clearer?

No, at least i couldn't get this working. When trying to set the environment variable KERNEL_DEVICETREE in this context the values was only ignored. Don't know if the image recipe (or at least the IMAGE_CMD func) are doing something special. Perhaps it's possible to use 'eval' or something similar to enforce the expansion of the variable. If you have any good advice please share them, otherwise I can at least write some comment about this.

Quoted 1 line

I'll try it a little. But I didn't expect this. Will see. Otherwise this is fine.

Neither did I, let me know if you find anything interesting about this.

Quoted 6 lines
Signature · 4 lines
-- 
*Andrei Gherzan*
*e: */[email protected] <mailto:[email protected]>/
/*w:* /www.gherzan.ro <http://www.gherzan.ro>
#6 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

In reply to Petter Mabäcker

Hi Petter,

Quoted 6 lines
classes/sdcard_image-rpi.bbclass +2 -0
+       # Check if we are building with device tree support
+       DTS="${@get_dts(d, None)}"
 
        # Initialize sdcard image file
        dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE}

classes/sdcard_image-rpi.bbclass IMAGE_CMD_rpi-sdimg () { · line 120

Quoted 8 lines
classes/sdcard_image-rpi.bbclass +1 -1
@@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () {
                mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
                ;;
        *)
-               if test -n "${KERNEL_DEVICETREE}"; then
+               if test -n "${DTS}"; then
                        # Copy board device trees to root folder
                        for DTB in ${DT_ROOT}; do
                                DTB_BASE_NAME=`basename ${DTB} .dtb`

I started to review these patches and test. I have one concern related to this patch. More specifically the fact that even though you check for DTS now, we are still using DT_ROOT (and co) for the next loops which use KERNEL_DEVICETREE. Maybe a better way to do it would be to move
DT_ALL = "${@d.getVar('KERNEL_DEVICETREE', True) or ''}" DT_OVERLAYS = "${@oe.utils.str_filter('\S+\-overlay\.dtb$', '${DT_ALL}', d)}"
DT_ROOT = "${@oe.utils.str_filter_out('\S+\-overlay\.dtb$', '${DT_ALL}', d)}" ... after you define DTS and define these based on DTS variable.

Regards,
Andrei

#7 lore raw

Re: [meta-raspberrypi][PATCH 1/5] devicetree: auto-disable dts for old kernels

2015-05-18 00:46 skrev Andrei Gherzan:

Quoted 3 lines

Hi Petter,

Quoted 1 line

+ #

Check if we are building with device tree support + DTS="${@get_dts(d, None)}" # Initialize sdcard image file dd if=/dev/zero of=${SDIMG} bs=1024 count=0 seek=${SDIMG_SIZE} @@ -112,7 +114,7 @@ IMAGE_CMD_rpi-sdimg () { mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage ;; *) - if test -n "${KERNEL_DEVICETREE}"; then + if test -n "${DTS}"; then # Copy board device trees to root folder for DTB in ${DT_ROOT}; do DTB_BASE_NAME=basename ${DTB} .dtb

Quoted 2 lines

I started to

review these patches and test. I have one concern related

Quoted 1 line

to this

patch. More specifically the fact that even though you check

Quoted 1 line

for DTS

now, we are still using DT_ROOT (and co) for the next loops

Quoted 1 line

which use

KERNEL_DEVICETREE. Maybe a better way to do it would be to

Quoted 2 lines

move

DT_ALL = "${@d.getVar('KERNEL_DEVICETREE', True) or ''}"

Quoted 1 line

DT_OVERLAYS =

"${@oe.utils.str_filter('S+-overlay.dtb$',

Quoted 2 lines

'${DT_ALL}', d)}"
DT_ROOT

= "${@oe.utils.str_filter_out('S+-overlay.dtb$', '${DT_ALL}', d)}"

Quoted 1 line

...

after you define DTS and define these based on DTS variable.

Quoted 2 lines

Regards,

Quoted 1 line

Andrei

I Agree, it sounds reasonable. I have prepared a new changeset for this. Have some final testing to do before sending it. Biggest problem why I didn't fix this in first change was that the IMAGE_CMD func seems to behave a little different then I thought. I had problems to use some functionality and expand variables in some situations, but I think I figured out a way forward...

Regards Petter

Petter Mabäcker

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

#8 lore raw

PATCH 2/5 README: fix outdated device tree info

In reply to Petter Mabäcker

After '6392a63 rpi-base.inc: Use KERNEL_DEVICETREE by default' was introduced, the default value for 3.18+ kernels was changed. Ensure this is reflected in the README.

---
 README | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
README +2 -1
index a2ec4ca..3913f41 100644
@@ -179,7 +179,8 @@ kernels.
           While creating the SDCard image, this modified kernel is put on
           boot partition (as kernel.img) as well as DeviceTree blobs (.dtb files).
 
-NOTE: KERNEL_DEVICETREE is empty by default.
+NOTE: KERNEL_DEVICETREE is default enabled for kernel >= 3.18 and always disabled for
+      older kernel versions.
 
 3. Extra apps
 =============
Signature · 1 line
1.9.1
#9 lore raw

PATCH 3/5 linux-raspberrypi: Add 3.14 support

In reply to Petter Mabäcker

Add basic support for Linux 3.14, cherry-pick changes from 3.18.y in order to solve some debugfs warnings and get better support for i2s for BCM2708.

- 3.14 lacks BCM2709 support and will not by default be able to use for raspberry pi 2.

Below warnings still exists they are harmless and exists due to that snd_soc_pcm512x is triggered to be loaded twice. The problem is solved after device tree support for the driver was introduced in 3.18.y and no easy solution exists to solve this problem on older kernel versions (see
https://github.com/raspberrypi/linux/issues/662 for more info).

pcm512x 1-004c: Failed to reset device: -5
pcm512x: probe of 1-004c failed with error

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore and its content seems to be obsolite after cherry-picking '558d0bf Fix grabbing lock from atomic context in i2c driver'.

[Support #57]

---
 .../0001-ASoC-Add-BCM2708-fixes.patch              | 263 +++++++++++++++++++++
 ...ng-lock-from-atomic-context-in-i2c-driver.patch | 235 ++++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_3.14.bb     |   9 +
 3 files changed, 507 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_3.14.bb
recipes-kernel/linux/linux-raspberrypi/0001-ASoC-Add-BCM2708-fixes.patch new file +263 -0
new file mode 100644
index 0000000..26c71b8
@@ -0,0 +1,263 @@
+From e73a69601c65103b0e032e6093af0f00a1e1af3a Mon Sep 17 00:00:00 2001
+From: Florian Meier <[email protected]>
+Date: Fri, 22 Nov 2013 14:33:38 +0100
+Subject: [PATCH 1/2] ASoC: Add BCM2708 fixes
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+(cherry-pick remaining parts of
+730cb8a1216f9da3d097072cd9bb06e0db348172)
+
+bcm2708-i2s: Update bclk_ratio to more correct values
+
+Move GPIO setup to hw_params.
+
+This is used to stop the I2S driver from breaking
+the GPIO setup for other uses of the PCM interface
+
+Configure GPIOs for I2S based on revision/card settings
+
+With RPi model B+, assignment of the I2S GPIO pins has changed.
+This patch uses the board revision to auto-detect the GPIOs used
+for I2S. It also allows sound card drivers to set the GPIOs that
+should be used. This is especially important with the Compute
+Module.
+
+bcm2708-i2s: Avoid leak from iomap when accessing gpio
+
+bcm2708: Eliminate i2s debugfs directory error
+
+Qualify the two regmap ranges uses by bcm2708-i2s ('-i2s' and '-clk')
+to avoid the name clash when registering debugfs entries.
+
+Upstream-Status: Pending
+
+Signed-off-by: Petter Mabäcker <[email protected]>
+
+Conflicts:
+	sound/soc/bcm/Kconfig
+	sound/soc/bcm/Makefile
+	sound/soc/bcm/bcm2708-i2s.c
+---
+ sound/soc/bcm/bcm2708-i2s.c | 82 ++++++++++++++++++++++++++++++++++++---------
+ sound/soc/bcm/bcm2708-i2s.h | 35 +++++++++++++++++++
+ 2 files changed, 102 insertions(+), 15 deletions(-)
+ create mode 100644 sound/soc/bcm/bcm2708-i2s.h
+
+diff --git a/sound/soc/bcm/bcm2708-i2s.c b/sound/soc/bcm/bcm2708-i2s.c
+index 9976571..3fcb740 100644
+--- a/sound/soc/bcm/bcm2708-i2s.c
++++ b/sound/soc/bcm/bcm2708-i2s.c
+@@ -31,6 +31,8 @@
+  * General Public License for more details.
+  */
+ 
++#include "bcm2708-i2s.h"
++
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/device.h>
+@@ -38,6 +40,7 @@
+ #include <linux/delay.h>
+ #include <linux/io.h>
+ #include <linux/clk.h>
++#include <mach/gpio.h>
+ 
+ #include <sound/core.h>
+ #include <sound/pcm.h>
+@@ -46,6 +49,8 @@
+ #include <sound/soc.h>
+ #include <sound/dmaengine_pcm.h>
+ 
++#include <asm/system_info.h>
++
+ /* Clock registers */
+ #define BCM2708_CLK_PCMCTL_REG  0x00
+ #define BCM2708_CLK_PCMDIV_REG  0x04
+@@ -163,6 +168,9 @@ static const unsigned int bcm2708_clk_freq[BCM2708_CLK_SRC_HDMI+1] = {
+ #define BCM2708_DMA_DREQ_PCM_TX		2
+ #define BCM2708_DMA_DREQ_PCM_RX		3
+ 
++/* I2S pin configuration */
++static int bcm2708_i2s_gpio=BCM2708_I2S_GPIO_AUTO;
++
+ /* General device struct */
+ struct bcm2708_i2s_dev {
+ 	struct device				*dev;
+@@ -174,6 +182,12 @@ struct bcm2708_i2s_dev {
+ 	struct regmap *clk_regmap;
+ };
+ 
++void bcm2708_i2s_set_gpio(int gpio) {
++	bcm2708_i2s_gpio=gpio;
++}
++EXPORT_SYMBOL(bcm2708_i2s_set_gpio);
++
++
+ static void bcm2708_i2s_start_clock(struct bcm2708_i2s_dev *dev)
+ {
+ 	/* Start the clock if in master mode */
+@@ -306,6 +320,25 @@ static int bcm2708_i2s_set_dai_bclk_ratio(struct snd_soc_dai *dai,
+ }
+ 
+ 
++static int bcm2708_i2s_set_function(unsigned offset, int function)
++{
++	#define GPIOFSEL(x)  (0x00+(x)*4)
++	void __iomem *gpio = __io_address(GPIO_BASE);
++	unsigned alt = function <= 3 ? function + 4: function == 4 ? 3 : 2;
++	unsigned gpiodir;
++	unsigned gpio_bank = offset / 10;
++	unsigned gpio_field_offset = (offset - 10 * gpio_bank) * 3;
++
++	if (offset >= BCM2708_NR_GPIOS)
++		return -EINVAL;
++
++	gpiodir = readl(gpio + GPIOFSEL(gpio_bank));
++	gpiodir &= ~(7 << gpio_field_offset);
++	gpiodir |= alt << gpio_field_offset;
++	writel(gpiodir, gpio + GPIOFSEL(gpio_bank));
++	return 0;
++}
++
+ static void bcm2708_i2s_setup_gpio(void)
+ {
+ 	/*
+@@ -314,20 +347,37 @@ static void bcm2708_i2s_setup_gpio(void)
+ 	 * TODO Better way would be to handle
+ 	 * this in the device tree!
+ 	 */
+-#define INP_GPIO(g) *(gpio+((g)/10)) &= ~(7<<(((g)%10)*3))
+-#define SET_GPIO_ALT(g,a) *(gpio+(((g)/10))) |= (((a)<=3?(a)+4:(a)==4?3:2)<<(((g)%10)*3))
++	int pin,pinconfig,startpin,alt;
++
++	/* SPI is on different GPIOs on different boards */
++        /* for Raspberry Pi B+, this is pin GPIO18-21, for original on 28-31 */
++	if (bcm2708_i2s_gpio==BCM2708_I2S_GPIO_AUTO) {	
++		if ((system_rev & 0xffffff) >= 0x10) {
++			/* Model B+ */
++			pinconfig=BCM2708_I2S_GPIO_PIN18;
++		} else {
++			/* original */
++			pinconfig=BCM2708_I2S_GPIO_PIN28;
++		}
++	} else {
++		pinconfig=bcm2708_i2s_gpio;
++	}
+ 
+-	unsigned int *gpio;
+-	int pin;
+-	gpio = ioremap(GPIO_BASE, SZ_16K);
++	if (pinconfig==BCM2708_I2S_GPIO_PIN18) {
++		startpin=18;
++		alt=BCM2708_I2S_GPIO_PIN18_ALT;
++	} else if (pinconfig==BCM2708_I2S_GPIO_PIN28) {
++		startpin=28;
++		alt=BCM2708_I2S_GPIO_PIN28_ALT;
++	} else {
++		printk(KERN_INFO "Can't configure I2S GPIOs, unknown pin mode for I2S: %i\n",pinconfig);
++		return;
++	}	
+ 
+-	/* SPI is on GPIO 7..11 */
+-	for (pin = 28; pin <= 31; pin++) {
+-		INP_GPIO(pin);		/* set mode to GPIO input first */
+-		SET_GPIO_ALT(pin, 2);	/* set mode to ALT 0 */
++	/* configure I2S pins to correct ALT mode */
++	for (pin = startpin; pin <= startpin+3; pin++) {
++		bcm2708_i2s_set_function(pin, alt);
+ 	}
+-#undef INP_GPIO
+-#undef SET_GPIO_ALT
+ }
+ 
+ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream,
+@@ -372,15 +422,15 @@ static int bcm2708_i2s_hw_params(struct snd_pcm_substream *substream,
+ 	switch (params_format(params)) {
+ 	case SNDRV_PCM_FORMAT_S16_LE:
+ 		data_length = 16;
+-		bclk_ratio = 40;
++		bclk_ratio = 50;
+ 		break;
+ 	case SNDRV_PCM_FORMAT_S24_LE:
+ 		data_length = 24;
+-		bclk_ratio = 40;
++		bclk_ratio = 50;
+ 		break;
+ 	case SNDRV_PCM_FORMAT_S32_LE:
+ 		data_length = 32;
+-		bclk_ratio = 80;
++		bclk_ratio = 100;
+ 		break;
+ 	default:
+ 		return -EINVAL;
+@@ -746,7 +796,7 @@ static struct snd_soc_dai_driver bcm2708_i2s_dai = {
+ 		.channels_max = 2,
+ 		.rates =	SNDRV_PCM_RATE_8000_192000,
+ 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
+-				// | SNDRV_PCM_FMTBIT_S24_LE : disable for now, it causes white noise with xbmc
++				| SNDRV_PCM_FMTBIT_S24_LE
+ 				| SNDRV_PCM_FMTBIT_S32_LE
+ 		},
+ 	.capture = {
+@@ -803,6 +853,7 @@ static const struct regmap_config bcm2708_regmap_config[] = {
+ 		.precious_reg = bcm2708_i2s_precious_reg,
+ 		.volatile_reg = bcm2708_i2s_volatile_reg,
+ 		.cache_type = REGCACHE_RBTREE,
++		.name = "i2s",
+ 	},
+ 	{
+ 		.reg_bits = 32,
+@@ -811,6 +862,7 @@ static const struct regmap_config bcm2708_regmap_config[] = {
+ 		.max_register = BCM2708_CLK_PCMDIV_REG,
+ 		.volatile_reg = bcm2708_clk_volatile_reg,
+ 		.cache_type = REGCACHE_RBTREE,
++		.name = "clk",
+ 	},
+ };
+ 
+diff --git a/sound/soc/bcm/bcm2708-i2s.h b/sound/soc/bcm/bcm2708-i2s.h
+new file mode 100644
+index 0000000..94fed6a
+--- /dev/null
++++ b/sound/soc/bcm/bcm2708-i2s.h
+@@ -0,0 +1,35 @@
++/*
++ * I2S configuration for sound cards. 
++ *
++ * Copyright (c) 2014 Daniel Matuschek <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ */
++
++#ifndef BCM2708_I2S_H
++#define BCM2708_I2S_H
++
++/* I2S pin assignment */
++#define BCM2708_I2S_GPIO_AUTO	0
++#define BCM2708_I2S_GPIO_PIN18	1
++#define BCM2708_I2S_GPIO_PIN28	2
++
++/* Alt mode to enable I2S */
++#define BCM2708_I2S_GPIO_PIN18_ALT	0
++#define BCM2708_I2S_GPIO_PIN28_ALT	2
++
++extern void bcm2708_i2s_set_gpio(int gpio);
++
++#endif
+-- 
+1.9.1
+
recipes-kernel/linux/linux-raspberrypi/0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch new file +235 -0

235 lines not on this page · raw message

recipes-kernel/linux/linux-raspberrypi_3.14.bb new file +9 -0
new file mode 100644
index 0000000..2edba32
@@ -0,0 +1,9 @@
+LINUX_VERSION ?= "3.14.28"
+
+SRCREV = "e294028d7733a30f3befacc41d473c251096a515"
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.14.y \
+           file://0001-ASoC-Add-BCM2708-fixes.patch \
+           file://0002-Fix-grabbing-lock-from-atomic-context-in-i2c-driver.patch \
+          "
+
+require linux-raspberrypi.inc
Signature · 1 line
1.9.1
#10 lore raw

Re: [meta-raspberrypi][PATCH 3/5] linux-raspberrypi: Add 3.14 support

Quoted 13 lines · Petter Mabäcker

Add basic support for Linux 3.14, cherry-pick changes from 3.18.y in order to solve some debugfs warnings and get better support for i2s for BCM2708.

- 3.14 lacks BCM2709 support and will not by default be able to use for raspberry pi 2.

Below warnings still exists they are harmless and exists due to that snd_soc_pcm512x is triggered to be loaded twice. The problem is solved after device tree support for the driver was introduced in 3.18.y and no easy solution exists to solve this problem on older kernel versions (see
https://github.com/raspberrypi/linux/issues/662 for more info).

Quoted 8 lines

pcm512x 1-004c: Failed to reset device: -5
pcm512x: probe of 1-004c failed with error

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore and its content seems to be obsolite after cherry-picking '558d0bf Fix grabbing lock from atomic context in i2c driver'.

[Support #57]

Patch merged to master. Thanks.

--
Andrei Gherzan

#11 lore raw

PATCH 4/5 linux-raspberrypi: Drop support for old kernel versions

In reply to Petter Mabäcker

meta-raspberrypi currently supports too many versions in order to ensure that all of them are frequently tested and updated. Change to only support latest stable + 2 long term versions.

[Support #59]

---
 recipes-kernel/linux/linux-raspberrypi_3.10.bb | 8 --------
 recipes-kernel/linux/linux-raspberrypi_3.16.bb | 8 --------
 recipes-kernel/linux/linux-raspberrypi_3.6.bb  | 8 --------
 recipes-kernel/linux/linux-raspberrypi_3.8.bb  | 8 --------
 4 files changed, 32 deletions(-)
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.10.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.16.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.6.bb
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi_3.8.bb
recipes-kernel/linux/linux-raspberrypi_3.10.bb deleted +0 -8
deleted file mode 100644
index e5d5bf2..0000000
@@ -1,8 +0,0 @@
-LINUX_VERSION ?= "3.10.38"
-
-SRCREV = "1b49b450222df26e4abf7abb6d9302f72b2ed386"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.10.y \
-           file://sl030raspberrypii2ckernel.patch \
-          "
-
-require linux-raspberrypi.inc
recipes-kernel/linux/linux-raspberrypi_3.16.bb deleted +0 -8
deleted file mode 100644
index ccc414f..0000000
@@ -1,8 +0,0 @@
-LINUX_VERSION ?= "3.16.5"
-
-SRCREV = "377c82aa1d31b37f1096096b0e4c65beb0bc5c49"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.16.y \
-           file://sl030raspberrypii2ckernel.patch \
-          "
-
-require linux-raspberrypi.inc
recipes-kernel/linux/linux-raspberrypi_3.6.bb deleted +0 -8
deleted file mode 100644
index fc9ac89..0000000
@@ -1,8 +0,0 @@
-LINUX_VERSION ?= "3.6.11"
-
-SRCREV = "2a8d45ec0883e3cbdce920855b3461ac77308a5f"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
-           file://sl030raspberrypii2ckernel.patch \
-          "
-
-require linux-raspberrypi.inc
recipes-kernel/linux/linux-raspberrypi_3.8.bb deleted +0 -8
deleted file mode 100644
index ae0dc99..0000000
@@ -1,8 +0,0 @@
-LINUX_VERSION ?= "3.8.13"
-
-SRCREV = "d996a1b91b2bf3dc06f4f4f822a56f4496457aa1"
-SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.8.y \
-           file://sl030raspberrypii2ckernel.patch \
-          "
-
-require linux-raspberrypi.inc
Signature · 1 line
1.9.1
#12 lore raw

Re: [meta-raspberrypi][PATCH 4/5] linux-raspberrypi: Drop support for old kernel versions

Quoted 7 lines · Petter Mabäcker

meta-raspberrypi currently supports too many versions in order to ensure that all of them are frequently tested and updated. Change to only support latest stable + 2 long term versions.

[Support #59]

Patch merged to master. Thanks.

--
Andrei Gherzan

#13 lore raw

PATCH 5/5 linux-raspberrypi: Update 3.12 branch to latest

In reply to Petter Mabäcker

Update linux-raspberrypi_3.12 to latest revision.

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore and its content seems to be obsolite after
'558d0bf Fix grabbing lock from atomic context in i2c driver' was merged to 3.12.

[Support #60]

---
 .../sl030raspberrypii2ckernel.patch                | 32 ----------------------
 recipes-kernel/linux/linux-raspberrypi_3.12.bb     |  3 +-
 2 files changed, 1 insertion(+), 34 deletions(-)
 delete mode 100644 recipes-kernel/linux/linux-raspberrypi/sl030raspberrypii2ckernel.patch
recipes-kernel/linux/linux-raspberrypi/sl030raspberrypii2ckernel.patch deleted +0 -32
deleted file mode 100644
index 8534ecb..0000000
@@ -1,32 +0,0 @@
-Fix i2c timing errors.
-
-When Transmitting: Make SDA valid quarter of a cycle after the falling edge of SCL.
-When Receiving: Sample SDA Quarter of a cycle after the rising edge of SCL.
-
-Upstream-Status: Pending
-
-RP 2013/04/21
-
-Index: git/drivers/i2c/busses/i2c-bcm2708.c
-===================================================================
---- git.orig/drivers/i2c/busses/i2c-bcm2708.c	2013-01-06 17:15:00.754954587 +0000
-+++ git/drivers/i2c/busses/i2c-bcm2708.c	2013-01-06 17:50:09.794905741 +0000
-@@ -150,6 +150,7 @@
- 	unsigned long bus_hz;
- 	u32 cdiv;
- 	u32 c = BSC_C_I2CEN | BSC_C_INTD | BSC_C_ST | BSC_C_CLEAR_1;
-+	u32 cdel;
- 
- 	bus_hz = clk_get_rate(bi->clk);
- 	cdiv = bus_hz / baudrate;
-@@ -163,6 +164,10 @@
- 	bcm2708_wr(bi, BSC_A, bi->msg->addr);
- 	bcm2708_wr(bi, BSC_DLEN, bi->msg->len);
- 	bcm2708_wr(bi, BSC_C, c);
-+
-+	cdel = (cdiv / 4) & 0xffff;
-+	cdel = cdel << 16 | cdel;
-+	bcm2708_wr(bi, BSC_DEL, cdel);
- }
- 
- static irqreturn_t bcm2708_i2c_interrupt(int irq, void *dev_id)
recipes-kernel/linux/linux-raspberrypi_3.12.bb +1 -2
index 2952778..71fba49 100644
@@ -1,8 +1,7 @@
 LINUX_VERSION ?= "3.12.36"
 
-SRCREV = "90fa5df724d147564149c7b79cb1ffc571a345ec"
+SRCREV = "ee9b8c7d46f2b1787b1e64604acafc70f70191cf"
 SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.12.y \
-           file://sl030raspberrypii2ckernel.patch \
           "
 
 require linux-raspberrypi.inc
Signature · 1 line
1.9.1
#14 lore raw

Re: [meta-raspberrypi][PATCH 5/5] linux-raspberrypi: Update 3.12 branch to latest

Quoted 10 lines · Petter Mabäcker

Update linux-raspberrypi_3.12 to latest revision.

Remove sl030raspberrypii2ckernel.patch since it will not apply anymore and its content seems to be obsolite after
'558d0bf Fix grabbing lock from atomic context in i2c driver' was merged to 3.12.

[Support #60]

Patch merged to master. Thanks.

--
Andrei Gherzan