From: Marek Vasut <marek.vasut@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] What if ATF can be part of U-Boot source, like SPL?
Date: Sat, 29 Jun 2019 20:38:58 +0200 [thread overview]
Message-ID: <4f38452c-9bea-7cda-9866-42f46eb29d21@gmail.com> (raw)
In-Reply-To: <CAMty3ZDwHbkNr28m8Q1Q_F716S1tCU0Fhn3aurpWvkK58WyCXA@mail.gmail.com>
On 6/29/19 5:02 PM, Jagan Teki 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.
You are free to do so locally, but following this train of thought would
possibly lead to putting Linux kernel sources in the same repository
too, and possible the entire userspace.
Mixing two completely different projects, with different goals, makes
zero sense.
> 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?
I agree with Mark, SPL and U-Boot share a lot of code.
ATF and U-Boot share nothing, in fact, from what I was told, ATF was
designed to be explicitly non-GPL, to make it easier for vendors to take
the ATF code and close source it. Hence, ATF cannot import any U-Boot
code and reimplements everything from scratch.
> 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?
See above.
> This would ultimately avoid out-off-tree ATF builds with associated
> variable exporting during u-boot builds.
See the Linux + userspace argument.
> 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.
U-Boot code should ideally be GPLv2, other licenses should be an exception.
> 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?
IMO the better solution here would be to take the BL2 hardware init code
and put it into SPL. Then you won't need the ATF BL1/BL2 hardware init,
which is the bulk of what ATF does on many platforms.
If you need resident services, BL31, either implement some sort of
PSCI-like support into U-Boot (possibly alongside SPL/TPL/U-Boot
proper), or build it from ATF sources.
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2019-06-29 18:38 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-29 15:02 [U-Boot] What if ATF can be part of U-Boot source, like SPL? Jagan Teki
2019-06-29 16:50 ` Mark Kettenis
2019-06-29 18:38 ` Marek Vasut [this message]
2019-06-29 18:49 ` André Przywara
2019-06-29 23:03 ` Marek Vasut
2019-06-30 1:38 ` André Przywara
2019-07-02 18:32 ` Marek Vasut
2019-09-04 2:17 ` Simon Glass
2019-09-04 17:32 ` Andre Przywara
2019-09-04 17:56 ` Marek Vasut
2019-09-05 0:54 ` André Przywara
2019-09-05 12:26 ` Marek Vasut
2019-09-05 23:14 ` André Przywara
2019-06-30 11:15 ` Wolfgang Denk
2019-06-30 13:57 ` Tom Rini
2019-06-30 14:03 ` Marek Vasut
2019-06-30 14:07 ` Michael Nazzareno Trimarchi
2019-06-30 14:17 ` Tom Rini
2019-06-30 14:20 ` Marek Vasut
2019-06-30 14:29 ` Tom Rini
2019-06-30 14:50 ` Marek Vasut
2019-09-04 2:51 ` Masahiro Yamada
2019-09-04 23:10 ` Tom Rini
[not found] <20190904134501.7980e45b@donnerap.cambridge.arm.com>
2019-09-05 1:17 ` Matteo Carlini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4f38452c-9bea-7cda-9866-42f46eb29d21@gmail.com \
--to=marek.vasut@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox