[PATCH] Makefile: let 'make clean' remove files created by DEVICE_TREE_DEBUG

Rasmus Villemoes rv at rasmusvillemoes.dk
Mon Jun 15 09:56:57 CEST 2026


On Fri, Jun 12 2026, "Marek Vasut" <marek.vasut at mailbox.org> wrote:

> On 6/12/26 8:19 AM, Rasmus Villemoes wrote:
>> On Thu, Jun 11 2026, "Marek Vasut" <marek.vasut at mailbox.org> wrote:
>>
>>> On 6/11/26 4:08 PM, Rasmus Villemoes wrote:
>>>> Originally, 'make DEVICE_TREE_DEBUG=1' only generated extra output on
>>>> the console. But since 6cdd7597a2f ("kbuild: Produce diff between base
>>>> DT and U-Boot augmented DT if DEVICE_TREE_DEBUG=1"), that has also
>>>> left behind lots of files that clutter the repo and are hard to get
>>>> rid of manually.
>>>>
>>>> Make sure that a 'make clean' will remove those files, and add them to
>>>> .gitignore.
>>>>
>>>> Signed-off-by: Rasmus Villemoes <rv at rasmusvillemoes.dk>
>>>> ---
>>>>    .gitignore | 3 +++
>>>>    Makefile   | 1 +
>>>>    2 files changed, 4 insertions(+)
>>>
>>> This is nice, thank you.
>>>
>>>> diff --git a/.gitignore b/.gitignore
>>>> index d57d3be0291..0e09715cc60 100644
>>>> --- a/.gitignore
>>>> +++ b/.gitignore
>>>> @@ -16,6 +16,9 @@
>>>>    *.dtb
>>>>    *.dtbo
>>>>    *.dtb.S
>>>> +*.dtb.clean.dts
>>>> +*.dtb.diff
>>>> +*.dtb.full.dts
>>> Would it make sense to simply change this to *.dtb.* ? Or do you think
>>> that is too much ?
>>
>> I think I'm leaning on the explicit mention of each suffix. Had there
>> already been a *.dtb.* pattern, I would probably not have noticed and
>> thus not been prompted to amend the 'make clean' rule, so I think it's
>> better that some potential future .dtb.foo artifact does show up in 'git
>> status' as an untracked file. But this is certainly not a strong
>> opinion, and I'd be fine either way.
> I would be fine with .dts.foo showing up, but .dtb.foo are most likely
> build artifacts ?

Yes, but my point was that if we add a blanket *.dtb.* pattern to
.gitignore, the fact that some future .dtb.foo does _not_ show up in 'git
status' will make it less likely for the developer who adds .dtb.foo, or
someone else shortly afterwards, to note that it wasn't added to the
clean rule, as I'm sure we agree that it should be. Hence I think the
patterns should be added one by one to .gitignore in tandem with their
addition to the clean rule. But it's still not a strong opinion, so if
you or Tom or someone else think *.dtb.* in .gitignore is the way to go,
I won't object.

Rasmus


More information about the U-Boot mailing list