diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-21 08:24:33 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-27 06:26:48 +0300 |
commit | 5ff9fedc9bc02e01d73d57e9c7d7eac9fd6320d4 (patch) | |
tree | 0fc99fe53f99d7f97011a990ddf452454ad7b15b /tools/binman/entry.py | |
parent | 631f752de5b8dccbf9a0d4824213e9e6e0d96167 (diff) | |
download | u-boot-5ff9fedc9bc02e01d73d57e9c7d7eac9fd6320d4.tar.xz |
binman: Support default alignment for sections
Sometimes it is useful to specify the default alignment for all entries
in a section, such as when word-alignment is necessary, for example. It
is tedious and error-prone to specify this individually for each section.
Add a property to control this for a section.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry.py')
-rw-r--r-- | tools/binman/entry.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/binman/entry.py b/tools/binman/entry.py index b7b9791b10..70222718ea 100644 --- a/tools/binman/entry.py +++ b/tools/binman/entry.py @@ -201,6 +201,8 @@ class Entry(object): if tools.NotPowerOfTwo(self.align): raise ValueError("Node '%s': Alignment %s must be a power of two" % (self._node.path, self.align)) + if self.section and self.align is None: + self.align = self.section.align_default self.pad_before = fdt_util.GetInt(self._node, 'pad-before', 0) self.pad_after = fdt_util.GetInt(self._node, 'pad-after', 0) self.align_size = fdt_util.GetInt(self._node, 'align-size') |