binman: Only write FDT once per node

Due to an extra level of indentation, the "data" property containing the
FDT was being written repeatedly after every other property in the node.
This caused the generated FIT image to be invalid.

Move the block up one level, so the property is added exactly once.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
This commit is contained in:
Samuel Holland 2020-10-21 21:12:09 -05:00 committed by Jagan Teki
parent 509978e5d2
commit b26536ad3d
1 changed files with 4 additions and 4 deletions

View File

@ -205,10 +205,10 @@ class Entry_fit(Entry):
b'SEQ', tools.ToBytes(str(seq + 1)))
fsw.property(pname, val)
# Add data for 'fdt' nodes (but not 'config')
if depth == 1 and in_images:
fsw.property('data',
tools.ReadFile(fname))
# Add data for 'fdt' nodes (but not 'config')
if depth == 1 and in_images:
fsw.property('data',
tools.ReadFile(fname))
else:
if self._fdts is None:
if self._fit_list_prop: