mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
binman: elf: Check for ELF_TOOLS availability and remove extra semicolon
Check if elf tools are available when running DecodeElf(). Also remove superfuous semicolon at line ending. Signed-off-by: Lukas Funke <lukas.funke@weidmueller.com> Reviewed-by: Simon Glass <sjg@chromium.org> Revert part of patch to make binman test pass Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
7755b22007
commit
43176ed86d
2 changed files with 20 additions and 6 deletions
|
@ -447,13 +447,15 @@ def DecodeElf(data, location):
|
|||
Returns:
|
||||
ElfInfo object containing information about the decoded ELF file
|
||||
"""
|
||||
if not ELF_TOOLS:
|
||||
raise ValueError("Python: No module named 'elftools'")
|
||||
file_size = len(data)
|
||||
with io.BytesIO(data) as fd:
|
||||
elf = ELFFile(fd)
|
||||
data_start = 0xffffffff;
|
||||
data_end = 0;
|
||||
mem_end = 0;
|
||||
virt_to_phys = 0;
|
||||
data_start = 0xffffffff
|
||||
data_end = 0
|
||||
mem_end = 0
|
||||
virt_to_phys = 0
|
||||
|
||||
for i in range(elf.num_segments()):
|
||||
segment = elf.get_segment(i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue