binman: Add support for sections

It is useful to be able to split an image into multiple sections,
each with its own size and position, for cases where a flash device has
read-only and read-write portions.

Add support for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-06-01 09:38:16 -06:00
parent badf0ec6e4
commit 1854695bd8
6 changed files with 132 additions and 2 deletions

View File

@@ -914,6 +914,11 @@ class TestFunctional(unittest.TestCase):
data = self._DoReadFile('54_unit_address.dts')
self.assertEqual(U_BOOT_DATA + U_BOOT_DATA, data)
def testSections(self):
"""Basic test of sections"""
data = self._DoReadFile('55_sections.dts')
expected = U_BOOT_DATA + '!' * 12 + U_BOOT_DATA + 'a' * 12 + '&' * 8
self.assertEqual(expected, data)
if __name__ == "__main__":
unittest.main()