All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Gherzan <andrei@gherzan.ro>
To: Herve Jourdain <herve.jourdain@neuf.fr>
Cc: yocto@yoctoproject.org
Subject: Re: [meta-raspberrypi][PATCH v4 3/5] rpi-base.inc: support for .dtbo files for dtb overlays
Date: Wed, 15 Jun 2016 01:12:12 +0100	[thread overview]
Message-ID: <20160615001212.GF22479@resin> (raw)
In-Reply-To: <1464641195-88380-4-git-send-email-herve.jourdain@neuf.fr>

[-- Attachment #1: Type: text/plain, Size: 2931 bytes --]

On Tue, May 31, 2016 at 04:46:33AM +0800, Herve Jourdain wrote:
> Kernel 4.4.6+ on RaspberryPi support .dtbo files for overlays, instead of .dtb.
> Add support for both variants of overlays ("-overlay.dtb" and ".dtbo") for the default KERNEL_DEVICETREE variable
>
> Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
> ---
>  conf/machine/include/rpi-base.inc | 36 +++++++++++++++++++++++++++++++++++-
>  1 file changed, 35 insertions(+), 1 deletion(-)
>
> diff --git a/conf/machine/include/rpi-base.inc b/conf/machine/include/rpi-base.inc
> index 56ca83e..2c9d8e0 100644
> --- a/conf/machine/include/rpi-base.inc
> +++ b/conf/machine/include/rpi-base.inc
> @@ -16,7 +16,7 @@ XSERVER = " \
>      "
>
>  # Really supported starting from linux-raspberrypi 3.18.y only
> -KERNEL_DEVICETREE ?= " \
> +KERNEL_DEVICETREE_OVERLAYS_DTB = " \
>      bcm2708-rpi-b.dtb \
>      bcm2708-rpi-b-plus.dtb \
>      bcm2709-rpi-2-b.dtb \
> @@ -38,6 +38,40 @@ KERNEL_DEVICETREE ?= " \
>      overlays/w1-gpio-pullup-overlay.dtb \
>      overlays/pi3-miniuart-bt-overlay.dtb \
>      "
> +KERNEL_DEVICETREE_OVERLAYS_DTBO = " \
> +    bcm2708-rpi-b.dtb \
> +    bcm2708-rpi-b-plus.dtb \
> +    bcm2709-rpi-2-b.dtb \
> +    bcm2710-rpi-3-b.dtb \
> +    \
> +    overlays/hifiberry-amp.dtbo \
> +    overlays/hifiberry-dac.dtbo \
> +    overlays/hifiberry-dacplus.dtbo \
> +    overlays/hifiberry-digi.dtbo \
> +    overlays/i2c-rtc.dtbo \
> +    overlays/iqaudio-dac.dtbo \
> +    overlays/iqaudio-dacplus.dtbo \
> +    overlays/lirc-rpi.dtbo \
> +    overlays/pitft22.dtbo \
> +    overlays/pitft28-resistive.dtbo \
> +    overlays/pps-gpio.dtbo \
> +    overlays/rpi-ft5406.dtbo \
> +    overlays/w1-gpio.dtbo \
> +    overlays/w1-gpio-pullup.dtbo \
> +    overlays/pi3-miniuart-bt.dtbo \
> +    "
> +
> +def cmpver_strings(ver1, ver2, truevalue, falsevalue):
> +    from distutils.version import LooseVersion
> +    ver1 = ''.join(ch for ch in ver1 if ch in '0123456789.')
> +    ver2 = ''.join(ch for ch in ver2 if ch in '0123456789.')
> +    if LooseVersion(ver1) >= LooseVersion(ver2):
> +        return truevalue
> +    else:
> +        return falsevalue
> +
> +KERNEL_DEVICETREE ?= "${@cmpver_strings("${PREFERRED_VERSION_linux-raspberrypi}", "4.4", "${KERNEL_DEVICETREE_OVERLAYS_DTBO}", "${KERNEL_DEVICETREE_OVERLAYS_DTB}")}"
> +
>  KERNEL_IMAGETYPE ?= "Image"
>

Can we avoid this duplication by translating dtbo->dtb for kernels
before 4.4? And I would suggest doing this in
linux-raspberrypi-base.bbclass . What do you think? We should reuse code
there for version too.

>  MACHINE_FEATURES += "apm usbhost keyboard vfat ext2 screen touchscreen alsa bluetooth wifi sdio"
> --
> 2.7.4
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

--
Andrei Gherzan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2016-06-15  0:12 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-30 20:46 [meta-raspberrypi][PATCH v4 0/5] Support for .dtbo files for dtb overlays, required by kernels 4.4.6+ Herve Jourdain
2016-05-30 20:46 ` [meta-raspberrypi][PATCH v4 1/5] linux-raspberrypi-base.bbclass: support for .dtbo files for dtb overlays Herve Jourdain
2016-05-30 20:46 ` [meta-raspberrypi][PATCH v4 2/5] sdcard_image-rpi.bbclass: " Herve Jourdain
2016-05-30 20:46 ` [meta-raspberrypi][PATCH v4 3/5] rpi-base.inc: " Herve Jourdain
2016-06-15  0:12   ` Andrei Gherzan [this message]
2016-06-17  7:50     ` Herve Jourdain
2016-06-17  8:56       ` Herve Jourdain
2016-05-30 20:46 ` [meta-raspberrypi][PATCH v4 4/5] linux-raspberrypi_4.4.inc: " Herve Jourdain
2016-06-15  0:09   ` Andrei Gherzan
2016-05-30 20:46 ` [meta-raspberrypi][PATCH v4 5/5] " Herve Jourdain
2016-06-14 23:55   ` Andrei Gherzan
2016-06-15  8:05     ` Herve Jourdain
2016-06-14 23:54 ` [meta-raspberrypi][PATCH v4 0/5] Support for .dtbo files for dtb overlays, required by kernels 4.4.6+ Andrei Gherzan
2016-06-15  5:37   ` Herve Jourdain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160615001212.GF22479@resin \
    --to=andrei@gherzan.ro \
    --cc=herve.jourdain@neuf.fr \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.