summaryrefslogtreecommitdiff
path: root/tools/binman/control.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2021-11-13 21:14:51 -0500
committerTom Rini <trini@konsulko.com>2021-11-13 21:14:51 -0500
commite035ce4b3ba116016385e8d93ef448c710810286 (patch)
tree89cf25fb1c1cb99e18ca3ab1da98d70b9da0554f /tools/binman/control.py
parentb8a156f54ecd1e9a74f48a09a0735b4a41c90eba (diff)
parent89cc0520d7962358ca85464836112217c5b8eca2 (diff)
Merge tag 'dm-pull-13nov21' of https://source.denx.de/u-boot/custodians/u-boot-dm
env tidy-ups test fixes binman fixes and ELF enhancements
Diffstat (limited to 'tools/binman/control.py')
-rw-r--r--tools/binman/control.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools/binman/control.py b/tools/binman/control.py
index 0dbcbc28e99..304fc70f56f 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -343,10 +343,10 @@ def ReplaceEntries(image_fname, input_fname, indir, entry_paths,
Args:
image_fname: Image filename to process
- input_fname: Single input ilename to use if replacing one file, None
+ input_fname: Single input filename to use if replacing one file, None
otherwise
indir: Input directory to use (for any number of files), else None
- entry_paths: List of entry paths to extract
+ entry_paths: List of entry paths to replace
do_compress: True if the input data is uncompressed and may need to be
compressed if the entry requires it, False if the data is already
compressed.
@@ -595,6 +595,13 @@ def Binman(args):
tools.FinaliseOutputDir()
return 0
+ elf_params = None
+ if args.update_fdt_in_elf:
+ elf_params = args.update_fdt_in_elf.split(',')
+ if len(elf_params) != 4:
+ raise ValueError('Invalid args %s to --update-fdt-in-elf: expected infile,outfile,begin_sym,end_sym' %
+ elf_params)
+
# Try to figure out which device tree contains our image description
if args.dt:
dtb_fname = args.dt
@@ -641,6 +648,10 @@ def Binman(args):
for dtb_item in state.GetAllFdts():
tools.WriteFile(dtb_item._fname, dtb_item.GetContents())
+ if elf_params:
+ data = state.GetFdtForEtype('u-boot-dtb').GetContents()
+ elf.UpdateFile(*elf_params, data)
+
if missing:
tout.Warning("\nSome images are invalid")