summaryrefslogtreecommitdiff
path: root/tools/binman/entry.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 23:25:46 +0300
committerSimon Glass <sjg@chromium.org>2019-07-24 22:54:08 +0300
commitffded7527ad5272249ae728a88585373182cc7f4 (patch)
tree04140bde0535c6d018dff213975ff032cf0b15df /tools/binman/entry.py
parent2d26003df79839d7f6b5e30eaa49e191dc9e6c87 (diff)
downloadu-boot-ffded7527ad5272249ae728a88585373182cc7f4.tar.xz
binman: Support reading an image into an Image object
It is possible to read an Image, locate its FDT map and then read it into the binman data structures. This allows full access to the entries that were written to the image. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r--tools/binman/entry.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py
index ee63d18353..6c74f2a217 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -162,6 +162,11 @@ class Entry(object):
self.orig_offset = self.offset
self.orig_size = self.size
+ # These should not be set in input files, but are set in an FDT map,
+ # which is also read by this code.
+ self.image_pos = fdt_util.GetInt(self._node, 'image-pos')
+ self.uncomp_size = fdt_util.GetInt(self._node, 'uncomp-size')
+
self.align = fdt_util.GetInt(self._node, 'align')
if tools.NotPowerOfTwo(self.align):
raise ValueError("Node '%s': Alignment %s must be a power of two" %