[PATCH v2 2/3] arm: dts: rockchip: Separate rockchip-binman.dtsi

Jagan Teki jagan at edgeble.ai
Thu Nov 3 13:37:05 CET 2022


On Thu, 3 Nov 2022 at 15:32, Quentin Schulz
<quentin.schulz at theobroma-systems.com> wrote:
>
> Hi Jagan,
>
> On 11/3/22 07:19, Jagan Teki wrote:
> > rockchip-u-boot.dtsi has the FIT image for the final stage of
> > binman image creation.
> >
> > If the actual binman node is part of this dtsi then there are
> > build issues to use optee as input to this final stage binman
> > image since optee is built via another binman image creation
> > unlike ATF built via tools like make_fit_atf.py.
> >
> >     binman: Filename 'u-boot.itb' not found in input path
> >
> > Fix this by separating binman FIT image in rockchip-binman.dtsi
> >
>
> My understanding is that this is a work-around for something that should
> be implemented in binman instead (e.g. dependency between images). If
> i'm not mistaken, what you're suggesting is to not build
> u-boot-rockchip.bin for some platforms? IIRC the plan for this binary
> was that it would apply to all Rockchip platforms, and this patch makes
> this "promise" go away.

Not really, no functionality is changed. It is just that we cannot
create the final binman image for optee. It is not possible to
implement in binman alone however if you want to add optee binman
prior to the final binman can be solvable but it makes unnecessary
ifdefs and maintaining many binman node definitions in one file seems
confusing and difficult to maintain.

>
> > rockchip-u-boot.dtsi: binman node
> > rockchip-binman.dtsi: binman FIT image node
> >
> > The inclusion of rockchip-binman.dtsi is always to be last in
> > included files as it has a FIT image node for final image creation.
> >
>
> You are not respecting this in your patch. Please update or remove this
> section if not required. (I assume you have this limitation because you
> use a binman phandle, meaning the node needs to be defined before).
>
> Also, rockchip-u-boot.dtsi content is now literally:
> / {
>         binman: binman {
>                 multiple-images;
>         };
> };
>
> which is pretty much useless.
>
> Since you want to work around your build issue, why just not include
> rockchip-u-boot.dtsi instead of moving part of it to another file
> without any added benefit (at least at first glance, I may be missing
> some context).
>
> BTW, we were discussing some months ago on moving away from
> make_fit_atf.py to binman for all Rockchip platforms, c.f. the long
> discussion here:
> https://lore.kernel.org/u-boot/20220725172953.GD2029@begut/ So maybe we
> should just do this and that might fix the problem you're trying to
> work-around?
>
> In any case, can you provide a bit more context on the failing platform(s)?

As I explained above, the functionality remains unchanged. Even if you
build atf via binam dts files the final binman node has to be in the
order of last since input files like bl31 and tee.bin have depended.
Adding all the binman image creations and the final binman image
creation in one file make it difficult to read and maintain and
unnecessary ifdef.

Thanks,
Jagan.


More information about the U-Boot mailing list