diff options
author | Simon Glass <sjg@chromium.org> | 2018-09-14 04:57:35 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-09-29 11:49:35 -0600 |
commit | fe1ae3ecc3a2203babd7837bd2d5cf514a374c1f (patch) | |
tree | 8a6ebd631bb6fe83a419ae23b136680e81f435e8 /tools/binman/ftest.py | |
parent | f8f8df6eb870b53e025aa447f8d40cd2ce2a77f6 (diff) |
binman: Support ELF files for U-Boot and SPL
For sandbox we want to put ELF files in the image since that is what we
need to execute. Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 1abb768e64..27dca3a2a7 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -1708,6 +1708,22 @@ class TestFunctional(unittest.TestCase): fmap_util.FMAP_AREA_LEN * 3, fentries[2].size) self.assertEqual('FMAP', fentries[2].name) + def testElf(self): + """Basic test of ELF entries""" + with open(self.TestFile('bss_data')) as fd: + TestFunctional._MakeInputFile('spl/u-boot-spl', fd.read()) + with open(self.TestFile('bss_data')) as fd: + TestFunctional._MakeInputFile('-boot', fd.read()) + data = self._DoReadFile('96_elf.dts') + + def testElfStripg(self): + """Basic test of ELF entries""" + with open(self.TestFile('bss_data')) as fd: + TestFunctional._MakeInputFile('spl/u-boot-spl', fd.read()) + with open(self.TestFile('bss_data')) as fd: + TestFunctional._MakeInputFile('-boot', fd.read()) + data = self._DoReadFile('97_elf_strip.dts') + if __name__ == "__main__": unittest.main() |