[PATCH V5 4/9] binman: introduce no-u-boot-any property
Peng Fan (OSS)
peng.fan at oss.nxp.com
Tue May 24 10:00:34 CEST 2022
From: Peng Fan <peng.fan at nxp.com>
By default when BINMAN_SYMBOLS is enabled, common/spl/spl.c has a code
piece `binman_sym_declare(ulong, u_boot_any, image_pos);` which requires
u-boot* node in device tree binman node section. But some
platforms(i.MX8M) not need it. To avoid build break with BINMAN_SYMBOLS,
introduce a no-u-boot-any property.
Signed-off-by: Peng Fan <peng.fan at nxp.com>
---
tools/binman/binman.rst | 6 ++++++
tools/binman/etype/section.py | 5 +++++
2 files changed, 11 insertions(+)
diff --git a/tools/binman/binman.rst b/tools/binman/binman.rst
index 935839c433e..9dab83b45c8 100644
--- a/tools/binman/binman.rst
+++ b/tools/binman/binman.rst
@@ -502,6 +502,12 @@ no-expanded:
`no-expanded` property disables this just for a single entry. Put the
`no-expanded` boolean property in the node to select this behaviour.
+no-u-boot-any:
+ By default when BINMAN_SYMBOLS are enabled,
+ `binman_sym_declare(ulong, u_boot_any, image_pos);` requires a u-boot node
+ in binman section. Some platforms not need it with the help of this flag
+ set.
+
The attributes supported for images and sections are described below. Several
are similar to those for entries.
diff --git a/tools/binman/etype/section.py b/tools/binman/etype/section.py
index e3f362b442b..a09c539a12b 100644
--- a/tools/binman/etype/section.py
+++ b/tools/binman/etype/section.py
@@ -164,6 +164,7 @@ class Entry_section(Entry):
self._skip_at_start = None
self._end_4gb = False
self._ignore_missing = False
+ self._no_uboot_any = False
def ReadNode(self):
"""Read properties from the section node"""
@@ -172,6 +173,7 @@ class Entry_section(Entry):
self._sort = fdt_util.GetBool(self._node, 'sort-by-offset')
self._end_4gb = fdt_util.GetBool(self._node, 'end-at-4gb')
self._skip_at_start = fdt_util.GetInt(self._node, 'skip-at-start')
+ self._no_uboot_any = fdt_util.GetBool(self._node, 'no-u-boot-any')
if self._end_4gb:
if not self.size:
self.Raise("Section size must be provided when using end-at-4gb")
@@ -565,9 +567,12 @@ class Entry_section(Entry):
rest = name[len(root):]
if rest in ['', '-img', '-nodtb']:
entry = entries[name]
+
if not entry:
err = ("%s: Entry '%s' not found in list (%s)" %
(msg, entry_name, ','.join(entries.keys())))
+ if entry_name == 'u-boot-any' and self._no_uboot_any:
+ return None
if optional:
print('Warning: %s' % err, file=sys.stderr)
return None
--
2.36.0
More information about the U-Boot
mailing list