Re: Record of original components for fdtoverlay

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, Jan 09, 2024 at 03:20:12PM +0900, Masahiro Yamada wrote:
> Hi.
> 
> Sorry for a stupid question.
> 
> 
> When you get a DTB by using fdtoverlay, there is no way to
> know how it was produced later. Correct?

More or less, yes.  Depending on the exact situation there might be
some clues that an overlay has been applied, but there's certainly no
easy or reliable way to tell.

> For instance, this case:
> 
>  $ fdtoverlay --input base.dtb ovl.dtbo --output foo.dtb
> 
> Once you get foo.dtb, you will never know whether it was
> assembled from base.dtb + ovl.dtbo, or it was directly
> generated from a single source, foo.dts.

Correct.

> In my understanding, there is no room in DTB to record
> such metadata, and it is impossible to disassemble foo.dtb
> into the original components, base.dtb and ovl.dtbo.

Yes and no.  It would certainly be possible to add special property
into the dtb to record a listing of the overlays applied.  However,
that would only be accurate if the tools used to apply updated it
correctly, and of course the current ones don't.

Even with that, it wouldn't be possible to "unapply" overlays -
overlays can overwrite data in the base tree so it's no longer
available.  There's not really any natural way of making that possible
within the dtb + overlay model.

> Please let me confirm that I did not miss anything.
> 
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux