[U-Boot] What if ATF can be part of U-Boot source, like SPL?
Mark Kettenis
mark.kettenis at xs4all.nl
Sat Jun 29 16:50:14 UTC 2019
> From: Jagan Teki <jagan at amarulasolutions.com>
> Date: Sat, 29 Jun 2019 20:32:00 +0530
>
> 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.
I disagree. This strategy often leads to diverging codebases where
local improvements are not fed back upstream and/or not picking up
bug- and security fixes from upstream.
It also means that developers of non-ARM U-Boot platforms will have to
check out the full ATF 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?
SPL and U-Boot proper share a lot of code. I'd say it is totally
different.
> 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.
I don't see this as a huge issue. For OpenBSD we already have the
(small) build infrastructure to handle this.
> More over this idea would also help to design a single-step bootloader
> where it can't depends on out-of-tree sources.
>
> Code sync from ATF source to U-Boot can be possible in-terms licensing
> point-of-view since ATF licensed under BSD-3-Clause.
>
> I'm thinking this can be a worth-idea to look at it and I'm sure It
> may require some hard changes and other things to consider but just
> posted to understand how hard or feasible or meaningful it is?
>
> Feel free for any comments?
I don't think this makes a lot of sense. Apart from what I wrote
above, some platforms use U-Boot as a payload for ATF (or TF-A as it
is called now) instead of the other way around. It also makes it
difficult to do development on platforms where ATF sources have not
yet been upstreamed.
More information about the U-Boot
mailing list