aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/state.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-01-06 21:35:18 -0700
committerSimon Glass <sjg@chromium.org>2021-01-30 14:25:41 -0700
commit6eb9932668fa6bd8c659484b2d18d8a73713208c (patch)
tree6c4b726aaceedc0f28c522457dc14438a86316e9 /tools/binman/state.py
parent5af9ebc4bcbcca91b21257c18cb94c78e7356980 (diff)
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>
Diffstat (limited to 'tools/binman/state.py')
-rw-r--r--tools/binman/state.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/binman/state.py b/tools/binman/state.py
index 36bc513535..bb3e36ea7a 100644
--- a/tools/binman/state.py
+++ b/tools/binman/state.py
@@ -314,6 +314,16 @@ def AddString(node, prop, value):
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