Skip to contentSkip to conversation

Fix incorrect usage of the (FIT) DT node unit address

PATCH New Andre Przywara 4 participants 29 messages Dec 4, 2017 – Dec 19, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover 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
#1 lore raw

PATCH 1/7 doc: FIT image: fix incorrect description of DT node unit address

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image documentation files where this was not observed, to not give bad examples to the reader.

---
 doc/uImage.FIT/beaglebone_vboot.txt          |  84 +++++++++++-----------
 doc/uImage.FIT/command_syntax_extensions.txt |  42 +++++------
 doc/uImage.FIT/howto.txt                     |  52 +++++++-------
 doc/uImage.FIT/overlay-fdt-boot.txt          |  78 ++++++++++-----------
 doc/uImage.FIT/signature.txt                 | 100 +++++++++++++--------------
 doc/uImage.FIT/source_file_format.txt        |  26 +++----
 doc/uImage.FIT/x86-fit-boot.txt              |  10 +--
 7 files changed, 196 insertions(+), 196 deletions(-)
doc/uImage.FIT/beaglebone_vboot.txt +42 -42
index b4ab28542e..f1862c2753 100644
@@ -130,7 +130,7 @@ Put this into a file in that directory called sign.its:
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			data = /incbin/("Image.lzo");
 			type = "kernel";
 			arch = "arm";
@@ -138,27 +138,27 @@ Put this into a file in that directory called sign.its:
 			compression = "lzo";
 			load = <0x80008000>;
 			entry = <0x80008000>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
