[PATCH v3] image: apply FDTOs on FDT image node without a load property
Marek Vasut
marex at denx.de
Wed Jan 22 15:32:37 CET 2025
On 1/22/25 3:21 PM, Quentin Schulz wrote:
[...]
>> @@ -2395,17 +2395,18 @@ int boot_get_fdt_fit(struct bootm_headers
>> *images, ulong addr,
>> /* we need to apply overlays */
>> #ifdef CONFIG_OF_LIBFDT_OVERLAY
>> - image_start = addr;
>> - image_end = addr + fit_get_size(fit);
>> - /* verify that relocation took place by load address not being in
>> fit */
>> - if (load >= image_start && load < image_end) {
>> - /* check is simplified; fit load checks for overlaps */
>> - printf("Overlayed FDT requires relocation\n");
>> + /* Relocate FDT so resizing does not overwrite other data in FIT. */
>> + of_flat_tree = map_sysmem(load, len);
>> + len = ALIGN(fdt_totalsize(load), SZ_4K);
>> + err = boot_relocate_fdt(&of_flat_tree, &len);
>
> My bad, I mistakenly "compile-tested" this with a defconfig that doesn't
> enable CONFIG_OF_LIBFDT_OVERLAY so this was never built.
>
> The compiler is actually not happy about that, it wants it cast to (char
> **).
>
> @Marek, what do you prefer? We go back to having of_flat_tree a char* or
> do the cast in boot_relocate_fdt?
What about -- go back and add a code comment ?
btw. please try and clip the response using [...] so you won't be
quoting a wall of useless text each time. The actual response is then
hard to find in it.
More information about the U-Boot
mailing list