On 1/19/26 6:12 PM, [email protected] wrote:

Hello Jamie,

The error is: failed on fdt_open_into for DTO, i.e. overlay
application
fdt error. This was introduced by 0535e46d55d scripts/dtc: Update
to
upstream version v1.7.2-35-g52f07dcca47c, i.e. this patch. Please
see
the attached log which includes a `printenv` attached.
Does this fix your problem ?

diff --git a/boot/image-fit.c b/boot/image-fit.c
index 2d040e38d97..1163e837d7e 100644
--- a/boot/image-fit.c
+++ b/boot/image-fit.c
@@ -2491,7 +2491,7 @@ int boot_get_fdt_fit(struct bootm_headers
*images,
ulong addr,
                  ov = map_sysmem(ovload, ovlen);

                  ovcopylen = ALIGN(fdt_totalsize(ov), SZ_4K);
-               ovcopy = malloc(ovcopylen);
+               ovcopy = memalign(8, ovcopylen);
                  if (!ovcopy) {
                          printf("failed to duplicate DTO before
application\n");
                          fdt_noffset = -ENOMEM;

Apologies for the delayed response. The above proposed solution did not
change/fix the issue. Any other suggestions would be greatly
appreciated.
Look at this piece of code in boot/image-fit.c :

2489                 debug("%s loaded at 0x%08lx len=0x%08lx\n",
2490                                 uname, ovload, ovlen);
2491                 ov = map_sysmem(ovload, ovlen);
2492
2493                 ovcopylen = ALIGN(fdt_totalsize(ov), SZ_4K);
2494                 ovcopy = memalign(8, ovcopylen);
2495                 if (!ovcopy) {
2496 printf("failed to duplicate DTO before application\n");
2497                         fdt_noffset = -ENOMEM;
2498                         goto out;
2499                 }
2500
2501                 err = fdt_open_into(ov, ovcopy, ovcopylen);
2502                 if (err < 0) {
2503                         printf("failed on fdt_open_into for DTO\n");

This is where it fails. Is $ov or $ovcopy 4-byte aligned ? Enable the debug() print at the beginning (or #define DEBUG at the beginning of this file) to find out.

If $ov is 4-byte aligned, try to generate your fitImage with "mkimage ... -E -B 8 ..." , does that make any difference ?

Reply via email to