summaryrefslogtreecommitdiff
path: root/tools/binman/etype
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-04-25 21:58:39 -0600
committerBin Meng <bmeng.cn@gmail.com>2019-05-08 12:44:07 +0800
commit9481c80f55260fa2b2c37445fb2a30811b136ed3 (patch)
tree7ac1d0265c52f660145b4d628ff887fbd374a157 /tools/binman/etype
parent0b96f6ecbe8f68232adeb4340883aaeee5d63bd5 (diff)
binman: Allow sections to have an offset
At present sections are always placed automatically. Even if an 'offset' property is provided it is ignored. Update the logic to support an offset for sections. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'tools/binman/etype')
-rw-r--r--tools/binman/etype/section.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index 7f1b413604..3681a48468 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -67,7 +67,8 @@ class Entry_section(Entry):
def Pack(self, offset):
"""Pack all entries into the section"""
self._section.PackEntries()
- self._section.SetOffset(offset)
+ if self._section._offset is None:
+ self._section.SetOffset(offset)
self.size = self._section.GetSize()
return super(Entry_section, self).Pack(offset)