[U-Boot] What if ATF can be part of U-Boot source, like SPL?

Wolfgang Denk wd at denx.de
Sun Jun 30 11:15:38 UTC 2019


Dear Jagan,

In message <CAMty3ZDwHbkNr28m8Q1Q_F716S1tCU0Fhn3aurpWvkK58WyCXA at mail.gmail.com> you wrote:
> In terms of code maintenance and development feasibility it is always
> a better approach to have out-of-tree code or binary to be part of
> in-house source tree.
>
> This is what exactly it was done for SPL, if I'm not wrong. So can we
> do the same thing for ATF on ARM64 SoCs?

You are wrong.  SPL has always been U-Boot internal code.

It may be true that some "external" early boot stages (line xloader)
have been replaced by SPL, but in no case such external code was
adaptes as is, and in the cases I am aware of this was original
U-Boot code anyway which hat just been forked off and maintained
out-of-tree.

But SPL is native U-Boot code only.

> We are using ATF (on Allwinner) to switch EL3 to EL2 for start loading
> U-Boot proper and minimal PSCI, PMIC initialization. So assuming the
> functionality of ATF (like here) is limited so the code it require can
> be limited too, so why can't this code to be part of U-Boot tree?
>
> This would ultimately avoid out-off-tree ATF builds with associated
> variable exporting during u-boot builds.

If U-Boot included a copy of the ATF code, it would have been forked
of the mainline ATF code at some point, so it is still out of tree.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Absolute: Independent, irresponsible. An absolute monarchy is one  in
which  the  sovereign  does  as  he pleases so long as he pleases the
assassins. Not many absolute monarchies are left, most of them having
been replaced by limited monarchies, where the soverign's  power  for
evil (and for good) is greatly curtailed, and by republics, which are
governed by chance.                                  - Ambrose Bierce


More information about the U-Boot mailing list