summaryrefslogtreecommitdiff
path: root/tools/binman/elf.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-08-02 17:33:09 -0400
committerTom Rini <trini@konsulko.com>2023-08-02 17:33:09 -0400
commit35e6c89b76fcdad101e0a706e4706ac11cb8642d (patch)
tree26db2605eaac51131a79230267f21332dee797a4 /tools/binman/elf.py
parent38dedebc547f795efc3daad17f7c013c515e1285 (diff)
parent288ae53cb73605500b7fc01e5919753c878466be (diff)
Merge tag 'dm-pull-2aug23' of https://source.denx.de/u-boot/custodians/u-boot-dm
binman fixes for options, etc. binman template fixes / tweaks
Diffstat (limited to 'tools/binman/elf.py')
-rw-r--r--tools/binman/elf.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/binman/elf.py b/tools/binman/elf.py
index 4219001feac..2ecc95f7eb8 100644
--- a/tools/binman/elf.py
+++ b/tools/binman/elf.py
@@ -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)