SlideShare a Scribd company logo
1 of 19
Download to read offline
1 |
Lopper
Bruce Ashfield & Stefano Stabellini
ELC NA 2022
2 |
System Device Tree & Heterogeneous computing
• Heterogeneous System with multiple HW components
• A72s,R5s,PMC, MicroBlaze clusters
• Multiple Execution Domains with its own address map
• Each domain with its own operating system
• Multiple execution levels (EL)
• Multiple Security Environments
• E.g.: U-Boot, TF-A, Xen, Linux, OPTEE,Zephyr, baremetal
• The system is divided into domains
• Each domain is an independentoperating environment with
CPUs, memory,and devices allocated to it
• System Device Tree: extending DT to describe the full system
• Including multiple heterogeneous CPU clusters
• Including multiple domains
Secure State
Trusted Firmware (TF)
App App
Trusted Execution
Environment(TEE)
Non-secure State
Hypervisor
App App
Linux
App
RTOS
FPGA
MicroBlaze
App App
RTOS
MicroBlaze
App
Bare Metal
A72
Core 0
A72
Core 1
RPU
R5 Core 0
App App
RTOS
R5 Core 1
App
Bare Metal
Container
App
EL0
EL1
EL2
EL3
App App
Platform ManagementController (PMC)
PLM
Devices
Memory
3 |
System Device Tree
• Device Tree expresses HW information relevant to an operating environment
• Used by U-Boot, Linux, Xen, TF-A and others
• System Device Tree is an extension to Device Tree to describe the full system
• It describes multiple CPU clusters with different address maps
• Both A72s and R5s
• It describes multiple domains and the resources allocated to each
• A domain could be:
• an heterogenous computing unit, e.g. Zephyr on R5s
• an operating environment at a specific execution level, e.g. OPTEE
• a virtual machine, e.g. a Xen domain
4 |
Lopper: an introduction
• Lopper
• Is a framework for manipulating System Device Trees and transforming information
• Original goal / concept was to produce standard devices trees to support existing platforms/OSs
• Produces any number of outputs: device trees, generated code, custom, etc
• Flexible development / runtime workflow integration
• Data driven
• A few details:
• OpenSource, BSD-3 License
• https://github.com/devicetree-org/lopper, https://pypi.org/project/lopper/
• Written in python, using pluggable backends (libfdt,dtlib) for device tree manipulations
• Additional logic components in the future
• Works with dts, dtb and yaml inputs
• Supports unit operations (lops) and more complex python assist modules
• Depending on the task, both can be used
• Flexible output / input is provided via python assists
• Performs validation and consistency checking
5 |
Lopper: a framework
• Common base for tooling inquiring or manipulating device trees​
• Built-in:
• Core tree manipulation, merging
• Input and output: dts / dtb / yaml
• Parsing: libfdt or dtlib
• Assist / lop management
• Device tree sanity and consistency checking
• Tree manipulation library / routines
6 |
Lopper: a framework
• Optional / plugin:
• Assists provide Logic / semantics / context awareness
• Front ends
• domains / protection, yaml expansion
• Backends / Assists
• System Device tree pruning
• RTOS/Bare Metal backend creates #defines into #include files (early availability)
• OpenAMP plugin that generates device specific DT for shared pages/IRQs
• Security / partitioning backend for subsystem and firewall information (TBD)
• Default Domain specification plugin creates a YAML file that can later be edited (under development)
• Verification assist that compares DTs from different domains to make sure they are compatible (TBD)
• Sub device tree / overlay extraction
• Detailed tree analysis / modification
• Source validation and expansion
• ReST API: an HTTP server to support GUIs and other tooling
7 |
Lopper: components
Lopper Core
YAML
dts
other
YAML
dts
dtb
other
ruamel
or
pyyaml
libfdt
or
dtlib
Lopper
Lopper:
Tree,
Fdt/Dt,Sdt
..
importer
yaml / xlate
Device /
domain
lops
exporter
ruamel
or
pyyaml
libfdt
or
dtlib
custom custom
lops
inputs outputs
Front ends Back ends
assists
Linux
RTOS
Bare Metal
devicetree.org
• bindings
• schemas
• ….
• Systemdevicetree
• Boarddts
• overlays
• ‘Standard’device tree
• C-devicedrivers
• Configuration
• ….
dtc cpp
8 |
Xen Partial Device Trees
• Similar to device tree overlays but older
• Everything under the top-level passthrough
node is copied to the guest device tree
• Xen reads partial device trees today to:
• configure guest device assignment
• describe passthrough hardware to the guest
• Starting from a copy of the host device tree
node and editing it
• Removing unwanted properties
• Adding Xen specific properties
passthrough {
compatible = "simple-bus";
ranges;
#address-cells = <0x2>;
#size-cells = <0x2>;
timer@ff110000 {
compatible = "cdns,ttc";
status = "okay";
interrupt-parent = <0xfde8>;
interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>;
reg = <0x0 0xff110000 0x0 0x1000>;
timer-width = <0x20>;
xen,force-assign-without-iommu = <1>;
xen,reg = <0x0 0xff110000 0x0 0x1000 0x0 0xff110000>;
xen,path = "/axi/timer@ff110000";
};
};
9 |
Xen Partial Device Trees
• Xen specific properties and quirks:
• xen,reg to specify memory mappings
• xen,path points to the corresponding host device tree node (used for IOMMU configurations)
• xen,force-assign-without-iommu when IOMMU configuration is not necessary
• interrupt-parents = <0xfde8> to point to the virtual interrupt controller of the guest
• no iommus, because the IOMMU is used by Xen and not exposed to the guest
• xen,passthrough; in the corresponding host device tree node to mark it for assignment
timer@ff110000 {
compatible = "cdns,ttc";
status = "okay";
interrupt-parent = <0xfde8>;
interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>;
reg = <0x0 0xff110000 0x0 0x1000>;
timer-width = <0x20>;
xen,force-assign-without-iommu = <1>;
xen,reg = <0x0 0xff110000 0x0 0x1000 0x0 0xff110000>;
xen,path = "/axi/timer@ff110000";
};
10 |
Xen Partial Device Trees: the problems
• Xen specific changes are not simple, but they could be automated more easily
• Xen properties aside, how to generate the partial device tree?
• Which properties to remove compared to the host device tree node?
• How to solve clock dependencies? Do we need to include the clock controller too?
• What about power domains and reset lines?
• Generic problem: affects device assignment on any hypervisor and heterogeneous domains too
11 |
Xen Partial Device Trees: a more complex example
zynqmp-firmware {
compatible = "xlnx,zynqmp-firmware", "xlnx,zynqmp";
method = "smc";
#power-domain-cells = <0x1>;
phandle = <0x1>;
clock-controller {
u-boot,dm-pre-reloc;
#clock-cells = <0x1>;
compatible = "xlnx,zynqmp-clk";
clocks = <0x6 0x7 0x8 0x9 0xa>;
clock-names = "pss_ref_clk", "video_clk",
"pss_alt_ref_clk",
"aux_ref_clk", "gt_crx_ref_clk";
phandle = <0x3>;
};
};
pss_ref_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
clock-frequency = <0x1fc9350>;
phandle = <0x6>;
};
video_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
clock-frequency = <0x1fc9f08>;
phandle = <0x7>;
};
pss_alt_ref_clk {
compatible = "fixed-clock";
#clock-cells = <0x0>;
clock-frequency = <0x0>;
phandle = <0x8>;
};
[…]
mmc@ff170000 {
compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a";
status = "okay";
interrupt-parent = <0xfde8>;
interrupts = <0x0 0x31 0x4>;
reg = <0x0 0xff170000 0x0 0x1000>;
xlnx,device_id = <0x1>;
clock-names = "clk_xin", "clk_ahb";
#clock-cells = <0x1>;
clock-output-names = "clk_out_sd1", "clk_in_sd1";
clocks = <0x3 0x37 0x3 0x1f>;
phandle = <0x37>;
xen,reg = <0x0 0xff170000 0x0 0x1000 0x0 0xff170000>;
xen,path = "/axi/mmc@ff170000";
};
12 |
The Solution with Lopper
• Leverage core Lopper functionality + assists
• Read the device tree -> LopperTree
• Analyze the devices
• Manipulate the tree
• Output dts/dtbs for passthrough devices
• Trigger image generation (optional)
• Requirements:
• No hardcoded Xen knowledge
• Inputs + devicetree properties as triggers
• Split functionality into generic / resuable components
• Use Lopper Library routines where possible
• Data driven + command line options for flexibility
• Works for any device that can be passed through
13 |
Implementation
• A pipeline of assists to extract device tree nodes and their dependencies
• extract: Generates a partial / extracted device tree starting from a target node
• extract-xen: Converts generic extracted tree to a Xen understood format
• Imagebuilder: Takes extracted dtbs and generates boot artifacts
extract
board
devicetree
Lopper
extract-xen
imagebuilder
14 |
Implementation: Assists
Usage: extract-xen -t <target node> [OPTION]
-t target node (full path)
-p permissive matching on target node (regex)
-v enable verbose debug/processing
-o output file for extracted device tree
Usage: extract -t <target node> [OPTION]
-t target node (full path)
-i include node if found in extracted node paths
-p permissive matching on target node (regex)
-v enable verbose debug/processing
-x exclude nodes or properties matching regex
-o output file for extracted device tree
Usage: image-builder [--uboot] -o <output dir> --imagebuilder <path to imagebuilder>
wrapper around imagebuilder (https://gitlab.com/xen-project/imagebuilder)
--uboot execute imagebuilder's "uboot-script-gen", with the
options: -t tftp -c ./config, and the supplied output directory
-i path to imagebuilder clone
-v enable verbose debug/processing
-o output directory for files
Demo
16 |
Lopper and Yocto
• Recipe is part of the meta-virtualization layer
• Current use cases:
• Configuration generation from device tree
• Modification of qemu device trees for Xen boot support
• See: qemuboot-xen-dtb.bbclass
• Future:
• Map devices to kernel configuration
• Boot artifacts generation
• …
17 |
Future Work
• Runtime dynamic device tree extraction -> overlay
• Containers
• Partitioning
• Validation and smart comparisions
• Common library / routines:
• Code / driver generation
• Device analysis and export
• Replace scripts / custom tools and solutions
• Generic image configuration and generation wrapper
• Improved schema integration
• Extend Yocto Project integration
Questions?
System Device Tree and Lopper: Concrete Examples - ELC NA 2022

More Related Content

What's hot

Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectYen-Chin Lee
 
Anatomy of the loadable kernel module (lkm)
Anatomy of the loadable kernel module (lkm)Anatomy of the loadable kernel module (lkm)
Anatomy of the loadable kernel module (lkm)Adrian Huang
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxThe Linux Foundation
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)Linaro
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedBrendan Gregg
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdfAdrian Huang
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Linaro
 
Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protectionsShubham Dubey
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation Jiann-Fuh Liaw
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)shimosawa
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisBuland Singh
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernelAdrian Huang
 
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsXen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsStefano Stabellini
 
