binman: Add an image name into the fdtmap

Since binman supports multiple images it is useful to know which one
created the image that has been read. Then it is possible to look up that
name in the 'master' device tree (containing the description of all
images).

Add a property for this.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2019-07-20 12:23:44 -06:00
parent 6ca0dcba5e
commit 1411ac8d16
2 changed files with 3 additions and 1 deletions

View file

@ -60,6 +60,7 @@ class Entry_fdtmap(Entry):
Example output for a simple image with U-Boot and an FDT map:
/ {
image-name = "binman";
size = <0x00000112>;
image-pos = <0x00000000>;
offset = <0x00000000>;
@ -110,6 +111,7 @@ class Entry_fdtmap(Entry):
fsw = libfdt.FdtSw()
fsw.finish_reservemap()
with fsw.add_node(''):
fsw.property_string('image-node', node.name)
_AddNode(node)
fdt = fsw.as_fdt()

View file

@ -2369,7 +2369,7 @@ class TestFunctional(unittest.TestCase):
' u-boot 138 4 u-boot 38',
' u-boot-dtb 180 10f u-boot-dtb 80 3c9',
' u-boot-dtb 500 %x u-boot-dtb 400 3c9' % fdt_size,
' fdtmap %x 395 fdtmap %x' %
' fdtmap %x 3b4 fdtmap %x' %
(fdtmap_offset, fdtmap_offset),
' image-header bf8 8 image-header bf8',
]