aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-09-01 05:13:58 -0600
committerSimon Glass <sjg@chromium.org>2020-09-22 12:50:43 -0600
commitdc2f81a2c89468371cf404816ed57481718deb7f (patch)
tree616bf002956581de23a55c5f9e4b3857cd68f13b /tools/binman/ftest.py
parent8795898a53dae112857f06b49e58cfe94a731dfa (diff)
downloadu-boot-dc2f81a2c89468371cf404816ed57481718deb7f.zip
u-boot-dc2f81a2c89468371cf404816ed57481718deb7f.tar.gz
u-boot-dc2f81a2c89468371cf404816ed57481718deb7f.tar.bz2
binman: Add support for ATF BL31
Add an entry for ARM Trusted Firmware's 'BL31' payload, which is the device's main firmware. Typically this is U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index ceeee1d..2b3690e 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -74,6 +74,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
@@ -167,6 +168,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
@@ -3550,5 +3552,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('169_atf_bl31.dts')
+ self.assertEqual(ATF_BL31_DATA, data[:len(ATF_BL31_DATA)])
+
+ATF_BL31_DATA
+
if __name__ == "__main__":
unittest.main()