20221021_JP5.0.2-Webinar-JP_Final.pdf
20221021_JP5.0.2-Webinar-JP_Final.pdf20221021_JP5.0.2-Webinar-JP_Final.pdf
20221021_JP5.0.2-Webinar-JP_Final.pdfNVIDIA Japan
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux InstrumentationDarkStarSword
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelDivye Kapoor
 
Memory management in Linux kernel
Memory management in Linux kernelMemory management in Linux kernel
Memory management in Linux kernelVadim Nikitin
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototypingYan Vugenfirer
 

What's hot (20)

Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Anatomy of the loadable kernel module (lkm)
Anatomy of the loadable kernel module (lkm)Anatomy of the loadable kernel module (lkm)
Anatomy of the loadable kernel module (lkm)
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training
 
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)SFO15-TR9: PSCI, ACPI (and UEFI to boot)
SFO15-TR9: PSCI, ACPI (and UEFI to boot)
 
Systems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting StartedSystems@Scale 2021 BPF Performance Getting Started
Systems@Scale 2021 BPF Performance Getting Started
 
Physical Memory Models.pdf
Physical Memory Models.pdfPhysical Memory Models.pdf
Physical Memory Models.pdf
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
Summary of linux kernel security protections
Summary of linux kernel security protectionsSummary of linux kernel security protections
Summary of linux kernel security protections
 
