Fix incorrect usage of the (FIT) DT node unit address
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | doc: FIT image: fix incorrect description of DT node unit addressdoc/ doc/ doc/ +4 more | +196 | 2 replies | |
| 2/7 | doc: FIT image: fix incorrect examples of DT node unit addressdoc/ doc/ doc/ +7 more | +117 | 2 replies | |
| 3/7 | doc: fix incorrect usage of DT node unit addressarch/ doc/ doc/ +1 more | +42 | 2 replies | |
| 4/7 | fix incorrect usage of DT node unit address in commentscommon/ common/ include/ +1 more | +27 | 2 replies | |
| 5/7 | sunxi: arm64: correct usage of DT node address in FIT generationboard/ | +8 | 1 reply | |
| 5/7 | sunxi: arm64: correct usage of DT node address in FIT generation | +0 | 2 replies | |
| 6/7 | tools: fix incorrect usage of DT node unit addresstools/ | +12 | 3 replies | |
| 7/7 | armv8: secure firmware: fix incorrect unit address in node namearch/ | +1 | 3 replies |
Reviews trailers per patch
6 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Simon Glass |
|---|---|
| 1/7 | R-b |
| 2/7 | R-b |
| 3/7 | R-b R-b |
| 4/7 | R-b R-b |
| 5/7 | |
| 5/7 | |
| 6/7 | R-b R-b R-b |
| 7/7 | R-b R-b R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [U-Boot] [PATCH 0/7] Fix incorrect usage of the (FIT) DT node unit address
The DT spec[1] demands a unit-address in a node name (name at address) to match the "reg" property inside that node:
uart0: serial at 1c28000 {
reg = <0x01c28000 0x400>;
....If there is no reg property in a node, there must not be a unit address in the node name as well (so no '@' sign at all).
Newer version of the device tree compiler (dtc) will warn about violations of this rule:
....
<stdout>: Warning (unit_address_vs_reg): Node /images/fdt at 1 has a unit name, but no reg property
....
To avoid those warnings, but still keep enumerable node names, we replace the "@" sign with a dash ("-"), which does not have a specical meaning, but is a valid node name character. So the first fdt file (as referenced above in the warning message) would be called "fdt-1" instead.
This affects mostly documenation files and some examples of FIT image files, but also some code which actually generates FIT images:
- The first four patches fix documentation, example files and comments, they should not affect actual generated code or files.
In places where having multiple instances of a node is normal (fdt, hash, signature), I simply replaced the '@' sign with the dash. Where one would expect only one instance (kernel, initrd), I removed the bogus '@1' completely, so a "kernel" just goes by just this very name.
- Patch 5/7 fixes the usage in the Allwinner SPL FIT image files, this has been on the list before.
- Patch 6/7 fixes the usage when the mkimage tool (auto-)generates FIT images.
- The final patch 7/7 fixes the usage for the ARMv8 secure firmware image handling. I am a bit unsure about this one, as this seems to *look* for a specific node name, which sounds a bit dodgy to me. I think DT parsers should never rely on a certain node name, but either use references or look inside nodes to find a matching one. Also I am not sure who actually generates those FIT image files this code gets to read. Any input would be welcome here.
Please let me know if this makes some sense or not.
Cheers,
Andre.
[1] https://www.devicetree.org/downloads/devicetree-specification-v0.1-20160524.pdf; chapter 2.2.1 "Node names", page 6
Andre Przywara (7):
doc: FIT image: fix incorrect description of DT node unit address
doc: FIT image: fix incorrect examples of DT node unit address
doc: fix incorrect usage of DT node unit address
fix incorrect usage of DT node unit address in comments
sunxi: arm64: correct usage of DT node address in FIT generation
tools: fix incorrect usage of DT node unit address
armv8: secure firmware: fix incorrect unit address in node name
.../arm/cpu/armv8/fsl-layerscape/doc/README.falcon | 16 ++-- arch/arm/cpu/armv8/sec_firmware.c | 2 +- board/sunxi/mksunxi_fit_atf.sh | 16 ++-- common/image-fit.c | 16 ++-- common/image-sig.c | 2 +- doc/README.uniphier | 36 ++++---- doc/chromium/chromebook_jerry.its | 16 ++-- doc/chromium/nyan-big.its | 16 ++-- doc/uImage.FIT/beaglebone_vboot.txt | 84 ++++++++--------- doc/uImage.FIT/command_syntax_extensions.txt | 42 ++++----- doc/uImage.FIT/howto.txt | 52 +++++------ doc/uImage.FIT/kernel.its | 28 +++--- doc/uImage.FIT/kernel_fdt.its | 20 ++--- doc/uImage.FIT/multi-with-fpga.its | 28 +++--- doc/uImage.FIT/multi-with-loadables.its | 40 ++++----- doc/uImage.FIT/multi.its | 54 +++++------ doc/uImage.FIT/multi_spl.its | 14 +-- doc/uImage.FIT/overlay-fdt-boot.txt | 78 ++++++++-------- doc/uImage.FIT/sign-configs.its | 18 ++-- doc/uImage.FIT/sign-images.its | 16 ++-- doc/uImage.FIT/signature.txt | 100 ++++++++++----------- doc/uImage.FIT/source_file_format.txt | 26 +++--- doc/uImage.FIT/update3.its | 12 +-- doc/uImage.FIT/update_uboot.its | 4 +- doc/uImage.FIT/x86-fit-boot.txt | 10 +-- include/image.h | 26 +++--- tools/fit_image.c | 24 ++--- tools/image-host.c | 10 +-- 28 files changed, 403 insertions(+), 403 deletions(-)
Signature · 1 line
2.14.1