diff options
author | Simon Glass <sjg@chromium.org> | 2018-06-01 09:38:11 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-06-07 11:25:07 -0800 |
commit | dd57c13bbc28df6f1bc849ec55d1703f4ca0398e (patch) | |
tree | 28401cbca4c07d4cde33fc1944a100c46378fd92 /tools/binman/etype | |
parent | 48ae412424ddfda64f45a9d679a960357e57433e (diff) |
binman: Allow unit addresses for binaries
Allow the same binary to appear multiple times in an image by using the
device-tree unit-address feature (u-boot@0, u-boot@1).
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/etype')
-rw-r--r-- | tools/binman/etype/entry.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/binman/etype/entry.py b/tools/binman/etype/entry.py index c331312c491..23e436a2e9d 100644 --- a/tools/binman/etype/entry.py +++ b/tools/binman/etype/entry.py @@ -72,7 +72,12 @@ class Entry(object): """ if not etype: etype = fdt_util.GetString(node, 'type', node.name) + + # Convert something like 'u-boot@0' to 'u_boot' since we are only + # interested in the type. module_name = etype.replace('-', '_') + if '@' in module_name: + module_name = module_name.split('@')[0] module = modules.get(module_name) # Import the module if we have not already done so. |