Skip to contentSkip to conversation

binman: Add support for generating more complex FITs

PATCH New Simon Glass 3 participants 19 messages Aug 22, 2020 – Aug 30, 2020

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

cover binman: Add support for generating more complex FITs

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

Simon Glass (7):
binman: Allow entry args to be required
binman: Fix up a few missing comments
libfdt: Detected out-of-space with fdt_finish()
binman: Add support for ATF BL31
binman: Support generating FITs with multiple dtbs
sunxi: Convert 64-bit boards to use binman
sunxi: Drop the FIT-generator script

 Kconfig                                 |   3 +-
 Makefile                                |  18 +---
 arch/arm/dts/sunxi-u-boot.dtsi          |  60 +++++++++++-
 board/sunxi/mksunxi_fit_atf.sh          |  87 -----------------
 scripts/dtc/pylibfdt/libfdt.i_shipped   |   3 +-
 tools/binman/README.entries             |  59 ++++++++++-
 tools/binman/etype/atf_bl31.py          |  20 ++++
 tools/binman/etype/blob_named_by_arg.py |  10 +-
 tools/binman/etype/cros_ec_rw.py        |   3 +-
 tools/binman/etype/fit.py               |  76 +++++++++++++--
 tools/binman/ftest.py                   | 124 ++++++++++++++++++++++--
 tools/binman/test/165_atf_bl31.dts      |  16 +++
 tools/binman/test/166_fit_fdt.dts       |  55 +++++++++++
 13 files changed, 405 insertions(+), 129 deletions(-)
 delete mode 100755 board/sunxi/mksunxi_fit_atf.sh
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
 create mode 100644 tools/binman/test/166_fit_fdt.dts
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#1 lore raw

PATCH 1/7 binman: Allow entry args to be required

If an entry argument is needed by an entry but the entry argument is not present, then a strange error can occur when trying to read the file.

Fix this by allowing arguments to be required. Select this option for the cros-ec-rw entry. If a filename is provided in the node, allow that to be used.

Also tidy up a few related tests to make the error string easier to find, and fully ignore unused return values.

---

 tools/binman/README.entries             |  7 ++++++-
 tools/binman/etype/blob_named_by_arg.py | 10 ++++++----
 tools/binman/etype/cros_ec_rw.py        |  3 +--
 tools/binman/ftest.py                   | 15 +++++++++++----
 4 files changed, 24 insertions(+), 11 deletions(-)
tools/binman/README.entries +6 -1
index bf8edce02b4..97bfae16116 100644
@@ -60,7 +60,7 @@ Entry: blob-named-by-arg: A blob entry which gets its filename property from its
 
 Properties / Entry arguments:
     - <xxx>-path: Filename containing the contents of this entry (optional,
-        defaults to 0)
+        defaults to None)
 
 where <xxx> is the blob_fname argument to the constructor.
 
@@ -691,6 +691,11 @@ Properties / Entry arguments: (see binman README for more information)
     name-prefix: Adds a prefix to the name of every entry in the section
         when writing out the map
 
+Properties:
+    _allow_missing: True if this section permits external blobs to be
+        missing their contents. The second will produce an image but of
+        course it will not work.
+
 Since a section is also an entry, it inherits all the properies of entries
 too.
 
tools/binman/etype/blob_named_by_arg.py +6 -4
index e95dabe4d07..7c486b2dc91 100644
@@ -17,7 +17,7 @@ class Entry_blob_named_by_arg(Entry_blob):
 
     Properties / Entry arguments:
         - <xxx>-path: Filename containing the contents of this entry (optional,
-            defaults to 0)
+            defaults to None)
 
     where <xxx> is the blob_fname argument to the constructor.
 
@@ -28,7 +28,9 @@ class Entry_blob_named_by_arg(Entry_blob):
 
     See cros_ec_rw for an example of this.
     """
-    def __init__(self, section, etype, node, blob_fname):
+    def __init__(self, section, etype, node, blob_fname, required=False):
         super().__init__(section, etype, node)
-        self._filename, = self.GetEntryArgsOrProps(
-            [EntryArg('%s-path' % blob_fname, str)])
+        filename, = self.GetEntryArgsOrProps(
+            [EntryArg('%s-path' % blob_fname, str)], required=required)
+        if filename:
+            self._filename = filename
tools/binman/etype/cros_ec_rw.py +1 -2
index 741372e1af4..bf676b2d1a7 100644
@@ -7,7 +7,6 @@
 
 from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
 
-
 class Entry_cros_ec_rw(Entry_blob_named_by_arg):
     """A blob entry which contains a Chromium OS read-write EC image
 
@@ -18,5 +17,5 @@ class Entry_cros_ec_rw(Entry_blob_named_by_arg):
     updating the EC on startup via software sync.
     """
     def __init__(self, section, etype, node):
-        super().__init__(section, etype, node, 'cros-ec-rw')
+        super().__init__(section, etype, node, 'cros-ec-rw', required=True)
         self.external = True
tools/binman/ftest.py +11 -4
index bf7f59fb841..258296f2459 100644
@@ -1383,8 +1383,9 @@ class TestFunctional(unittest.TestCase):
         }
         with self.assertRaises(ValueError) as e:
             self._DoReadFileDtb('064_entry_args_required.dts')
-        self.assertIn("Node '/binman/_testing': Missing required "
-            'properties/entry args: test-str-arg, test-int-fdt, test-int-arg',
+        self.assertIn("Node '/binman/_testing': "
+            'Missing required properties/entry args: test-str-arg, '
+            'test-int-fdt, test-int-arg',
             str(e.exception))
 
     def testEntryArgsInvalidFormat(self):
@@ -1488,8 +1489,7 @@ class TestFunctional(unittest.TestCase):
         entry_args = {
             'cros-ec-rw-path': 'ecrw.bin',
         }
-        data, _, _, _ = self._DoReadFileDtb('068_blob_named_by_arg.dts',
-                                            entry_args=entry_args)
+        self._DoReadFileDtb('068_blob_named_by_arg.dts', entry_args=entry_args)
 
     def testFill(self):
         """Test for an fill entry type"""
@@ -3478,5 +3478,12 @@ class TestFunctional(unittest.TestCase):
         fnode = dtb.GetNode('/images/kernel')
         self.assertNotIn('data', fnode.props)
 
+    def testBlobNamedByArgMissing(self):
+        """Test handling of a missing entry arg"""
+        with self.assertRaises(ValueError) as e:
+            self._DoReadFile('068_blob_named_by_arg.dts')
+        self.assertIn("Missing required properties/entry args: cros-ec-rw-path",
+                      str(e.exception))
+
 if __name__ == "__main__":
     unittest.main()
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#2 lore raw

PATCH 2/7 binman: Fix up a few missing comments

In reply to Simon Glass

Tidy up a few test functions which lack argument comments. Rename one that has the same name as a different test.

---

 tools/binman/ftest.py | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
tools/binman/ftest.py +21 -1
index 258296f2459..8d687162185 100644
@@ -299,6 +299,13 @@ class TestFunctional(unittest.TestCase):
                 key: arg name
                 value: value of that arg
             images: List of image names to build
+            use_real_dtb: True to use the test file as the contents of
+                the u-boot-dtb entry. Normally this is not needed and the
+                test contents (the U_BOOT_DTB_DATA string) can be used.
+                But in some test we need the real contents.
+            verbosity: Verbosity level to use (0-3, None=don't set it)
+            allow_missing: Set the '--allow-missing' flag so that missing
+                external binaries just produce a warning instead of an error
         """
         args = []
         if debug:
