On 1/18/26 8:53 PM, Marco Felsch wrote:
> Hi Ahmad,
> 
> On 26-01-15, Ahmad Fatoum wrote:
>> Hi,
>>
>> On 11/10/25 9:34 PM, Marco Felsch wrote:
>>> Add a helper to copy a node from a src FDT into a dest FDT. The helper
>>> is used later on by OP-TEE because OP-TEE appends FTD overlay fragements
>>> into the provided FTD.
>>
>> Does this correctly handle the case of a node already existing in the
>> base DT further down the tree or does it add a new node with the same name?
> 
> I think this is done by:
> 
>       node = fdt_add_subnode(dest_fdt, dest_node, name);
>       if (node == -FDT_ERR_EXISTS) {
>               node = fdt_subnode_offset(dest_fdt, dest_node, name);
>               if (node == -FDT_ERR_NOTFOUND)
>                       return -FDT_ERR_INTERNAL;
>       }
> 
>> I am not convinced we need such a function in the PBL, but I will read
>> along.
> 
> This function is used to split the overlay-fragments from the
> barebox-pbl passed FDT which are added by OP-TEE. The reason for doing
> this was to not cause any issue during the of_overlay_apply_tree() call
> because we have added an odd FDT overlay.
> 
> Therefore I'm going to extract the FDTO fragments first.

Why can't this be done in barebox proper?

Cheers,
Ahmad

> 
> Regards,
>   Marco
> 
> 
>> Cheers,
>> Ahmad
>>
>> -- 
>> Pengutronix e.K.                  |                             |
>> Steuerwalder Str. 21              | http://www.pengutronix.de/  |
>> 31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
>> Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |
>>
>>
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |


Reply via email to