[OE-core] [OE-Core][PATCH 1/2] kernel-fitimage: Allow setting of DTB/DTBO relocation address

Alex Kiernan alex.kiernan at gmail.com
Thu Jul 5 10:19:46 UTC 2018


On Mon, Jun 18, 2018 at 7:25 AM Martin Hundebøll <martin at geanix.com> wrote:
>
> Hi Alex,
>

Sorry only just found this, gmail decided to mark it as spam :(

> On 2018-06-16 09:17, Alex Kiernan wrote:
> > Introduce UBOOT_DTB_LOADADDRESS and UBOOT_DTBO_LOADADDRESS so that you
> > can set where U-Boot loads full and overlay DTBs. This is required when
> > using bootm's overlay support to construct the final DTB.
> >
> > Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> > ---
> > This commit conflicts with this patch:
> >
> > https://patchwork.openembedded.org/series/12589/
> >
> > Either that needs applying first and this needs rebasing on top of it, or
> > use this one in its place.
> >
> >   meta/classes/kernel-fitimage.bbclass | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> >
> > diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
> > index 50a91e1..f3c2ff0 100644
> > --- a/meta/classes/kernel-fitimage.bbclass
> > +++ b/meta/classes/kernel-fitimage.bbclass
> > @@ -135,6 +135,15 @@ fitimage_emit_section_dtb() {
> >
> >       dtb_csum="sha1"
> >
> > +     dtb_loadline=""
> > +     dtb_ext=${DTB##*.}
> > +     if [ "${dtb_ext}" = "dtbo" ]; then
> > +             if [ -n "${UBOOT_DTBO_LOADADDRESS}" ]; then
> > +                     dtb_loadline="load = <${UBOOT_DTBO_LOADADDRESS}>;"
> > +             fi
> > +     elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
> > +             dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
> > +     fi
>
> I haven't looked into the use of DTB overlays in fitimages, but
> shouldn't it be possible to specify multiple overlays?
>
>  From the way I read your patch, only a single overlay is supported...
>

Multiple overlays are fine - that's my exact use case. But you only
need one loadaddress for all of them, I have to admit I've not dug
into why that's the case, but it matches the U-Boot documentation:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/uImage.FIT/overlay-fdt-boot.txt;h=dddc4db1a67de19053ba1e9d395e2f651b13d7d0;hb=HEAD#l117

>From a quick read of the overlay code in bootm, it looks like it
serially loads the overlays into the loadaddress from the FIT image
before it's merged into the main DTB.

-- 
Alex Kiernan



More information about the Openembedded-core mailing list