@@ -358,6 +365,13 @@ class TestFunctional(unittest.TestCase):
         We still want the DTBs for SPL and TPL to be different though, since
         otherwise it is confusing to know which one we are looking at. So add
         an 'spl' or 'tpl' property to the top-level node.
+
+        Args:
+            dtb_data: dtb data to modify (this should be a value devicetree)
+            name: Name of a new property to add
+
+        Returns:
+            New dtb data with the property added
         """
         dtb = fdt.Fdt.FromData(dtb_data)
         dtb.Scan()
@@ -385,6 +399,12 @@ class TestFunctional(unittest.TestCase):
             map: True to output map files for the images
             update_dtb: Update the offset and size of each entry in the device
                 tree before packing it into the image
+            entry_args: Dict of entry args to supply to binman
+                key: arg name
+                value: value of that arg
+            reset_dtbs: With use_real_dtb the test dtb is overwritten by this
+                function. If reset_dtbs is True, then the original test dtb
+                is written back before this function finishes
 
         Returns:
             Tuple:
@@ -3468,7 +3488,7 @@ class TestFunctional(unittest.TestCase):
         self.assertEqual(len(U_BOOT_SPL_DTB_DATA), int(data_sizes[1].split()[0]))
 
     def testFitExternal(self):
-        """Test an image with an FIT"""
+        """Test an image with an FIT with external images"""
         data = self._DoReadFile('162_fit_external.dts')
         fit_data = data[len(U_BOOT_DATA):-2]  # _testing is 2 bytes
 
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#3 lore raw

PATCH 3/7 libfdt: Detected out-of-space with fdt_finish()

In reply to Simon Glass

At present the Python sequential-write interface can produce an error when it calls fdt_finish(), since this needs to add a terminating tag to the end of the struct section.

Fix this by automatically expanding the buffer if needed.

---

 scripts/dtc/pylibfdt/libfdt.i_shipped | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/dtc/pylibfdt/libfdt.i_shipped +2 -1
index fae0b27d7d0..1d69ad38e2e 100644
@@ -786,7 +786,8 @@ class FdtSw(FdtRo):
             Fdt object allowing access to the newly created device tree
         """
         fdtsw = bytearray(self._fdt)
-        check_err(fdt_finish(fdtsw))
+        while self.check_space(fdt_finish(fdtsw)):
+            fdtsw = bytearray(self._fdt)
         return Fdt(fdtsw)
 
     def check_space(self, val):
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#4 lore raw

PATCH 4/7 binman: Add support for ATF BL31

In reply to Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

 tools/binman/README.entries        | 10 ++++++++++
 tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
 tools/binman/ftest.py              |  9 +++++++++
 tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
tools/binman/README.entries +10 -0
index 97bfae16116..85b8ec9fa73 100644
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.
+
+
+
 Entry: blob: Entry containing an arbitrary binary blob
 ------------------------------------------------------
 
tools/binman/etype/atf_bl31.py new file +20 -0
new file mode 100644
index 00000000000..fd7223843b1
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Management Engine binary blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_atf_bl31(Entry_blob_named_by_arg):
+    """Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+
+    Properties / Entry arguments:
+        - atf-bl31-path: Filename of file to read into entry
+
+    This entry holds the run-time firmware started by ATF.
+    """
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node, 'atf-bl31')
+        self.external = True
tools/binman/ftest.py +9 -0
index 8d687162185..30c9c764327 100644
@@ -75,6 +75,7 @@ REFCODE_DATA          = b'refcode'
 FSP_M_DATA            = b'fsp_m'
 FSP_S_DATA            = b'fsp_s'
 FSP_T_DATA            = b'fsp_t'
+ATF_BL31_DATA         = b'bl31'
 
 # The expected size for the device tree in some tests
 EXTRACT_DTB_SIZE = 0x3c9
@@ -168,6 +169,7 @@ class TestFunctional(unittest.TestCase):
                         os.path.join(cls._indir, 'files'))
 
         TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
+        TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
 
         # Travis-CI may have an old lz4
         cls.have_lz4 = True
@@ -3505,5 +3507,12 @@ class TestFunctional(unittest.TestCase):
         self.assertIn("Missing required properties/entry args: cros-ec-rw-path",
                       str(e.exception))
 
+    def testPackBl31(self):
+        """Test that an image with an ATF BL31 binary can be created"""
+        data = self._DoReadFile('165_atf_bl31.dts')
+        self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+
+ATF_BL31_DATA
+
 if __name__ == "__main__":
     unittest.main()
tools/binman/test/165_atf_bl31.dts new file +16 -0
new file mode 100644
index 00000000000..2b7547d70f9
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		size = <16>;
+
+		atf-bl31 {
+			filename = "bl31.bin";
+		};
+	};
+};
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#5 lore raw

PATCH 4/7 binman: Add support for ATF BL31

Hi Simon,

Quoted 74 lines · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

  tools/binman/README.entries        | 10 ++++++++++
  tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
  tools/binman/ftest.py              |  9 +++++++++
  tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
  4 files changed, 55 insertions(+)

create mode 100644 tools/binman/etype/atf_bl31.py create mode 100644 tools/binman/test/165_atf_bl31.dts

tools/binman/README.entries +10 -0
index 97bfae16116..85b8ec9fa73 100644
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.
+
+
+
  Entry: blob: Entry containing an arbitrary binary blob
  ------------------------------------------------------
 
tools/binman/etype/atf_bl31.py new file +20 -0
new file mode 100644
index 00000000000..fd7223843b1
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Management Engine binary blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_atf_bl31(Entry_blob_named_by_arg):
+    """Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+
+    Properties / Entry arguments:
+        - atf-bl31-path: Filename of file to read into entry
+
+    This entry holds the run-time firmware started by ATF.
+    """
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node, 'atf-bl31')
+        self.external = True
tools/binman/ftest.py +1 -0
index 8d687162185..30c9c764327 100644
@@ -75,6 +75,7 @@ REFCODE_DATA          = b'refcode'
  FSP_M_DATA            = b'fsp_m'
  FSP_S_DATA            = b'fsp_s'
  FSP_T_DATA            = b'fsp_t'
+ATF_BL31_DATA         = b'bl31'
 
  # The expected size for the device tree in some tests
  EXTRACT_DTB_SIZE = 0x3c9

tools/binman/ftest.py class TestFunctional(unittest.TestCase): · line 172

