aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/state.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-20 12:23:56 -0600
committerSimon Glass <sjg@chromium.org>2019-07-29 09:38:06 -0600
commit51014aabc28e497eb98e0ba9c1fa0f19e871af1b (patch)
treebc48a7e5c0fdedc1a8e32b033cd9dc915b1fcb8d /tools/binman/state.py
parenteba1f0cc942947722f70029c033b915113cec1ba (diff)
downloadu-boot-51014aabc28e497eb98e0ba9c1fa0f19e871af1b.zip
u-boot-51014aabc28e497eb98e0ba9c1fa0f19e871af1b.tar.gz
u-boot-51014aabc28e497eb98e0ba9c1fa0f19e871af1b.tar.bz2
binman: Allow updating entries that change size
So far we don't allow entries to change size when repacking. But this is not very useful since it is common for entries to change size after an updated binary is built, etc. Add support for this, respecting the original offset/size/alignment constraints of the image layout. For this to work the original image must have been created with the 'allow-repack' property. This does not support entry types with sub-entries such as files and CBFS, but it does support sections. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/state.py')
-rw-r--r--tools/binman/state.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/binman/state.py b/tools/binman/state.py
index 2379e24..6553615 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -249,6 +249,7 @@ def GetUpdateNodes(node, for_repack=False):
if for_repack and entry.etype != 'u-boot-dtb':
continue
other_node = dtb.GetNode(fdt_path_prefix + node.path)
+ #print(' try', fdt_path_prefix + node.path, other_node)
if other_node:
yield other_node
@@ -300,7 +301,7 @@ def SetInt(node, prop, value, for_repack=False):
"""
for n in GetUpdateNodes(node, for_repack):
tout.Detail("File %s: Update node '%s' prop '%s' to %#x" %
- (node.GetFdt().name, node.path, prop, value))
+ (n.GetFdt().name, n.path, prop, value))
n.SetInt(prop, value)
def CheckAddHashProp(node):