From: Francois Muller <forlorn18@gmail.com>
To: yocto@yoctoproject.org
Subject: Re: [meta-raspberrypi][PATCH v5 3/4] linux-raspberrypi-base.bbclass: support for .dtbo files for dtb overlays
Date: Sat, 25 Jun 2016 17:48:29 +0200 [thread overview]
Message-ID: <1466869709.19352.170.camel@gmail.com> (raw)
In-Reply-To: <1466177739-77627-4-git-send-email-herve.jourdain@neuf.fr>
[-- Attachment #1: Type: text/plain, Size: 3150 bytes --]
Hi Hervé,
I haven't tested your patch yet, but while reviewing the diff I'm a
bit surprised about this:
> overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$', > dts
, d)
> + overlays = oe.utils.str_filter_out('\S+\.dtbo$', > overlays,
> d)
Shouldn't .dtbo files be filtered out from 'dts' instead of 'overlays'
in the added line?
Seems like a typo to me.
BR,
François
Le vendredi 17 juin 2016 à 23:35 +0800, Herve Jourdain a écrit :
> 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")
> Change which variant needs to be supported based on the kernel
> version
>
> CAUTION: when called from IMAGE_CMD_rpi-sdimg, 'TMPDIR' is not set,
> causing 'STAGING_KERNEL_BUILDDIR' to not be expanded, causing
> get_kernelversion_file() to fail!
> To avoid this problem, get_dts() and split_overlays() MUST be called
> with the kernel version parameter set, when called from
> IMAGE_CMD_rpi-sdimg!
>
> Signed-off-by: Herve Jourdain <herve.jourdain@neuf.fr>
> ---
> classes/linux-raspberrypi-base.bbclass | 19 ++++++++++++-------
> 1 file changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/classes/linux-raspberrypi-base.bbclass b/classes/linux-
> raspberrypi-base.bbclass
> index 40beef1..930fc44 100644
> --- a/classes/linux-raspberrypi-base.bbclass
> +++ b/classes/linux-raspberrypi-base.bbclass
> @@ -1,7 +1,8 @@
> inherit linux-kernel-base
>
> -
> def get_dts(d, ver):
> + import re
> +
> staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR", True)
> dts = d.getVar("KERNEL_DEVICETREE", True)
>
> @@ -20,20 +21,24 @@ def get_dts(d, ver):
>
> # 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 = ""
> + if int(min_ver[0]) >= 4:
> + if (int(min_ver[1]) < 4) or (int(min_ver[1]) == 4 and
> int(min_ver[2]) < 6):
> + dts = ' '.join([(re.sub(r'(.*)\.dtbo$', r'\1-
> overlay.dtb', x)) for x in dts.split()])
> + elif int(min_ver[1]) < 18:
> + dts = ""
> except IndexError:
> min_ver = None
>
> return dts
>
>
> -def split_overlays(d, out):
> - dts = get_dts(d, None)
> +def split_overlays(d, ver, out):
> + dts = get_dts(d, ver)
> if out:
> overlays = oe.utils.str_filter_out('\S+\-overlay\.dtb$',
> dts, d)
> + overlays = oe.utils.str_filter_out('\S+\.dtbo$', overlays,
> d)
> else:
> - overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d)
> + overlays = oe.utils.str_filter('\S+\-overlay\.dtb$', dts, d)
> + \
> + " " + oe.utils.str_filter('\S+\.dtbo$', dts, d)
>
> return overlays
> --
> 2.7.4
>
[-- Attachment #2: Type: text/html, Size: 3175 bytes --]
next prev parent reply other threads:[~2016-06-25 15:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 15:35 [meta-raspberrypi][PATCH v5 0/4] Support for .dtbo files for dtb overlays, required by kernels 4.4.6+ Herve Jourdain
2016-06-17 15:35 ` [meta-raspberrypi][PATCH v5 1/4] linux-raspberrypi_4.4.inc: support for .dtbo files for dtb overlays Herve Jourdain
2016-06-17 15:35 ` [meta-raspberrypi][PATCH v5 2/4] rpi-base.inc: " Herve Jourdain
2016-06-17 15:35 ` [meta-raspberrypi][PATCH v5 3/4] linux-raspberrypi-base.bbclass: " Herve Jourdain
2016-06-25 15:48 ` Francois Muller [this message]
2016-07-20 14:51 ` ***SPAM*** " Herve Jourdain
2016-07-25 14:33 ` Francois Muller
2016-06-17 15:35 ` [meta-raspberrypi][PATCH v5 4/4] sdcard_image-rpi.bbclass: " 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=1466869709.19352.170.camel@gmail.com \
--to=forlorn18@gmail.com \
--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.