QEMU - Binary Translation
QEMU - Binary Translation QEMU - Binary Translation
QEMU - Binary Translation
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)
 
Kernel_Crash_Dump_Analysis
Kernel_Crash_Dump_AnalysisKernel_Crash_Dump_Analysis
Kernel_Crash_Dump_Analysis
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
 
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systemsXen on ARM for embedded and IoT: from secure containers to dom0less systems
Xen on ARM for embedded and IoT: from secure containers to dom0less systems
 
20221021_JP5.0.2-Webinar-JP_Final.pdf
20221021_JP5.0.2-Webinar-JP_Final.pdf20221021_JP5.0.2-Webinar-JP_Final.pdf
20221021_JP5.0.2-Webinar-JP_Final.pdf
 
Linux Instrumentation
Linux InstrumentationLinux Instrumentation
Linux Instrumentation
 
Xen Debugging
Xen DebuggingXen Debugging
Xen Debugging
 
The TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux KernelThe TCP/IP Stack in the Linux Kernel
The TCP/IP Stack in the Linux Kernel
 
Memory management in Linux kernel
Memory management in Linux kernelMemory management in Linux kernel
Memory management in Linux kernel
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 

Similar to System Device Tree and Lopper: Concrete Examples - ELC NA 2022

Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1Susant Sahani
 
Considerations when implementing_ha_in_dmf
Considerations when implementing_ha_in_dmfConsiderations when implementing_ha_in_dmf
Considerations when implementing_ha_in_dmfhik_lhz
 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018The Linux Foundation
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) 동현 김
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-reviewabinaya m
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)Gustavo Rene Antunez
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudBrendan Gregg
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at ScaleAntony Messerl
 
How to Build a Compute Cluster
How to Build a Compute ClusterHow to Build a Compute Cluster
How to Build a Compute ClusterRamsay Key
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetesTed Jung
 
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Puppet
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device DriverGary Yeh
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinciAkash Sahoo
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESJan Kalcic
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Continuent
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveAlison Chaiken
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Neeraj Shrimali
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin敬倫 林
 

Similar to System Device Tree and Lopper: Concrete Examples - ELC NA 2022 (20)

Summit demystifying systemd1
Summit demystifying systemd1Summit demystifying systemd1
Summit demystifying systemd1
 
Considerations when implementing_ha_in_dmf
Considerations when implementing_ha_in_dmfConsiderations when implementing_ha_in_dmf
Considerations when implementing_ha_in_dmf
 
Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018Platform Security Summit 18: Xen Security Weather Report 2018
Platform Security Summit 18: Xen Security Weather Report 2018
 
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community) [발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
[발표자료] 오픈소스 Pacemaker 활용한 zabbix 이중화 방안(w/ Zabbix Korea Community)
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)My First 100 days with an Exadata (PPT)
My First 100 days with an Exadata (PPT)
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
Performance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloudPerformance Analysis: new tools and concepts from the cloud
Performance Analysis: new tools and concepts from the cloud
 
#WeSpeakLinux Session
#WeSpeakLinux Session#WeSpeakLinux Session
#WeSpeakLinux Session
 
Stateless Hypervisors at Scale
Stateless Hypervisors at ScaleStateless Hypervisors at Scale
Stateless Hypervisors at Scale
 
How to Build a Compute Cluster
How to Build a Compute ClusterHow to Build a Compute Cluster
How to Build a Compute Cluster
 
Container & kubernetes
Container & kubernetesContainer & kubernetes
Container & kubernetes
 
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
Exploring the Final Frontier of Data Center Orchestration: Network Elements -...
 
Linux Char Device Driver
Linux Char Device DriverLinux Char Device Driver
Linux Char Device Driver
 
Add sale davinci
Add sale davinciAdd sale davinci
Add sale davinci
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
 
Systemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to loveSystemd: the modern Linux init system you will learn to love
Systemd: the modern Linux init system you will learn to love
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
 
Week1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC BeginWeek1 Electronic System-level ESL Design and SystemC Begin
Week1 Electronic System-level ESL Design and SystemC Begin
 

More from Stefano Stabellini

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorStefano Stabellini
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedStefano Stabellini
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeStefano Stabellini
 
System Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperSystem Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperStefano Stabellini
 
Cache coloring Xen Summit 2020
Cache coloring Xen Summit 2020Cache coloring Xen Summit 2020
Cache coloring Xen Summit 2020Stefano Stabellini
 