Quoted 4 lines
tools/binman/ftest.py +1 -0
@@ -168,6 +169,7 @@ class TestFunctional(unittest.TestCase):
                          os.path.join(cls._indir, 'files'))
 
          TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
+        TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)

Should this be 'bl31.elf' from ARM TF project instead of 'bl31.bin'?

Thanks,

- Kever

Quoted 38 lines
tools/binman/ftest.py +7 -0
          # Travis-CI may have an old lz4
          cls.have_lz4 = True
@@ -3505,5 +3507,12 @@ class TestFunctional(unittest.TestCase):
          self.assertIn("Missing required properties/entry args: cros-ec-rw-path",
                        str(e.exception))
 
+    def testPackBl31(self):
+        """Test that an image with an ATF BL31 binary can be created"""
+        data = self._DoReadFile('165_atf_bl31.dts')
+        self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+
+ATF_BL31_DATA
+
  if __name__ == "__main__":
      unittest.main()
tools/binman/test/165_atf_bl31.dts new file +16 -0
new file mode 100644
index 00000000000..2b7547d70f9
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		size = <16>;
+
+		atf-bl31 {
+			filename = "bl31.bin";
+		};
+	};
+};
#6 lore raw

PATCH 4/7 binman: Add support for ATF BL31

Quoted 73 lines · Kever Yang

Hi Simon,

Quoted 70 lines · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

? tools/binman/README.entries??????? | 10 ++++++++++
? tools/binman/etype/atf_bl31.py???? | 20 ++++++++++++++++++++
? tools/binman/ftest.py????????????? |? 9 +++++++++
? tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++

? 4 files changed, 55 insertions(+)
? create mode 100644 tools/binman/etype/atf_bl31.py ? create mode 100644 tools/binman/test/165_atf_bl31.dts

tools/binman/README.entries +0 -0
index 97bfae16116..85b8ec9fa73 100644
@@ -11,6 +11,16 @@ features to produce new behaviours.
 ? ? ? +Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF)

BL31 blob
+-------------------------------------------------------------------------

tools/binman/README.entries +8 -0
+
+Properties / Entry arguments:
+??? - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.
+
+
+

? Entry: blob: Entry containing an arbitrary binary blob ? ------------------------------------------------------ ? diff --git a/tools/binman/etype/atf_bl31.py b/tools/binman/etype/atf_bl31.py
new file mode 100644
index 00000000000..fd7223843b1

tools/binman/etype/atf_bl31.py new file +20 -0
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Management Engine binary blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_atf_bl31(Entry_blob_named_by_arg):
+??? """Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+
+??? Properties / Entry arguments:
+??????? - atf-bl31-path: Filename of file to read into entry
+
+??? This entry holds the run-time firmware started by ATF.
+??? """
+??? def __init__(self, section, etype, node):
+??????? super().__init__(section, etype, node, 'atf-bl31')
+??????? self.external = True
tools/binman/ftest.py +0 -0
index 8d687162185..30c9c764327 100644
@@ -75,6 +75,7 @@ REFCODE_DATA????????? = b'refcode'

? FSP_M_DATA??????????? = b'fsp_m'
? FSP_S_DATA??????????? = b'fsp_s'
? FSP_T_DATA??????????? = b'fsp_t' +ATF_BL31_DATA???????? = b'bl31'
? ? # The expected size for the device tree in some tests

Quoted 8 lines

tools/binman/ftest.py class TestFunctional(unittest.TestCase): · line 171

Quoted 5 lines

? EXTRACT_DTB_SIZE = 0x3c9

tools/binman/ftest.py +1 -0
@@ -168,6 +169,7 @@ class TestFunctional(unittest.TestCase):
 ????????????????????????? os.path.join(cls._indir, 'files'))
 ? ????????? TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
+??????? TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)

Should this be 'bl31.elf' from ARM TF project instead of 'bl31.bin'?

The file that I need to include from the TF-A project is:

<trusted-firmware-a>/build/sun50i_a64/debug/bl31.bin

Best regards

Heinrich

Quoted 45 lines

Thanks,

- Kever

Quoted 38 lines

? ????????? # Travis-CI may have an old lz4
????????? cls.have_lz4 = True

tools/binman/ftest.py +0 -0
@@ -3505,5 +3507,12 @@ class TestFunctional(unittest.TestCase):

????????? self.assertIn("Missing required properties/entry args:
cros-ec-rw-path",
??????????????????????? str(e.exception))
? +??? def testPackBl31(self):
+??????? """Test that an image with an ATF BL31 binary can be created""" +??????? data = self._DoReadFile('165_atf_bl31.dts') +??????? self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])

tools/binman/ftest.py +3 -0
+
+ATF_BL31_DATA
+

? if __name__ == "__main__":
????? unittest.main()

tools/binman/test/165_atf_bl31.dts new file +16 -0
new file mode 100644
index 00000000000..2b7547d70f9
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+??? #address-cells = <1>;
+??? #size-cells = <1>;
+
+??? binman {
+??????? size = <16>;
+
+??????? atf-bl31 {
+??????????? filename = "bl31.bin";
+??????? };
+??? };
+};
#7 lore raw

PATCH 4/7 binman: Add support for ATF BL31

In reply to Simon Glass
Quoted 41 lines · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

 tools/binman/README.entries        | 10 ++++++++++
 tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
 tools/binman/ftest.py              |  9 +++++++++
 tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
tools/binman/README.entries +10 -0
index 97bfae16116..85b8ec9fa73 100644
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.
+
+
+
 Entry: blob: Entry containing an arbitrary binary blob
 ------------------------------------------------------
 
tools/binman/etype/atf_bl31.py new file +0 -0
new file mode 100644
index 00000000000..fd7223843b1

tools/binman/etype/atf_bl31.py line 2

Quoted 2 lines
tools/binman/etype/atf_bl31.py new file +2 -0
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc

Nits:

It is 2020 now.

Quoted 74 lines
tools/binman/etype/atf_bl31.py new file +18 -0
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Management Engine binary blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_atf_bl31(Entry_blob_named_by_arg):
+    """Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+
+    Properties / Entry arguments:
+        - atf-bl31-path: Filename of file to read into entry
+
+    This entry holds the run-time firmware started by ATF.
+    """
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node, 'atf-bl31')
+        self.external = True
tools/binman/ftest.py +9 -0
index 8d687162185..30c9c764327 100644
@@ -75,6 +75,7 @@ REFCODE_DATA          = b'refcode'
 FSP_M_DATA            = b'fsp_m'
 FSP_S_DATA            = b'fsp_s'
 FSP_T_DATA            = b'fsp_t'
+ATF_BL31_DATA         = b'bl31'
 
 # The expected size for the device tree in some tests
 EXTRACT_DTB_SIZE = 0x3c9
@@ -168,6 +169,7 @@ class TestFunctional(unittest.TestCase):
                         os.path.join(cls._indir, 'files'))
 
         TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
+        TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
 
         # Travis-CI may have an old lz4
         cls.have_lz4 = True
@@ -3505,5 +3507,12 @@ class TestFunctional(unittest.TestCase):
         self.assertIn("Missing required properties/entry args: cros-ec-rw-path",
                       str(e.exception))
 
+    def testPackBl31(self):
+        """Test that an image with an ATF BL31 binary can be created"""
+        data = self._DoReadFile('165_atf_bl31.dts')
+        self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+
+ATF_BL31_DATA
+
 if __name__ == "__main__":
     unittest.main()
tools/binman/test/165_atf_bl31.dts new file +16 -0
new file mode 100644
index 00000000000..2b7547d70f9
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		size = <16>;
+
+		atf-bl31 {
+			filename = "bl31.bin";
+		};
+	};
+};
#8 lore raw

PATCH 4/7 binman: Add support for ATF BL31

In reply to Simon Glass
Quoted 19 lines · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

 tools/binman/README.entries        | 10 ++++++++++
 tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
 tools/binman/ftest.py              |  9 +++++++++
 tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
tools/binman/README.entries +0 -0
index 97bfae16116..85b8ec9fa73 100644

tools/binman/README.entries features to produce new behaviours. · line 20

Quoted 10 lines
tools/binman/README.entries +7 -0
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.

No, BL31 is started by U-Boot SPL on the Sunxi platform.

Best regards

Heinrich

Quoted 88 lines
tools/binman/README.entries +3 -0
+
+
+
 Entry: blob: Entry containing an arbitrary binary blob
 ------------------------------------------------------
 
tools/binman/etype/atf_bl31.py new file +20 -0
new file mode 100644
index 00000000000..fd7223843b1
@@ -0,0 +1,20 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <[email protected]>
+#
+# Entry-type module for Intel Management Engine binary blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_atf_bl31(Entry_blob_named_by_arg):
+    """Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+
+    Properties / Entry arguments:
+        - atf-bl31-path: Filename of file to read into entry
+
+    This entry holds the run-time firmware started by ATF.
+    """
+    def __init__(self, section, etype, node):
+        super().__init__(section, etype, node, 'atf-bl31')
+        self.external = True
tools/binman/ftest.py +9 -0
index 8d687162185..30c9c764327 100644
@@ -75,6 +75,7 @@ REFCODE_DATA          = b'refcode'
 FSP_M_DATA            = b'fsp_m'
 FSP_S_DATA            = b'fsp_s'
 FSP_T_DATA            = b'fsp_t'
+ATF_BL31_DATA         = b'bl31'
 
 # The expected size for the device tree in some tests
 EXTRACT_DTB_SIZE = 0x3c9
@@ -168,6 +169,7 @@ class TestFunctional(unittest.TestCase):
                         os.path.join(cls._indir, 'files'))
 
         TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
+        TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
 
         # Travis-CI may have an old lz4
         cls.have_lz4 = True
@@ -3505,5 +3507,12 @@ class TestFunctional(unittest.TestCase):
         self.assertIn("Missing required properties/entry args: cros-ec-rw-path",
                       str(e.exception))
 
+    def testPackBl31(self):
+        """Test that an image with an ATF BL31 binary can be created"""
+        data = self._DoReadFile('165_atf_bl31.dts')
+        self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+
+ATF_BL31_DATA
+
 if __name__ == "__main__":
     unittest.main()
tools/binman/test/165_atf_bl31.dts new file +16 -0
new file mode 100644
index 00000000000..2b7547d70f9
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		size = <16>;
+
+		atf-bl31 {
+			filename = "bl31.bin";
+		};
+	};
+};
#9 lore raw

PATCH 4/7 binman: Add support for ATF BL31

Hi Heinrich,

Quoted 24 lines · Heinrich Schuchardt
Quoted 22 lines · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot.

---

 tools/binman/README.entries        | 10 ++++++++++
 tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
 tools/binman/ftest.py              |  9 +++++++++
 tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
tools/binman/README.entries +0 -0
index 97bfae16116..85b8ec9fa73 100644
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
Quoted 9 lines

tools/binman/README.entries features to produce new behaviours. · line 20

Quoted 7 lines
tools/binman/README.entries +7 -0
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF) BL31 blob
+-------------------------------------------------------------------------
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.

No, BL31 is started by U-Boot SPL on the Sunxi platform.

So perhaps I should reword this to indicate it can go either way?

Quoted 3 lines

Best regards

[..]

Regards,
Simon

#10 lore raw

PATCH 4/7 binman: Add support for ATF BL31

Am 25. August 2020 18:57:57 MESZ schrieb Simon Glass <[email protected]>:

Quoted 42 lines

Hi Heinrich,

Quoted 3 lines · Heinrich Schuchardt
Quoted 1 line · Simon Glass

Add an entry for ARM Trusted Firmware's 'BL31' payload, which is

the

Quoted 13 lines
Quoted 13 lines

device's main firmware. Typically this is U-Boot.

---

 tools/binman/README.entries        | 10 ++++++++++
 tools/binman/etype/atf_bl31.py     | 20 ++++++++++++++++++++
 tools/binman/ftest.py              |  9 +++++++++
 tools/binman/test/165_atf_bl31.dts | 16 ++++++++++++++++
 4 files changed, 55 insertions(+)
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
Quoted 1 line

Review

Quoted 1 line
(quoted diff) +0 -0

b/tools/binman/README.entries

Quoted 8 lines

tools/binman/README.entries features to produce new behaviours. · line 14

Quoted 8 lines

index 97bfae16116..85b8ec9fa73 100644

tools/binman/README.entries +1 -0
@@ -11,6 +11,16 @@ features to produce new behaviours.
 
 
 
+Entry: atf-bl31: Entry containing an ARM Trusted Firmware (ATF)

BL31 blob

Quoted 1 line
Quoted 1 line

+-------------------------------------------------------------------------

Quoted 7 lines

tools/binman/README.entries features to produce new behaviours. · line 20

Quoted 5 lines
tools/binman/README.entries +5 -0
+
+Properties / Entry arguments:
+    - atf-bl31-path: Filename of file to read into entry
+
+This entry holds the run-time firmware started by ATF.

No, BL31 is started by U-Boot SPL on the Sunxi platform.

Quoted 1 line

So perhaps I should reword this to indicate it can go either way?

If SPL is not loading BL31, we don't need this value. Instead we will pass U-Boot as BL33 to the TF-A make command.

Best regards

Heinrich

Quoted 8 lines
Quoted 4 lines

Best regards

[..]

Regards,
Simon

#11 lore raw

PATCH 5/7 binman: Support generating FITs with multiple dtbs

In reply to Simon Glass

In some cases it is useful to generate a FIT which has a number of DTB images, selectable by configuration. Add support for this in binman, using a simple iterator and string substitution.

---

 tools/binman/README.entries       | 42 +++++++++++++++-
 tools/binman/etype/fit.py         | 76 ++++++++++++++++++++++++++---
 tools/binman/ftest.py             | 80 +++++++++++++++++++++++++++++--
 tools/binman/test/166_fit_fdt.dts | 55 +++++++++++++++++++++
 4 files changed, 242 insertions(+), 11 deletions(-)
 create mode 100644 tools/binman/test/166_fit_fdt.dts
tools/binman/README.entries +41 -1
index 85b8ec9fa73..2bf7655b7f0 100644
@@ -335,6 +335,7 @@ For example, this creates an image containing a FIT with U-Boot SPL:
     binman {
         fit {
             description = "Test FIT";
+            fit,fdt-list = "of-list";
 
             images {
                 kernel at 1 {
@@ -353,7 +354,46 @@ For example, this creates an image containing a FIT with U-Boot SPL:
         };
     };
 
-Properties:
+U-Boot supports creating fdt and config nodes automatically. To do this,
+pass an of-list property (e.g. -a of-list=file1 file2). This tells binman
+that you want to generates nodes for two files: file1.dtb and file2.dtb
+The fit,fdt-list property (see above) indicates that of-list should be used.
+
+Then add a 'generator node', a node with a name starting with '@':
+
+    @fdt-SEQ {
+        description = "fdt-NAME";
+        type = "flat_dt";
+        compression = "none";
+    };
+
+This tells binman to create nodes fdt-1 and fdt-2 for each of your two
+files. All the properties you specify will be included in the node. This
+node acts like a template to generate the nodes. The generator node itself
+does not appear in the output - it is replaced with what binman generates.
+
+You can create config nodes in a similar way:
+
+    @config-SEQ {
+        description = "NAME";
+        firmware = "uboot";
+        loadables = "atf";
+        fdt = "fdt-SEQ";
+    };
+
+This tells binman to create nodes config-1 and config-2, i.e. a config for
+each of your two files.
+
+Available substitutions for '@' nodes are:
+
+    SEQ    Sequence number of the generated fdt (1, 2, ...)
+    NAME   Name of the dtb as provided (i.e. without adding '.dtb')
+
+Note that if no device tree files are provided (with '-a of-list' as above)
+then no nodes will be generated.
+
+
+Properties (in the 'fit' node itself):
     fit,external-offset: Indicates that the contents of the FIT are external
         and provides the external offset. This is passsed to mkimage via
         the -E and -p flags.
tools/binman/etype/fit.py +70 -6

115 lines not on this page · raw message

tools/binman/ftest.py +76 -4

134 lines not on this page · raw message

tools/binman/test/166_fit_fdt.dts new file +55 -0

55 lines not on this page · raw message

Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#12 lore raw

PATCH 6/7 sunxi: Convert 64-bit boards to use binman

In reply to Simon Glass

At present 64-bit sunxi board use the Makefile to create a FIT, using USE_SPL_FIT_GENERATOR. This is deprecated.

Update sunxi to use binman instead.

---

 Kconfig                        |  3 +-
 Makefile                       | 18 ++--------
 arch/arm/dts/sunxi-u-boot.dtsi | 60 +++++++++++++++++++++++++++++++++-
 3 files changed, 62 insertions(+), 19 deletions(-)
Kconfig +1 -2
index 883e3f71d01..837b2f517ae 100644
@@ -659,12 +659,11 @@ config SPL_FIT_SOURCE
 
 config USE_SPL_FIT_GENERATOR
 	bool "Use a script to generate the .its script"
-	default y if SPL_FIT
+	default y if SPL_FIT && !ARCH_SUNXI
 
 config SPL_FIT_GENERATOR
 	string ".its file generator script for U-Boot FIT image"
 	depends on USE_SPL_FIT_GENERATOR
-	default "board/sunxi/mksunxi_fit_atf.sh" if SPL_LOAD_FIT && ARCH_SUNXI
 	default "arch/arm/mach-rockchip/make_fit_atf.py" if SPL_LOAD_FIT && ARCH_ROCKCHIP
 	default "arch/arm/mach-zynqmp/mkimage_fit_atf.sh" if SPL_LOAD_FIT && ARCH_ZYNQMP
 	default "arch/riscv/lib/mkimage_fit_opensbi.sh" if SPL_LOAD_FIT && RISCV
Makefile +2 -16
index d9a08818cda..8e175bd0b40 100644
@@ -923,11 +923,6 @@ INPUTS-$(CONFIG_REMAKE_ELF) += u-boot.elf
 INPUTS-$(CONFIG_EFI_APP) += u-boot-app.efi
 INPUTS-$(CONFIG_EFI_STUB) += u-boot-payload.efi
 
-# Build a combined spl + u-boot image for sunxi
-ifeq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64)$(CONFIG_SPL),yyy)
-INPUTS-y += u-boot-sunxi-with-spl.bin
-endif
-
 # Generate this input file for binman
 ifeq ($(CONFIG_SPL),)
 INPUTS-$(CONFIG_ARCH_MEDIATEK) += u-boot-mtk.bin
@@ -1024,13 +1019,9 @@ PHONY += inputs
 inputs: $(INPUTS-y)
 
 all: .binman_stamp inputs
-# Hack for sunxi which doesn't have a proper binman definition for
-# 64-bit boards
-ifneq ($(CONFIG_ARCH_SUNXI)$(CONFIG_ARM64),yy)
 ifeq ($(CONFIG_BINMAN),y)
 	$(call if_changed,binman)
 endif
-endif
 
 # Timestamp file to make sure that binman always runs
 .binman_stamp: FORCE
@@ -1337,6 +1328,8 @@ cmd_binman = $(srctree)/tools/binman/binman $(if $(BINMAN_DEBUG),-D) \
 		build -u -d u-boot.dtb -O . \
 		$(if $(BUILD_ROM),,-m --allow-missing) \
 		-I . -I $(srctree) -I $(srctree)/board/$(BOARDDIR) \
+		-I arch/$(ARCH)/dts -a of-list=$(CONFIG_OF_LIST) \
+		-a atf-bl31-path=${BL31} \
 		$(BINMAN_$(@F))
 
 OBJCOPYFLAGS_u-boot.ldr.hex := -I binary -O ihex
@@ -1626,13 +1619,6 @@ u-boot-x86-reset16.bin: u-boot FORCE
 
 endif # CONFIG_X86
 
-ifneq ($(CONFIG_ARCH_SUNXI),)
-ifeq ($(CONFIG_ARM64),y)
-u-boot-sunxi-with-spl.bin: spl/sunxi-spl.bin u-boot.itb FORCE
-	$(call if_changed,cat)
-endif
-endif
-
 OBJCOPYFLAGS_u-boot-app.efi := $(OBJCOPYFLAGS_EFI)
 u-boot-app.efi: u-boot FORCE
 	$(call if_changed,zobjcopy)
arch/arm/dts/sunxi-u-boot.dtsi +59 -1

73 lines not on this page · raw message

Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#13 lore raw

PATCH 7/7 sunxi: Drop the FIT-generator script

In reply to Simon Glass

This file is no-longer used. Drop it.

---

 board/sunxi/mksunxi_fit_atf.sh | 87 ----------------------------------
 1 file changed, 87 deletions(-)
 delete mode 100755 board/sunxi/mksunxi_fit_atf.sh
board/sunxi/mksunxi_fit_atf.sh deleted +0 -87
deleted file mode 100755
index 88ad7197470..00000000000
@@ -1,87 +0,0 @@
-#!/bin/sh
-#
-# script to generate FIT image source for 64-bit sunxi boards with
-# ARM Trusted Firmware and multiple device trees (given on the command line)
-#
-# usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
-
-[ -z "$BL31" ] && BL31="bl31.bin"
-
-if [ ! -f $BL31 ]; then
-	echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
-	echo "Please read the section on ARM Trusted Firmware (ATF) in board/sunxi/README.sunxi64" >&2
-	BL31=/dev/null
-fi
-
-if grep -q "^CONFIG_MACH_SUN50I_H6=y" .config; then
-	BL31_ADDR=0x104000
-else
-	BL31_ADDR=0x44000
-fi
-
-cat << __HEADER_EOF
-/dts-v1/;
-
-/ {
-	description = "Configuration to load ATF before U-Boot";
-	#address-cells = <1>;
-
-	images {
-		uboot {
-			description = "U-Boot (64-bit)";
-			data = /incbin/("u-boot-nodtb.bin");
-			type = "standalone";
-			arch = "arm64";
-			compression = "none";
-			load = <0x4a000000>;
-		};
-		atf {
-			description = "ARM Trusted Firmware";
-			data = /incbin/("$BL31");
-			type = "firmware";
-			arch = "arm64";
-			compression = "none";
-			load = <$BL31_ADDR>;
-			entry = <$BL31_ADDR>;
-		};
-__HEADER_EOF
-
-cnt=1
-for dtname in $*
-do
-	cat << __FDT_IMAGE_EOF
-		fdt_$cnt {
-			description = "$(basename $dtname .dtb)";
-			data = /incbin/("$dtname");
-			type = "flat_dt";
-			compression = "none";
-		};
-__FDT_IMAGE_EOF
-	cnt=$((cnt+1))
-done
-
-cat << __CONF_HEADER_EOF
-	};
-	configurations {
-		default = "config_1";
-
-__CONF_HEADER_EOF
-
-cnt=1
-for dtname in $*
-do
-	cat << __CONF_SECTION_EOF
-		config_$cnt {
-			description = "$(basename $dtname .dtb)";
-			firmware = "uboot";
-			loadables = "atf";
-			fdt = "fdt_$cnt";
-		};
-__CONF_SECTION_EOF
-	cnt=$((cnt+1))
-done
-
-cat << __ITS_EOF
-	};
-};
-__ITS_EOF
Signature · 1 line
2.28.0.297.g1956fa8f8d-goog
#14 lore raw

cover binman: Add support for generating more complex FITs

In reply to Simon Glass
Quoted 7 lines · Simon Glass

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

I have applied this patch series and it does not work on my pine64-lts_defconfig.

Environment variable BL31 points to my bl31.bin:

$ echo $BL31
../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin

U-Boot SPL 2020.10-rc2-00147-g72293dc579 (Aug 25 2020 - 03:29:28 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Without your patches U-Boot works. But CONFIG_SYS_MALLOC_F_LEN=0x400 is
too small. This results in a warning "alloc space exhausted". Cf.
https://patchwork.ozlabs.org/project/uboot/patch/20200725181851.4339-1-xypron.glpk at gmx.de/

U-Boot SPL 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1

NOTICE:  BL31: v2.2():v2.2-1138-g78460ced4
NOTICE:  BL31: Built : 05:50:47, Apr  7 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4092cc8, model: Pine64 LTS
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP803 on RSB
INFO:    PMIC: dcdc1 voltage: 3.300V
INFO:    PMIC: dcdc5 voltage: 1.200V
INFO:    PMIC: dcdc6 voltage: 1.100V
INFO:    PMIC: dldo1 voltage: 3.300V
INFO:    PMIC: dldo2 voltage: 3.300V
INFO:    PMIC: dldo4 voltage: 3.300V
INFO:    PMIC: fldo1 voltage: 1.200V
INFO:    PMIC: Enabling DC SW
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9

alloc space exhausted

U-Boot 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Pine64 LTS
DRAM:  2 GiB
MMC:   mmc at 1c0f000: 0, mmc at 1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet at 1c30000
Hit any key to stop autoboot:  0

Best regards

Heinrich

Quoted 30 lines

Simon Glass (7):
binman: Allow entry args to be required
binman: Fix up a few missing comments
libfdt: Detected out-of-space with fdt_finish()
binman: Add support for ATF BL31
binman: Support generating FITs with multiple dtbs
sunxi: Convert 64-bit boards to use binman
sunxi: Drop the FIT-generator script

 Kconfig                                 |   3 +-
 Makefile                                |  18 +---
 arch/arm/dts/sunxi-u-boot.dtsi          |  60 +++++++++++-
 board/sunxi/mksunxi_fit_atf.sh          |  87 -----------------
 scripts/dtc/pylibfdt/libfdt.i_shipped   |   3 +-
 tools/binman/README.entries             |  59 ++++++++++-
 tools/binman/etype/atf_bl31.py          |  20 ++++
 tools/binman/etype/blob_named_by_arg.py |  10 +-
 tools/binman/etype/cros_ec_rw.py        |   3 +-
 tools/binman/etype/fit.py               |  76 +++++++++++++--
 tools/binman/ftest.py                   | 124 ++++++++++++++++++++++--
 tools/binman/test/165_atf_bl31.dts      |  16 +++
 tools/binman/test/166_fit_fdt.dts       |  55 +++++++++++
 13 files changed, 405 insertions(+), 129 deletions(-)
 delete mode 100755 board/sunxi/mksunxi_fit_atf.sh
 create mode 100644 tools/binman/etype/atf_bl31.py
 create mode 100644 tools/binman/test/165_atf_bl31.dts
 create mode 100644 tools/binman/test/166_fit_fdt.dts
#15 lore raw

cover binman: Add support for generating more complex FITs

Quoted 76 lines · Heinrich Schuchardt
Quoted 7 lines · Simon Glass

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

I have applied this patch series and it does not work on my pine64-lts_defconfig.

Environment variable BL31 points to my bl31.bin:

$ echo $BL31
../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin

U-Boot SPL 2020.10-rc2-00147-g72293dc579 (Aug 25 2020 - 03:29:28 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Without your patches U-Boot works. But CONFIG_SYS_MALLOC_F_LEN=0x400 is
too small. This results in a warning "alloc space exhausted". Cf.
https://patchwork.ozlabs.org/project/uboot/patch/20200725181851.4339-1-xypron.glpk at gmx.de/

U-Boot SPL 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1

NOTICE:  BL31: v2.2():v2.2-1138-g78460ced4
NOTICE:  BL31: Built : 05:50:47, Apr  7 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4092cc8, model: Pine64 LTS
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP803 on RSB
INFO:    PMIC: dcdc1 voltage: 3.300V
INFO:    PMIC: dcdc5 voltage: 1.200V
INFO:    PMIC: dcdc6 voltage: 1.100V
INFO:    PMIC: dldo1 voltage: 3.300V
INFO:    PMIC: dldo2 voltage: 3.300V
INFO:    PMIC: dldo4 voltage: 3.300V
INFO:    PMIC: fldo1 voltage: 1.200V
INFO:    PMIC: Enabling DC SW
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9

alloc space exhausted

U-Boot 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Pine64 LTS
DRAM:  2 GiB
MMC:   mmc at 1c0f000: 0, mmc at 1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet at 1c30000
Hit any key to stop autoboot:  0
Quoted 3 lines

Best regards

Heinrich

This is u-boot.its created without your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = <1>;

        images {
                uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = <0x4a000000>;
                };
                atf {
                        description = "ARM Trusted Firmware";
                        data =
/incbin/("../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin");
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = <0x44000>;
                        entry = <0x44000>;
                };
                fdt_1 {
                        description = "sun50i-a64-pine64-lts";
                        data =
/incbin/("arch/arm/dts/sun50i-a64-pine64-lts.dtb");
                        type = "flat_dt";
                        compression = "none";
                };
        };
        configurations {
                default = "config_1";

                config_1 {
                        description = "sun50i-a64-pine64-lts";
                        firmware = "uboot";
                        loadables = "atf";
                        fdt = "fdt_1";
                };
        };
};

This is the itb that is created with your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = < 0x01 >;

        images {

                uboot {
                        data = < 0x1f000 ...
                        description = "U-Boot (64-bit)";
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x4a000000 >;
                };

                atf {
                        data = [ f4 ...
                        description = "ARM Trusted Firmware";
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x44000 >;
                        entry = < 0x44000 >;
                };
        };

        configurations {
                default = "config-1";
        };
};

The device tree is missing and the default configuration is empty.

Best regards

Heinrich

#16 lore raw

cover binman: Add support for generating more complex FITs

Hi Heinrich,

Quoted 165 lines · Heinrich Schuchardt
Quoted 76 lines · Heinrich Schuchardt
Quoted 7 lines · Simon Glass

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

I have applied this patch series and it does not work on my pine64-lts_defconfig.

Environment variable BL31 points to my bl31.bin:

$ echo $BL31
../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin

U-Boot SPL 2020.10-rc2-00147-g72293dc579 (Aug 25 2020 - 03:29:28 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Without your patches U-Boot works. But CONFIG_SYS_MALLOC_F_LEN=0x400 is
too small. This results in a warning "alloc space exhausted". Cf.
https://patchwork.ozlabs.org/project/uboot/patch/20200725181851.4339-1-xypron.glpk at gmx.de/

U-Boot SPL 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1

NOTICE:  BL31: v2.2():v2.2-1138-g78460ced4
NOTICE:  BL31: Built : 05:50:47, Apr  7 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4092cc8, model: Pine64 LTS
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP803 on RSB
INFO:    PMIC: dcdc1 voltage: 3.300V
INFO:    PMIC: dcdc5 voltage: 1.200V
INFO:    PMIC: dcdc6 voltage: 1.100V
INFO:    PMIC: dldo1 voltage: 3.300V
INFO:    PMIC: dldo2 voltage: 3.300V
INFO:    PMIC: dldo4 voltage: 3.300V
INFO:    PMIC: fldo1 voltage: 1.200V
INFO:    PMIC: Enabling DC SW
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9

alloc space exhausted

U-Boot 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Pine64 LTS
DRAM:  2 GiB
MMC:   mmc at 1c0f000: 0, mmc at 1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet at 1c30000
Hit any key to stop autoboot:  0
Quoted 3 lines

Best regards

Heinrich

This is u-boot.its created without your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = <1>;

        images {
                uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = <0x4a000000>;
                };
                atf {
                        description = "ARM Trusted Firmware";
                        data =
/incbin/("../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin");
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = <0x44000>;
                        entry = <0x44000>;
                };
                fdt_1 {
                        description = "sun50i-a64-pine64-lts";
                        data =
/incbin/("arch/arm/dts/sun50i-a64-pine64-lts.dtb");
                        type = "flat_dt";
                        compression = "none";
                };
        };
        configurations {
                default = "config_1";

                config_1 {
                        description = "sun50i-a64-pine64-lts";
                        firmware = "uboot";
                        loadables = "atf";
                        fdt = "fdt_1";
                };
        };
};

This is the itb that is created with your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = < 0x01 >;

        images {

                uboot {
                        data = < 0x1f000 ...
                        description = "U-Boot (64-bit)";
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x4a000000 >;
                };

                atf {
                        data = [ f4 ...
                        description = "ARM Trusted Firmware";
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x44000 >;
                        entry = < 0x44000 >;
                };
        };

        configurations {
                default = "config-1";
        };
};
Quoted 1 line

The device tree is missing and the default configuration is empty.

There was a thread on this, I thought. Can you check u-boot-dm/binman-working ?

I can send v2 I suppose.

Regards,
Simon

#17 lore raw

cover binman: Add support for generating more complex FITs

Quoted 168 lines · Simon Glass

Hi Heinrich,

Quoted 165 lines · Heinrich Schuchardt
Quoted 76 lines · Heinrich Schuchardt
Quoted 7 lines · Simon Glass

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

I have applied this patch series and it does not work on my pine64-lts_defconfig.

Environment variable BL31 points to my bl31.bin:

$ echo $BL31
../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin

U-Boot SPL 2020.10-rc2-00147-g72293dc579 (Aug 25 2020 - 03:29:28 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Without your patches U-Boot works. But CONFIG_SYS_MALLOC_F_LEN=0x400 is
too small. This results in a warning "alloc space exhausted". Cf.
https://patchwork.ozlabs.org/project/uboot/patch/20200725181851.4339-1-xypron.glpk at gmx.de/

U-Boot SPL 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1

NOTICE:  BL31: v2.2():v2.2-1138-g78460ced4
NOTICE:  BL31: Built : 05:50:47, Apr  7 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4092cc8, model: Pine64 LTS
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP803 on RSB
INFO:    PMIC: dcdc1 voltage: 3.300V
INFO:    PMIC: dcdc5 voltage: 1.200V
INFO:    PMIC: dcdc6 voltage: 1.100V
INFO:    PMIC: dldo1 voltage: 3.300V
INFO:    PMIC: dldo2 voltage: 3.300V
INFO:    PMIC: dldo4 voltage: 3.300V
INFO:    PMIC: fldo1 voltage: 1.200V
INFO:    PMIC: Enabling DC SW
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9

alloc space exhausted

U-Boot 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Pine64 LTS
DRAM:  2 GiB
MMC:   mmc at 1c0f000: 0, mmc at 1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet at 1c30000
Hit any key to stop autoboot:  0
Quoted 3 lines

Best regards

Heinrich

This is u-boot.its created without your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = <1>;

        images {
                uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = <0x4a000000>;
                };
                atf {
                        description = "ARM Trusted Firmware";
                        data =
/incbin/("../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin");
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = <0x44000>;
                        entry = <0x44000>;
                };
                fdt_1 {
                        description = "sun50i-a64-pine64-lts";
                        data =
/incbin/("arch/arm/dts/sun50i-a64-pine64-lts.dtb");
                        type = "flat_dt";
                        compression = "none";
                };
        };
        configurations {
                default = "config_1";

                config_1 {
                        description = "sun50i-a64-pine64-lts";
                        firmware = "uboot";
                        loadables = "atf";
                        fdt = "fdt_1";
                };
        };
};

