SlideShare a Scribd company logo
1 of 22
Download to read offline
© Copyright 2020 Xilinx
RunX
Stefano Stabellini
Bruce Ashfield
Wesley Skeffington
Brian Woods
LVC20
© Copyright 2020 Xilinx
Introducing 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
© Copyright 2020 Xilinx
RunX
Linux
Container
xl create
Container
1
2
Container Orchestration Framework
(e.g. Kubernetes)
Xen
ramdisk
kernel
VM
containerd
containerd “shim”
Introducing RunX
© Copyright 2020 Xilinx
RunX: implementation choices
 Easy to Build: minimal build dependencies
 gcc,make, go
 Easy to Run: minimal runtime dependencies
 (in addition to Xen,) bash, jq, socat, daemonize
 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
© Copyright 2020 Xilinx
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 expected to work
$ export ARCH=aarch64
$ export GOROOT=/usr/lib/go-1.10
$ export CROSS_COMPILE=/path/to/aarch64-linux-gnu-
$ ./build.sh
© Copyright 2020 Xilinx
RunX Runtime
Copy runX and /usr/share/runX to target
Enable it in containerd’s config.toml
[plugins.linux]
runtime="/usr/sbin/runX"
© Copyright 2020 Xilinx
Yocto + RunX
meta-virtualization provides the recipes for RunX, Xen and supporting
components (containerd, etc)
Why use Yocto / OE to build / deploy RunX ?
 Leverage the Yocto / OE core values
 Transition path from development to production
 Active community and integration with BSPs (e.g. meta-xilinx)
 Multiconfig builds
 Build host + guests + containers + firmware in a single platform
Note: development and build directly with upstream projects is always possible
© Copyright 2020 Xilinx
Yocto + RunX: Simplified build
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)
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
Yocto + RunX: build steps
Note: not all changes are merged upstream, but will be shortly
# 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
© Copyright 2020 Xilinx
Yocto + RunX: runtime steps
Note: some on target configuration may be required (and will be automated in
the future)
# 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
© Copyright 2020 Xilinx
RunX
Linux
Container
xl create
Container
1
2
Container Orchestration Framework
(e.g. Kubernetes)
Xen
ramdisk
kernel
VM
containerd
containerd “shim”
RunX: Traditional Containers
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
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)
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
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
© Copyright 2020 Xilinx
Demo
© Copyright 2020 Xilinx
containerd
RunX
+ extra args
Linux
Baremetal
Xen
VM
TTC Timer
containerd “shim”
xl create
2
1
RunX RTOS and Device Assignment Demo
Baremetal Container with access to the physical TTC timer
© Copyright 2020 Xilinx
Thank You

More Related Content

What's hot

Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
Docker, Inc.
 

What's hot (20)

Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & DeployOPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
OPENSHIFT CONTAINER PLATFORM CI/CD Build & Deploy
 
Docker Networking
Docker NetworkingDocker Networking
Docker Networking
 
Learning AOSP - Android Booting Process
Learning AOSP - Android Booting ProcessLearning AOSP - Android Booting Process
Learning AOSP - Android Booting Process
 
K8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals TrainingK8s in 3h - Kubernetes Fundamentals Training
K8s in 3h - Kubernetes Fundamentals Training
 
Docker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and ContainersDocker 101 : Introduction to Docker and Containers
Docker 101 : Introduction to Docker and Containers
 
Docker introduction
Docker introductionDocker introduction
Docker introduction
 
Docker Networking Overview
Docker Networking OverviewDocker Networking Overview
Docker Networking Overview
 
Docker Basics
Docker BasicsDocker Basics
Docker Basics
 
Containerd + buildkit breakout
Containerd + buildkit breakoutContainerd + buildkit breakout
Containerd + buildkit breakout
 
Learning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device DriverLearning AOSP - Android Linux Device Driver
Learning AOSP - Android Linux Device Driver
 
Android 10
Android 10Android 10
Android 10
 
Virtual desktop infrastructure
Virtual desktop infrastructureVirtual desktop infrastructure
Virtual desktop infrastructure
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 
코틀린 멀티플랫폼, 미지와의 조우
코틀린 멀티플랫폼, 미지와의 조우코틀린 멀티플랫폼, 미지와의 조우
코틀린 멀티플랫폼, 미지와의 조우
 
Kubernetes #1 intro
Kubernetes #1   introKubernetes #1   intro
Kubernetes #1 intro
 
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
Node.js Tutorial for Beginners | Node.js Web Application Tutorial | Node.js T...
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Le Wagon - React 101
Le Wagon - React 101Le Wagon - React 101
Le Wagon - React 101
 
Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad Docker Compose by Aanand Prasad
Docker Compose by Aanand Prasad
 

Similar to RunX: deploy real-time OSes as containers at the edge

Similar to RunX: deploy real-time OSes as containers at the edge (20)

RunX ELCE 2020
RunX ELCE 2020RunX ELCE 2020
RunX ELCE 2020
 
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcementsContainerday17 Moby-linuxkit-DockerCon-2017-announcements
Containerday17 Moby-linuxkit-DockerCon-2017-announcements
 
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at KiratechMoby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
Moby and linux kit, what to expect - Lorenzo Fontana, DevOps Expert at Kiratech
 
Docker for Java developers at JavaLand
Docker for Java developers at JavaLandDocker for Java developers at JavaLand
Docker for Java developers at JavaLand
 
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App FactoryRevolutionizing WSO2 PaaS with Kubernetes & App Factory
Revolutionizing WSO2 PaaS with Kubernetes & App Factory
 
