All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: Tim Harvey <tharvey@gateworks.com>
Cc: u-boot <u-boot@lists.denx.de>, Stefano Babic <sbabic@denx.de>,
	Marek Vasut <marex@denx.de>,  Adam Ford <aford173@gmail.com>,
	Schrempf Frieder <frieder.schrempf@kontron.de>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>,
	Fabio Estevam <festevam@gmail.com>,
	 Jagan Teki <jagan@amarulasolutions.com>,
	Igor Opaniuk <igor.opaniuk@toradex.com>
Subject: Re: Multi-Soc binary support for i.MX8M Mini/Nano/Plus/? in single boot firmware binary
Date: Sun, 30 May 2021 13:47:49 -0600	[thread overview]
Message-ID: <CAPnjgZ0irB5gzO4USOp3tz99Q-4pwTNFLjrgatsHt95rX-Xrcw@mail.gmail.com> (raw)
In-Reply-To: <CAJ+vNU3OmbtKzQ3ezdqsNnKAFHkAU86PBfLKJgo_jy6TXPqFkg@mail.gmail.com>

Hi Tim,

On Thu, 27 May 2021 at 09:41, Tim Harvey <tharvey@gateworks.com> wrote:
>
> Greetings,
>
> I support various iMX8M PCB's via board/gateworks/venice that are SOM based and we are starting to add SOM's that have different IMX8M variant SoC's on them which for various reasons are not binary compatible. I'm very interested in coming up with a way to make them binary compatible to reduce the number of disk images and boot firmware binaries our users work with (along with the confusion of which one they need to use).
>
> From what I see in working thus far with the IMX8M Mini, Nano, and Plus boot firmware differs in the following ways:
> - different primary image offsets
> - different dram config (phy training blob, phy cfg, cfg; which total about 3KiB for each config which varies based on dram type, soc variant, dram topology and bit-mapping)
> - different OCRAM sizes (compat binary would have to use the minimum size ie 256K)
> - different ATF binaries
> - different ATF load address
> - different pinmux/padconf/inputsel registers
> - different clk config
>
> The primary image offsets should be able to be dealt with by placing jumps at the various offsets and I believe the rest could be dealt with via runtime code if the SPL could load soc-specific blobs including dram config, ATF, binary firmware blobs from a nice indexed image such as FIT or binman. Currently imx8m SPL's use FIT images that are loaded entirely into OCRAM which becomes an issue when you have enough dram configs that they no longer fit in the OCRAM.
>
> Does anyone agree this is doable or is there something they see that would be a show-stopper?

It is possible so long as you don't mind a larger image.

>
> I'm not all that familiar with the merits of binman fs FIT images... I think they were developed for different things. I'm not sure if either/both are suited for what I'm talking about regarding having the SPL raw load binary blobs vs having them tacked onto a FIT image.

Either or both. Binman lets you access the location of things without
any parsing overhead in SPL but once you get to U-Boot proper, you
might be better off with FIT. In any case, binman can produce the
final image.

>
> I'm not sure if the imx8mq has enough in common to be able to do this with either, in fact I'm not even clear with SoC that is (is it what NXP calls i.MX 8M?)

You might also consider whether you want to produce one image for each
variant, but with the U-Boot binaries the same in all cases. So the
same SPL binary could work on all boards, accessing things it needs
via binman or FIT. Then at least you have a packaging problem, rather
than a build problem.

Another option is to have multiple SPLs and a single U-Boot.

It is a shame that there are multiple TF-A binaries. The inability to
take advantage of common features is one of the many things I dislike
about binaries. We have this problem in spades on the Intel side.

Regards,
Simon

  reply	other threads:[~2021-05-30 19:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-27 15:41 Multi-Soc binary support for i.MX8M Mini/Nano/Plus/? in single boot firmware binary Tim Harvey
2021-05-30 19:47 ` Simon Glass [this message]
2021-06-07 10:27 ` Stefano Babic
2021-06-17  3:25 ` Peng Fan (OSS)
2021-06-18 17:27   ` Tim Harvey

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=CAPnjgZ0irB5gzO4USOp3tz99Q-4pwTNFLjrgatsHt95rX-Xrcw@mail.gmail.com \
    --to=sjg@chromium.org \
    --cc=aford173@gmail.com \
    --cc=festevam@gmail.com \
    --cc=frieder.schrempf@kontron.de \
    --cc=igor.opaniuk@toradex.com \
    --cc=jagan@amarulasolutions.com \
    --cc=marex@denx.de \
    --cc=peng.fan@oss.nxp.com \
    --cc=sbabic@denx.de \
    --cc=tharvey@gateworks.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.