From 232aa4cf51234218c3bb9b01e2b874513677daa8 Mon Sep 17 00:00:00 2001 From: Michal Orzel Date: Tue, 13 Sep 2022 14:09:18 +0200 Subject: Add support for lopper to generate partial dts Currently ImageBuilder can compile and merge partial dts obtained from a repository specified using PASSTHROUGH_DTS_REPO. With the recent changes done in the lopper, we can use it to generate partial dts automatically (to some extent as this is still an early support). Introduce LOPPER_PATH option to specify a path to a lopper.py script, the main script in the Lopper repository, that if set, will invoke lopper to generate partial dts for the passthrough devices specified in DOMU_PASSTHROUGH_PATHS. Introduce LOPPER_CMD option to specify custom command line arguments (if needed) for lopper's extract assist. Example usage: LOPPER_PATH="/home/user/lopper/lopper.py" DOMU_PASSTHROUGH_PATHS[0]="/axi/spi@ff0f0000 /axi/serial@ff010000" Signed-off-by: Michal Orzel Reviewed-by: Stefano Stabellini --- README.md | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index da9ba78..f4213d5 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,20 @@ Where: - DT_OVERLAY[number] specifies the path to the hosts device tree overlays to be added at boot time in u-boot +- LOPPER_PATH specifies the path to lopper.py script, the main script in the + Lopper repository (https://github.com/devicetree-org/lopper). This is + optional. However, if this is specified, then DOMU_PASSTHROUGH_PATHS[number] + needs to be specified. uboot-script-gen will invoke lopper to generate the + partial device trees for devices which have been listed in + DOMU_PASSTHROUGH_PATHS[number]. This option is currently in experimental state + as the corresponding lopper changes are still in an early support state. + +- LOPPER_CMD specifies the command line arguments for lopper's extract assist. + This is optional and only applicable when LOPPER_PATH is specified. Only to be + used to specify which nodes to include (using -i ) and which + nodes/properties to exclude (using -x ). If not set at all, the default + one is used applicable for ZynqMP MPSoC boards. + - NUM_DOMUS specifies how many Dom0-less DomUs to load - DOMU_KERNEL[number] specifies the DomU kernel to use. @@ -140,7 +154,7 @@ Where: - DOMU_PASSTHROUGH_PATHS[number] specifies the passthrough devices ( separated by spaces). It adds "xen,passthrough" to the corresponding dtb nodes in xen device tree blob. - This option is valid in the following two cases: + This option is valid in the following cases: 1. When PASSTHROUGH_DTS_REPO is provided. With this option, the partial device trees (corresponding to the @@ -149,7 +163,12 @@ Where: Note it assumes that the names of the partial device trees will match to the names of the devices specified here. - 2. When DOMU_NOBOOT[number] is provided. In this case, it will only + 2. When LOPPER_PATH is provided. + With this option, the partial device trees (corresponding to the + passthrough devices) are generated by the lopper and then compiled and merged + by ImageBuilder to be used as DOMU[number] device tree blob. + + 3. When DOMU_NOBOOT[number] is provided. In this case, it will only add "xen,passthrough" as mentioned before. - DOMU_PASSTHROUGH_DTB[number] specifies the passthrough device trees -- cgit v1.2.3