aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/binman/README.entries4
-rw-r--r--tools/binman/etype/fit.py12
-rw-r--r--tools/binman/etype/scp.py19
-rw-r--r--tools/binman/ftest.py7
-rw-r--r--tools/binman/missing-blob-help4
-rw-r--r--tools/binman/test/172_scp.dts16
6 files changed, 54 insertions, 8 deletions
diff --git a/tools/binman/README.entries b/tools/binman/README.entries
index c1d436563e8..bdb4fd6ee51 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 de4745c5521..1a7cbd7cec7 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";
};
};
@@ -205,10 +205,10 @@ class Entry_fit(Entry):
b'SEQ', tools.ToBytes(str(seq + 1)))
fsw.property(pname, val)
- # Add data for 'fdt' nodes (but not 'config')
- if depth == 1 and in_images:
- fsw.property('data',
- tools.ReadFile(fname))
+ # Add data for 'fdt' nodes (but not 'config')
+ if depth == 1 and in_images:
+ fsw.property('data',
+ tools.ReadFile(fname))
else:
if self._fdts is None:
if self._fit_list_prop:
diff --git a/tools/binman/etype/scp.py b/tools/binman/etype/scp.py
new file mode 100644
index 00000000000..93f8787d2d7
--- /dev/null
+++ b/tools/binman/etype/scp.py
@@ -0,0 +1,19 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright 2020 Samuel Holland <samuel@sholland.org>
+#
+# Entry-type module for System Control Processor (SCP) firmware blob
+#
+
+from binman.etype.blob_named_by_arg import Entry_blob_named_by_arg
+
+class Entry_scp(Entry_blob_named_by_arg):
+ """Entry containing a System Control Processor (SCP) firmware blob
+
+ Properties / Entry arguments:
+ - scp-path: Filename of file to read into the entry, typically scp.bin
+
+ This entry holds firmware for an external platform-specific coprocessor.
+ """
+ def __init__(self, section, etype, node):
+ super().__init__(section, etype, node, 'scp')
+ self.external = True
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index b771b9d5df7..75f6ca3a895 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -75,6 +75,7 @@ FSP_M_DATA = b'fsp_m'
FSP_S_DATA = b'fsp_s'
FSP_T_DATA = b'fsp_t'
ATF_BL31_DATA = b'bl31'
+SCP_DATA = b'scp'
TEST_FDT1_DATA = b'fdt1'
TEST_FDT2_DATA = b'test-fdt2'
ENV_DATA = b'var1=1\nvar2="2"'
@@ -175,6 +176,7 @@ class TestFunctional(unittest.TestCase):
TestFunctional._MakeInputFile('compress', COMPRESS_DATA)
TestFunctional._MakeInputFile('bl31.bin', ATF_BL31_DATA)
+ TestFunctional._MakeInputFile('scp.bin', SCP_DATA)
# Add a few .dtb files for testing
TestFunctional._MakeInputFile('%s/test-fdt1.dtb' % TEST_FDT_SUBDIR,
@@ -3578,6 +3580,11 @@ class TestFunctional(unittest.TestCase):
data = self._DoReadFile('169_atf_bl31.dts')
self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+ def testPackScp(self):
+ """Test that an image with an SCP binary can be created"""
+ data = self._DoReadFile('172_scp.dts')
+ self.assertEqual(SCP_DATA, data[:len(SCP_DATA)])
+
def testFitFdt(self):
"""Test an image with an FIT with multiple FDT images"""
def _CheckFdt(seq, expected_data):
diff --git a/tools/binman/missing-blob-help b/tools/binman/missing-blob-help
index 7cf1c346101..f7bc80ea830 100644
--- a/tools/binman/missing-blob-help
+++ b/tools/binman/missing-blob-help
@@ -13,3 +13,7 @@ Firmware and build with BL31=/path/to/bl31.bin
atf-bl31-sunxi:
Please read the section on ARM Trusted Firmware (ATF) in
board/sunxi/README.sunxi64
+
+scp-sunxi:
+SCP firmware is required for system suspend, but is otherwise optional.
+Please read the section on SCP firmware in board/sunxi/README.sunxi64
diff --git a/tools/binman/test/172_scp.dts b/tools/binman/test/172_scp.dts
new file mode 100644
index 00000000000..354e4ef17df
--- /dev/null
+++ b/tools/binman/test/172_scp.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0+
+
+/dts-v1/;
+
+/ {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ binman {
+ size = <16>;
+
+ scp {
+ filename = "scp.bin";
+ };
+ };
+};