-		fdt at 1 {
+		fdt-1 {
 			description = "beaglebone-black";
 			data = /incbin/("am335x-boneblack.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
 	};
 	configurations {
-		default = "conf at 1";
-		conf at 1 {
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
-			signature at 1 {
+		default = "conf-1";
+		conf-1 {
+			kernel = "kernel";
+			fdt = "fdt-1";
+			signature-1 {
 				algo = "sha1,rsa2048";
 				key-name-hint = "dev";
 				sign-images = "fdt", "kernel";
@@ -211,7 +211,7 @@ You should see something like this:
 
 FIT description: Beaglebone black
 Created:         Sun Jun  1 12:50:30 2014
- Image 0 (kernel at 1)
+ Image 0 (kernel)
   Description:  unavailable
   Created:      Sun Jun  1 12:50:30 2014
   Type:         Kernel Image
@@ -223,7 +223,7 @@ Created:         Sun Jun  1 12:50:30 2014
   Entry Point:  0x80008000
   Hash algo:    sha1
   Hash value:   c94364646427e10f423837e559898ef02c97b988
- Image 1 (fdt at 1)
+ Image 1 (fdt-1)
   Description:  beaglebone-black
   Created:      Sun Jun  1 12:50:30 2014
   Type:         Flat Device Tree
@@ -232,11 +232,11 @@ Created:         Sun Jun  1 12:50:30 2014
   Architecture: ARM
   Hash algo:    sha1
   Hash value:   cb09202f889d824f23b8e4404b781be5ad38a68d
- Default Configuration: 'conf at 1'
- Configuration 0 (conf at 1)
+ Default Configuration: 'conf-1'
+ Configuration 0 (conf-1)
   Description:  unavailable
-  Kernel:       kernel at 1
-  FDT:          fdt at 1
+  Kernel:       kernel
+  FDT:          fdt-1
 
 
 Now am335x-boneblack-pubkey.dtb contains the public key and image.fit contains
@@ -251,12 +251,12 @@ which results in:
 
 Verifying Hash Integrity ... sha1,rsa2048:dev+
 ## Loading kernel from FIT Image at 7fc6ee469000 ...
-   Using 'conf at 1' configuration
+   Using 'conf-1' configuration
    Verifying Hash Integrity ...
 sha1,rsa2048:dev+
 OK
 
-   Trying 'kernel at 1' kernel subimage
+   Trying 'kernel' kernel subimage
      Description:  unavailable
      Created:      Sun Jun  1 12:50:30 2014
      Type:         Kernel Image
@@ -274,8 +274,8 @@ OK
 
 Unimplemented compression type 4
 ## Loading fdt from FIT Image at 7fc6ee469000 ...
-   Using 'conf at 1' configuration
-   Trying 'fdt at 1' fdt subimage
+   Using 'conf-1' configuration
+   Trying 'fdt-1' fdt subimage
      Description:  beaglebone-black
      Created:      Sun Jun  1 12:50:30 2014
      Type:         Flat Device Tree
@@ -291,7 +291,7 @@ OK
    Loading Flat Device Tree ... OK
 
 ## Loading ramdisk from FIT Image at 7fc6ee469000 ...
-   Using 'conf at 1' configuration
+   Using 'conf-1' configuration
 Could not find subimage node
 
 Signature check OK
@@ -313,8 +313,8 @@ the above flow works.
 But it is fun to do this by hand, so you can load image.fit into a hex editor
 like ghex, and change a byte in the kernel:
 
-   $UOUT/tools/fit_info -f image.fit -n /images/kernel at 1 -p data
-NAME: kernel at 1
+   $UOUT/tools/fit_info -f image.fit -n /images/kernel -p data
+NAME: kernel
 LEN: 7790938
 OFF: 168
 
@@ -324,12 +324,12 @@ fit_check_sign again. You should see something like:
 
 Verifying Hash Integrity ... sha1,rsa2048:dev+
 ## Loading kernel from FIT Image at 7f5a39571000 ...
-   Using 'conf at 1' configuration
+   Using 'conf-1' configuration
    Verifying Hash Integrity ...
 sha1,rsa2048:dev+
 OK
 
-   Trying 'kernel at 1' kernel subimage
+   Trying 'kernel' kernel subimage
      Description:  unavailable
      Created:      Sun Jun  1 13:09:21 2014
      Type:         Kernel Image
@@ -343,12 +343,12 @@ OK
      Hash value:   c94364646427e10f423837e559898ef02c97b988
    Verifying Hash Integrity ...
 sha1 error
-Bad hash value for 'hash at 1' hash node in 'kernel at 1' image node
+Bad hash value for 'hash-1' hash node in 'kernel' image node
 Bad Data Hash
 
 ## Loading fdt from FIT Image at 7f5a39571000 ...
-   Using 'conf at 1' configuration
-   Trying 'fdt at 1' fdt subimage
+   Using 'conf-1' configuration
+   Trying 'fdt-1' fdt subimage
      Description:  beaglebone-black
      Created:      Sun Jun  1 13:09:21 2014
      Type:         Flat Device Tree
@@ -364,7 +364,7 @@ OK
    Loading Flat Device Tree ... OK
 
 ## Loading ramdisk from FIT Image at 7f5a39571000 ...
-   Using 'conf at 1' configuration
+   Using 'conf-1' configuration
 Could not find subimage node
 
 Signature check Bad (error 1)
@@ -386,11 +386,11 @@ images
 configurations
 
    fdtget -l image.fit /configurations
-conf at 1
-fdtget -l image.fit /configurations/conf at 1
-signature at 1
+conf-1
+fdtget -l image.fit /configurations/conf-1
+signature-1
 
-   fdtget -p image.fit /configurations/conf at 1/signature at 1
+   fdtget -p image.fit /configurations/conf-1/signature-1
 hashed-strings
 hashed-nodes
 timestamp
@@ -401,20 +401,20 @@ algo
 key-name-hint
 sign-images
 
-   fdtget image.fit /configurations/conf at 1/signature at 1 hashed-nodes
-/ /configurations/conf at 1 /images/fdt at 1 /images/fdt at 1/hash at 1 /images/kernel at 1 /images/kernel at 1/hash at 1
+   fdtget image.fit /configurations/conf-1/signature-1 hashed-nodes
+/ /configurations/conf-1 /images/fdt-1 /images/fdt-1/hash /images/kernel /images/kernel/hash-1
 
 This gives us a bit of a look into the signature that mkimage added. Note you
 can also use fdtdump to list the entire device tree.
 
 Say we want to change the kernel that this configuration uses
-(/images/kernel at 1). We could just put a new kernel in the image, but we will
+(/images/kernel). We could just put a new kernel in the image, but we will
 need to change the hash to match. Let's simulate that by changing a byte of
 the hash:
 
-    fdtget -tx image.fit /images/kernel at 1/hash at 1 value
+    fdtget -tx image.fit /images/kernel/hash-1 value
 c9436464 6427e10f 423837e5 59898ef0 2c97b988
-    fdtput -tx image.fit /images/kernel at 1/hash at 1 value c9436464 6427e10f 423837e5 59898ef0 2c97b981
+    fdtput -tx image.fit /images/kernel/hash-1 value c9436464 6427e10f 423837e5 59898ef0 2c97b981
 
 Now check it again:
 
@@ -437,7 +437,7 @@ configuration. But that won't work since you are not allowed to change the
 configuration in any way. Try it with a fresh (valid) image if you like by
 running the mkimage link again. Then:
 
-   fdtput -p image.fit /configurations/conf at 1/signature at 2 value fred
+   fdtput -p image.fit /configurations/conf-1/signature-1 value fred
    $UOUT/tools/fit_check_sign -f image.fit -k am335x-boneblack-pubkey.dtb
 Verifying Hash Integrity ... -
 sha1,rsa2048:devrsa_verify_with_keynode: RSA failed to verify: -13
@@ -521,9 +521,9 @@ U-Boot# ext2load mmc 0:2 82000000 /boot/image.fit
 7824930 bytes read in 589 ms (12.7 MiB/s)
 U-Boot# bootm 82000000
 ## Loading kernel from FIT Image at 82000000 ...
-   Using 'conf at 1' configuration
+   Using 'conf-1' configuration
    Verifying Hash Integrity ... sha1,rsa2048:dev+ OK
-   Trying 'kernel at 1' kernel subimage
+   Trying 'kernel' kernel subimage
      Description:  unavailable
      Created:      2014-06-01  19:32:54 UTC
      Type:         Kernel Image
@@ -538,8 +538,8 @@ U-Boot# bootm 82000000
      Hash value:   c94364646427e10f423837e559898ef02c97b988
    Verifying Hash Integrity ... sha1+ OK
 ## Loading fdt from FIT Image at 82000000 ...
-   Using 'conf at 1' configuration
-   Trying 'fdt at 1' fdt subimage
+   Using 'conf-1' configuration
+   Trying 'fdt-1' fdt subimage
      Description:  beaglebone-black
      Created:      2014-06-01  19:32:54 UTC
      Type:         Flat Device Tree
doc/uImage.FIT/command_syntax_extensions.txt +21 -21

68 lines not on this page · raw message

doc/uImage.FIT/howto.txt +26 -26

127 lines not on this page · raw message

doc/uImage.FIT/overlay-fdt-boot.txt +39 -39

178 lines not on this page · raw message

doc/uImage.FIT/signature.txt +50 -50

188 lines not on this page · raw message

doc/uImage.FIT/source_file_format.txt +13 -13
index 6f727a1e8a..b617b6ccec 100644
@@ -102,15 +102,15 @@ Root node of the uImage Tree should have the following layout:
     |
     o images
     | |
-    | o image at 1 {...}
-    | o image at 2 {...}
+    | o image-1 {...}
+    | o image-2 {...}
     | ...
     |
     o configurations
-      |- default = "conf at 1"
+      |- default = "conf-1"
       |
-      o conf at 1 {...}
-      o conf at 2 {...}
+      o conf-1 {...}
+      o conf-2 {...}
       ...
 
 
@@ -142,7 +142,7 @@ Root node of the uImage Tree should have the following layout:
 This node is a container node for component sub-image nodes. Each sub-node of
 the '/images' node should have the following layout:
 
- o image at 1
+ o image-1
    |- description = "component sub-image description"
    |- data = /incbin/("path/to/data/file.bin")
    |- type = "sub-image type name"
@@ -152,8 +152,8 @@ the '/images' node should have the following layout:
    |- load = <00000000>
    |- entry = <00000000>
    |
-   o hash at 1 {...}
-   o hash at 2 {...}
+   o hash-1 {...}
+   o hash-2 {...}
    ...
 
   Mandatory properties:
@@ -183,14 +183,14 @@ the '/images' node should have the following layout:
     property of the root node. Mandatory for types: "standalone" and "kernel".
 
   Optional nodes:
-  - hash at 1 : Each hash sub-node represents separate hash or checksum
+  - hash-1 : Each hash sub-node represents separate hash or checksum
     calculated for node's data according to specified algorithm.
 
 
 5) Hash nodes
 -------------
 
-o hash at 1
+o hash-1
   |- algo = "hash or checksum algorithm name"
   |- value = [hash or checksum value]
 
@@ -212,8 +212,8 @@ The 'configurations' node has has the following structure:
 o configurations
   |- default = "default configuration sub-node unit name"
   |
-  o config at 1 {...}
-  o config at 2 {...}
+  o config-1 {...}
+  o config-2 {...}
   ...
 
 
@@ -231,7 +231,7 @@ o configurations
 
 Each configuration has the following structure:
 
-o config at 1
+o config-1
   |- description = "configuration description"
   |- kernel = "kernel sub-node unit name"
   |- ramdisk = "ramdisk sub-node unit name"
doc/uImage.FIT/x86-fit-boot.txt +5 -5
index 02238f9df8..88d3460a83 100644
@@ -197,7 +197,7 @@ You can take a look at the resulting fit file if you like:
 $ dumpimage -l image.fit
 FIT description: Simple image with single Linux kernel on x86
 Created:         Tue Oct  7 10:57:24 2014
- Image 0 (kernel at 1)
+ Image 0 (kernel)
   Description:  Vanilla Linux kernel
   Created:      Tue Oct  7 10:57:24 2014
   Type:         Kernel Image
@@ -209,7 +209,7 @@ Created:         Tue Oct  7 10:57:24 2014
   Entry Point:  0x00000000
   Hash algo:    sha1
   Hash value:   446b5163ebfe0fb6ee20cbb7a8501b263cd92392
- Image 1 (setup at 1)
+ Image 1 (setup)
   Description:  Linux setup.bin
   Created:      Tue Oct  7 10:57:24 2014
   Type:         x86 setup.bin
@@ -217,10 +217,10 @@ Created:         Tue Oct  7 10:57:24 2014
   Data Size:    12912 Bytes = 12.61 kB = 0.01 MB
   Hash algo:    sha1
   Hash value:   a1f2099cf47ff9816236cd534c77af86e713faad
- Default Configuration: 'config at 1'
- Configuration 0 (config at 1)
+ Default Configuration: 'config-1'
+ Configuration 0 (config-1)
   Description:  Boot Linux kernel
-  Kernel:       kernel at 1
+  Kernel:       kernel
 
 
 Booting the FIT
Signature · 1 line
2.14.1
#2 lore raw

PATCH 1/7 doc: FIT image: fix incorrect description of DT node unit address

Quoted 7 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image documentation files where this was not observed, to not give bad examples to the reader.

Quoted 10 lines
---
 doc/uImage.FIT/beaglebone_vboot.txt          |  84 +++++++++++-----------
 doc/uImage.FIT/command_syntax_extensions.txt |  42 +++++------
 doc/uImage.FIT/howto.txt                     |  52 +++++++-------
 doc/uImage.FIT/overlay-fdt-boot.txt          |  78 ++++++++++-----------
 doc/uImage.FIT/signature.txt                 | 100 +++++++++++++--------------
 doc/uImage.FIT/source_file_format.txt        |  26 +++----
 doc/uImage.FIT/x86-fit-boot.txt              |  10 +--
 7 files changed, 196 insertions(+), 196 deletions(-)

I'm not hugely keen on the inconsistency of kernel vs. hash at 1, but I suppose it does not matter.

Regards,
Simon

#3 lore raw

PATCH 1/7 doc: FIT image: fix incorrect description of DT node unit address

Quoted 19 lines · Simon Glass
Quoted 7 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image documentation files where this was not observed, to not give bad examples to the reader.

Quoted 10 lines
---
 doc/uImage.FIT/beaglebone_vboot.txt          |  84 +++++++++++-----------
 doc/uImage.FIT/command_syntax_extensions.txt |  42 +++++------
 doc/uImage.FIT/howto.txt                     |  52 +++++++-------
 doc/uImage.FIT/overlay-fdt-boot.txt          |  78 ++++++++++-----------
 doc/uImage.FIT/signature.txt                 | 100 +++++++++++++--------------
 doc/uImage.FIT/source_file_format.txt        |  26 +++----
 doc/uImage.FIT/x86-fit-boot.txt              |  10 +--
 7 files changed, 196 insertions(+), 196 deletions(-)
Quoted 4 lines

I'm not hugely keen on the inconsistency of kernel vs. hash at 1, but I suppose it does not matter.

Applied to u-boot-dm, thanks!

#4 lore raw

PATCH 2/7 doc: FIT image: fix incorrect examples of DT node unit address

In reply to Andre Przywara

The DT spec demands a unit-address of a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image example files where this was not observed, to not give bad examples to the reader.

---
 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/sign-configs.its         | 18 +++++------
 doc/uImage.FIT/sign-images.its          | 16 +++++-----
 doc/uImage.FIT/update3.its              | 12 ++++----
 doc/uImage.FIT/update_uboot.its         |  4 +--
 10 files changed, 117 insertions(+), 117 deletions(-)
doc/uImage.FIT/kernel.its +14 -14
index 0aaf47e6c6..77ddf622de 100644
@@ -9,7 +9,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "Vanilla Linux kernel";
 			data = /incbin/("./vmlinux.bin.gz");
 			type = "kernel";
@@ -18,20 +18,20 @@
 			compression = "gzip";
 			load = <00000000>;
 			entry = <00000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "crc32";
 			};
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 1";
-		config at 1 {
+		default = "config-1";
+		config-1 {
 			description = "Boot Linux kernel";
-			kernel = "kernel at 1";
+			kernel = "kernel";
 		};
 	};
 };
@@ -47,7 +47,7 @@ For x86 a setup node is also required: see x86-fit-boot.txt.
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "Vanilla Linux kernel";
 			data = /incbin/("./image.bin.lzo");
 			type = "kernel";
@@ -56,12 +56,12 @@ For x86 a setup node is also required: see x86-fit-boot.txt.
 			compression = "lzo";
 			load = <0x01000000>;
 			entry = <0x00000000>;
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 
-		setup at 1 {
+		setup {
 			description = "Linux setup.bin";
 			data = /incbin/("./setup.bin");
 			type = "x86_setup";
@@ -70,18 +70,18 @@ For x86 a setup node is also required: see x86-fit-boot.txt.
 			compression = "none";
 			load = <0x00090000>;
 			entry = <0x00090000>;
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 1";
-		config at 1 {
+		default = "config-1";
+		config-1 {
 			description = "Boot Linux kernel";
-			kernel = "kernel at 1";
-			setup = "setup at 1";
+			kernel = "kernel";
+			setup = "setup";
 		};
 	};
 };
doc/uImage.FIT/kernel_fdt.its +10 -10
index 7c521486ef..000d85b8e0 100644
@@ -9,7 +9,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "Vanilla Linux kernel";
 			data = /incbin/("./vmlinux.bin.gz");
 			type = "kernel";
@@ -18,34 +18,34 @@
 			compression = "gzip";
 			load = <00000000>;
 			entry = <00000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "crc32";
 			};
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
-		fdt at 1 {
+		fdt-1 {
 			description = "Flattened Device Tree blob";
 			data = /incbin/("./target.dtb");
 			type = "flat_dt";
 			arch = "ppc";
 			compression = "none";
-			hash at 1 {
+			hash-1 {
 				algo = "crc32";
 			};
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 	};
 
 	configurations {
-		default = "conf at 1";
-		conf at 1 {
+		default = "conf-1";
+		conf-1 {
 			description = "Boot Linux kernel with FDT blob";
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
+			kernel = "kernel";
+			fdt = "fdt-1";
 		};
 	};
 };
doc/uImage.FIT/multi-with-fpga.its +14 -14
index 0cdb31fe91..47ee5760c4 100644
@@ -10,31 +10,31 @@
 	#address-cells = <1>;
 
 	images {
-		fdt at 1 {
+		fdt-1 {
 			description = "zc706";
 			data = /incbin/("/tftpboot/devicetree.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
 			load = <0x10000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 
-		fpga at 1 {
+		fpga {
 			description = "FPGA";
 			data = /incbin/("/tftpboot/download.bit");
 			type = "fpga";
 			arch = "arm";
 			compression = "none";
 			load = <0x30000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 
-		linux_kernel at 1 {
+		linux_kernel {
 			description = "Linux";
 			data = /incbin/("/tftpboot/zImage");
 			type = "kernel";
@@ -43,25 +43,25 @@
 			compression = "none";
 			load = <0x8000>;
 			entry = <0x8000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 2";
-		config at 1 {
+		default = "config-2";
+		config-1 {
 			description = "Linux";
-			kernel = "linux_kernel at 1";
-			fdt = "fdt at 1";
+			kernel = "linux_kernel";
+			fdt = "fdt-1";
 		};
 
-		config at 2 {
+		config-2 {
 			description = "Linux with fpga";
-			kernel = "linux_kernel at 1";
-			fdt = "fdt at 1";
-			fpga = "fpga at 1";
+			kernel = "linux_kernel";
+			fdt = "fdt-1";
+			fpga = "fpga";
 		};
 	};
 };
doc/uImage.FIT/multi-with-loadables.its +20 -20
index a8545d245c..4d4909f832 100644
@@ -10,7 +10,7 @@
 	#address-cells = <1>;
 
 	images {
-		xen_kernel at 1 {
+		xen_kernel {
 			description = "xen binary";
 			data = /incbin/("./xen");
 			type = "kernel";
@@ -19,36 +19,36 @@
 			compression = "none";
 			load = <0xa0000000>;
 			entry = <0xa0000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 
-		fdt at 1 {
+		fdt-1 {
 			description = "xexpress-ca15 tree blob";
 			data = /incbin/("./vexpress-v2p-ca15-tc1.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
 			load = <0xb0000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 
-		fdt at 2 {
+		fdt-2 {
 			description = "xexpress-ca15 tree blob";
 			data = /incbin/("./vexpress-v2p-ca15-tc1.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
 			load = <0xb0400000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 
-		linux_kernel at 1 {
+		linux_kernel {
 			description = "Linux Image";
 			data = /incbin/("./Image");
 			type = "kernel";
@@ -57,33 +57,33 @@
 			compression = "none";
 			load = <0xa0000000>;
 			entry = <0xa0000000>;
-			hash at 1 {
+			hash-1 {
 				algo = "md5";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 2";
+		default = "config-2";
 
-		config at 1 {
+		config-1 {
 			description = "Just plain Linux";
-			kernel = "linux_kernel at 1";
-			fdt = "fdt at 1";
+			kernel = "linux_kernel";
+			fdt = "fdt-1";
 		};
 
-		config at 2 {
+		config-2 {
 			description = "Xen one loadable";
-			kernel = "xen_kernel at 1";
-			fdt = "fdt at 1";
-			loadables = "linux_kernel at 1";
+			kernel = "xen_kernel";
+			fdt = "fdt-1";
+			loadables = "linux_kernel";
 		};
 
-		config at 3 {
+		config-3 {
 			description = "Xen two loadables";
-			kernel = "xen_kernel at 1";
-			fdt = "fdt at 1";
-			loadables = "linux_kernel at 1", "fdt at 2";
+			kernel = "xen_kernel";
+			fdt = "fdt-1";
+			loadables = "linux_kernel", "fdt-2";
 		};
 	};
 };
doc/uImage.FIT/multi.its +27 -27

141 lines not on this page · raw message

doc/uImage.FIT/multi_spl.its +7 -7
index d43563d87a..5942199744 100644
@@ -45,7 +45,7 @@
 			load = <0x40000>;
 		};
 
-		fdt at 1 {
+		fdt-1 {
 			description = "Pine64+ DT";
 			type = "flat_dt";
 			compression = "none";
@@ -53,7 +53,7 @@
 			arch = "arm64";
 		};
 
-		fdt at 2 {
+		fdt-2 {
 			description = "Pine64 DT";
 			type = "flat_dt";
 			compression = "none";
@@ -79,18 +79,18 @@
 	};
 
 	configurations {
-		default = "config at 1";
+		default = "config-1";
 
-		config at 1 {
+		config-1 {
 			description = "sun50i-a64-pine64-plus";
 			loadables = "uboot", "atf", "kernel", "initrd";
-			fdt = "fdt at 1";
+			fdt = "fdt-1";
 		};
 
-		config at 2 {
+		config-2 {
 			description = "sun50i-a64-pine64";
 			loadables = "uboot", "atf", "mgmt-firmware";
-			fdt = "fdt at 2";
+			fdt = "fdt-2";
 		};
 	};
 };
doc/uImage.FIT/sign-configs.its +9 -9
index 3c17f040de..9e992c1988 100644
@@ -5,7 +5,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			data = /incbin/("test-kernel.bin");
 			type = "kernel_noload";
 			arch = "sandbox";
@@ -14,28 +14,28 @@
 			load = <0x4>;
 			entry = <0x8>;
 			kernel-version = <1>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
-		fdt at 1 {
+		fdt-1 {
 			description = "snow";
 			data = /incbin/("sandbox-kernel.dtb");
 			type = "flat_dt";
 			arch = "sandbox";
 			compression = "none";
 			fdt-version = <1>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
 	};
 	configurations {
-		default = "conf at 1";
-		conf at 1 {
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
-			signature at 1 {
+		default = "conf-1";
+		conf-1 {
+			kernel = "kernel";
+			fdt = "fdt-1";
+			signature {
 				algo = "sha1,rsa2048";
 				key-name-hint = "dev";
 				sign-images = "fdt", "kernel";
doc/uImage.FIT/sign-images.its +8 -8
index f69326a39b..18c759e9e6 100644
@@ -5,7 +5,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			data = /incbin/("test-kernel.bin");
 			type = "kernel_noload";
 			arch = "sandbox";
@@ -14,29 +14,29 @@
 			load = <0x4>;
 			entry = <0x8>;
 			kernel-version = <1>;
-			signature at 1 {
+			signature {
 				algo = "sha1,rsa2048";
 				key-name-hint = "dev";
 			};
 		};
-		fdt at 1 {
+		fdt-1 {
 			description = "snow";
 			data = /incbin/("sandbox-kernel.dtb");
 			type = "flat_dt";
 			arch = "sandbox";
 			compression = "none";
 			fdt-version = <1>;
-			signature at 1 {
+			signature {
 				algo = "sha1,rsa2048";
 				key-name-hint = "dev";
 			};
 		};
 	};
 	configurations {
-		default = "conf at 1";
-		conf at 1 {
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
+		default = "conf-1";
+		conf-1 {
+			kernel = "kernel";
+			fdt = "fdt-1";
 		};
 	};
 };
doc/uImage.FIT/update3.its +6 -6
index a6eaef691e..0659f20002 100644
@@ -9,34 +9,34 @@
 	#address-cells = <1>;
 
 	images {
-		update at 1 {
+		update-1 {
 			description = "Linux kernel binary";
 			data = /incbin/("./vmlinux.bin.gz");
 			compression = "none";
 			type = "firmware";
 			load = <FF700000>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
-		update at 2 {
+		update-2 {
 			description = "Ramdisk image";
 			data = /incbin/("./ramdisk_image.gz");
 			compression = "none";
 			type = "firmware";
 			load = <FF8E0000>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
 
-		update at 3 {
+		update-3 {
 			description = "FDT blob";
 			data = /incbin/("./blob.fdt");
 			compression = "none";
 			type = "firmware";
 			load = <FFAC0000>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
doc/uImage.FIT/update_uboot.its +2 -2
index 846723e2d6..c2ac2663e6 100644
@@ -10,13 +10,13 @@
 	#address-cells = <1>;
 
 	images {
-		update at 1 {
+		update-1 {
 			description = "U-Boot binary";
 			data = /incbin/("./u-boot.bin");
 			compression = "none";
 			type = "firmware";
 			load = <FFFC0000>;
-			hash at 1 {
+			hash-1 {
 				algo = "sha1";
 			};
 		};
Signature · 1 line
2.14.1
#5 lore raw

PATCH 2/7 doc: FIT image: fix incorrect examples of DT node unit address

Quoted 7 lines · Andre Przywara

The DT spec demands a unit-address of a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image example files where this was not observed, to not give bad examples to the reader.

Quoted 12 lines
---
 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/sign-configs.its         | 18 +++++------
 doc/uImage.FIT/sign-images.its          | 16 +++++-----
 doc/uImage.FIT/update3.its              | 12 ++++----
 doc/uImage.FIT/update_uboot.its         |  4 +--
 10 files changed, 117 insertions(+), 117 deletions(-)
#6 lore raw

PATCH 2/7 doc: FIT image: fix incorrect examples of DT node unit address

Quoted 21 lines · Simon Glass
Quoted 7 lines · Andre Przywara

The DT spec demands a unit-address of a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the FIT image example files where this was not observed, to not give bad examples to the reader.

Quoted 12 lines
---
 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/sign-configs.its         | 18 +++++------
 doc/uImage.FIT/sign-images.its          | 16 +++++-----
 doc/uImage.FIT/update3.its              | 12 ++++----
 doc/uImage.FIT/update_uboot.its         |  4 +--
 10 files changed, 117 insertions(+), 117 deletions(-)
Quoted 1 line

Applied to u-boot-dm, thanks!

#7 lore raw

PATCH 3/7 doc: fix incorrect usage of DT node unit address

In reply to Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in various documentation files where this was not observed, to not give bad examples to the reader.

---
 .../arm/cpu/armv8/fsl-layerscape/doc/README.falcon | 16 +++++-----
 doc/README.uniphier                                | 36 +++++++++++-----------
 doc/chromium/chromebook_jerry.its                  | 16 +++++-----
 doc/chromium/nyan-big.its                          | 16 +++++-----
 4 files changed, 42 insertions(+), 42 deletions(-)
arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon +8 -8
index 2505f408ab..a00b5bc9c3 100644
@@ -86,7 +86,7 @@ Example:
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "ARM64 Linux kernel";
 			data = /incbin/("./arch/arm64/boot/Image.gz");
 			type = "kernel";
@@ -96,7 +96,7 @@ Example:
 			load = <0x80080000>;
 			entry = <0x80080000>;
 		};
-		fdt at 1 {
+		fdt-1 {
 			description = "Flattened Device Tree blob";
 			data = /incbin/("./fsl-ls1043ardb-static.dtb");
 			type = "flat_dt";
@@ -104,7 +104,7 @@ Example:
 			compression = "none";
 			load = <0x90000000>;
 		};
-		ramdisk at 1 {
+		ramdisk {
 			description = "LS1043 Ramdisk";
                         data = /incbin/("./rootfs.cpio.gz");
 			type = "ramdisk";
@@ -116,12 +116,12 @@ Example:
 	};
 
 	configurations {
-		default = "config at 1";
-		config at 1 {
+		default = "config-1";
+		config-1 {
 			description = "Boot Linux kernel";
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
-			ramdisk = "ramdisk at 1";
+			kernel = "kernel";
+			fdt = "fdt-1";
+			ramdisk = "ramdisk";
 			loadables = "fdt", "ramdisk";
 		};
 	};
doc/README.uniphier +18 -18
index 0fa3248fae..990806ab79 100644
@@ -142,7 +142,7 @@ The following is an example for a simple usecase:
 	#address-cells = <1>;
 
 	images {
-		kernel at 0 {
+		kernel {
 			description = "linux";
 			data = /incbin/("PATH/TO/YOUR/LINUX/DIR/arch/arm64/boot/Image.gz");
 			type = "kernel";
@@ -151,44 +151,44 @@ The following is an example for a simple usecase:
 			compression = "gzip";
 			load = <0x82080000>;
 			entry = <0x82080000>;
-			hash at 0 {
+			hash-1 {
 				algo = "sha256";
 			};
 		};
 
-		fdt at 0 {
+		fdt-1 {
 			description = "fdt";
 			data = /incbin/("PATH/TO/YOUR/LINUX/DIR/arch/arm64/boot/dts/socionext/uniphier-ld20-ref.dtb");
 			type = "flat_dt";
 			arch = "arm64";
 			compression = "none";
-			hash at 0 {
+			hash-1 {
 				algo = "sha256";
 			};
 		};
 
-		ramdisk at 0 {
+		ramdisk {
 			description = "ramdisk";
 			data = /incbin/("PATH/TO/YOUR/ROOTFS/DIR/rootfs.cpio");
 			type = "ramdisk";
 			arch = "arm64";
 			os = "linux";
 			compression = "none";
-			hash at 0 {
+			hash-1 {
 				algo = "sha256";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 0";
+		default = "config-1";
 
-		config at 0 {
+		config-1 {
 			description = "Configuration0";
-			kernel = "kernel at 0";
-			fdt = "fdt at 0";
-			ramdisk = "ramdisk at 0";
-			signature at 0 {
+			kernel = "kernel";
+			fdt = "fdt-1";
+			ramdisk = "ramdisk";
+			signature-1 {
 				algo = "sha256,rsa2048";
 				key-name-hint = "dev";
 				sign-images = "kernel", "fdt", "ramdisk";
@@ -268,9 +268,9 @@ If it is successful, you will see messages like follows:
 
 ---------------------------------------->8----------------------------------------
 ## Loading kernel from FIT Image at 84100000 ...
-   Using 'config at 0' configuration
+   Using 'config-1' configuration
    Verifying Hash Integrity ... sha256,rsa2048:dev+ OK
-   Trying 'kernel at 0' kernel subimage
+   Trying 'kernel' kernel subimage
      Description:  linux
      Created:      2017-10-20  14:32:29 UTC
      Type:         Kernel Image
@@ -285,8 +285,8 @@ If it is successful, you will see messages like follows:
      Hash value:   82a37b7f11ae55f4e07aa25bf77e4067cb9dc1014d52d6cd4d588f92eee3aaad
    Verifying Hash Integrity ... sha256+ OK
 ## Loading ramdisk from FIT Image at 84100000 ...
-   Using 'config at 0' configuration
-   Trying 'ramdisk at 0' ramdisk subimage
+   Using 'config-1' configuration
+   Trying 'ramdisk' ramdisk subimage
      Description:  ramdisk
      Created:      2017-10-20  14:32:29 UTC
      Type:         RAMDisk Image
@@ -301,8 +301,8 @@ If it is successful, you will see messages like follows:
      Hash value:   44980a2874154a2e31ed59222c9f8ea968867637f35c81e4107a984de7014deb
    Verifying Hash Integrity ... sha256+ OK
 ## Loading fdt from FIT Image at 84100000 ...
-   Using 'config at 0' configuration
-   Trying 'fdt at 0' fdt subimage
+   Using 'config-1' configuration
+   Trying 'fdt-1' fdt subimage
      Description:  fdt
      Created:      2017-10-20  14:32:29 UTC
      Type:         Flat Device Tree
doc/chromium/chromebook_jerry.its +8 -8
index 8cff840e00..7505a20535 100644
@@ -5,7 +5,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "U-Boot mainline";
 			type = "kernel_noload";
 			arch = "arm";
@@ -14,29 +14,29 @@
 			compression = "none";
 			load = <0>;
 			entry = <0>;
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 
-		fdt at 1{
+		fdt-1{
 			description = "rk3288-veryron-jerry.dtb";
 			data = /incbin/("../../b/chromebook_jerry/u-boot.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
-			hash at 1{
+			hash-1{
 				algo = "sha1";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 1";
-		config at 1 {
+		default = "config-1";
+		config-1 {
 			description = "Boot U-Boot";
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
+			kernel = "kernel";
+			fdt = "fdt-1";
 		};
 	};
 };
doc/chromium/nyan-big.its +8 -8
index 8dc8d73041..37d4e10949 100644
@@ -5,7 +5,7 @@
 	#address-cells = <1>;
 
 	images {
-		kernel at 1 {
+		kernel {
 			description = "U-Boot mainline";
 			type = "kernel_noload";
 			arch = "arm";
@@ -14,29 +14,29 @@
 			compression = "none";
 			load = <0>;
 			entry = <0>;
-			hash at 2 {
+			hash-2 {
 				algo = "sha1";
 			};
 		};
 
-		fdt at 1{
+		fdt-1{
 			description = "tegra124-nyan-big.dtb";
 			data = /incbin/("../.././b/nyan-big/u-boot.dtb");
 			type = "flat_dt";
 			arch = "arm";
 			compression = "none";
-			hash at 1{
+			hash-1{
 				algo = "sha1";
 			};
 		};
 	};
 
 	configurations {
-		default = "config at 1";
-		config at 1 {
+		default = "config-1";
+		config-1 {
 			description = "Boot U-Boot";
-			kernel = "kernel at 1";
-			fdt = "fdt at 1";
+			kernel = "kernel";
+			fdt = "fdt-1";
 		};
 	};
 };
Signature · 1 line
2.14.1
#8 lore raw

PATCH 3/7 doc: fix incorrect usage of DT node unit address

Quoted 6 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in various documentation files where this was not observed, to not give bad examples to the reader.

Quoted 7 lines
---
 .../arm/cpu/armv8/fsl-layerscape/doc/README.falcon | 16 +++++-----
 doc/README.uniphier                                | 36 +++++++++++-----------
 doc/chromium/chromebook_jerry.its                  | 16 +++++-----
 doc/chromium/nyan-big.its                          | 16 +++++-----
 4 files changed, 42 insertions(+), 42 deletions(-)
#9 lore raw

PATCH 3/7 doc: fix incorrect usage of DT node unit address

Quoted 6 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in various documentation files where this was not observed, to not give bad examples to the reader.

Quoted 7 lines
---
 .../arm/cpu/armv8/fsl-layerscape/doc/README.falcon | 16 +++++-----
 doc/README.uniphier                                | 36 +++++++++++-----------
 doc/chromium/chromebook_jerry.its                  | 16 +++++-----
 doc/chromium/nyan-big.its                          | 16 +++++-----
 4 files changed, 42 insertions(+), 42 deletions(-)

Applied to u-boot-dm thanks!

#10 lore raw

PATCH 4/7 fix incorrect usage of DT node unit address in comments

In reply to Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the tree where node names were mentioned in comments, to not give bad examples to the reader.

---
 common/image-fit.c | 16 ++++++++--------
 common/image-sig.c |  2 +-
 include/image.h    | 26 +++++++++++++-------------
 tools/image-host.c | 10 +++++-----
 4 files changed, 27 insertions(+), 27 deletions(-)
common/image-fit.c +8 -8
index 7f17fd1410..990c6038d7 100644
@@ -330,7 +330,7 @@ static void fit_image_print_verification_data(const void *fit, int noffset,
 	/*
 	 * Check subnode name, must be equal to "hash" or "signature".
 	 * Multiple hash/signature nodes require unique unit node
-	 * names, e.g. hash at 1, hash at 2, signature at 1, signature at 2, etc.
+	 * names, e.g. hash-1, hash-2, signature-1, signature-2, etc.
 	 */
 	name = fit_get_name(fit, noffset, NULL);
 	if (!strncmp(name, FIT_HASH_NODENAME, strlen(FIT_HASH_NODENAME))) {
@@ -1086,7 +1086,7 @@ int fit_image_verify(const void *fit, int image_noffset)
 		/*
 		 * Check subnode name, must be equal to "hash".
 		 * Multiple hash nodes require unique unit node
-		 * names, e.g. hash at 1, hash at 2, etc.
+		 * names, e.g. hash-1, hash-2, etc.
 		 */
 		if (!strncmp(name, FIT_HASH_NODENAME,
 			     strlen(FIT_HASH_NODENAME))) {
@@ -1323,15 +1323,15 @@ int fit_check_format(const void *fit)
  *
  * / o image-tree
  *   |-o images
- *   | |-o fdt at 1
- *   | |-o fdt at 2
+ *   | |-o fdt-1
+ *   | |-o fdt-2
  *   |
  *   |-o configurations
- *     |-o config at 1
- *     | |-fdt = fdt at 1
+ *     |-o config-1
+ *     | |-fdt = fdt-1
  *     |
- *     |-o config at 2
- *       |-fdt = fdt at 2
+ *     |-o config-2
+ *       |-fdt = fdt-2
  *
  * / o U-Boot fdt
  *   |-compatible = "foo,bar", "bim,bam"
common/image-sig.c +1 -1
index bf824fef3c..d9f712fc1e 100644
@@ -347,7 +347,7 @@ int fit_config_check_sig(const void *fit, int noffset, int required_keynode,
 
 	/*
 	 * Each node can generate one region for each sub-node. Allow for
-	 * 7 sub-nodes (hash at 1, signature at 1, etc.) and some extra.
+	 * 7 sub-nodes (hash-1, signature-1, etc.) and some extra.
 	 */
 	max_regions = 20 + count * 7;
 	struct fdt_region fdt_regions[max_regions];
include/image.h +13 -13
index e9c18ce403..e28415bd9a 100644
@@ -577,7 +577,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
  * boot_get_loadable() will take the given FIT configuration, and look
  * for a field named "loadables".  Loadables, is a list of elements in
  * the FIT given as strings.  exe:
- *   loadables = "linux_kernel at 1", "fdt at 2";
+ *   loadables = "linux_kernel", "fdt-2";
  * this function will attempt to parse each string, and load the
  * corresponding element from the FIT into memory.  Once placed,
  * no aditional actions are taken.
@@ -603,10 +603,10 @@ int boot_get_setup_fit(bootm_headers_t *images, uint8_t arch,
  * @param images	Boot images structure
  * @param addr		Address of FIT in memory
  * @param fit_unamep	On entry this is the requested image name
- *			(e.g. "kernel at 1") or NULL to use the default. On exit
+ *			(e.g. "kernel") or NULL to use the default. On exit
  *			points to the selected image name
  * @param fit_uname_configp	On entry this is the requested configuration
- *			name (e.g. "conf at 1") or NULL to use the default. On
+ *			name (e.g. "conf-1") or NULL to use the default. On
  *			exit points to the selected configuration name.
  * @param arch		Expected architecture (IH_ARCH_...)
  * @param datap		Returns address of loaded image
@@ -631,10 +631,10 @@ int boot_get_fdt_fit(bootm_headers_t *images, ulong addr,
  * @param images	Boot images structure
  * @param addr		Address of FIT in memory
  * @param fit_unamep	On entry this is the requested image name
- *			(e.g. "kernel at 1") or NULL to use the default. On exit
+ *			(e.g. "kernel") or NULL to use the default. On exit
  *			points to the selected image name
  * @param fit_uname_configp	On entry this is the requested configuration
- *			name (e.g. "conf at 1") or NULL to use the default. On
+ *			name (e.g. "conf-1") or NULL to use the default. On
  *			exit points to the selected configuration name.
  * @param arch		Expected architecture (IH_ARCH_...)
  * @param image_type	Required image type (IH_TYPE_...). If this is
@@ -657,25 +657,25 @@ int fit_image_load(bootm_headers_t *images, ulong addr,
 /**
  * fit_get_node_from_config() - Look up an image a FIT by type
  *
- * This looks in the selected conf@ node (images->fit_uname_cfg) for a
+ * This looks in the selected conf- node (images->fit_uname_cfg) for a
  * particular image type (e.g. "kernel") and then finds the image that is
  * referred to.
  *
  * For example, for something like:
  *
  * images {
- *	kernel at 1 {
+ *	kernel {
  *		...
  *	};
  * };
  * configurations {
- *	conf at 1 {
- *		kernel = "kernel at 1";
+ *	conf-1 {
+ *		kernel = "kernel";
  *	};
  * };
  *
  * the function will return the node offset of the kernel at 1 node, assuming
- * that conf at 1 is the chosen configuration.
+ * that conf-1 is the chosen configuration.
  *
  * @param images	Boot images structure
  * @param prop_name	Property name to look up (FIT_..._PROP)
@@ -1018,10 +1018,10 @@ int fit_conf_get_node(const void *fit, const char *conf_uname);
  * @noffset:	Offset of conf at xxx node to check
  * @prop_name:	Property to read from the conf node
  *
- * The conf@ nodes contain references to other nodes, using properties
- * like 'kernel = "kernel at 1"'. Given such a property name (e.g. "kernel"),
+ * The conf- nodes contain references to other nodes, using properties
+ * like 'kernel = "kernel"'. Given such a property name (e.g. "kernel"),
  * return the offset of the node referred to (e.g. offset of node
- * "/images/kernel at 1".
+ * "/images/kernel".
  */
 int fit_conf_get_prop_node(const void *fit, int noffset,
 		const char *prop_name);
tools/image-host.c +5 -5
index 2c0030b5e2..8a7469e538 100644
@@ -270,16 +270,16 @@ static int fit_image_process_sig(const char *keydir, void *keydest,
  *
  * Input component image node structure:
  *
- * o image at 1 (at image_noffset)
+ * o image-1 (at image_noffset)
  *   | - data = [binary data]
- *   o hash at 1
+ *   o hash-1
  *     |- algo = "sha1"
  *
  * Output component image node structure:
  *
- * o image at 1 (at image_noffset)
+ * o image-1 (at image_noffset)
  *   | - data = [binary data]
- *   o hash at 1
+ *   o hash-1
  *     |- algo = "sha1"
  *     |- value = sha1(data)
  *
@@ -321,7 +321,7 @@ int fit_image_add_verification_data(const char *keydir, void *keydest,
 		/*
 		 * Check subnode name, must be equal to "hash" or "signature".
 		 * Multiple hash nodes require unique unit node
-		 * names, e.g. hash at 1, hash at 2, signature at 1, etc.
+		 * names, e.g. hash-1, hash-2, signature-1, etc.
 		 */
 		node_name = fit_get_name(fit, noffset, NULL);
 		if (!strncmp(node_name, FIT_HASH_NODENAME,
Signature · 1 line
2.14.1
#11 lore raw

PATCH 4/7 fix incorrect usage of DT node unit address in comments

Quoted 6 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the tree where node names were mentioned in comments, to not give bad examples to the reader.

Quoted 7 lines
---
 common/image-fit.c | 16 ++++++++--------
 common/image-sig.c |  2 +-
 include/image.h    | 26 +++++++++++++-------------
 tools/image-host.c | 10 +++++-----
 4 files changed, 27 insertions(+), 27 deletions(-)
#12 lore raw

PATCH 4/7 fix incorrect usage of DT node unit address in comments

Quoted 6 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Fix all occurences in the tree where node names were mentioned in comments, to not give bad examples to the reader.

Quoted 7 lines
---
 common/image-fit.c | 16 ++++++++--------
 common/image-sig.c |  2 +-
 include/image.h    | 26 +++++++++++++-------------
 tools/image-host.c | 10 +++++-----
 4 files changed, 27 insertions(+), 27 deletions(-)

Applied to u-boot-dm thanks!

#13 lore raw

PATCH 5/7 sunxi: arm64: correct usage of DT node address in FIT generation

In reply to Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Adjust the FIT build script for 64-bit Allwinner boards to remove the bogus addresses from the node names and avoid the warnings. This avoids a warning with recent versions of the dtc tool.

---
 board/sunxi/mksunxi_fit_atf.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
board/sunxi/mksunxi_fit_atf.sh +8 -8
index b1d6e0e16a..36abe9efed 100755
@@ -21,7 +21,7 @@ cat << __HEADER_EOF
 	#address-cells = <1>;
 
 	images {
-		uboot at 1 {
+		uboot {
 			description = "U-Boot (64-bit)";
 			data = /incbin/("u-boot-nodtb.bin");
 			type = "standalone";
@@ -29,7 +29,7 @@ cat << __HEADER_EOF
 			compression = "none";
 			load = <0x4a000000>;
 		};
-		atf at 1 {
+		atf {
 			description = "ARM Trusted Firmware";
 			data = /incbin/("$BL31");
 			type = "firmware";
@@ -44,7 +44,7 @@ cnt=1
 for dtname in $*
 do
 	cat << __FDT_IMAGE_EOF
-		fdt@$cnt {
+		fdt_$cnt {
 			description = "$(basename $dtname .dtb)";
 			data = /incbin/("$dtname");
 			type = "flat_dt";
@@ -57,7 +57,7 @@ done
 cat << __CONF_HEADER_EOF
 	};
 	configurations {
-		default = "config at 1";
+		default = "config_1";
 
 __CONF_HEADER_EOF
 
@@ -65,11 +65,11 @@ cnt=1
 for dtname in $*
 do
 	cat << __CONF_SECTION_EOF
-		config@$cnt {
+		config_$cnt {
 			description = "$(basename $dtname .dtb)";
-			firmware = "uboot at 1";
-			loadables = "atf@1";
-			fdt = "fdt@$cnt";
+			firmware = "uboot";
+			loadables = "atf";
+			fdt = "fdt_$cnt";
 		};
 __CONF_SECTION_EOF
 	cnt=$((cnt+1))
Signature · 1 line
2.14.1
#14 lore raw

PATCH 5/7 sunxi: arm64: correct usage of DT node address in FIT generation

Hi Andre,

Quoted 44 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Adjust the FIT build script for 64-bit Allwinner boards to remove the bogus addresses from the node names and avoid the warnings. This avoids a warning with recent versions of the dtc tool.

---
 board/sunxi/mksunxi_fit_atf.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
board/sunxi/mksunxi_fit_atf.sh +3 -3
index b1d6e0e16a..36abe9efed 100755
@@ -21,7 +21,7 @@ cat << __HEADER_EOF
        #address-cells = <1>;
 
        images {
-               uboot at 1 {
+               uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
@@ -29,7 +29,7 @@ cat << __HEADER_EOF
                        compression = "none";
                        load = <0x4a000000>;
                };
-               atf at 1 {
+               atf {
                        description = "ARM Trusted Firmware";
                        data = /incbin/("$BL31");
                        type = "firmware";
@@ -44,7 +44,7 @@ cnt=1
 for dtname in $*
 do
        cat << __FDT_IMAGE_EOF
-               fdt@$cnt {
+               fdt_$cnt {
                        description = "$(basename $dtname .dtb)";
                        data = /incbin/("$dtname");
                        type = "flat_dt";

board/sunxi/mksunxi_fit_atf.sh done · line 60

Quoted 5 lines
board/sunxi/mksunxi_fit_atf.sh +1 -1
@@ -57,7 +57,7 @@ done
 cat << __CONF_HEADER_EOF
        };
        configurations {
-               default = "config at 1";
+               default = "config_1";

Have you changed from hyphen to underscore here?

Quoted 20 lines
board/sunxi/mksunxi_fit_atf.sh +4 -5
 __CONF_HEADER_EOF
 
@@ -65,11 +65,11 @@ cnt=1
 for dtname in $*
 do
        cat << __CONF_SECTION_EOF
-               config@$cnt {
+               config_$cnt {
                        description = "$(basename $dtname .dtb)";
-                       firmware = "uboot at 1";
-                       loadables = "atf at 1";
-                       fdt = "fdt@$cnt";
+                       firmware = "uboot";
+                       loadables = "atf";
+                       fdt = "fdt_$cnt";
                };
 __CONF_SECTION_EOF
        cnt=$((cnt+1))
--
Quoted 2 lines

2.14.1

Regards,
Simon

#15 lore raw

PATCH 5/7 sunxi: arm64: correct usage of DT node address in FIT generation

Hi Simon,

thanks for going through this!

Quoted 46 lines · Simon Glass

Hi Andre,

Quoted 43 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Adjust the FIT build script for 64-bit Allwinner boards to remove the bogus addresses from the node names and avoid the warnings. This avoids a warning with recent versions of the dtc tool.

---
 board/sunxi/mksunxi_fit_atf.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
board/sunxi/mksunxi_fit_atf.sh +3 -3
index b1d6e0e16a..36abe9efed 100755
@@ -21,7 +21,7 @@ cat << __HEADER_EOF
        #address-cells = <1>;
 
        images {
-               uboot at 1 {
+               uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
@@ -29,7 +29,7 @@ cat << __HEADER_EOF
                        compression = "none";
                        load = <0x4a000000>;
                };
-               atf at 1 {
+               atf {
                        description = "ARM Trusted Firmware";
                        data = /incbin/("$BL31");
                        type = "firmware";
@@ -44,7 +44,7 @@ cnt=1
 for dtname in $*
 do
        cat << __FDT_IMAGE_EOF
-               fdt@$cnt {
+               fdt_$cnt {
                        description = "$(basename $dtname .dtb)";
                        data = /incbin/("$dtname");
                        type = "flat_dt";
Quoted 8 lines

board/sunxi/mksunxi_fit_atf.sh done · line 60

Quoted 6 lines
board/sunxi/mksunxi_fit_atf.sh +1 -1
@@ -57,7 +57,7 @@ done
 cat << __CONF_HEADER_EOF
        };
        configurations {
-               default = "config at 1";
+               default = "config_1";

Have you changed from hyphen to underscore here?

Arrgh, indeed. I think that was the first version of the patch, before I changed to '-'.
Sorry for that, will fix it.

Cheers,
Andre.

Quoted 27 lines
Quoted 21 lines
board/sunxi/mksunxi_fit_atf.sh +4 -5
 __CONF_HEADER_EOF
 
@@ -65,11 +65,11 @@ cnt=1
 for dtname in $*
 do
        cat << __CONF_SECTION_EOF
-               config@$cnt {
+               config_$cnt {
                        description = "$(basename $dtname .dtb)";
-                       firmware = "uboot at 1";
-                       loadables = "atf at 1";
-                       fdt = "fdt@$cnt";
+                       firmware = "uboot";
+                       loadables = "atf";
+                       fdt = "fdt_$cnt";
                };
 __CONF_SECTION_EOF
        cnt=$((cnt+1))
--
Quoted 2 lines

2.14.1

Regards,
Simon

#16 lore raw

PATCH 5/7 sunxi: arm64: correct usage of DT node address in FIT generation

Hi Simon,

thanks for going through this!

Quoted 15 lines · Simon Glass

Hi Andre,

Quoted 12 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Adjust the FIT build script for 64-bit Allwinner boards to remove the bogus addresses from the node names and avoid the warnings. This avoids a warning with recent versions of the dtc tool.

---
 board/sunxi/mksunxi_fit_atf.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Applied to u-boot-dm thanks!

#17 lore raw

PATCH 5/7 sunxi: arm64: correct usage of DT node address in FIT generation

Hi Simon,

thanks for going through this!

Quoted 15 lines · Simon Glass

Hi Andre,

Quoted 12 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Adjust the FIT build script for 64-bit Allwinner boards to remove the bogus addresses from the node names and avoid the warnings. This avoids a warning with recent versions of the dtc tool.

---
 board/sunxi/mksunxi_fit_atf.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Applied to u-boot-dm thanks!
Applied to u-boot-dm thanks!

#18 lore raw

PATCH 6/7 tools: fix incorrect usage of DT node unit address

In reply to Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Correct the generated unit names when U-Boot's mkimage creates a FIT image.

---
 tools/fit_image.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
tools/fit_image.c +12 -12
index 6dcc88bae0..1db44f47a1 100644
@@ -185,7 +185,7 @@ static void get_basename(char *str, int size, const char *fname)
  * fit_write_images() - Write out a list of images to the FIT
  *
  * We always include the main image (params->datafile). If there are device
- * tree files, we include an fdt@ node for each of those too.
+ * tree files, we include an fdt- node for each of those too.
  */
 static int fit_write_images(struct image_tool_params *params, char *fdt)
 {
@@ -199,7 +199,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
 
 	/* First the main image */
 	typename = genimg_get_type_short_name(params->fit_image_type);
-	snprintf(str, sizeof(str), "%s at 1", typename);
+	snprintf(str, sizeof(str), "%s-1", typename);
 	fdt_begin_node(fdt, str);
 	fdt_property_string(fdt, "description", params->imagename);
 	fdt_property_string(fdt, "type", typename);
@@ -225,7 +225,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
 	for (cont = params->content_head; cont; cont = cont->next) {
 		if (cont->type != IH_TYPE_FLATDT)
 			continue;
-		snprintf(str, sizeof(str), "%s@%d", FIT_FDT_PROP, ++upto);
+		snprintf(str, sizeof(str), "%s-%d", FIT_FDT_PROP, ++upto);
 		fdt_begin_node(fdt, str);
 
 		get_basename(str, sizeof(str), cont->fname);
@@ -243,7 +243,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt)
 
 	/* And a ramdisk file if available */
 	if (params->fit_ramdisk) {
-		fdt_begin_node(fdt, FIT_RAMDISK_PROP "@1");
+		fdt_begin_node(fdt, FIT_RAMDISK_PROP "-1");
 
 		fdt_property_string(fdt, "type", FIT_RAMDISK_PROP);
 		fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os));
@@ -277,41 +277,41 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt)
 	int upto;
 
 	fdt_begin_node(fdt, "configurations");
-	fdt_property_string(fdt, "default", "conf at 1");
+	fdt_property_string(fdt, "default", "conf-1");
 
 	upto = 0;
 	for (cont = params->content_head; cont; cont = cont->next) {
 		if (cont->type != IH_TYPE_FLATDT)
 			continue;
 		typename = genimg_get_type_short_name(cont->type);
-		snprintf(str, sizeof(str), "conf@%d", ++upto);
+		snprintf(str, sizeof(str), "conf-%d", ++upto);
 		fdt_begin_node(fdt, str);
 
 		get_basename(str, sizeof(str), cont->fname);
 		fdt_property_string(fdt, "description", str);
 
 		typename = genimg_get_type_short_name(params->fit_image_type);
-		snprintf(str, sizeof(str), "%s at 1", typename);
+		snprintf(str, sizeof(str), "%s-1", typename);
 		fdt_property_string(fdt, typename, str);
 
 		if (params->fit_ramdisk)
 			fdt_property_string(fdt, FIT_RAMDISK_PROP,
-					    FIT_RAMDISK_PROP "@1");
+					    FIT_RAMDISK_PROP "-1");
 
-		snprintf(str, sizeof(str), FIT_FDT_PROP "@%d", upto);
+		snprintf(str, sizeof(str), FIT_FDT_PROP "-%d", upto);
 		fdt_property_string(fdt, FIT_FDT_PROP, str);
 		fdt_end_node(fdt);
 	}
 
 	if (!upto) {
-		fdt_begin_node(fdt, "conf at 1");
+		fdt_begin_node(fdt, "conf-1");
 		typename = genimg_get_type_short_name(params->fit_image_type);
-		snprintf(str, sizeof(str), "%s at 1", typename);
+		snprintf(str, sizeof(str), "%s-1", typename);
 		fdt_property_string(fdt, typename, str);
 
 		if (params->fit_ramdisk)
 			fdt_property_string(fdt, FIT_RAMDISK_PROP,
-					    FIT_RAMDISK_PROP "@1");
+					    FIT_RAMDISK_PROP "-1");
 
 		fdt_end_node(fdt);
 	}
Signature · 1 line
2.14.1
#19 lore raw

PATCH 6/7 tools: fix incorrect usage of DT node unit address

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Correct the generated unit names when U-Boot's mkimage creates a FIT image.

---
 tools/fit_image.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
#20 lore raw

PATCH 6/7 tools: fix incorrect usage of DT node unit address

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Correct the generated unit names when U-Boot's mkimage creates a FIT image.

---
 tools/fit_image.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Applied to u-boot-dm thanks!

#21 lore raw

PATCH 6/7 tools: fix incorrect usage of DT node unit address

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Correct the generated unit names when U-Boot's mkimage creates a FIT image.

---
 tools/fit_image.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

Applied to u-boot-dm thanks!
Applied to u-boot-dm thanks!

#22 lore raw

PATCH 7/7 armv8: secure firmware: fix incorrect unit address in node name

In reply to Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Remove the unit address from the config node name when U-Boot deals with secure firmware FIT images.

---
 arch/arm/cpu/armv8/sec_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/cpu/armv8/sec_firmware.c +1 -1
index 927eae4f74..b56ea785c5 100644
@@ -30,7 +30,7 @@ phys_addr_t sec_firmware_addr;
 #define SEC_FIRMWARE_FIT_IMAGE		"firmware"
 #endif
 #ifndef SEC_FIRMEWARE_FIT_CNF_NAME
-#define SEC_FIRMEWARE_FIT_CNF_NAME	"config at 1"
+#define SEC_FIRMEWARE_FIT_CNF_NAME	"config-1"
 #endif
 #ifndef SEC_FIRMWARE_TARGET_EL
 #define SEC_FIRMWARE_TARGET_EL		2
Signature · 1 line
2.14.1
#23 lore raw

PATCH 7/7 armv8: secure firmware: fix incorrect unit address in node name

Hi Andre,

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Remove the unit address from the config node name when U-Boot deals with secure firmware FIT images.

---
 arch/arm/cpu/armv8/sec_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

After this series, what remains to be converted?

- Simon

#24 lore raw

PATCH 7/7 armv8: secure firmware: fix incorrect unit address in node name

Hi Andre,

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Remove the unit address from the config node name when U-Boot deals with secure firmware FIT images.

---
 arch/arm/cpu/armv8/sec_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

After this series, what remains to be converted?

- Simon

Applied to u-boot-dm thanks!

#25 lore raw

PATCH 7/7 armv8: secure firmware: fix incorrect unit address in node name

Hi Andre,

Quoted 10 lines · Andre Przywara

The DT spec demands a unit-address in a node name to match the "reg" property in that node. Newer dtc versions will throw warnings if this is not the case.
Remove the unit address from the config node name when U-Boot deals with secure firmware FIT images.

---
 arch/arm/cpu/armv8/sec_firmware.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

After this series, what remains to be converted?

- Simon

Applied to u-boot-dm thanks!
Applied to u-boot-dm thanks!

#26 lore raw

cover Fix incorrect usage of the (FIT) DT node unit address

In reply to Andre Przywara

Hi Andre,

Quoted 39 lines · Andre Przywara

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.

Quoted 1 line

Please let me know if this makes some sense or not.

I thought I read somewhere that there is a dtc option to turn off these warnings?

Regards,
Simon

#27 lore raw

cover Fix incorrect usage of the (FIT) DT node unit address

Hi Simon,

2017-12-12 13:38 GMT+09:00 Simon Glass <[email protected]>:

Quoted 42 lines

Hi Andre,

Quoted 39 lines · Andre Przywara

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.

Quoted 5 lines
Quoted 1 line

Please let me know if this makes some sense or not.

I thought I read somewhere that there is a dtc option to turn off these warnings?

I think -Wno-unit_address_vs_reg is the one,
but I prefer to fix the root cause by replacing @
instead of hiding it.

Signature · 2 lines
Best Regards
Masahiro Yamada
#28 lore raw

cover Fix incorrect usage of the (FIT) DT node unit address

Hi,

Quoted 48 lines · Masahiro Yamada

Hi Simon,

2017-12-12 13:38 GMT+09:00 Simon Glass <[email protected]>:

Quoted 44 lines

Hi Andre,

Quoted 40 lines · Andre Przywara

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.

Quoted 7 lines
Quoted 3 lines

I thought I read somewhere that there is a dtc option to turn off these warnings?

I think -Wno-unit_address_vs_reg is the one,
but I prefer to fix the root cause by replacing @
instead of hiding it.

Yes, I pulled this series off purely because Masahiro asked for it before. I am just after patch 5/7 ;-)
And I agree with him that we should fix it rather than paper over it - at least for the code parts. And if we do so, we should fix the documentation as well - so here we go.
I know it's a pain to review (sorry for that!).
I would appreciate if we could push 5/7 through - as without it I see warnings right now and I am sure that it works. 6/7 looks good as well, though I can't say if there are side effects. Normally one would expect that node names are purely descriptive, but 7/7 tells me otherwise.

Cheers,
Andre.