diff options
author | Samuel Holland <samuel@sholland.org> | 2020-10-21 21:12:13 -0500 |
---|---|---|
committer | Jagan Teki <jagan@amarulasolutions.com> | 2020-10-22 11:43:43 +0530 |
commit | cf70553e2c11a3f75835a51ecfbf898ac7e899f3 (patch) | |
tree | 79d6367326f602e7167033f4ba2ba33a02bba987 /common/spl/Kconfig | |
parent | 827c420c40030c9ddca16e97c2bb01244f2c66b4 (diff) | |
download | u-boot-cf70553e2c11a3f75835a51ecfbf898ac7e899f3.zip u-boot-cf70553e2c11a3f75835a51ecfbf898ac7e899f3.tar.gz u-boot-cf70553e2c11a3f75835a51ecfbf898ac7e899f3.tar.bz2 |
spl: fit: Minimally parse OS properties with FIT_IMAGE_TINY
Some boards, specifically 64-bit Allwinner boards (sun50i), are
extremely limited on SPL size. One strategy that was used to make space
was to remove the FIT "os" property parsing code, because it uses a
rather large lookup table.
However, this forces the legacy FIT parsing code path, which requires
the "firmware" entry in the FIT to reference the U-Boot binary, even if
U-Boot is not the next binary in the boot sequence (for example, on
sun50i boards, ATF is run first).
This prevents the same FIT image from being used with a SPL with
CONFIG_SPL_FIT_IMAGE_TINY=n and CONFIG_SPL_ATF=y, because the boot
method selection code looks at `spl_image.os`, which is only set from
the "firmware" entry's "os" property.
To be able to use CONFIG_SPL_ATF=y, the "firmware" entry in the FIT
must be ATF, and U-Boot must be a loadable. For this to work, we need to
parse the "os" property just enough to tell U-Boot from other images, so
we can find it in the loadables list to append the FDT, and so we don't
try to append the FDT to ATF (which could clobber adjacent firmware).
So add the minimal code necessary to distinguish U-Boot/non-U-Boot
loadables with CONFIG_SPL_FIT_IMAGE_TINY=y. This adds about 300 bytes,
much less than the 7400 bytes added by CONFIG_SPL_FIT_IMAGE_TINY=n.
Acked-by: Patrick Wildt <patrick@blueri.se>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Diffstat (limited to 'common/spl/Kconfig')
-rw-r--r-- | common/spl/Kconfig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/common/spl/Kconfig b/common/spl/Kconfig index 620ea1e..8d8126d 100644 --- a/common/spl/Kconfig +++ b/common/spl/Kconfig @@ -465,9 +465,7 @@ config SPL_FIT_IMAGE_TINY Enable this to reduce the size of the FIT image loading code in SPL, if space for the SPL binary is very tight. - This removes the detection of image types (which forces the - first image to be treated as having a U-Boot style calling - convention) and skips the recording of each loaded payload + This skips the recording of each loaded payload (i.e. loadable) into the FDT (modifying the loaded FDT to ensure this information is available to the next image invoked). |