diff options
author | Ayan Kumar Halder | 2022-01-21 11:10:40 +0000 |
---|---|---|
committer | Stefano Stabellini | 2022-01-21 12:57:01 -0800 |
commit | 1393caa374db807b7ece3fef18c00a4bffb5fa57 (patch) | |
tree | 88380239981921028e85e6682d743f01a4e444ea /docker-extras/imagebuilder_run | |
parent | f3c2be56f0cbdf220eca94d6ca58b94392768f37 (diff) |
Added the lopper dts file to generate imagebuilder config from system-device-tree
Lopper parses the device tree for a "xen" label. It parses the sub nodes
to determine the DOM0_VCPUS, DOM0_MEM, NUM_DOMUS, DOMU_VCPUS[],
DOMU_MEM[] and DOMU_PASSTHROUGH_PATHS[]
As an example, consider the following snippet of system-device-tree
xen: domain@2 {
compatible = "openamp,domain-v1","openamp,hypervisor-v1";
cpus = <&cpus_a72 0x3 0x00000002>;
memory = <0x0 0x500000 0x0 0x7fb00000>;
dom0: domain@3 {
compatible = "openamp,domain-v1","xen,domain-v2";
cpus = <&cpus_a72 0x3 0x00000001>;
memory = <0x0 0x501000 0x0 0x3faff000>;
};
linux1: domain@4 {
compatible = "openamp,domain-v1","xen,domain-v2";
cpus = <&cpus_a72 0x3 0x00000001>;
memory = <0x0 0x501000 0x0 0x3faff000>;
access = <&mmc0 0x0>;
};
linux2: domain@5 {
compatible = "openamp,domain-v1","xen,domain-v2";
cpus = <&cpus_a72 0x3 0x00000001>;
memory = <0x0 0x40000000 0x0 0x40000000>;
firewallconfig = <&linux1 1 0>;
};
};
python3 _path_to_/lopper.py -f --enhanced -i path_to_/lop-xen.dts device-trees/system-device-tree-xen.dts > config
The contents of the 'config' will be as follows :-
NUM_DOMUS=2
DOM0_VCPUS = 2
DOM0_MEM = 1018
DOMU_VCPUS[0] = 2
DOMU_MEM[0] = 1018
DOMU_PASSTHROUGH_PATHS[0] = "/bus@f1000000/sdhci@f1050000"
DOMU_VCPUS[1] = 2
DOMU_MEM[1] = 1024
This is provided as the input configuration file for the imagebuilder.
Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
Signed-off-by: Ayan Kumar Halder <ayankuma@xilinx.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
[stefano: minor style and grammar fixes]
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
Diffstat (limited to 'docker-extras/imagebuilder_run')
0 files changed, 0 insertions, 0 deletions