Hi Tom,
On 1/2/2026 8:25 PM, Tom Rini wrote:
On Fri, Jan 02, 2026 at 08:47:10AM -0600, Tom Rini wrote:
On Wed, Dec 31, 2025 at 11:06:11PM +0530, Beleswar Padhi wrote:
In cases where the 'load' property is not defined in a FIT image node,
fallback to using the data address returned by `fit_image_get_data()`.
This enables FIT images to omit the 'load' property during FIT creation.
Signed-off-by: Beleswar Padhi <[email protected]>
---
Cc: Simon Glass <[email protected]>
v3: Changelog:
1. None
Link to v2:
https://lore.kernel.org/all/[email protected]/
v2: Changelog:
1. New patch. Add support to load images without 'load' property.
common/spl/spl_fit.c | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
index a588d13eb40..c18c98b2959 100644
--- a/common/spl/spl_fit.c
+++ b/common/spl/spl_fit.c
@@ -803,6 +803,8 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
{
struct spl_image_info image_info;
struct spl_fit_info ctx;
+ const void *fit_image_loadaddr;
+ size_t fit_image_size;
int node = -1;
int ret;
int index = 0;
@@ -893,7 +895,19 @@ int spl_load_simple_fit(struct spl_image_info *spl_image,
if (firmware_node == node)
continue;
- image_info.load_addr = 0;
+ /*
+ * If the 'load' property is not present in the image node,
+ * use the FIT image's data address as the fallback load
+ * address. This allows flexibility in omitting the load address
+ * during FIT creation time.
+ */
+ ret = fit_image_get_data(ctx.fit, node,
+ &fit_image_loadaddr, &fit_image_size);
+ if (ret < 0)
+ panic("Error accessing node = %d in FIT (%d)\n", node,
+ ret);
+
+ image_info.load_addr = (ulong)fit_image_loadaddr;
ret = load_simple_fit(info, offset, &ctx, node, &image_info);
if (ret < 0 && ret != -EBADSLT) {
printf("%s: can't load image loadables index %d (ret =
%d)\n",
What's the IH_TYPE here? Saying to use something in-place is not always
safe.
Looking at the rest of the series, and then going back to v1 and:
https://lore.kernel.org/all/[email protected]/
we're IH_TYPE_STANDALONE which *does* require a load address
Yes.. we are trying to change that: support fit images with optional
load addresses. Ideally, load_simple_fit[0] would grab the loadaddr from
the fitNode, and if it is absent, it would use the address that we
populate as fallback above.
https://source.denx.de/u-boot/u-boot/-/blob/master/common/spl/spl_fit.c#L261
Please feel free to let me know if you are seeing any issues with this flow.
(see boot/image-fit.c).
https://source.denx.de/u-boot/u-boot/-/blob/master/boot/image-fit.c?ref_type=heads#L545-554
Here, we are just printing unavailable and not failing anywhere based on
IH_TYPE_STANDALONE...
Could you please point out if I am missing something..?
Thanks,
Beleswar
You might need to look in to a new type or see if
another type is reasonable, that doesn't already expect a load address
set.