Devicetree state of U-Boot vs kernel

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Devicetree state of U-Boot vs kernel

Bill Mills
All,

On the Devicetree evolution call Wednesday I promised to finish my
comparison of u-boot DT vs kernel DT.
The script is not perfect but the results are still interesting.

For each dts and dtsi file in the tip of the u-boot tree, it tries to
correlate it to the kernel tip.
It compares git SHA1 signatures or falls back to filenames.
The results were surprising to me but perhaps they should not have been.

I have checked in the script[1] and the full results here [2]

The full file lists (with some diff stats) are in the root dir.
Example [3]

I also looked at the line count of the u-boot override files.
Even though we don't expect these to correlate, we do expect reasonable
usage to result in small files.  Big files are an indication of possible
abuse of the system.  (I don't think the idea was to have wholesale new
versions of the DTS as an override.)

I plan to redo the script in python.  It will be much easier to be more
precise and to look deeper.  (For example figure out how old the u-boot
version is in number of change sets and number of days.  Or if no
content sync now were they ever synced?)

Here is the scripts output: (from summary.txt)

Devicetree sync status for u-boot v2021.01-rc5-7-gb8c725e736
Compared to kernel v5.11-rc2-156-g71c061d24438
14% (255) are completely synced
      253 arm
        2 riscv
        0 mips
        0 powerpc
        0 x86
        0 68k
        0 microblaze
        0 sh
        0 arc
23% (416) content has appeared in the kernel but is not up to date
      411 arm
        0 riscv
        1 mips
        0 powerpc
        1 x86
        0 68k
        0 microblaze
        0 sh
        1 arc
33% (584) filename appears in kernel but content never has
      467 arm
        1 riscv
       12 mips
       91 powerpc
        0 x86
        0 68k
        0 microblaze
        0 sh
        8 arc
28% (510) neither filename nor content appears in kernel
      305 arm
        4 riscv
       48 mips
       35 powerpc
       44 x86
        0 68k
        1 microblaze
        1 sh
        6 arc
n/a (510) U-Boot specific, no correlation expected
        7 sandbox
      358 override
      211 test
histogram of override size (in raw lines)
    10  61
    20  53
    30  38
    40  33
    50  23
    60  14
    70  12
    80   7
    90   5
   100   4
   110   4
   120   5
   130   6
   140   4
   150   0
   160   2
   170   0
   180   0
   190   4
   200   0
   210   2
   220   2
   230   1
   240   2
   250   1
   260   1
   270   1
   280   0
   290   0
   300   0
   310   0
   320   1


[1]
https://github.com/wmamills/devicetree-source/blob/master/scripts/correlate-dts
[2] https://github.com/wmamills/devicetree-source
[3]
https://github.com/wmamills/devicetree-source/blob/master/dts-somewhere.txt

--
Bill Mills
Principal Technical Consultant, Linaro
+1-240-643-0836
TZ: US Eastern
Work Schedule:  Tues/Wed/Thur
Reply | Threaded
Open this post in threaded view
|

Re: Devicetree state of U-Boot vs kernel

Neil Armstrong
Hi,

On 08/01/2021 01:39, Bill Mills wrote:

> All,
>
> On the Devicetree evolution call Wednesday I promised to finish my comparison of u-boot DT vs kernel DT.
> The script is not perfect but the results are still interesting.
>
> For each dts and dtsi file in the tip of the u-boot tree, it tries to correlate it to the kernel tip.
> It compares git SHA1 signatures or falls back to filenames.
> The results were surprising to me but perhaps they should not have been.
>
> I have checked in the script[1] and the full results here [2]
>
> The full file lists (with some diff stats) are in the root dir.
> Example [3]
>
> I also looked at the line count of the u-boot override files.
> Even though we don't expect these to correlate, we do expect reasonable usage to result in small files.  Big files are an indication of possible abuse of the system.  (I don't think the idea was to have wholesale new versions of the DTS as an override.)
>
> I plan to redo the script in python.  It will be much easier to be more precise and to look deeper.  (For example figure out how old the u-boot version is in number of change sets and number of days.  Or if no content sync now were they ever synced?)
>
> Here is the scripts output: (from summary.txt)
>
> Devicetree sync status for u-boot v2021.01-rc5-7-gb8c725e736
> Compared to kernel v5.11-rc2-156-g71c061d24438

Do not compare with a such kernel, usually DT is sync'ed from stable kernels, or -rc1, so 5.11 stuff will eventually go for next u-boot release, not the actual one.

We (amlogic/meson) will sync part of DT with 5.10 for next release, the previous is sync'ed to 5.9/5.8.

It's almost impossible to sync to each release.

Neil

> 14% (255) are completely synced
>      253 arm
>        2 riscv
>        0 mips
>        0 powerpc
>        0 x86
>        0 68k
>        0 microblaze
>        0 sh
>        0 arc
> 23% (416) content has appeared in the kernel but is not up to date
>      411 arm
>        0 riscv
>        1 mips
>        0 powerpc
>        1 x86
>        0 68k
>        0 microblaze
>        0 sh
>        1 arc
> 33% (584) filename appears in kernel but content never has
>      467 arm
>        1 riscv
>       12 mips
>       91 powerpc
>        0 x86
>        0 68k
>        0 microblaze
>        0 sh
>        8 arc
> 28% (510) neither filename nor content appears in kernel
>      305 arm
>        4 riscv
>       48 mips
>       35 powerpc
>       44 x86
>        0 68k
>        1 microblaze
>        1 sh
>        6 arc
> n/a (510) U-Boot specific, no correlation expected
>        7 sandbox
>      358 override
>      211 test
> histogram of override size (in raw lines)
>    10  61
>    20  53
>    30  38
>    40  33
>    50  23
>    60  14
>    70  12
>    80   7
>    90   5
>   100   4
>   110   4
>   120   5
>   130   6
>   140   4
>   150   0
>   160   2
>   170   0
>   180   0
>   190   4
>   200   0
>   210   2
>   220   2
>   230   1
>   240   2
>   250   1
>   260   1
>   270   1
>   280   0
>   290   0
>   300   0
>   310   0
>   320   1
>
>
> [1] https://github.com/wmamills/devicetree-source/blob/master/scripts/correlate-dts
> [2] https://github.com/wmamills/devicetree-source
> [3] https://github.com/wmamills/devicetree-source/blob/master/dts-somewhere.txt
>

Reply | Threaded
Open this post in threaded view
|

Re: Devicetree state of U-Boot vs kernel

Tom Rini-4
On Wed, Jan 13, 2021 at 02:30:03PM +0100, Neil Armstrong wrote:

> Hi,
>
> On 08/01/2021 01:39, Bill Mills wrote:
> > All,
> >
> > On the Devicetree evolution call Wednesday I promised to finish my comparison of u-boot DT vs kernel DT.
> > The script is not perfect but the results are still interesting.
> >
> > For each dts and dtsi file in the tip of the u-boot tree, it tries to correlate it to the kernel tip.
> > It compares git SHA1 signatures or falls back to filenames.
> > The results were surprising to me but perhaps they should not have been.
> >
> > I have checked in the script[1] and the full results here [2]
> >
> > The full file lists (with some diff stats) are in the root dir.
> > Example [3]
> >
> > I also looked at the line count of the u-boot override files.
> > Even though we don't expect these to correlate, we do expect reasonable usage to result in small files.  Big files are an indication of possible abuse of the system.  (I don't think the idea was to have wholesale new versions of the DTS as an override.)
> >
> > I plan to redo the script in python.  It will be much easier to be more precise and to look deeper.  (For example figure out how old the u-boot version is in number of change sets and number of days.  Or if no content sync now were they ever synced?)
> >
> > Here is the scripts output: (from summary.txt)
> >
> > Devicetree sync status for u-boot v2021.01-rc5-7-gb8c725e736
> > Compared to kernel v5.11-rc2-156-g71c061d24438
>
> Do not compare with a such kernel, usually DT is sync'ed from stable kernels, or -rc1, so 5.11 stuff will eventually go for next u-boot release, not the actual one.
>
> We (amlogic/meson) will sync part of DT with 5.10 for next release, the previous is sync'ed to 5.9/5.8.
>
> It's almost impossible to sync to each release.
It's also something left up to the custodians, but it's also expected to
sync things when our -rc1 window is open with the latest best-choice
upstream Linux kernel.  There is of course, work to be done still and
tooling to better / more easily identify the gaps is good.

--
Tom

signature.asc (673 bytes) Download Attachment