binman: Add support for align argument to mkimage tool
Add support to indicate what alignment to use for the FIT and its
external data. Pass the alignment to mkimage via the -B flag.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/btool/mkimage.py b/tools/binman/btool/mkimage.py
index da5f344..d5b407c 100644
--- a/tools/binman/btool/mkimage.py
+++ b/tools/binman/btool/mkimage.py
@@ -22,7 +22,7 @@
# pylint: disable=R0913
def run(self, reset_timestamp=False, output_fname=None, external=False,
- pad=None):
+ pad=None, align=None):
"""Run mkimage
Args:
@@ -33,6 +33,7 @@
pad: Bytes to use for padding the FIT devicetree output. This allows
other things to be easily added later, if required, such as
signatures
+ align: Bytes to use for alignment of the FIT and its external data
version: True to get the mkimage version
"""
args = []
@@ -40,6 +41,8 @@
args.append('-E')
if pad:
args += ['-p', f'{pad:x}']
+ if align:
+ args += ['-B', f'{align:x}']
if reset_timestamp:
args.append('-t')
if output_fname: