diff options
author | Simon Glass <sjg@chromium.org> | 2018-06-01 09:38:21 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-06-07 11:25:08 -0800 |
commit | c8d48efb2b373dc6893e7e9f2f6aaefe5d194719 (patch) | |
tree | 6f3b8315fc2e6fc02c1eede703a804162e7d044e /tools/binman/ftest.py | |
parent | 3b0c3821d6401106cc873a6c27a8ee31a8d466a4 (diff) |
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>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 61bbb53f8c3..eb8a0793cbe 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -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() |