binman: Support alignment of files
When packing files it is sometimes useful to align the start of each file,
e.g. if the flash driver can only access 32-bit-aligned data. Provides a
new property to support this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/state.py b/tools/binman/state.py
index 36bc513..bb3e36e 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -314,6 +314,16 @@
for n in GetUpdateNodes(node):
n.AddString(prop, value)
+def AddInt(node, prop, value):
+ """Add a new string property to affected device trees
+
+ Args:
+ prop_name: Name of property
+ val: Integer value of property
+ """
+ for n in GetUpdateNodes(node):
+ n.AddInt(prop, value)
+
def SetInt(node, prop, value, for_repack=False):
"""Update an integer property in affected device trees with an integer value