Xen Cache Coloring: Interference-Free Real-Time System
Xen Cache Coloring: Interference-Free Real-Time SystemXen Cache Coloring: Interference-Free Real-Time System
Xen Cache Coloring: Interference-Free Real-Time SystemStefano Stabellini
 
Dom0less - Xen Developer Summit 2019
Dom0less  - Xen Developer Summit 2019Dom0less  - Xen Developer Summit 2019
Dom0less - Xen Developer Summit 2019Stefano Stabellini
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Stefano Stabellini
 

More from Stefano Stabellini (14)

Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
 
ELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for EmbeddedELC21: VM-to-VM Communication Mechanisms for Embedded
ELC21: VM-to-VM Communication Mechanisms for Embedded
 
RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
RunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edgeRunX: deploy real-time OSes as containers at the edge
RunX: deploy real-time OSes as containers at the edge
 
System Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and LopperSystem Device Tree update: Bus Firewalls and Lopper
System Device Tree update: Bus Firewalls and Lopper
 
Cache coloring Xen Summit 2020
Cache coloring Xen Summit 2020Cache coloring Xen Summit 2020
Cache coloring Xen Summit 2020
 
Xen Cache Coloring: Interference-Free Real-Time System
Xen Cache Coloring: Interference-Free Real-Time SystemXen Cache Coloring: Interference-Free Real-Time System
Xen Cache Coloring: Interference-Free Real-Time System
 
Dom0less - Xen Developer Summit 2019
Dom0less  - Xen Developer Summit 2019Dom0less  - Xen Developer Summit 2019
Dom0less - Xen Developer Summit 2019
 
Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)Xen and the art of embedded virtualization (ELC 2017)
Xen and the art of embedded virtualization (ELC 2017)
 
Xen Project for ARM Servers
Xen Project for ARM ServersXen Project for ARM Servers
Xen Project for ARM Servers
 
Xen and OpenStack
Xen and OpenStackXen and OpenStack
Xen and OpenStack
 
XDS15: Project Raisin
XDS15: Project RaisinXDS15: Project Raisin
XDS15: Project Raisin
 
OpenStack and Xen
OpenStack and XenOpenStack and Xen
OpenStack and Xen
 

Recently uploaded

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

