SlideShare una empresa de Scribd logo
1 de 27
Descargar para leer sin conexión
RunX
Stefano Stabellini, Xilinx
Bruce Ashfield, Xilinx
Rob Woolley, WindRiver
1
Introducing RunX
 https://github.com/lf-edge/runx
 A new OCI-compatible containers runtime to start containers as Xen VMs
 Written for Embedded
 Very simple
 Minimal overhead
 Real-Time support
 Accelerators support
 Secure by Default
 New project started under the Linux Foundation Edge (LF-Edge) umbrella
 Early collaborationwith Zededa
 Permissive license (Apache v2)
 Open to contributions from the start
 All developmentusing a public mailing list: https://lists.lfedge.org/g/eve-runx
2
RunX
Linux
Container
xl create
Container
1
2
Container Orchestration Framework
(e.g. Kubernetes)
Xen
ramdisk
kernel
VM
containerd
containerd “shim”
Introducing RunX
3
RunX: implementation choices
 Easy to Build: minimal build dependencies
 gcc,make, go
 cross-compiles
 no Xen dependecyat build-time
 Easy to Run: minimal runtime dependencies
 (in addition to Xen,) bash, jq, socat, daemonize
 no ties betweenXen and RunX versions
4
RunX: implementation choices
 No in-guest agents: minimal runtime overhead
 Provides a minimal Linux kernel and Busybox-based ramdiskfor booting regular containers as VMs
 Pristine container environment
 Tiny Micro-VMs optimized for embedded
 A minimal environment
 No device emulation
 No in-guest firmware or bootloaders
 OCI Runtime Spec compliant
 Developedtogetherwith ContainerD
 Should work with any container engines
5
RunX (Cross)Build
Cross-build requirements:
 cross-compilationtoolchain
 e.g. Linaro: https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu
 golang compiler (soon to be removed)
 distro golang package works
$ export ARCH=aarch64
$ export GOROOT=/usr/lib/go-1.10
$ export CROSS_COMPILE=/path/to/aarch64-linux-gnu-
$ ./build.sh
6
RunX Runtime
Copy runX and /usr/share/runX to target
Enable it in containerd’s config.toml, containerd <= 1.2.9:
containerd >= 1.4.0:
[plugins.linux]
runtime="/usr/sbin/runX"
ctr run --runc-binary=/usr/sbin/runX ...
7
Yocto + RunX
Why use Yocto / OE to build / deploy RunX ?
 Leverage the Yocto / OE core values
 configurability, licence management, cross build, fine grained image composition, performance tuning, etc.
 Transition path from development to production
 Active community and integration with BSPs (e.g. xilinx, rpi)
 Multiconfig builds
 Build host + guests + containers + firmware in a single platform
The build of RunX within Yocto is an integration
 Development and build directly with upstream projects is always possible
8
RunX: oe-core + BSP + meta-virtualization
Layers define the platform and software stack possibilities
 Distro, configuration, package recipes and image recipes: customize and specify the details
For RunX:
 oe-core: base support
 toolchain, base packages, image construction, etc
 meta-virtualization: container runtimes + support
 RunX, Xen and supporting components (containerd, cni, ...)
 Xen host reference image recipe, dom0
 u-boot, initrd and image build
 BSP layers provide hardware support
 Kernel, bootloader, firmware, tightly coupled userspace packages
