Re: [PATCH] of: unittest: Statically apply overlays using fdtoverlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 8, 2021 at 2:41 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> Now that fdtoverlay is part of the kernel build, start using it to test
> the unitest overlays we have by applying them statically.

Nice idea.

> The file overlay_base.dtb have symbols of its own and we need to apply
> overlay.dtb to overlay_base.dtb alone first to make it work, which gives
> us intermediate-overlay.dtb file.

Okay? If restructuring things helps we should do that. Frank?

> The intermediate-overlay.dtb file along with all other overlays is them

s/them/then/

> applied to testcases.dtb to generate the master.dtb file.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
>
> ---
> Depends on:
>
> https://lore.kernel.org/lkml/be5cb12a68d9ac2c35ad9dd50d6b168f7cad6837.1609996381.git.viresh.kumar@xxxxxxxxxx/
>
> I have kept the .dtb naming for overlays for now, lets see how we do it
> eventually.
>
> Rob/Frank, this doesn't work properly right now. Maybe I missed how
> these overlays must be applied or there is a bug in fdtoverlay.
>
> The master.dtb doesn't include any nodes from overlay_base.dtb or
> overlay.dtb probably because 'testcase-data-2' node isn't present in
> testcases.dtb and fdtoverlay doesn't allow applying new nodes to the
> root node, i.e. allows new sub-nodes once it gets phandle to the parent
> but nothing can be added to the root node itself. Though I get a feel
> that it works while applying the nodes dynamically and it is expected to
> work here as well.

Sounds like a bug in fdtoverlay to me. Though maybe you need an empty
base tree. An overlay serving as the base is a bit odd so it's
somewhat understandable fdtoverlay couldn't handle that. OTOH,
combining 2 overlays together seems like a valid use.

>
> (And yeah, this is my first serious attempt at updating Makefiles, I am
> sure there is a scope of improvement here :))

Usually I write something and Masahiro rewrites it for me. :)

Rob



[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux