diff mbox series

[U-Boot,03/13] binman: Add support for including spl/u-boot-spl-nodtb.bin

Message ID 20171114015506.25673-4-sjg@chromium.org
State Accepted
Commit 4e6fdbef67e4e73b516c20b073cf160679940b77
Delegated to: Simon Glass
Headers show
Series binman: Support run-time access to binman image positions | expand

Commit Message

Simon Glass Nov. 14, 2017, 1:54 a.m. UTC
This file contains SPL image without a device tree. Add support for
including this in images.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/etype/u_boot_spl_nodtb.py    | 17 +++++++++++++++++
 tools/binman/ftest.py                     |  5 +++++
 tools/binman/test/52_u_boot_spl_nodtb.dts | 11 +++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 tools/binman/etype/u_boot_spl_nodtb.py
 create mode 100644 tools/binman/test/52_u_boot_spl_nodtb.dts

Comments

Simon Glass Dec. 8, 2017, 5:12 p.m. UTC | #1
This file contains SPL image without a device tree. Add support for
including this in images.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/etype/u_boot_spl_nodtb.py    | 17 +++++++++++++++++
 tools/binman/ftest.py                     |  5 +++++
 tools/binman/test/52_u_boot_spl_nodtb.dts | 11 +++++++++++
 3 files changed, 33 insertions(+)
 create mode 100644 tools/binman/etype/u_boot_spl_nodtb.py
 create mode 100644 tools/binman/test/52_u_boot_spl_nodtb.dts

Applied to u-boot-dm thanks!
diff mbox series

Patch

diff --git a/tools/binman/etype/u_boot_spl_nodtb.py b/tools/binman/etype/u_boot_spl_nodtb.py
new file mode 100644
index 00000000000..880e0c78fbc
--- /dev/null
+++ b/tools/binman/etype/u_boot_spl_nodtb.py
@@ -0,0 +1,17 @@ 
+# Copyright (c) 2016 Google, Inc
+# Written by Simon Glass <sjg@chromium.org>
+#
+# SPDX-License-Identifier:      GPL-2.0+
+#
+# Entry-type module for 'u-boot-nodtb.bin'
+#
+
+from entry import Entry
+from blob import Entry_blob
+
+class Entry_u_boot_spl_nodtb(Entry_blob):
+    def __init__(self, image, etype, node):
+        Entry_blob.__init__(self, image, etype, node)
+
+    def GetDefaultFilename(self):
+        return 'spl/u-boot-spl-nodtb.bin'
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 32bc7950b14..ed0697af006 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -876,6 +876,11 @@  class TestFunctional(unittest.TestCase):
         data = self._DoReadFile('51_u_boot_spl_dtb.dts')
         self.assertEqual(U_BOOT_SPL_DTB_DATA, data[:len(U_BOOT_SPL_DTB_DATA)])
 
+    def testSplNoDtb(self):
+        """Test that an image with spl/u-boot-spl-nodtb.bin can be created"""
+        data = self._DoReadFile('52_u_boot_spl_nodtb.dts')
+        self.assertEqual(U_BOOT_SPL_NODTB_DATA, data[:len(U_BOOT_SPL_NODTB_DATA)])
+
 
 if __name__ == "__main__":
     unittest.main()
diff --git a/tools/binman/test/52_u_boot_spl_nodtb.dts b/tools/binman/test/52_u_boot_spl_nodtb.dts
new file mode 100644
index 00000000000..7f4e27780fe
--- /dev/null
+++ b/tools/binman/test/52_u_boot_spl_nodtb.dts
@@ -0,0 +1,11 @@ 
+/dts-v1/;
+
+/ {
+	#address-cells = <1>;
+	#size-cells = <1>;
+
+	binman {
+		u-boot-spl-nodtb {
+		};
+	};
+};