This is the itb that is created with your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = < 0x01 >;

        images {

                uboot {
                        data = < 0x1f000 ...
                        description = "U-Boot (64-bit)";
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x4a000000 >;
                };

                atf {
                        data = [ f4 ...
                        description = "ARM Trusted Firmware";
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x44000 >;
                        entry = < 0x44000 >;
                };
        };

        configurations {
                default = "config-1";
        };
};
Quoted 3 lines
Quoted 1 line

The device tree is missing and the default configuration is empty.

There was a thread on this, I thought.

Do you have a link?

Quoted 1 line

Can you check u-boot-dm/binman-working ?

Bad luck. The problem is reproducible with your branch

commit c6723231a80ad6c2a842778fea7d4857ba81d7c3 (HEAD -> binman-working, dm/binman-working)

Author: Simon Glass <[email protected]>
Date:   Fri Aug 21 20:25:56 2020 -0600

sunxi: Drop the FIT-generator script

U-Boot SPL 2020.10-rc2-00107-gc6723231a8 (Aug 25 2020 - 17:29:26 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Best regards

Heinrich

Quoted 6 lines

I can send v2 I suppose.

Regards,
Simon

#18 lore raw

cover binman: Add support for generating more complex FITs

Hi Heinrich,

Quoted 172 lines · Heinrich Schuchardt
Quoted 170 lines · Simon Glass

Hi Heinrich,

Quoted 166 lines · Heinrich Schuchardt
Quoted 76 lines · Heinrich Schuchardt
Quoted 7 lines · Simon Glass

This series allows binman to generate FITs that include multiple DTB images and the configuration to use them.

It is then possible to remove the sunxi FIT generator script, so this series handles that also.

With this, sunxi is fully converted to use binman.

I have applied this patch series and it does not work on my pine64-lts_defconfig.

Environment variable BL31 points to my bl31.bin:

$ echo $BL31
../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin

U-Boot SPL 2020.10-rc2-00147-g72293dc579 (Aug 25 2020 - 03:29:28 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Without your patches U-Boot works. But CONFIG_SYS_MALLOC_F_LEN=0x400 is
too small. This results in a warning "alloc space exhausted". Cf.
https://patchwork.ozlabs.org/project/uboot/patch/20200725181851.4339-1-xypron.glpk at gmx.de/

U-Boot SPL 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1

NOTICE:  BL31: v2.2():v2.2-1138-g78460ced4
NOTICE:  BL31: Built : 05:50:47, Apr  7 2020
NOTICE:  BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE:  BL31: Found U-Boot DTB at 0x4092cc8, model: Pine64 LTS
INFO:    ARM GICv2 driver initialized
INFO:    Configuring SPC Controller
INFO:    PMIC: Probing AXP803 on RSB
INFO:    PMIC: dcdc1 voltage: 3.300V
INFO:    PMIC: dcdc5 voltage: 1.200V
INFO:    PMIC: dcdc6 voltage: 1.100V
INFO:    PMIC: dldo1 voltage: 3.300V
INFO:    PMIC: dldo2 voltage: 3.300V
INFO:    PMIC: dldo4 voltage: 3.300V
INFO:    PMIC: fldo1 voltage: 1.200V
INFO:    PMIC: Enabling DC SW
INFO:    BL31: Platform setup done
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 843419 was applied
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
NOTICE:  PSCI: System suspend is unavailable
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x4a000000
INFO:    SPSR = 0x3c9

alloc space exhausted

U-Boot 2020.10-rc2-00140-g1aa3966173 (Aug 25 2020 - 03:46:36 +0000) Allwinner Technology

CPU:   Allwinner A64 (SUN50I)
Model: Pine64 LTS
DRAM:  2 GiB
MMC:   mmc at 1c0f000: 0, mmc at 1c11000: 1
Loading Environment from FAT... Card did not respond to voltage select!
In:    serial
Out:   serial
Err:   serial
Net:   phy interface7
eth0: ethernet at 1c30000
Hit any key to stop autoboot:  0
Quoted 3 lines

Best regards

Heinrich

This is u-boot.its created without your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = <1>;

        images {
                uboot {
                        description = "U-Boot (64-bit)";
                        data = /incbin/("u-boot-nodtb.bin");
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = <0x4a000000>;
                };
                atf {
                        description = "ARM Trusted Firmware";
                        data =
/incbin/("../trusted-firmware-a/build/sun50i_a64/debug/bl31.bin");
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = <0x44000>;
                        entry = <0x44000>;
                };
                fdt_1 {
                        description = "sun50i-a64-pine64-lts";
                        data =
/incbin/("arch/arm/dts/sun50i-a64-pine64-lts.dtb");
                        type = "flat_dt";
                        compression = "none";
                };
        };
        configurations {
                default = "config_1";

                config_1 {
                        description = "sun50i-a64-pine64-lts";
                        firmware = "uboot";
                        loadables = "atf";
                        fdt = "fdt_1";
                };
        };
};

This is the itb that is created with your patches:

/dts-v1/;

/ {
        description = "Configuration to load ATF before U-Boot";
        #address-cells = < 0x01 >;

        images {

                uboot {
                        data = < 0x1f000 ...
                        description = "U-Boot (64-bit)";
                        type = "standalone";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x4a000000 >;
                };

                atf {
                        data = [ f4 ...
                        description = "ARM Trusted Firmware";
                        type = "firmware";
                        arch = "arm64";
                        compression = "none";
                        load = < 0x44000 >;
                        entry = < 0x44000 >;
                };
        };

        configurations {
                default = "config-1";
        };
};

The device tree is missing and the default configuration is empty.

Quoted 8 lines
Quoted 1 line

There was a thread on this, I thought.

Do you have a link?

Quoted 1 line

Can you check u-boot-dm/binman-working ?

Bad luck. The problem is reproducible with your branch

Yes it is missing the fit,fdt-list property. I'll add an error check for this.

Quoted 8 lines

commit c6723231a80ad6c2a842778fea7d4857ba81d7c3 (HEAD -> binman-working, dm/binman-working)

Author: Simon Glass <[email protected]>
Date:   Fri Aug 21 20:25:56 2020 -0600

sunxi: Drop the FIT-generator script

Quoted 10 lines

U-Boot SPL 2020.10-rc2-00107-gc6723231a8 (Aug 25 2020 - 17:29:26 +0000)
DRAM: 2048 MiB
Trying to boot from MMC1
No matching DT out of these options:
Configuration to load ATF before U-Boot
No matching DT out of these options:
Configuration to load ATF before U-Boot
mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

Regards,
SImon