[PATCH] spl: fit: List DTOs applied by SPL in U-Boot control DT
Marek Vasut
marex at denx.de
Fri Jun 28 04:18:11 CEST 2024
On 6/27/24 10:37 AM, Simon Glass wrote:
Hi,
>>
>> /* Make room in FDT for changes from the overlay */
>> ret = fdt_increase_size(spl_image->fdt_addr,
>> - image_info.size);
>> + image_info.size + strlen(str));
>
> You may also need space for the string terminator (i.e. add 1 more byte).
Fixed in V2 with expanded comment, thanks.
>> if (ret < 0)
>> break;
>>
>> @@ -464,6 +465,26 @@ static int spl_fit_append_fdt(struct spl_image_info *spl_image,
>>
>> debug("%s: DT overlay %s applied\n", __func__,
>> fit_get_name(ctx->fit, node, NULL));
>> +
>> + /*
>> + * Insert /u-boot,<dto-name> = <index> property into
>> + * the U-Boot control DT. This can be used by user
>> + * to inspect which DTOs got applied by the SPL from
>> + * a running U-Boot.
>> + */
>> + snprintf(dtoname, sizeof(dtoname), "u-boot,%s", str);
>> + ret = fdt_setprop_u32(spl_image->fdt_addr, 0, dtoname,
>> + index);
>> + if (!ret) {
>
> This means there was no error, right?
Yes, this should be inverted, thanks.
>> + /*
>> + * The DTO itself was applied, do not treat the
>> + * insertion of /u-boot,<dto-name> as an error
>> + * so the system can possibly boot somehow.
>> + */
>> + debug("%s: DT overlay %s name not inserted into / node (%d)\n",
>> + __func__,
>> + fit_get_name(ctx->fit, node, NULL), ret);
>> + }
>
> log_debug()
The whole file uses debug(), so let's keep it consistent.
Thanks !
More information about the U-Boot
mailing list