summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-07-20 21:31:31 -0400
committerTom Rini <trini@konsulko.com>2023-07-20 21:31:31 -0400
commite896279ac39ebb97f23e6132bf7668a61e1cd86b (patch)
tree24e035ebd13dbd272da4b3845a1dfcac66e4a86f /tools/binman/entry.py
parent7fe5accb4516144b7abb8f183640cdf50423121e (diff)
parent24142ead21ed5e4d2d6f39dd410d91d815ea1ae2 (diff)
Merge tag 'dm-pull-20jul23' of https://source.denx.de/u-boot/custodians/u-boot-dm
binman mkimage and template enhancements misc fixes
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index 39456906a47..42e0b7b9145 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -158,6 +158,7 @@ class Entry(object):
self.offset_from_elf = None
self.preserve = False
self.build_done = False
+ self.no_write_symbols = False
@staticmethod
def FindEntryClass(etype, expanded):
@@ -321,6 +322,7 @@ class Entry(object):
'offset-from-elf')
self.preserve = fdt_util.GetBool(self._node, 'preserve')
+ self.no_write_symbols = fdt_util.GetBool(self._node, 'no-write-symbols')
def GetDefaultFilename(self):
return None
@@ -472,6 +474,9 @@ class Entry(object):
def ObtainContents(self, skip_entry=None, fake_size=0):
"""Figure out the contents of an entry.
+ For missing blobs (where allow-missing is enabled), the contents are set
+ to b'' and self.missing is set to True.
+
Args:
skip_entry (Entry): Entry to skip when obtaining section contents
fake_size (int): Size of fake file to create if needed
@@ -695,7 +700,7 @@ class Entry(object):
Args:
section: Section containing the entry
"""
- if self.auto_write_symbols:
+ if self.auto_write_symbols and not self.no_write_symbols:
# Check if we are writing symbols into an ELF file
is_elf = self.GetDefaultFilename() == self.elf_fname
elf.LookupAndWriteSymbols(self.elf_fname, self, section.GetImage(),
@@ -1309,10 +1314,6 @@ features to produce new behaviours.
"""
data = b''
for entry in entries:
- # First get the input data and put it in a file. If not available,
- # try later.
- if not entry.ObtainContents(fake_size=fake_size):
- return None, None, None
data += entry.GetData()
uniq = self.GetUniqueName()
fname = tools.get_output_filename(f'{prefix}.{uniq}')