diff options
author | Simon Glass | 2020-09-01 05:13:59 -0600 |
---|---|---|
committer | Simon Glass | 2020-09-22 12:50:43 -0600 |
commit | 6cf9953bfb9d849b4f617e54570a6fe0e5b824a9 (patch) | |
tree | 197ae1de78cea60105adbdd5fe4e942385952f70 /tools/binman/README.entries | |
parent | dc2f81a2c89468371cf404816ed57481718deb7f (diff) |
binman: Support generating FITs with multiple dtbs
In some cases it is useful to generate a FIT which has a number of DTB
images, selectable by configuration. Add support for this in binman,
using a simple iterator and string substitution.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/README.entries')
-rw-r--r-- | tools/binman/README.entries | 48 |
1 files changed, 47 insertions, 1 deletions
diff --git a/tools/binman/README.entries b/tools/binman/README.entries index 8999d5eb387..d2628dffd5d 100644 --- a/tools/binman/README.entries +++ b/tools/binman/README.entries @@ -339,6 +339,7 @@ For example, this creates an image containing a FIT with U-Boot SPL: binman { fit { description = "Test FIT"; + fit,fdt-list = "of-list"; images { kernel@1 { @@ -357,7 +358,52 @@ For example, this creates an image containing a FIT with U-Boot SPL: }; }; -Properties: +U-Boot supports creating fdt and config nodes automatically. To do this, +pass an of-list property (e.g. -a of-list=file1 file2). This tells binman +that you want to generates nodes for two files: file1.dtb and file2.dtb +The fit,fdt-list property (see above) indicates that of-list should be used. +If the property is missing you will get an error. + +Then add a 'generator node', a node with a name starting with '@': + + images { + @fdt-SEQ { + description = "fdt-NAME"; + type = "flat_dt"; + compression = "none"; + }; + }; + +This tells binman to create nodes fdt-1 and fdt-2 for each of your two +files. All the properties you specify will be included in the node. This +node acts like a template to generate the nodes. The generator node itself +does not appear in the output - it is replaced with what binman generates. + +You can create config nodes in a similar way: + + configurations { + default = "@config-DEFAULT-SEQ"; + @config-SEQ { + description = "NAME"; + firmware = "uboot"; + loadables = "atf"; + fdt = "fdt-SEQ"; + }; + }; + +This tells binman to create nodes config-1 and config-2, i.e. a config for +each of your two files. + +Available substitutions for '@' nodes are: + + SEQ Sequence number of the generated fdt (1, 2, ...) + NAME Name of the dtb as provided (i.e. without adding '.dtb') + +Note that if no devicetree files are provided (with '-a of-list' as above) +then no nodes will be generated. + + +Properties (in the 'fit' node itself): fit,external-offset: Indicates that the contents of the FIT are external and provides the external offset. This is passsed to mkimage via the -E and -p flags. |