[yocto] [meta-raspberrypi][PATCH v3 1/2] linux-raspberrypi: Add a 4.2.3 linux kernel with vc4 support

Andrei Gherzan andrei at gherzan.ro
Wed Dec 2 14:00:05 PST 2015


On Wed, Dec 02, 2015 at 03:25:05PM +0100, Andrei Gherzan wrote:
> On Tue, Nov 10, 2015 at 11:45:19AM -0300, Javier Martinez Canillas wrote:
> > From: Derek Foreman <derekf at osg.samsung.com>
> > 
> > This adds Eric Anholt's WIP kernel with dri/kms/3d support for the GPU on
> > the rpi2. Adding a recipe that tracks this kernel, will make it easier to
> > test this setup.
> > 
> > This recipe should only used for testing purposes for now, so it will not
> > be set as the default but can be chosen by changing the default providers.
> > 
> > Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> > [javier: Extended commit message and set default preference to -1]
> > Signed-off-by: Javier Martinez Canillas <javier at osg.samsung.com>
> > 
> > ---
> > 
> > Changes in v3:
> > - Update to latest vc4-kms-v3d-rpi2 branch sha1. Suggested by Andreas Müller.
> > - Drop patches that were already merged in the vc4-kms-v3d-rpi2 branch.
> > - Bump Linux version from 4.1 to 4.2.
> > 
> > Changes in v2:
> > - Add a linux-raspberrypi-vc4 recipe insted of a linux-raspberrypi one.
> >   Suggested by Petter Mabäcker, Andreas Müller and Andrei Gherzan.
> > - Split the readme change in a separate patch. Suggested by Andrei Gherzan.
> > - Don't make the vc4 patches inclusion conditional since will always be
> >   needed when choosing the recipe. Suggested by Andrei Gherzan.
> > 
> >  ..._defconfig-Enable-config-options-for-vc4-.patch | 40 ++++++++++++++++++++++
> >  .../0002-bcm2708-Fix-DTC-build-error.patch         | 38 ++++++++++++++++++++
> >  .../linux/linux-raspberrypi-vc4/defconfig          |  1 +
> >  recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb  |  9 +++++
> >  4 files changed, 88 insertions(+)
> >  create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
> >  create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
> >  create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
> >  create mode 100644 recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb
> > 
> > diff --git a/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
> > new file mode 100644
> > index 000000000000..d7b722dd35df
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-raspberrypi-vc4/0001-ARM-bcm2709_defconfig-Enable-config-options-for-vc4-.patch
> > @@ -0,0 +1,40 @@
> > +From 10e0beec47def7813e2e256697018f3d0a4559fe Mon Sep 17 00:00:00 2001
> > +From: Derek Foreman <derekf at osg.samsung.com>
> > +Date: Fri, 6 Nov 2015 13:15:35 -0300
> > +Subject: [PATCH 1/1] ARM: bcm2709_defconfig: Enable config options for vc4
> > + support
> > +
> > +Add the needed Kconfig symbols to build Eric Anholt's WIP kernel
> > +4.1 Linux kernel with vc4 dri/kms/3d support. Also increase CMA
> > +size from 5 MiB to 256 MiB as that is needed by the driver.
> > +
> > +Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
> > +---
> > + arch/arm/configs/bcm2709_defconfig | 4 +++-
> > + 1 file changed, 3 insertions(+), 1 deletion(-)
> > +
> > +diff --git a/arch/arm/configs/bcm2709_defconfig b/arch/arm/configs/bcm2709_defconfig
> > +index c2ddd10dc106..4312906bfe0f 100644
> > +--- a/arch/arm/configs/bcm2709_defconfig
> > ++++ b/arch/arm/configs/bcm2709_defconfig
> > +@@ -394,7 +394,7 @@ CONFIG_NFC_PN533=m
> > + CONFIG_DEVTMPFS=y
> > + CONFIG_DEVTMPFS_MOUNT=y
> > + CONFIG_DMA_CMA=y
> > +-CONFIG_CMA_SIZE_MBYTES=5
> > ++CONFIG_CMA_SIZE_MBYTES=256
> > + CONFIG_MTD=m
> > + CONFIG_MTD_BLOCK=m
> > + CONFIG_MTD_NAND=m
> > +@@ -807,6 +807,8 @@ CONFIG_FB=y
> > + CONFIG_FB_BCM2708=y
> > + CONFIG_FB_SSD1307=m
> > + CONFIG_FB_RPISENSE=m
> > ++CONFIG_DRM=y
> > ++CONFIG_DRM_VC4=y
> > + # CONFIG_BACKLIGHT_GENERIC is not set
> > + CONFIG_BACKLIGHT_GPIO=m
> > + CONFIG_FRAMEBUFFER_CONSOLE=y
> > +-- 
> > +2.4.3
> > +
> > diff --git a/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
> > new file mode 100644
> > index 000000000000..59aa0e54d353
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-raspberrypi-vc4/0002-bcm2708-Fix-DTC-build-error.patch
> > @@ -0,0 +1,38 @@
> > +From 2d0adbb07ccccef248173af3ac090ca867cf3460 Mon Sep 17 00:00:00 2001
> > +From: Javier Martinez Canillas <javier at osg.samsung.com>
> > +Date: Mon, 9 Nov 2015 16:17:28 -0300
> > +Subject: [PATCH 1/1] bcm2708: Fix DTC build error
> > +
> > +Commit fa6a6d220c4c ("bcm2708: Use #include in dtsi files") changed the bcm*
> > +DTSI files to use the pre-processor #include directive instead the /include/
> > +but forgot to change the arch/arm/boot/dts/bcm2708.dtsi file. Later commit
> > +7f04e14bebf1 ("fixup! bcm2708: Use #include in dtsi files") tried to do that
> > +change but introduced a build error:
> > +
> > +DTC     arch/arm/boot/dts/bcm2708-rpi-b.dtb
> > +In file included from arch/arm/boot/dts/bcm2708-rpi-b.dts:3:0:
> > +arch/arm/boot/dts/bcm2708.dtsi:1:9: error: #include expects "FILENAME" or <FILENAME>
> > +            ^
> > +scripts/Makefile.lib:293: recipe for target 'arch/arm/boot/dts/bcm2708-rpi-b.dtb' failed
> > +make[1]: *** [arch/arm/boot/dts/bcm2708-rpi-b.dtb] Error 1
> > +arch/arm/Makefile:327: recipe for target 'bcm2708-rpi-b.dtb' failed
> > +make: *** [bcm2708-rpi-b.dtb] Error 2
> > +
> > +Signed-off-by: Javier Martinez Canillas <javier at osg.samsung.com>
> > +---
> > + arch/arm/boot/dts/bcm2708.dtsi | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/arch/arm/boot/dts/bcm2708.dtsi b/arch/arm/boot/dts/bcm2708.dtsi
> > +index a70fa3107ac2..b954255bb860 100644
> > +--- a/arch/arm/boot/dts/bcm2708.dtsi
> > ++++ b/arch/arm/boot/dts/bcm2708.dtsi
> > +@@ -1,4 +1,4 @@
> > +-#include/ "bcm2708_common.dtsi"
> > ++#include "bcm2708_common.dtsi"
> > + 
> > + / {
> > + 	compatible = "brcm,bcm2708";
> > +-- 
> > +2.4.3
> > +
> > diff --git a/recipes-kernel/linux/linux-raspberrypi-vc4/defconfig b/recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
> > new file mode 100644
> > index 000000000000..ecbf32cfdc4c
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-raspberrypi-vc4/defconfig
> > @@ -0,0 +1 @@
> > +# Dummy file to get through do_kernel_configme.
> > diff --git a/recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb b/recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb
> > new file mode 100644
> > index 000000000000..cdd351c3ee66
> > --- /dev/null
> > +++ b/recipes-kernel/linux/linux-raspberrypi-vc4_4.2.bb
> > @@ -0,0 +1,9 @@
> > +LINUX_VERSION ?= "4.2.3"
> > +
> > +SRCREV = "b8b2f50546513355fecd9ac44b2355f19a9620a8"
> > +SRC_URI = "git://github.com/anholt/linux.git;protocol=git;branch=vc4-kms-v3d-rpi2 \
> 
> Cloning this seems a problematic:
> 
> ERROR: Fetcher failure: Fetch command failed with exit code 141, output:
> Cloning into bare repository '/home/andrei/work/yocto/shared-downloads/git2/github.com.anholt.linux.git'...
> error: inflate: data stream error (invalid distance too far back)
> fatal: pack has bad object at offset 357395694: inflate returned -3
> 
> Any idea what might go wrong?

Scratch that as it seems to have been related to my netowrk. But now there is another problem. The branch you selected in the recipe doesn't contain the wanted revision. I'm wondering if that is due to a rebase or it is just a miss in the patch? If it's the first thing... then we need to find a stable revision (why do people rebase?). 

-- 
Andrei Gherzan



More information about the yocto mailing list