Skip to contentSkip to conversation

linux-raspberrypi: Add recipes and patches for 4.8 release

PATCH Superseded Khem Raj 2 participants 3 messages Oct 7, 2016 – Oct 13, 2016

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 linux-raspberrypi: Add recipes and patches for 4.8 release

---
 .../0001-fix-dtbo-rules.patch                      | 44 ++++++++++++++++++++++
 ...835-camera-fix-compilation-warning-werror.patch | 35 +++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_4.8.bb      | 10 +++++
 3 files changed, 89 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.8.bb
recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch new file +44 -0
new file mode 100644
index 0000000..5113e23
@@ -0,0 +1,44 @@
+From 13c8784da3dbd977f64cec740eba775b6fab11c2 Mon Sep 17 00:00:00 2001
+From: Herve Jourdain <[email protected]>
+Date: Fri, 20 May 2016 16:02:23 +0800
+Subject: [yocto][meta-raspberrypi][PATCH v4 4/5] linux-raspberrypi_4.4.inc:
+ support for .dtbo files for dtb overlays
+
+Upstream-Status: Pending
+
+Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb.
+Patch the kernel, which has faulty rules to generate .dtbo the way yocto does
+
+Signed-off-by: Herve Jourdain <[email protected]>
+---
+ .../0001-fix-dtbo-rules.patch                      | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index a2e7cf7..673c1cb 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -333,6 +333,8 @@ $(INSTALL_TARGETS):
+ 
+ %.dtb: | scripts
+ 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
++%.dtbo: | scripts
++	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
+ 
+ PHONY += dtbs dtbs_install
+ 
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 3079c4f..6cc3766 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -293,7 +293,8 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
+ 	$(call if_changed_dep,dtc)
+ 
+ quiet_cmd_dtco = DTCO    $@
+-cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
++cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
++	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+ 	$(objtree)/scripts/dtc/dtc -@ -H epapr -O dtb -o $@ -b 0 \
+ 		-i $(dir $<) $(DTC_FLAGS) \
+ 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch new file +35 -0
new file mode 100644
index 0000000..ea9778f
@@ -0,0 +1,35 @@
+From a8151cbe5d92d7487b7994522cbc83fed04ae1f9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 6 Oct 2016 19:42:55 -0700
+Subject: [PATCH] [media]: bcm2835-camera: fix compilation warning/werror
+
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm2835-camera.c:656:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types
+]
+|   .queue_setup = queue_setup,
+|                  ^~~~~~~~~~~
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm28
+35-camera.c:656:17: note: (near initialization for 'bm2835_mmal_video_qops.queue_setup')
+
+use struct device* instead of void*
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ drivers/media/platform/bcm2835/bcm2835-camera.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c
+index 70f4db2..cb5bab6 100644
+--- a/drivers/media/platform/bcm2835/bcm2835-camera.c
++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
+@@ -244,7 +244,7 @@ static struct mmal_fmt *get_format(struct v4l2_format *f)
+ 
+ static int queue_setup(struct vb2_queue *vq,
+ 		       unsigned int *nbuffers, unsigned int *nplanes,
+-		       unsigned int sizes[], void *alloc_ctxs[])
++		       unsigned int sizes[], struct device *alloc_ctxs[])
+ {
+ 	struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq);
+ 	unsigned long size;
+-- 
+2.10.0
+
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +10 -0
new file mode 100644
index 0000000..92a69ad
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
+
+LINUX_VERSION ?= "4.8.0"
+
+SRCREV = "2fb843e0e50b2330e76acea03ff63a5b2b1e411f"
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.8.y \
+           file://0001-fix-dtbo-rules.patch \
+           file://0001-media-bcm2835-camera-fix-compilation-warning-werror.patch \
+"
+require linux-raspberrypi.inc
Signature · 1 line
2.10.0
#1 lore raw
Quoted 107 lines · Khem Raj
---
 .../0001-fix-dtbo-rules.patch                      | 44 ++++++++++++++++++++++
 ...835-camera-fix-compilation-warning-werror.patch | 35 +++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_4.8.bb      | 10 +++++
 3 files changed, 89 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.8.bb
recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch new file +44 -0
new file mode 100644
index 0000000..5113e23
@@ -0,0 +1,44 @@
+From 13c8784da3dbd977f64cec740eba775b6fab11c2 Mon Sep 17 00:00:00 2001
+From: Herve Jourdain <[email protected]>
+Date: Fri, 20 May 2016 16:02:23 +0800
+Subject: [yocto][meta-raspberrypi][PATCH v4 4/5] linux-raspberrypi_4.4.inc:
+ support for .dtbo files for dtb overlays
+
+Upstream-Status: Pending
+
+Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb.
+Patch the kernel, which has faulty rules to generate .dtbo the way yocto does
+
+Signed-off-by: Herve Jourdain <[email protected]>
+---
+ .../0001-fix-dtbo-rules.patch                      | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index a2e7cf7..673c1cb 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -333,6 +333,8 @@ $(INSTALL_TARGETS):
+
+ %.dtb: | scripts
+ 	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
++%.dtbo: | scripts
++	$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
+
+ PHONY += dtbs dtbs_install
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 3079c4f..6cc3766 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -293,7 +293,8 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
+ 	$(call if_changed_dep,dtc)
+
+ quiet_cmd_dtco = DTCO    $@
+-cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
++cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
++	$(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+ 	$(objtree)/scripts/dtc/dtc -@ -H epapr -O dtb -o $@ -b 0 \
+ 		-i $(dir $<) $(DTC_FLAGS) \
+ 		-d $(depfile).dtc.tmp $(dtc-tmp) ; \
recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch new file +35 -0
new file mode 100644
index 0000000..ea9778f
@@ -0,0 +1,35 @@
+From a8151cbe5d92d7487b7994522cbc83fed04ae1f9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 6 Oct 2016 19:42:55 -0700
+Subject: [PATCH] [media]: bcm2835-camera: fix compilation warning/werror
+
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm2835-camera.c:656:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types
+]
+|   .queue_setup = queue_setup,
+|                  ^~~~~~~~~~~
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm28
+35-camera.c:656:17: note: (near initialization for 'bm2835_mmal_video_qops.queue_setup')
+
+use struct device* instead of void*
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ drivers/media/platform/bcm2835/bcm2835-camera.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c
+index 70f4db2..cb5bab6 100644
+--- a/drivers/media/platform/bcm2835/bcm2835-camera.c
++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
+@@ -244,7 +244,7 @@ static struct mmal_fmt *get_format(struct v4l2_format *f)
+
+ static int queue_setup(struct vb2_queue *vq,
+ 		       unsigned int *nbuffers, unsigned int *nplanes,
+-		       unsigned int sizes[], void *alloc_ctxs[])
++		       unsigned int sizes[], struct device *alloc_ctxs[])
+ {
+ 	struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq);
+ 	unsigned long size;
+--
+2.10.0
+
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +0 -0
new file mode 100644
index 0000000..92a69ad

recipes-kernel/linux/linux-raspberrypi_4.8.bb line 5

Quoted 5 lines
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +5 -0
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
+
+LINUX_VERSION ?= "4.8.0"
+
+SRCREV = "2fb843e0e50b2330e76acea03ff63a5b2b1e411f"

They seem to rebase the repository pretty often and we already have problems with 4.7 so I'm not sure how should we manage this in the future. The rebase only happens on in development branches.

Quoted 8 lines
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +5 -1
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.8.y \
+           file://0001-fix-dtbo-rules.patch \
+           file://0001-media-bcm2835-camera-fix-compilation-warning-werror.patch \
+"
+require linux-raspberrypi.inc
--

2.10.0

Quoted 5 lines

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

--
Andrei Gherzan

author
#2 lore raw
Quoted 109 lines · Andrei Gherzan
Quoted 108 lines · Khem Raj
---
 .../0001-fix-dtbo-rules.patch                      | 44 ++++++++++++++++++++++
 ...835-camera-fix-compilation-warning-werror.patch | 35 +++++++++++++++++
 recipes-kernel/linux/linux-raspberrypi_4.8.bb      | 10 +++++
 3 files changed, 89 insertions(+)
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch
 create mode 100644 recipes-kernel/linux/linux-raspberrypi_4.8.bb