Docker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use CasesDocker Athens: Docker Engine Evolution & Containerd Use Cases
Docker Athens: Docker Engine Evolution & Containerd Use Cases
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Docker-v3.pdf
Docker-v3.pdfDocker-v3.pdf
Docker-v3.pdf
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
LinuxKit and Moby, News from DockerCon 2017
LinuxKit and Moby, News from DockerCon 2017LinuxKit and Moby, News from DockerCon 2017
LinuxKit and Moby, News from DockerCon 2017
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Agile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: IntroductionAgile Brown Bag - Vagrant & Docker: Introduction
Agile Brown Bag - Vagrant & Docker: Introduction
 
Docker Multi-arch All The Things
Docker Multi-arch All The ThingsDocker Multi-arch All The Things
Docker Multi-arch All The Things
 
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
 
OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training OSSNA18: Xen Beginners Training
OSSNA18: Xen Beginners Training
 
Linux Containers and Docker SHARE.ORG Seattle 2015
Linux Containers and Docker SHARE.ORG Seattle 2015Linux Containers and Docker SHARE.ORG Seattle 2015
Linux Containers and Docker SHARE.ORG Seattle 2015
 
App container rkt
App container rktApp container rkt
App container rkt
 
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
Dev opsec dockerimage_patch_n_lifecyclemanagement_2019
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
 

More from Stefano Stabellini

More from Stefano Stabellini (16)

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...
 
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
 
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 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
 
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

Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Lisi Hocke
 

Recently uploaded (20)

Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...
 
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale IbridaUNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
UNI DI NAPOLI FEDERICO II - Il ruolo dei grafi nell'AI Conversazionale Ibrida
 
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Lessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdfLessons Learned from Building a Serverless Notifications System.pdf
Lessons Learned from Building a Serverless Notifications System.pdf
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)The mythical technical debt. (Brooke, please, forgive me)
The mythical technical debt. (Brooke, please, forgive me)
 
architecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdfarchitecting-ai-in-the-enterprise-apis-and-applications.pdf
architecting-ai-in-the-enterprise-apis-and-applications.pdf
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
Abortion Pill Prices Jane Furse ](+27832195400*)[ 🏥 Women's Abortion Clinic i...
 
Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024Modern binary build systems - PyCon 2024
Modern binary build systems - PyCon 2024
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-CloudAlluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
Alluxio Monthly Webinar | Simplify Data Access for AI in Multi-Cloud
 

RunX: deploy real-time OSes as containers at the edge

  • 1. © Copyright 2020 Xilinx RunX Stefano Stabellini Bruce Ashfield Wesley Skeffington Brian Woods LVC20
  • 2. © Copyright 2020 Xilinx Introducing 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
  • 3. © Copyright 2020 Xilinx RunX Linux Container xl create Container 1 2 Container Orchestration Framework (e.g. Kubernetes) Xen ramdisk kernel VM containerd containerd “shim” Introducing RunX
  • 4. © Copyright 2020 Xilinx RunX: implementation choices  Easy to Build: minimal build dependencies  gcc,make, go  Easy to Run: minimal runtime dependencies  (in addition to Xen,) bash, jq, socat, daemonize  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. © Copyright 2020 Xilinx 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 expected to work $ export ARCH=aarch64 $ export GOROOT=/usr/lib/go-1.10 $ export CROSS_COMPILE=/path/to/aarch64-linux-gnu- $ ./build.sh
  • 6. © Copyright 2020 Xilinx RunX Runtime Copy runX and /usr/share/runX to target Enable it in containerd’s config.toml [plugins.linux] runtime="/usr/sbin/runX"
  • 7. © Copyright 2020 Xilinx Yocto + RunX meta-virtualization provides the recipes for RunX, Xen and supporting components (containerd, etc) Why use Yocto / OE to build / deploy RunX ?  Leverage the Yocto / OE core values  Transition path from development to production  Active community and integration with BSPs (e.g. meta-xilinx)  Multiconfig builds  Build host + guests + containers + firmware in a single platform Note: development and build directly with upstream projects is always possible
  • 8. © Copyright 2020 Xilinx Yocto + RunX: Simplified build 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)
  • 9. © Copyright 2020 Xilinx 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
  • 10. © Copyright 2020 Xilinx Yocto + RunX: build steps Note: not all changes are merged upstream, but will be shortly # 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
  • 11. © Copyright 2020 Xilinx Yocto + RunX: runtime steps Note: some on target configuration may be required (and will be automated in the future) # 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
  • 12. © Copyright 2020 Xilinx RunX Linux Container xl create Container 1 2 Container Orchestration Framework (e.g. Kubernetes) Xen ramdisk kernel VM containerd containerd “shim” RunX: Traditional Containers
  • 13. © Copyright 2020 Xilinx 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
  • 14. © Copyright 2020 Xilinx 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
  • 15. © Copyright 2020 Xilinx 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
  • 16. © Copyright 2020 Xilinx 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
  • 17. © Copyright 2020 Xilinx 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)
  • 18. © Copyright 2020 Xilinx 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
  • 19. © Copyright 2020 Xilinx 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
  • 20. © Copyright 2020 Xilinx Demo
  • 21. © Copyright 2020 Xilinx containerd RunX + extra args Linux Baremetal Xen VM TTC Timer containerd “shim” xl create 2 1 RunX RTOS and Device Assignment Demo Baremetal Container with access to the physical TTC timer
  • 22. © Copyright 2020 Xilinx Thank You