[patch 0/7] dt: dtb version: add version info to dtb

From: Frank Rowand
Date: Wed Mar 18 2015 - 23:29:58 EST


Rob,

Can this be added to the next trees to get some test exposure before submitting
to Linus?

There is currently no way to tie a device tree blob (DTB) back to the source
and environment used to create it. Add this information, including a DTB
version number, which is somewhat analogous to the Linux kernel version number.

The DTB version number is independent of the kernel version number, and is
incremented for each make of one or more DTBs.

The DTB information is placed in node /chosen/dtb-info. The data for this
node will be automatically generated by the .dtb make system for any .dts
that includes arch/arm/boot/dts/skeleton.dtsi, either directly or indirectly.
This means that architectures other than arm will not receive this feature.
This can be added to other architectures by modifying their skeleton.dtsi.

There are 70 of the 557 arm .dts files that do not include skeleton.dtsi.
Thus the .dtb files created for these systems will not have the
/chosen/dtb-info node:

armada-xp-axpwifiap.dts
armada-xp-db.dts
armada-xp-gp.dts
armada-xp-lenovo-ix4-300d.dts
armada-xp-matrix.dts
armada-xp-netgear-rn2120.dts
armada-xp-openblocks-ax3-4.dts
armada-xp-synology-ds414.dts
atlas6-evb.dts
atlas7-evb.dts
axm5516-amarillo.dts
bcm2835-rpi-b-plus.dts
bcm2835-rpi-b.dts
ea3250.dts
ecx-2000.dts
highbank.dts
hip04-d01.dts
integratorap.dts
integratorcp.dts
ls1021a-qds.dts
ls1021a-twr.dts
meson6-atv1200.dts
moxart-uc7112lx.dts
mt8127-moose.dts
mt8135-evbp1.dts
nspire-clp.dts
nspire-cx.dts
nspire-tp.dts
phy3250.dts
picoxcell-pc7302-pc3x2.dts
picoxcell-pc7302-pc3x3.dts
prima2-evb.dts
r7s72100-genmai.dts
r8a73a4-ape6evm-reference.dts
r8a73a4-ape6evm.dts
r8a7790-lager.dts
r8a7791-henninger.dts
r8a7791-koelsch.dts
r8a7794-alt.dts
spear1310-evb.dts
spear1340-evb.dts
spear300-evb.dts
spear310-evb.dts
spear320-evb.dts
spear320-hmi.dts
spear600-evb.dts
stih407-b2120.dts
stih410-b2120.dts
stih415-b2000.dts
stih415-b2020.dts
stih416-b2000.dts
stih416-b2020.dts
stih416-b2020e.dts
stih418-b2199.dts
sun9i-a80-optimus.dts
vexpress-v2p-ca15-tc1.dts
vexpress-v2p-ca15_a7.dts
vexpress-v2p-ca5s.dts
vexpress-v2p-ca9.dts
vt8500-bv07.dts
wm8505-ref.dts
wm8650-mid.dts
wm8750-apc8750.dts
wm8850-w70v2.dts
xenvm-4.2.dts
zynq-parallella.dts
zynq-zc702.dts
zynq-zc706.dts
zynq-zed.dts
zynq-zybo.dts



An example of the DTB information reported is:

$ echo ; cat /proc/version; echo ; echo ; dmesg | grep DTB

Linux version 4.0.0-rc4-dirty (frank@buildhost) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #5 SMP PREEMPT Wed Mar 18 20:04:48 PDT 2015


DTB version 4.0.0-rc4-dirty (frank@buildhost) (DTC 1.4.0-dirty) #4 Wed Mar 18 20:04:11 PDT 2015
DTB linux version 4.0.0-rc4-dirty (frank@build_host) (gcc version 4.6.x-google 20120106 (prerelease) (GCC) ) #3 SMP PREEMPT Wed Mar 18 20:02:46 PDT 2015
DTB source /local/nobackup/src/git_linus/linux--4.0/arch/arm/boot/dts/qcom-apq8074-dragonboard.dts
DTB blob arch/arm/boot/dts/qcom-apq8074-dragonboard.dtb


The values of the /chosen/dtb-info/ properties are also available in
/proc/device-tree/chosen/dtb-info/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/