binman: Avoid setting the image_pos attribute directly
Two places set this attribute directly. Update them to use the function
provided.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/etype/atf_fip.py b/tools/binman/etype/atf_fip.py
index 3da0dfc..636e073 100644
--- a/tools/binman/etype/atf_fip.py
+++ b/tools/binman/etype/atf_fip.py
@@ -248,7 +248,7 @@
fent = entry._fip_entry
entry.size = fent.size
entry.offset = fent.offset
- entry.image_pos = self.image_pos + entry.offset
+ entry.SetImagePos(image_pos + self.offset)
def ReadChildData(self, child, decomp=True, alt_format=None):
if not self.reader:
diff --git a/tools/binman/etype/cbfs.py b/tools/binman/etype/cbfs.py
index 575aa62..124fa1e 100644
--- a/tools/binman/etype/cbfs.py
+++ b/tools/binman/etype/cbfs.py
@@ -245,7 +245,7 @@
cfile = entry._cbfs_file
entry.size = cfile.data_len
entry.offset = cfile.calced_cbfs_offset
- entry.image_pos = self.image_pos + entry.offset
+ entry.SetImagePos(image_pos + self.offset)
if entry._cbfs_compress:
entry.uncomp_size = cfile.memlen