Makefile: Add support for device tree compilation

Add rules to compile dts files into dtb files using the device tree
compiler (dtc). A platform can specify the DTS file to compile using
the platform-dtb-y variable. The flattened device tree binary file to be
used for building the final polatform firmware can be specified using
the new FW_PAYLOAD_FDT firmware configuration option to point to the
automatically compiled FDT file. Using the existing FW_PAYLOAD_FDT_PATH
configuration option is still possible and will take precedence over
the FW_PAYLOAD_FDT definition.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
This commit is contained in:
Damien Le Moal
2019-01-18 15:49:37 +09:00
committed by Anup Patel
parent f4373731e3
commit 0df8269477
4 changed files with 25 additions and 0 deletions

View File

@@ -57,6 +57,14 @@ device tree file is specified by the platform (c.f. *FW_PAYLOAD_FDT*),
then the firmware will expect the FDT to be passed as an argument by
the prior booting stage.
* **FW_PAYLOAD_FDT** - Path to an internal flattened device tree
binary file defined by the platform code. The file name must match the
DTB file name specified in the platform *objects.mk* file with the
*platform-dtb-y* entry. This option results in *FW_PAYLOAD_FDT_PATH* to
be automatically set. Specifying *FW_PAYLOAD_FDT_PATH* on the `make`
command line disables *FW_PAYLOAD_FDT* and the command line specified
device tree binary file is used for building the final firmware.
* **FW_PAYLOAD_FDT_ADDR** - Address where the FDT passed by the prior
booting stage or specified by the *FW_PAYLOAD_FDT_PATH* parameter and
embedded in the *.text* section will be placed before executing the