[PATCH] fdtgrep: Add option to reserve free space in the output FDT

Marek Vasut marek.vasut at mailbox.org
Mon Apr 27 12:11:33 CEST 2026


On 4/27/26 11:13 AM, Quentin Schulz wrote:
> Hi Simon, Marek,
> 
> On 4/22/26 4:31 AM, Simon Glass wrote:
>> When producing a DTB from fdtgrep, there is no way to reserve extra
>> space so that more nodes/properties can be added at runtime without
>> growing totalsize first.
>>
> 
> Ok but why is that an issue? What is the actual usecase? What I'm afraid 
> of is that you pad enough and you hit random bugs because you forget 
> that adding enough properties can now hit the size limit and you forgot 
> to add the logic to resize/grow the fdt when it's too small to fit new 
> properties.
This is needed to prevent fdtgrep from inhibiting this and stripping the 
pad bytes again:

scripts/Makefile.dts:DTC_FLAGS += -p $(CONFIG_SYS_DTC_PAD_BYTES)

That ^ is used by early U-Boot stages in place of 'fdt resize' , it 
provides enough space to add basic modifications to the DT at those stages.


More information about the U-Boot mailing list