System Device Tree and Lopper: Concrete Examples - ELC NA 2022

  • 1. 1 | Lopper Bruce Ashfield & Stefano Stabellini ELC NA 2022
  • 2. 2 | System Device Tree & Heterogeneous computing • Heterogeneous System with multiple HW components • A72s,R5s,PMC, MicroBlaze clusters • Multiple Execution Domains with its own address map • Each domain with its own operating system • Multiple execution levels (EL) • Multiple Security Environments • E.g.: U-Boot, TF-A, Xen, Linux, OPTEE,Zephyr, baremetal • The system is divided into domains • Each domain is an independentoperating environment with CPUs, memory,and devices allocated to it • System Device Tree: extending DT to describe the full system • Including multiple heterogeneous CPU clusters • Including multiple domains Secure State Trusted Firmware (TF) App App Trusted Execution Environment(TEE) Non-secure State Hypervisor App App Linux App RTOS FPGA MicroBlaze App App RTOS MicroBlaze App Bare Metal A72 Core 0 A72 Core 1 RPU R5 Core 0 App App RTOS R5 Core 1 App Bare Metal Container App EL0 EL1 EL2 EL3 App App Platform ManagementController (PMC) PLM Devices Memory
  • 3. 3 | System Device Tree • Device Tree expresses HW information relevant to an operating environment • Used by U-Boot, Linux, Xen, TF-A and others • System Device Tree is an extension to Device Tree to describe the full system • It describes multiple CPU clusters with different address maps • Both A72s and R5s • It describes multiple domains and the resources allocated to each • A domain could be: • an heterogenous computing unit, e.g. Zephyr on R5s • an operating environment at a specific execution level, e.g. OPTEE • a virtual machine, e.g. a Xen domain
  • 4. 4 | Lopper: an introduction • Lopper • Is a framework for manipulating System Device Trees and transforming information • Original goal / concept was to produce standard devices trees to support existing platforms/OSs • Produces any number of outputs: device trees, generated code, custom, etc • Flexible development / runtime workflow integration • Data driven • A few details: • OpenSource, BSD-3 License • https://github.com/devicetree-org/lopper, https://pypi.org/project/lopper/ • Written in python, using pluggable backends (libfdt,dtlib) for device tree manipulations • Additional logic components in the future • Works with dts, dtb and yaml inputs • Supports unit operations (lops) and more complex python assist modules • Depending on the task, both can be used • Flexible output / input is provided via python assists • Performs validation and consistency checking
  • 5. 5 | Lopper: a framework • Common base for tooling inquiring or manipulating device trees​ • Built-in: • Core tree manipulation, merging • Input and output: dts / dtb / yaml • Parsing: libfdt or dtlib • Assist / lop management • Device tree sanity and consistency checking • Tree manipulation library / routines
  • 6. 6 | Lopper: a framework • Optional / plugin: • Assists provide Logic / semantics / context awareness • Front ends • domains / protection, yaml expansion • Backends / Assists • System Device tree pruning • RTOS/Bare Metal backend creates #defines into #include files (early availability) • OpenAMP plugin that generates device specific DT for shared pages/IRQs • Security / partitioning backend for subsystem and firewall information (TBD) • Default Domain specification plugin creates a YAML file that can later be edited (under development) • Verification assist that compares DTs from different domains to make sure they are compatible (TBD) • Sub device tree / overlay extraction • Detailed tree analysis / modification • Source validation and expansion • ReST API: an HTTP server to support GUIs and other tooling
  • 7. 7 | Lopper: components Lopper Core YAML dts other YAML dts dtb other ruamel or pyyaml libfdt or dtlib Lopper Lopper: Tree, Fdt/Dt,Sdt .. importer yaml / xlate Device / domain lops exporter ruamel or pyyaml libfdt or dtlib custom custom lops inputs outputs Front ends Back ends assists Linux RTOS Bare Metal devicetree.org • bindings • schemas • …. • Systemdevicetree • Boarddts • overlays • ‘Standard’device tree • C-devicedrivers • Configuration • …. dtc cpp
  • 8. 8 | Xen Partial Device Trees • Similar to device tree overlays but older • Everything under the top-level passthrough node is copied to the guest device tree • Xen reads partial device trees today to: • configure guest device assignment • describe passthrough hardware to the guest • Starting from a copy of the host device tree node and editing it • Removing unwanted properties • Adding Xen specific properties passthrough { compatible = "simple-bus"; ranges; #address-cells = <0x2>; #size-cells = <0x2>; timer@ff110000 { compatible = "cdns,ttc"; status = "okay"; interrupt-parent = <0xfde8>; interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; reg = <0x0 0xff110000 0x0 0x1000>; timer-width = <0x20>; xen,force-assign-without-iommu = <1>; xen,reg = <0x0 0xff110000 0x0 0x1000 0x0 0xff110000>; xen,path = "/axi/timer@ff110000"; }; };
  • 9. 9 | Xen Partial Device Trees • Xen specific properties and quirks: • xen,reg to specify memory mappings • xen,path points to the corresponding host device tree node (used for IOMMU configurations) • xen,force-assign-without-iommu when IOMMU configuration is not necessary • interrupt-parents = <0xfde8> to point to the virtual interrupt controller of the guest • no iommus, because the IOMMU is used by Xen and not exposed to the guest • xen,passthrough; in the corresponding host device tree node to mark it for assignment timer@ff110000 { compatible = "cdns,ttc"; status = "okay"; interrupt-parent = <0xfde8>; interrupts = <0x0 0x24 0x4 0x0 0x25 0x4 0x0 0x26 0x4>; reg = <0x0 0xff110000 0x0 0x1000>; timer-width = <0x20>; xen,force-assign-without-iommu = <1>; xen,reg = <0x0 0xff110000 0x0 0x1000 0x0 0xff110000>; xen,path = "/axi/timer@ff110000"; };
  • 10. 10 | Xen Partial Device Trees: the problems • Xen specific changes are not simple, but they could be automated more easily • Xen properties aside, how to generate the partial device tree? • Which properties to remove compared to the host device tree node? • How to solve clock dependencies? Do we need to include the clock controller too? • What about power domains and reset lines? • Generic problem: affects device assignment on any hypervisor and heterogeneous domains too
  • 11. 11 | Xen Partial Device Trees: a more complex example zynqmp-firmware { compatible = "xlnx,zynqmp-firmware", "xlnx,zynqmp"; method = "smc"; #power-domain-cells = <0x1>; phandle = <0x1>; clock-controller { u-boot,dm-pre-reloc; #clock-cells = <0x1>; compatible = "xlnx,zynqmp-clk"; clocks = <0x6 0x7 0x8 0x9 0xa>; clock-names = "pss_ref_clk", "video_clk", "pss_alt_ref_clk", "aux_ref_clk", "gt_crx_ref_clk"; phandle = <0x3>; }; }; pss_ref_clk { compatible = "fixed-clock"; #clock-cells = <0x0>; clock-frequency = <0x1fc9350>; phandle = <0x6>; }; video_clk { compatible = "fixed-clock"; #clock-cells = <0x0>; clock-frequency = <0x1fc9f08>; phandle = <0x7>; }; pss_alt_ref_clk { compatible = "fixed-clock"; #clock-cells = <0x0>; clock-frequency = <0x0>; phandle = <0x8>; }; […] mmc@ff170000 { compatible = "xlnx,zynqmp-8.9a", "arasan,sdhci-8.9a"; status = "okay"; interrupt-parent = <0xfde8>; interrupts = <0x0 0x31 0x4>; reg = <0x0 0xff170000 0x0 0x1000>; xlnx,device_id = <0x1>; clock-names = "clk_xin", "clk_ahb"; #clock-cells = <0x1>; clock-output-names = "clk_out_sd1", "clk_in_sd1"; clocks = <0x3 0x37 0x3 0x1f>; phandle = <0x37>; xen,reg = <0x0 0xff170000 0x0 0x1000 0x0 0xff170000>; xen,path = "/axi/mmc@ff170000"; };
  • 12. 12 | The Solution with Lopper • Leverage core Lopper functionality + assists • Read the device tree -> LopperTree • Analyze the devices • Manipulate the tree • Output dts/dtbs for passthrough devices • Trigger image generation (optional) • Requirements: • No hardcoded Xen knowledge • Inputs + devicetree properties as triggers • Split functionality into generic / resuable components • Use Lopper Library routines where possible • Data driven + command line options for flexibility • Works for any device that can be passed through
  • 13. 13 | Implementation • A pipeline of assists to extract device tree nodes and their dependencies • extract: Generates a partial / extracted device tree starting from a target node • extract-xen: Converts generic extracted tree to a Xen understood format • Imagebuilder: Takes extracted dtbs and generates boot artifacts extract board devicetree Lopper extract-xen imagebuilder
  • 14. 14 | Implementation: Assists Usage: extract-xen -t <target node> [OPTION] -t target node (full path) -p permissive matching on target node (regex) -v enable verbose debug/processing -o output file for extracted device tree Usage: extract -t <target node> [OPTION] -t target node (full path) -i include node if found in extracted node paths -p permissive matching on target node (regex) -v enable verbose debug/processing -x exclude nodes or properties matching regex -o output file for extracted device tree Usage: image-builder [--uboot] -o <output dir> --imagebuilder <path to imagebuilder> wrapper around imagebuilder (https://gitlab.com/xen-project/imagebuilder) --uboot execute imagebuilder's "uboot-script-gen", with the options: -t tftp -c ./config, and the supplied output directory -i path to imagebuilder clone -v enable verbose debug/processing -o output directory for files
  • 15. Demo
  • 16. 16 | Lopper and Yocto • Recipe is part of the meta-virtualization layer • Current use cases: • Configuration generation from device tree • Modification of qemu device trees for Xen boot support • See: qemuboot-xen-dtb.bbclass • Future: • Map devices to kernel configuration • Boot artifacts generation • …
  • 17. 17 | Future Work • Runtime dynamic device tree extraction -> overlay • Containers • Partitioning • Validation and smart comparisions • Common library / routines: • Code / driver generation • Device analysis and export • Replace scripts / custom tools and solutions • Generic image configuration and generation wrapper • Improved schema integration • Extend Yocto Project integration