recipes-kernel/linux/linux-raspberrypi-4.8/0001-fix-dtbo-rules.patch new file +44 -0
new file mode 100644
index 0000000..5113e23
@@ -0,0 +1,44 @@
+From 13c8784da3dbd977f64cec740eba775b6fab11c2 Mon Sep 17 00:00:00 2001
+From: Herve Jourdain <[email protected]>
+Date: Fri, 20 May 2016 16:02:23 +0800
+Subject: [yocto][meta-raspberrypi][PATCH v4 4/5] linux-raspberrypi_4.4.inc:
+ support for .dtbo files for dtb overlays
+
+Upstream-Status: Pending
+
+Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb.
+Patch the kernel, which has faulty rules to generate .dtbo the way yocto does
+
+Signed-off-by: Herve Jourdain <[email protected]>
+---
+ .../0001-fix-dtbo-rules.patch                      | 27 ++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+ create mode 100644 recipes-kernel/linux/linux-raspberrypi-4.4/0001-fix-dtbo-rules.patch
+
+diff --git a/arch/arm/Makefile b/arch/arm/Makefile
+index a2e7cf7..673c1cb 100644
+--- a/arch/arm/Makefile
++++ b/arch/arm/Makefile
+@@ -333,6 +333,8 @@ $(INSTALL_TARGETS):
+
+ %.dtb: | scripts
+     $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
++%.dtbo: | scripts
++    $(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
+
+ PHONY += dtbs dtbs_install
+
+diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
+index 3079c4f..6cc3766 100644
+--- a/scripts/Makefile.lib
++++ b/scripts/Makefile.lib
+@@ -293,7 +293,8 @@ $(obj)/%.dtb: $(src)/%.dts FORCE
+     $(call if_changed_dep,dtc)
+
+ quiet_cmd_dtco = DTCO    $@
+-cmd_dtco = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
++cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
++    $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
+     $(objtree)/scripts/dtc/dtc -@ -H epapr -O dtb -o $@ -b 0 \
+             -i $(dir $<) $(DTC_FLAGS) \
+             -d $(depfile).dtc.tmp $(dtc-tmp) ; \
recipes-kernel/linux/linux-raspberrypi-4.8/0001-media-bcm2835-camera-fix-compilation-warning-werror.patch new file +35 -0
new file mode 100644
index 0000000..ea9778f
@@ -0,0 +1,35 @@
+From a8151cbe5d92d7487b7994522cbc83fed04ae1f9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Thu, 6 Oct 2016 19:42:55 -0700
+Subject: [PATCH] [media]: bcm2835-camera: fix compilation warning/werror
+
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm2835-camera.c:656:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types
+]
+|   .queue_setup = queue_setup,
+|                  ^~~~~~~~~~~
+| /a/builder/mnt/build/tmp-glibc/work-shared/raspberrypi3/kernel-source/drivers/media/platform/bcm2835/bcm28
+35-camera.c:656:17: note: (near initialization for 'bm2835_mmal_video_qops.queue_setup')
+
+use struct device* instead of void*
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ drivers/media/platform/bcm2835/bcm2835-camera.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/media/platform/bcm2835/bcm2835-camera.c b/drivers/media/platform/bcm2835/bcm2835-camera.c
+index 70f4db2..cb5bab6 100644
+--- a/drivers/media/platform/bcm2835/bcm2835-camera.c
++++ b/drivers/media/platform/bcm2835/bcm2835-camera.c
+@@ -244,7 +244,7 @@ static struct mmal_fmt *get_format(struct v4l2_format *f)
+
+ static int queue_setup(struct vb2_queue *vq,
+                    unsigned int *nbuffers, unsigned int *nplanes,
+-                   unsigned int sizes[], void *alloc_ctxs[])
++                   unsigned int sizes[], struct device *alloc_ctxs[])
+ {
+     struct bm2835_mmal_dev *dev = vb2_get_drv_priv(vq);
+     unsigned long size;
+--
+2.10.0
+
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +1 -0
new file mode 100644
index 0000000..92a69ad
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
Quoted 8 lines

recipes-kernel/linux/linux-raspberrypi_4.8.bb line 5

Quoted 4 lines
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +4 -0
+
+LINUX_VERSION ?= "4.8.0"
+
+SRCREV = "2fb843e0e50b2330e76acea03ff63a5b2b1e411f"

They seem to rebase the repository pretty often and we already have problems with 4.7 so I'm not sure how should we manage this in the future. The rebase only happens on in development branches.

Yes, I see thats sort of problematic.
I try to keep the srcrevs uptodate but this may not work all the time especially with release branches. One option to have is to use AUTOREV but I do not like that option
as much either but it would be good to have a dev kernel in layer too so we know any issues impacting us
early on and new features which depend on latest kernels e.g. vcgraphics I am fine to carry it locally, or may be we can have a bleeding branch to have these sort of stuff

Quoted 17 lines
Quoted 9 lines
recipes-kernel/linux/linux-raspberrypi_4.8.bb new file +5 -1
+SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-4.8.y \
+           file://0001-fix-dtbo-rules.patch \
+           file://0001-media-bcm2835-camera-fix-compilation-warning-werror.patch \
+"
+require linux-raspberrypi.inc
--

2.10.0

Quoted 5 lines

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

--
Andrei Gherzan