binman: Add support for adding a name prefix to entries
Sometimes we have several sections which repeat the same entries (e.g. for a read-only and read-write version of the same section). It is useful to be able to tell these entries apart by name. Add a new 'name-prefix' property for sections, which causes all entries within that section to have a given name prefix. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -950,5 +950,15 @@ class TestFunctional(unittest.TestCase):
|
||||
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('''Position Size Name
|
||||
00000000 00000010 section@0
|
||||
00000000 00000004 ro-u-boot
|
||||
00000010 00000010 section@1
|
||||
00000000 00000004 rw-u-boot
|
||||
''', map_data)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user