[PATCH v3 7/9] sunxi: binman: Update FIT component descriptions

Samuel Holland samuel at sholland.org
Sun Sep 6 05:26:13 CEST 2020


Since commit d879616e9e64 ("spl: fit: simplify logic for FDT loading for
non-OS boots"), the SPL looks at the "os" properties of FIT images to
determine where to append the FDT.

The "os" property of the "firmware" image also determines how to execute
the next stage of the boot process, as in 1d3790905d9c ("spl: atf:
introduce spl_invoke_atf and make bl31_entry private"). For this reason,
the next stage must be specified in "firmware", not in "loadables".

To support this additional functionality, and to properly model the boot
process, where ATF runs before U-Boot, add the "os" properties and swap
the firmware/loadable images in the FIT image.

Since this description was copied as an example in commit 70248d6a2916
("binman: Support generating FITs with multiple dtbs"), update those
examples as well for correctness and consistency.

Acked-by: Patrick Wildt <patrick at blueri.se>
Signed-off-by: Samuel Holland <samuel at sholland.org>
---
 arch/arm/dts/sunxi-u-boot.dtsi | 6 ++++--
 tools/binman/README.entries    | 4 ++--
 tools/binman/etype/fit.py      | 4 ++--
 3 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/arch/arm/dts/sunxi-u-boot.dtsi b/arch/arm/dts/sunxi-u-boot.dtsi
index 4d599720382..ff3fff599f4 100644
--- a/arch/arm/dts/sunxi-u-boot.dtsi
+++ b/arch/arm/dts/sunxi-u-boot.dtsi
@@ -35,6 +35,7 @@
 				uboot {
 					description = "U-Boot (64-bit)";
 					type = "standalone";
+					os = "u-boot";
 					arch = "arm64";
 					compression = "none";
 					load = <0x4a000000>;
@@ -46,6 +47,7 @@
 				atf {
 					description = "ARM Trusted Firmware";
 					type = "firmware";
+					os = "arm-trusted-firmware";
 					arch = "arm64";
 					compression = "none";
 					load = <BL31_ADDR>;
@@ -68,8 +70,8 @@
 
 				@config-SEQ {
 					description = "NAME";
-					firmware = "uboot";
-					loadables = "atf";
+					firmware = "atf";
+					loadables = "uboot";
 					fdt = "fdt-SEQ";
 				};
 			};
diff --git a/tools/binman/README.entries b/tools/binman/README.entries
index d2628dffd5d..c45aed0a681 100644
--- a/tools/binman/README.entries
+++ b/tools/binman/README.entries
@@ -385,8 +385,8 @@ You can create config nodes in a similar way:
         default = "@config-DEFAULT-SEQ";
         @config-SEQ {
             description = "NAME";
-            firmware = "uboot";
-            loadables = "atf";
+            firmware = "atf";
+            loadables = "uboot";
             fdt = "fdt-SEQ";
         };
     };
diff --git a/tools/binman/etype/fit.py b/tools/binman/etype/fit.py
index 01fa51367e6..73793ecda31 100644
--- a/tools/binman/etype/fit.py
+++ b/tools/binman/etype/fit.py
@@ -73,8 +73,8 @@ class Entry_fit(Entry):
             default = "@config-DEFAULT-SEQ";
             @config-SEQ {
                 description = "NAME";
-                firmware = "uboot";
-                loadables = "atf";
+                firmware = "atf";
+                loadables = "uboot";
                 fdt = "fdt-SEQ";
             };
         };
-- 
2.26.2



More information about the U-Boot mailing list