diff options
author | Simon Glass <sjg@chromium.org> | 2022-02-08 11:49:58 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-02-22 10:05:44 -0700 |
commit | 5c044ff52362f379b5a9296e724df9546ae98b34 (patch) | |
tree | db6ab3b85941ef4044f74d8b679cfc9ba88e0968 /tools/binman/elf_test.py | |
parent | 523cde0637f264380eeaaf0cfa82fdbbd99a261f (diff) |
binman: Support a list of strings with the mkimage etype
At present the 'args' property of the mkimage entry type is a string. This
makes it difficult to include CONFIG options in that property. In
particular, this does not work:
args = "-n CONFIG_SYS_SOC -E"
since the preprocessor does not operate within strings, nor does this:
args = "-n" CONFIG_SYS_SOC" "-E"
since the device tree compiler does not understand string concatenation.
With this new feature, we can do:
args = "-n", CONFIG_SYS_SOC, "-E";
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/elf_test.py')
-rw-r--r-- | tools/binman/elf_test.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/binman/elf_test.py b/tools/binman/elf_test.py index f92352d54f6..a67915bda63 100644 --- a/tools/binman/elf_test.py +++ b/tools/binman/elf_test.py @@ -263,7 +263,7 @@ class TestElf(unittest.TestCase): if not elf.ELF_TOOLS: self.skipTest('Python elftools not available') fname = self.ElfTestFile('embed_data') - segments, entry = elf.read_segments(tools.ReadFile(fname)) + segments, entry = elf.read_segments(tools.read_file(fname)) def test_read_segments_fail(self): """Test for read_segments() without elftools""" @@ -272,7 +272,7 @@ class TestElf(unittest.TestCase): elf.ELF_TOOLS = False fname = self.ElfTestFile('embed_data') with self.assertRaises(ValueError) as e: - elf.read_segments(tools.ReadFile(fname)) + elf.read_segments(tools.read_file(fname)) self.assertIn('Python elftools package is not available', str(e.exception)) finally: @@ -282,7 +282,7 @@ class TestElf(unittest.TestCase): """Test for read_segments() with an invalid ELF file""" fname = self.ElfTestFile('embed_data') with self.assertRaises(ValueError) as e: - elf.read_segments(tools.GetBytes(100, 100)) + elf.read_segments(tools.get_bytes(100, 100)) self.assertIn('Magic number does not match', str(e.exception)) |