diff options
author | Simon Glass <sjg@chromium.org> | 2018-07-17 13:25:28 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-08-01 16:30:07 -0600 |
commit | 8122f3967f6eaab7134051d1d8c9b1bfc3babadb (patch) | |
tree | 370eb5697e7f8f2d0613c407d86c546eecc66280 /tools/binman/ftest.py | |
parent | ea6922e3d6a1b6b73d7baef4998f8bef0fe332ad (diff) |
binman: Enhance the map and fdt-update output
At present the .map file produced for each image does not include the
overall image size. This is useful information.
Update the code to generate it in the .map file as well as the updated
FDT. Also fix a few comments while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 91b59f84ea..94e48f3ab3 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -1004,27 +1004,32 @@ class TestFunctional(unittest.TestCase): def testSections(self): """Basic test of sections""" data = self._DoReadFile('55_sections.dts') - expected = U_BOOT_DATA + '!' * 12 + U_BOOT_DATA + 'a' * 12 + '&' * 8 + expected = (U_BOOT_DATA + '!' * 12 + U_BOOT_DATA + 'a' * 12 + + U_BOOT_DATA + '&' * 4) self.assertEqual(expected, data) def testMap(self): """Tests outputting a map of the images""" _, _, map_data, _ = self._DoReadFileDtb('55_sections.dts', map=True) self.assertEqual(''' Offset Size Name -00000000 00000010 section@0 - 00000000 00000004 u-boot -00000010 00000010 section@1 - 00000000 00000004 u-boot +00000000 00000028 main-section + 00000000 00000010 section@0 + 00000000 00000004 u-boot + 00000010 00000010 section@1 + 00000000 00000004 u-boot + 00000020 00000004 section@2 + 00000000 00000004 u-boot ''', map_data) def testNamePrefix(self): """Tests that name prefixes are used""" _, _, map_data, _ = self._DoReadFileDtb('56_name_prefix.dts', map=True) self.assertEqual(''' Offset Size Name -00000000 00000010 section@0 - 00000000 00000004 ro-u-boot -00000010 00000010 section@1 - 00000000 00000004 rw-u-boot +00000000 00000028 main-section + 00000000 00000010 section@0 + 00000000 00000004 ro-u-boot + 00000010 00000010 section@1 + 00000000 00000004 rw-u-boot ''', map_data) def testUnknownContents(self): @@ -1051,6 +1056,7 @@ class TestFunctional(unittest.TestCase): with open(out_dtb_fname) as inf: outf.write(inf.read()) self.assertEqual({ + 'offset': 0, '_testing:offset': 32, '_testing:size': 1, 'section@0/u-boot:offset': 0, |