9
Yocto + RunX: simplified build steps (xilinx-zcu102)
Use master branches (there are no stable/released variants yet)
$ git clone -b master http://git.yoctoproject.org/git/poky
$ git clone -b master http://git.openembedded.org/meta-openembedded
$ git clone -b master https://git.yoctoproject.org/git/meta-virtualization
$ git clone -b master https://github.com/Xilinx/meta-xilinx.git
$ . ./oe-init-build-env zcu102-zynqmp
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-oe)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-filesystems)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-python)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-networking)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-virtualization)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-bsp)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-contrib)
$ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-standalone)
10
Yocto + RunX: Simplified setup
Local build setup (will eventually be in a xen distro config)
$ cat <<EOF >> conf/local.conf
MACHINE ??= "zcu102-zynqmp"
DISTRO = "poky"
BBMULTICONFIG ?= "pmu"
do_image[mcdepends] = "multiconfig::pmu:pmu-firmware:do_deploy"
IMAGE_FSTYPES += "tar.gz cpio.gz.u-boot jffs2"
DISTRO_FEATURES_append=" xen virtualization vmsep"
IMAGE_INSTALL_append = " busybox xen-tools zlib-dev runx"
IMAGE_INSTALL_append += " virtual/containerd virtual/runc"
ASSUME_PROVIDED += "iasl-native"
PACKAGECONFIG_remove_pn-xen += " sdl"
PREFERRED_PROVIDER_qemu-native = "xilinx-qemu-native"
PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx"
BUILDHISTORY_FEATURES ?= "image package sdk"
QB_DEFAULT_KERNEL="none"
QB_MEM = "-m 4096"
EOF
$ cat << EOF > conf/multiconfig/pmu.conf
MACHINE="microblaze-pmu"
DISTRO="xilinx-standalone"
TMPDIR="${TOPDIR}/pmutmp"
EOF
11
Yocto + RunX: build steps
Note: upstream submission and merging is in progress
# download and extract pmu files (optional: only if not using multiconfig):
# Download: https://www.xilinx.com/member/forms/download/xef.html?filename=xilinx-zcu102-v2020.1-final.bsp&akdm=1
$ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/pmu_rom_qemu_sha3.elf >
pmu-rom.elf
$ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/pmufw.elf > pmufw.elf
$ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/system.dtb > system.dtb
# copy files to deploy dir:
$ cp pmufw.elf build/tmp/deploy/images/zcu102-zynqmp/pmu-zcu102-zynqmp.bin
$ cp pmufw.elf build/tmp/deploy/images/zcu102-zynqmp/pmu-zcu102-zynqmp.elf
$ cp pmu-rom.elf $BUILDDIR/tmp/deploy/images/zcu102-zynqmp/pmu-rom.elf
$ cp system.dtb $BUILDDIR/tmp/deploy/images/zcu102-zynqmp/system.dtb
# build the image(s)
$ bitbake core-image-minimal
$ bitbake xen-image-minimal
12
Yocto + RunX: build artifacts
Outputs: build/tmp/deploy/images/$machine
 Deploy directory is setup as tftp target on boot via runqemu by default
% xen-image-minimal*
76M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.cpio.gz.u-boot
76M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.tar.gz
722M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.wic.qemu-sd
101M Oct 12 21:09 xen-image-minimal-zcu102-zynqmp-20201013040921.rootfs.jffs2
% Image*
17M Sep 18 07:45 Image--5.4+git0+22b71b4162-r0-zcu102-zynqmp-20200918143300.bin
56M Sep 16 14:16 image.ub
% u-boot*
878K Sep 16 12:41 u-boot-zcu102-zynqmp-v2020.01-xilinx-v2020.1+gitAUTOINC+86c84c0d0f-r0.bin
942K Sep 16 12:41 u-boot-zcu102-zynqmp-v2020.01-xilinx-v2020.1+gitAUTOINC+86c84c0d0f-r0.elf
13
Yocto + RunX: launch
Some on target configuration/interaction is required (automated in the future)
qemu example build (h/w boot differs)
# core-image-minimal as a sanity test. Works out of deployed artifacts by default:
$ runqemu core-image-minimal slirp nographic
# xen-minimal: requires manual u-boot config, or boot.scr support from image builder
(https://gitlab.com/ViryaOS/imagebuilder)
$ runqemu xen-image-minimal nographic slirp
14
Yocto + RunX: runtime steps
u-boot prompt (or automatically): load and exec boot configuration
% cat boot.source
tftpb 0x80000 Image;
tftpb 0x1280000 zynqmp-zcu102-rev1.0.dtb; tftpb 0x1400000 xen.ub; tftpb 0x9000000 xen-image-minimal-zcu102-zynqmp.cpio.gz.u-boot
fdt addr 0x1280000 ; fdt resize ; fdt set /chosen #address-cells <1> ; fdt set /chosen #size-cells <1>
fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=serial0 dom0_mem=1G"
fdt mknod /chosen module@0 ; fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
fdt set /chosen/module@0 reg <0x80000 0x109aa00> ; fdt set /chosen/module@0 bootargs "root=/dev/ram earlyprintk=serial,ttyPS0
console=ttyPS0,115200n8 earlycon=xenboot clk_ignore_unused"
fdt mknod /chosen module@1 ; fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module"
fdt set /chosen/module@1 reg <0x9000000 0x241a84d>
bootm 0x1400000 0x9000000 0x1280000
15
RunX
Linux
Container
xl create
Container
1
2
Container Orchestration Framework
(e.g. Kubernetes)
Xen
ramdisk
kernel
VM
containerd
containerd “shim”
RunX: Traditional Containers
16
RunX
Linux
Container
xl create
Tarball w/ kernel,
ramdisk, & rootfs
1
2
Container Orchestration Framework
(e.g. Kubernetes)
OCI Image Spec Extensions:
- KERNEL
- RAMDISK
Xen
Provided ramdisk
Provided kernel
VM
containerd
containerd “shim”
RunX: Containers with a Kernel
17
RunX
Linux
RTOS
xl create
RTOS packaged
as a container
1
2
Container Orchestration Framework
(e.g. Kubernetes)
Xen
VM
containerd
containerd “shim”
RunX: Baremetal and RTOS Containers
18
RunX: Containers with a Kernel
 Support containers that come with their own Kernel and/or Ramdisk
 a specific versionof the Linux kernel
 a specific kernel configuration
 LinuxRT
 Non-Linux OSes
 RTOSes
 Baremetal applications
 VxWorks
 Kernel and Ramdisk are advertised using new OCI Image flags
 TBD; currently Implemented using Environmental Variables
 RUNX_KERNEL
 RUNX_RAMDISK
 Workwith CNCF to standardize the new labels
19
containerd
RunX
+ extra args
Linux
Container
Tarball w/ kernel,
ramdisk, & rootfs
Container Orchestration Framework
(e.g. Kubernetes)
Xen
Provided ramdisk
Provided kernel
VM
Heterogeneous
HW Resource
containerd “shim”
xl create
2
1
RunX: Device Assignment
20
Device Assignment
 Device Assignment support via XLCONF
 Appends configurationoptions to the xl config file
 It can be used for anything from device assignmentto changing vcpus and memory configurations
 It can be used to set real-time configurations
 It is set by the user/admin (not by the container)
21
containerd
RunX
[extra args] or
config.json
Linux
Container
Tarball w/ kernel,
ramdisk, & rootfs
1
2
Container Orchestration Framework
(e.g. Kubernetes)
OCI Image Spec Extensions:
- RESOURCE = DEVICE_DATA
- KERNEL
- RAMDISK
Xen
Provided ramdisk
Provided kernel
VM
Device Config
Heterogeneous
HW Resource
containerd “shim”
Vision: Accelerators & FPGAs
22
Vision: Accelerators & FPGAs
1. Containers come with their own accelerator's binaries and data
 FPGAbitstreams
 Co-ProcessorKernels
 AIE Kernels
2. ContainerD calls to a service to program the accelerators
3. RunX assigns the accelerator's resources to the VM
23
Demo
24
containerd
RunX
Linux
VxWorks
Xen
VM
containerd “shim”
xl create
2
1
RunX / VxWorks Demo
Deploy VxWorks as a container with RunX
25
containerd
RunX
+ extra args
Linux
Baremetal
Xen
VM
TTC Timer
containerd “shim”
xl create
2
RunX Device Assignment Demo
Baremetal Container with access to the physical TTC timer
1
26
Thank You

Más contenido relacionado

La actualidad más candente

S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
Todd Deshane
 
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
The Linux Foundation
 

La actualidad más candente (20)

OWF: Xen - Open Source Hypervisor Designed for Clouds
OWF: Xen - Open Source Hypervisor Designed for CloudsOWF: Xen - Open Source Hypervisor Designed for Clouds
OWF: Xen - Open Source Hypervisor Designed for Clouds
 
S4 xen hypervisor_20080622
S4 xen hypervisor_20080622S4 xen hypervisor_20080622
S4 xen hypervisor_20080622
 
ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?QEMU Disk IO Which performs Better: Native or threads?
QEMU Disk IO Which performs Better: Native or threads?
 
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
LCNA14: Why Use Xen for Large Scale Enterprise Deployments? - Konrad Rzeszute...
 
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISORLOAD BALANCING OF APPLICATIONS  USING XEN HYPERVISOR
LOAD BALANCING OF APPLICATIONS USING XEN HYPERVISOR
 
XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...
XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...
XPDDS18: Windows PV Drivers Project: Status and Updates - Paul Durrant, Citri...
 
LF Collaboration Summit: Xen Project 4 4 Features and Futures
LF Collaboration Summit: Xen Project 4 4 Features and FuturesLF Collaboration Summit: Xen Project 4 4 Features and Futures
LF Collaboration Summit: Xen Project 4 4 Features and Futures
 
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSEXPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
XPDS16: libvirt and Tools: What's New and What's Next - James Fehlig, SUSE
 
XPDS16: Xen Development Update
XPDS16: Xen Development UpdateXPDS16: Xen Development Update
XPDS16: Xen Development Update
 
XPDDS17: Keynote: Xen 4.8 at Gandi - Vincent Legout, Gandi
XPDDS17: Keynote: Xen 4.8 at Gandi - Vincent Legout, GandiXPDDS17: Keynote: Xen 4.8 at Gandi - Vincent Legout, Gandi
XPDDS17: Keynote: Xen 4.8 at Gandi - Vincent Legout, Gandi
 
Rootlinux17: An introduction to Xen Project Virtualisation
Rootlinux17:  An introduction to Xen Project VirtualisationRootlinux17:  An introduction to Xen Project Virtualisation
Rootlinux17: An introduction to Xen Project Virtualisation
 
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...XPDS16:  Xenbedded: Xen-based client virtualization for phones and tablets - ...
XPDS16: Xenbedded: Xen-based client virtualization for phones and tablets - ...
 
LFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project HypervisorLFNW2014 Advanced Security Features of Xen Project Hypervisor
LFNW2014 Advanced Security Features of Xen Project Hypervisor
 
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARMXPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
XPDS16: Porting Xen on ARM to a new SOC - Julien Grall, ARM
 
Aplura virtualization slides
Aplura virtualization slidesAplura virtualization slides
Aplura virtualization slides
 
XPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, Intel
XPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, IntelXPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, Intel
XPDS13: HVM Dom0 - Any unmodified OS as Dom0 - Will Auld, Intel
 
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
CIF16/Scale14x: The latest from the Xen Project (Lars Kurth, Chairman of Xen ...
 
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, IntelXPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
XPDS14 - Xen as High-Performance NFV Platform - Jun Nakajima, Intel
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 

Similar a RunX ELCE 2020

the NML project
the NML projectthe NML project
the NML project
Lei Yang
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
Carlos Eduardo
 
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
Jan Kalcic
 

Similar a RunX ELCE 2020 (20)

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
 
Genode Compositions
Genode CompositionsGenode Compositions
Genode Compositions
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training
 
the NML project
the NML projectthe NML project
the NML project
 
2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch2015.10.05 Updated > Network Device Development - Part 1: Switch
2015.10.05 Updated > Network Device Development - Part 1: Switch
 
Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36Infrastructure as code - Python Saati #36
Infrastructure as code - Python Saati #36
 
Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5Instalando Cacti no CentOS 5
Instalando Cacti no CentOS 5
 
OLUG_xen.ppt
OLUG_xen.pptOLUG_xen.ppt
OLUG_xen.ppt
 
App container rkt
App container rktApp container rkt
App container rkt
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
[OpenInfra Days Korea 2018] Day 2 - E4 - 딥다이브: immutable Kubernetes architecture
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
A million ways to provision embedded linux devices
A million ways to provision embedded linux devicesA million ways to provision embedded linux devices
A million ways to provision embedded linux devices
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 
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
 
Delivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devicesDelivering Docker & K3s worloads to IoT Edge devices
Delivering Docker & K3s worloads to IoT Edge devices
 

Más de Stefano Stabellini

Más de Stefano Stabellini (12)

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
 
Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022
 
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022System Device Tree and Lopper: Concrete Examples - ELC NA 2022
System Device Tree and Lopper: Concrete Examples - ELC NA 2022
 
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
Static Partitioning with Xen, LinuxRT, and Zephyr: A Concrete End-to-end Exam...
 
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 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
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
%in Lydenburg+277-882-255-28 abortion pills for sale in Lydenburg
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

RunX ELCE 2020

  • 1. RunX Stefano Stabellini, Xilinx Bruce Ashfield, Xilinx Rob Woolley, WindRiver 1
  • 2. Introducing RunX  https://github.com/lf-edge/runx  A new OCI-compatible containers runtime to start containers as Xen VMs  Written for Embedded  Very simple  Minimal overhead  Real-Time support  Accelerators support  Secure by Default  New project started under the Linux Foundation Edge (LF-Edge) umbrella  Early collaborationwith Zededa  Permissive license (Apache v2)  Open to contributions from the start  All developmentusing a public mailing list: https://lists.lfedge.org/g/eve-runx 2
  • 3. RunX Linux Container xl create Container 1 2 Container Orchestration Framework (e.g. Kubernetes) Xen ramdisk kernel VM containerd containerd “shim” Introducing RunX 3
  • 4. RunX: implementation choices  Easy to Build: minimal build dependencies  gcc,make, go  cross-compiles  no Xen dependecyat build-time  Easy to Run: minimal runtime dependencies  (in addition to Xen,) bash, jq, socat, daemonize  no ties betweenXen and RunX versions 4
  • 5. RunX: implementation choices  No in-guest agents: minimal runtime overhead  Provides a minimal Linux kernel and Busybox-based ramdiskfor booting regular containers as VMs  Pristine container environment  Tiny Micro-VMs optimized for embedded  A minimal environment  No device emulation  No in-guest firmware or bootloaders  OCI Runtime Spec compliant  Developedtogetherwith ContainerD  Should work with any container engines 5
  • 6. RunX (Cross)Build Cross-build requirements:  cross-compilationtoolchain  e.g. Linaro: https://releases.linaro.org/components/toolchain/binaries/latest-7/aarch64-linux-gnu  golang compiler (soon to be removed)  distro golang package works $ export ARCH=aarch64 $ export GOROOT=/usr/lib/go-1.10 $ export CROSS_COMPILE=/path/to/aarch64-linux-gnu- $ ./build.sh 6
  • 7. RunX Runtime Copy runX and /usr/share/runX to target Enable it in containerd’s config.toml, containerd <= 1.2.9: containerd >= 1.4.0: [plugins.linux] runtime="/usr/sbin/runX" ctr run --runc-binary=/usr/sbin/runX ... 7
  • 8. Yocto + RunX Why use Yocto / OE to build / deploy RunX ?  Leverage the Yocto / OE core values  configurability, licence management, cross build, fine grained image composition, performance tuning, etc.  Transition path from development to production  Active community and integration with BSPs (e.g. xilinx, rpi)  Multiconfig builds  Build host + guests + containers + firmware in a single platform The build of RunX within Yocto is an integration  Development and build directly with upstream projects is always possible 8
  • 9. RunX: oe-core + BSP + meta-virtualization Layers define the platform and software stack possibilities  Distro, configuration, package recipes and image recipes: customize and specify the details For RunX:  oe-core: base support  toolchain, base packages, image construction, etc  meta-virtualization: container runtimes + support  RunX, Xen and supporting components (containerd, cni, ...)  Xen host reference image recipe, dom0  u-boot, initrd and image build  BSP layers provide hardware support  Kernel, bootloader, firmware, tightly coupled userspace packages 9
  • 10. Yocto + RunX: simplified build steps (xilinx-zcu102) Use master branches (there are no stable/released variants yet) $ git clone -b master http://git.yoctoproject.org/git/poky $ git clone -b master http://git.openembedded.org/meta-openembedded $ git clone -b master https://git.yoctoproject.org/git/meta-virtualization $ git clone -b master https://github.com/Xilinx/meta-xilinx.git $ . ./oe-init-build-env zcu102-zynqmp $ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-oe) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-filesystems) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-python) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-openembedded/meta-networking) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-virtualization) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-bsp) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-contrib) $ bitbake-layers add-layer $(readlink -f $PWD/../meta-xilinx/meta-xilinx-standalone) 10
  • 11. Yocto + RunX: Simplified setup Local build setup (will eventually be in a xen distro config) $ cat <<EOF >> conf/local.conf MACHINE ??= "zcu102-zynqmp" DISTRO = "poky" BBMULTICONFIG ?= "pmu" do_image[mcdepends] = "multiconfig::pmu:pmu-firmware:do_deploy" IMAGE_FSTYPES += "tar.gz cpio.gz.u-boot jffs2" DISTRO_FEATURES_append=" xen virtualization vmsep" IMAGE_INSTALL_append = " busybox xen-tools zlib-dev runx" IMAGE_INSTALL_append += " virtual/containerd virtual/runc" ASSUME_PROVIDED += "iasl-native" PACKAGECONFIG_remove_pn-xen += " sdl" PREFERRED_PROVIDER_qemu-native = "xilinx-qemu-native" PREFERRED_PROVIDER_nativesdk-qemu = "nativesdk-qemu-xilinx" BUILDHISTORY_FEATURES ?= "image package sdk" QB_DEFAULT_KERNEL="none" QB_MEM = "-m 4096" EOF $ cat << EOF > conf/multiconfig/pmu.conf MACHINE="microblaze-pmu" DISTRO="xilinx-standalone" TMPDIR="${TOPDIR}/pmutmp" EOF 11
  • 12. Yocto + RunX: build steps Note: upstream submission and merging is in progress # download and extract pmu files (optional: only if not using multiconfig): # Download: https://www.xilinx.com/member/forms/download/xef.html?filename=xilinx-zcu102-v2020.1-final.bsp&akdm=1 $ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/pmu_rom_qemu_sha3.elf > pmu-rom.elf $ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/pmufw.elf > pmufw.elf $ tar -O -xf xilinx-zcu102-v2020.1-final.bsp xilinx-zcu102-2020.1/pre-built/linux/images/system.dtb > system.dtb # copy files to deploy dir: $ cp pmufw.elf build/tmp/deploy/images/zcu102-zynqmp/pmu-zcu102-zynqmp.bin $ cp pmufw.elf build/tmp/deploy/images/zcu102-zynqmp/pmu-zcu102-zynqmp.elf $ cp pmu-rom.elf $BUILDDIR/tmp/deploy/images/zcu102-zynqmp/pmu-rom.elf $ cp system.dtb $BUILDDIR/tmp/deploy/images/zcu102-zynqmp/system.dtb # build the image(s) $ bitbake core-image-minimal $ bitbake xen-image-minimal 12
  • 13. Yocto + RunX: build artifacts Outputs: build/tmp/deploy/images/$machine  Deploy directory is setup as tftp target on boot via runqemu by default % xen-image-minimal* 76M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.cpio.gz.u-boot 76M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.tar.gz 722M Oct 12 21:06 xen-image-minimal-zcu102-zynqmp-20201013040413.rootfs.wic.qemu-sd 101M Oct 12 21:09 xen-image-minimal-zcu102-zynqmp-20201013040921.rootfs.jffs2 % Image* 17M Sep 18 07:45 Image--5.4+git0+22b71b4162-r0-zcu102-zynqmp-20200918143300.bin 56M Sep 16 14:16 image.ub % u-boot* 878K Sep 16 12:41 u-boot-zcu102-zynqmp-v2020.01-xilinx-v2020.1+gitAUTOINC+86c84c0d0f-r0.bin 942K Sep 16 12:41 u-boot-zcu102-zynqmp-v2020.01-xilinx-v2020.1+gitAUTOINC+86c84c0d0f-r0.elf 13
  • 14. Yocto + RunX: launch Some on target configuration/interaction is required (automated in the future) qemu example build (h/w boot differs) # core-image-minimal as a sanity test. Works out of deployed artifacts by default: $ runqemu core-image-minimal slirp nographic # xen-minimal: requires manual u-boot config, or boot.scr support from image builder (https://gitlab.com/ViryaOS/imagebuilder) $ runqemu xen-image-minimal nographic slirp 14
  • 15. Yocto + RunX: runtime steps u-boot prompt (or automatically): load and exec boot configuration % cat boot.source tftpb 0x80000 Image; tftpb 0x1280000 zynqmp-zcu102-rev1.0.dtb; tftpb 0x1400000 xen.ub; tftpb 0x9000000 xen-image-minimal-zcu102-zynqmp.cpio.gz.u-boot fdt addr 0x1280000 ; fdt resize ; fdt set /chosen #address-cells <1> ; fdt set /chosen #size-cells <1> fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=serial0 dom0_mem=1G" fdt mknod /chosen module@0 ; fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module" fdt set /chosen/module@0 reg <0x80000 0x109aa00> ; fdt set /chosen/module@0 bootargs "root=/dev/ram earlyprintk=serial,ttyPS0 console=ttyPS0,115200n8 earlycon=xenboot clk_ignore_unused" fdt mknod /chosen module@1 ; fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module" fdt set /chosen/module@1 reg <0x9000000 0x241a84d> bootm 0x1400000 0x9000000 0x1280000 15
  • 16. RunX Linux Container xl create Container 1 2 Container Orchestration Framework (e.g. Kubernetes) Xen ramdisk kernel VM containerd containerd “shim” RunX: Traditional Containers 16
  • 17. RunX Linux Container xl create Tarball w/ kernel, ramdisk, & rootfs 1 2 Container Orchestration Framework (e.g. Kubernetes) OCI Image Spec Extensions: - KERNEL - RAMDISK Xen Provided ramdisk Provided kernel VM containerd containerd “shim” RunX: Containers with a Kernel 17
  • 18. RunX Linux RTOS xl create RTOS packaged as a container 1 2 Container Orchestration Framework (e.g. Kubernetes) Xen VM containerd containerd “shim” RunX: Baremetal and RTOS Containers 18
  • 19. RunX: Containers with a Kernel  Support containers that come with their own Kernel and/or Ramdisk  a specific versionof the Linux kernel  a specific kernel configuration  LinuxRT  Non-Linux OSes  RTOSes  Baremetal applications  VxWorks  Kernel and Ramdisk are advertised using new OCI Image flags  TBD; currently Implemented using Environmental Variables  RUNX_KERNEL  RUNX_RAMDISK  Workwith CNCF to standardize the new labels 19
  • 20. containerd RunX + extra args Linux Container Tarball w/ kernel, ramdisk, & rootfs Container Orchestration Framework (e.g. Kubernetes) Xen Provided ramdisk Provided kernel VM Heterogeneous HW Resource containerd “shim” xl create 2 1 RunX: Device Assignment 20
  • 21. Device Assignment  Device Assignment support via XLCONF  Appends configurationoptions to the xl config file  It can be used for anything from device assignmentto changing vcpus and memory configurations  It can be used to set real-time configurations  It is set by the user/admin (not by the container) 21
  • 22. containerd RunX [extra args] or config.json Linux Container Tarball w/ kernel, ramdisk, & rootfs 1 2 Container Orchestration Framework (e.g. Kubernetes) OCI Image Spec Extensions: - RESOURCE = DEVICE_DATA - KERNEL - RAMDISK Xen Provided ramdisk Provided kernel VM Device Config Heterogeneous HW Resource containerd “shim” Vision: Accelerators & FPGAs 22
  • 23. Vision: Accelerators & FPGAs 1. Containers come with their own accelerator's binaries and data  FPGAbitstreams  Co-ProcessorKernels  AIE Kernels 2. ContainerD calls to a service to program the accelerators 3. RunX assigns the accelerator's resources to the VM 23
  • 25. containerd RunX Linux VxWorks Xen VM containerd “shim” xl create 2 1 RunX / VxWorks Demo Deploy VxWorks as a container with RunX 25
  • 26. containerd RunX + extra args Linux Baremetal Xen VM TTC Timer containerd “shim” xl create 2 RunX Device Assignment Demo Baremetal Container with access to the physical TTC timer 1 26