SlideShare a Scribd company logo
Copyright 2020, Burkhard Stubert
Build and Run Embedded Apps
Faster from QtCreator with Docker
Burkhard Stubert
As a solo consultant, I help teams succeed with Qt embedded systems
The Problem
2
App A v3.5 App A v1.0 App B v2.3 App C v4.7
Qt SDK
Yocto 2.7
Ubuntu 18.04
Qt SDK
Yocto 2.0
Ubuntu 14.04
Qt SDK
Yocto 2.4
Ubuntu 16.04
Qt SDK
Yocto 3.1
Ubuntu 19.10
Workstation
2x Xeon (32 cores)
Ubuntu 16.04
All Qt SDKs built in
Docker containers on
same workstation
How do we best build
Apps from QtCreator?
? ? ? ?
Solution 1 (Currently Used):
Virtual Machines
3
Host OS: Windows,
MacOS, Linux
App A v3.5
Qt SDK
Yocto 2.7
Guest OS:
Ubuntu 18.04
Host OS: Windows,
MacOS, Linux
App A v1.0
Qt SDK
Yocto 2.0
Guest OS:
Ubuntu 14.04
Host OS: Windows,
MacOS, Linux
App B v2.3
Qt SDK
Yocto 2.4
Guest OS:
Ubuntu 16.04
Host OS: Windows,
MacOS, Linux
App C v4.7
Qt SDK
Yocto 3.1
Guest OS:
Ubuntu 19.10
2-3 VMs fit on same dev PC
Fast workstation and
existing containers
not used for app builds
VMs slower than containers
Solution 2 (This Talk):
Containers on Local Workstation
4
Workstation: Ubuntu 16.04
QtCreator
App A v3.5
Qt SDK
Yocto 2.7
Ubuntu 18.04
Container
QtCreator
App A v1.0
Qt SDK
Yocto 2.0
Ubuntu 14.04
Container
QtCreator
App B v2.3
Qt SDK
Yocto 2.4
Ubuntu 16.04
Container
QtCreator
App C v4.7
Qt SDK
Yocto 3.1
Ubuntu 19.10
Container
Build details hidden
in black box (container)
Reuse existing containers
on fast workstation
Solution 3 (Future):
Containers on Remote Workstation
5
Windows
QtCreator
App A v3.5
Linux
QtCreator
App A v1.0
Windows
QtCreator
App B v2.3
MacOS
QtCreator
App C v4.7
Workstation: Ubuntu 16.04
Qt SDK
Yocto 2.7
Ubuntu 18.04
Container
Qt SDK
Yocto 2.0
Ubuntu 14.04
Container
Qt SDK
Yocto 2.4
Ubuntu 16.04
Container
Qt SDK
Yocto 3.1
Ubuntu 19.10
Container
Apps developed on
different computers
Apps built in containers
on one or more
remote workstations
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
6
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Copyright 2020, Burkhard Stubert
How QtCreator Calls CMake (Native Build)
Stage Working Directory CMake Command
Configure
project
/tmp/QtCreator-YqhjyI/qtc-cmake-
MDHAJjOH => <work-dir-1>
cmake '-GUnix Makefiles' -C <work-dir-1>/qtcsettings.cmake
/public/Work/cuteradio-apps
Generate
build files
/public/Work/build-cuteradio-apps-
Desktop_Qt_5_14_2_GCC_64bit-
Debug => <work-dir-2>
cmake '-GUnix Makefiles' -C <work-dir-2>/qtcsettings.cmake
/public/Work/cuteradio-app
Compile <work-dir-2> cmake --build . --target all -- -j4
Install <work-dir-2> cmake --build . --target install
7
Call Docker wrapper
instead of cmake
Docker Wrapper for CMake
8
#!/bin/bash
args=$(echo $@ | sed -e "s|-GCodeBlocks - Unix Makefiles|'-
GCodeBlocks - Unix Makefiles'|g")
docker run --rm -v /public/Work:/public/Work -v /tmp:/tmp 
-w $(pwd) dr-yocto:sdk-18.04 cmake $args
Save script in
$HOME/bin/dr-cmake
Resurrect single quotes
removed by shell
/public/Work and /tmp
visible both on host PC
and in container
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
9
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
My Setup
10
Workstation: Ubuntu 16.04
QtCreator
Cuteradio App
Qt SDK for RPi 3
Yocto 2.6
Ubuntu 18.04
Container
Only a proof of concept!
Copyright 2020, Burkhard Stubert
Prerequisites: General
• Install Docker on workstation (see [2])
• Create a Docker container (sdk-18.04) for Yocto builds (see [3])
• Build a Linux image with the Docker container (see [3])
• Or: Use a pre-built Boot2Qt image from The Qt Company (see [5] and [6])
• Build Qt SDK with the Docker container (see [4])
• Or: Use a pre-built Boot2Qt SDK from The Qt Company (see [5] and [6])
• Establish SSH connection between workstation and device (see [1] and [4])
11
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
12
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Prerequisites: SSH Access to Device
13
See [1] and [4]
how to add device
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
14
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Installing Qt SDK in Container
15
$ cd /public/Work
$ docker run –t –rm –v /public/Work:/public/Work -v /tmp:/tmp 
-w $(pwd) dr-yocto:sdk-18.04
On Workstation:
# cd cuteradio-thud/build-rpi3/tmp/deploy/sdk/
# ./poky-glibc-x86_64-meta-toolchain-qt5-cortexa7t2hf-neon-vfpv4-
toolchain-2.6.4.sh
Poky (Yocto Project Reference Distro) SDK installer version 2.6.4
=================================================================
Enter target directory for SDK (default: /opt/poky/2.6.4):
/public/Work/qt-sdk-thud
...
In Docker container:
Setting Up Build Environment in Dockerfile
16
export OECORE_NATIVE_SYSROOT="/public/Work/qt-sdk-thud/sysroots/x86_64-pokysdk-linux"
export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"
export OECORE_BASELIB="lib"
export OECORE_TARGET_ARCH="arm"
export OECORE_TARGET_OS="linux-gnueabi"
...
ENV OECORE_NATIVE_SYSROOT="/public/Work/qt-sdk-thud/sysroots/x86_64-pokysdk-linux"
ENV OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}"
ENV OECORE_BASELIB="lib"
ENV OECORE_TARGET_ARCH="arm"
ENV OECORE_TARGET_OS="linux-gnueabi"
...
source environment-setup-cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi
Dockerfile
Change all environment variables
Fixing Environment Variables for QtCreator
17
export CC="arm-poky-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 -
mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
export CXX="arm-poky-linux-gnueabi-g++ -march=armv7ve -mthumb -mfpu=neon-vfpv4 -
mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT"
export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types "
ENV CC="arm-poky-linux-gnueabi-gcc"
ENV CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -march=armv7ve -mthumb -
mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=${SDKTARGETSYSROOT}"
ENV CXX="arm-poky-linux-gnueabi-g++"
ENV CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -march=armv7ve -mthumb -
mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=${SDKTARGETSYSROOT}"
Do same with LD/LDFLAGS
and CPP/CPPFLAGS
Move options from CC to CFLAGS
and from CXX to CXXFLAGS
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
18
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Configuring QtCreator: CMake
19
Configuring QtCreator: Kit
20
Configuring QtCreator:
Kit – CMake Generator
21
Configuring QtCreator:
Kit – CMake Configuration
22
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
23
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Building the App with dr-cmake:
Switching to Project "Docker Raspberry Pi"
24
Building the App with dr-cmake:
Output when Switching the Project
25
Building the App with dr-cmake:
CMake-Output of Switching to Project
26
15:50:29: Running steps for project cuteradio-apps...
15:50:30: Starting: "/home/burkhard/bin/dr-cmake" --build . --target all
[ 16%] Automatic MOC for target cuteradio
[ 16%] Built target cuteradio_autogen
[ 33%] Automatic RCC for qml.qrc
Scanning dependencies of target cuteradio
[ 50%] Building CXX object
CMakeFiles/cuteradio.dir/cuteradio_autogen/mocs_compilation.cpp.o
[ 66%] Building CXX object CMakeFiles/cuteradio.dir/main.cpp.o
[ 83%] Building CXX object
CMakeFiles/cuteradio.dir/cuteradio_autogen/EWIEGA46WW/qrc_qml.cpp.o
[100%] Linking CXX executable cuteradio
[100%] Built target cuteradio
15:50:33: The process "/home/burkhard/bin/dr-cmake" exited normally.
15:50:33: Elapsed time: 00:05.
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
27
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Deployment Settings
28
Run Settings
29
Copyright 2020, Burkhard Stubert
QtCreator-CMake-Docker
30
• Motivation
• Idea: Docker Wrapper for CMake
• Prerequisites
• General
• SSH Access to Device
• Building App with Docker
• Installing Qt SDK in Container
• Configuring QtCreator
• Building App with Docker-CMake
• Running App on Device
• Deployment and Run Settings
• Running App
Running App on Device: Compile Output
31
Running App on Device: Application Output
32
Copyright 2020, Burkhard Stubert
Running App on Device: Instead of a Video
33
Ctrl+R
Copyright 2020, Burkhard Stubert
References
[1] Docker Builds from QtCreator. Basis for this talk.
[2] Using Docker Containers for Yocto Builds. How to install Docker.
[3] Qt Embedded Systems – Part 1: Building a Linux Image with Yocto. First step
to create a Qt SDK.
[4] Qt Embedded Systems – Part 2: Building a Qt SDK with Yocto. Creates the Qt
SDK used in this talk.
[5] The Qt Company, Boot to Qt Software Stack. Official documentation of
Boot2Qt.
[6] Tino Pyssysalo, Getting Started with Yocto & eLinux. How to install a Qt SDK
and start developing an app.
34
This presentation is licensed under a Creative Commons
Attribution-ShareAlike 4.0 International License.
Copyright 2020, Burkhard Stubert
Thank you 
Mail: burkhard.stubert@embeddeduse.com
Web: http://www.embeddeduse.com

More Related Content

What's hot

Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver MeetupDaneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
Shannon McFarland
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
Robert Barr
 
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
katsuya kawabe
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
Akihiro Suda
 
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
Daniel Bimschas
 
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
Daniel Bimschas
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into Containerd
Kohei Tokunaga
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
Eueung Mulyana
 
2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib
Daniel Bimschas
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
Kohei Tokunaga
 
WISEBED Tutorial @ ADHOCNETS 2011
WISEBED Tutorial @ ADHOCNETS 2011WISEBED Tutorial @ ADHOCNETS 2011
WISEBED Tutorial @ ADHOCNETS 2011
Daniel Bimschas
 
Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
Anne Nicolas
 
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz SnapshotterThe overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
Kohei Tokunaga
 
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
AMD Developer Central
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - Gorae
Rhio kim
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
Igalia
 
Optimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and VulkanOptimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and Vulkan
ax inc.
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
PROIDEA
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Igalia
 

What's hot (20)

Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver MeetupDaneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
Daneyon Hansen - Intro to OpenStack - Feb13 OpenStack Denver Meetup
 
Kubernetes for Java developers
Kubernetes for Java developersKubernetes for Java developers
Kubernetes for Java developers
 
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
【CNDO2021】Calicoのデプロイをミスって本番クラスタを壊しそうになった話
 
[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive[KubeCon EU 2020] containerd Deep Dive
[KubeCon EU 2020] containerd Deep Dive
 
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
2013 09-02 senzations-bimschas-part4-setting-up-your-own-testbed
 
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
2013 09-02 senzations-bimschas-part2-smart-santander-experimentation
 
Introduction and Deep Dive Into Containerd
Introduction and Deep Dive Into ContainerdIntroduction and Deep Dive Into Containerd
Introduction and Deep Dive Into Containerd
 
Raspberry Pi Swarm Cluster
Raspberry Pi Swarm ClusterRaspberry Pi Swarm Cluster
Raspberry Pi Swarm Cluster
 
2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib2013 09-02 senzations-bimschas-part3-wiselib
2013 09-02 senzations-bimschas-part3-wiselib
 
BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話BuildKitでLazy Pullを有効にしてビルドを早くする話
BuildKitでLazy Pullを有効にしてビルドを早くする話
 
WISEBED Tutorial @ ADHOCNETS 2011
WISEBED Tutorial @ ADHOCNETS 2011WISEBED Tutorial @ ADHOCNETS 2011
WISEBED Tutorial @ ADHOCNETS 2011
 
Kernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream firstKernel Recipes 2019 - Driving the industry toward upstream first
Kernel Recipes 2019 - Driving the industry toward upstream first
 
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz SnapshotterThe overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
The overview of lazypull with containerd Remote Snapshotter & Stargz Snapshotter
 
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
PL-4051, An Introduction to SPIR for OpenCL Application Developers and Compil...
 
Zedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on ZedboardZedroid - Android (5.0 and later) on Zedboard
Zedroid - Android (5.0 and later) on Zedboard
 
Docker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - GoraeDocker, Docker Swarm mangement tool - Gorae
Docker, Docker Swarm mangement tool - Gorae
 
Reaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkitReaching the multimedia web from embedded platforms with WPEWebkit
Reaching the multimedia web from embedded platforms with WPEWebkit
 
Optimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and VulkanOptimizing NN inference performance on Arm NEON and Vulkan
Optimizing NN inference performance on Arm NEON and Vulkan
 
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik DornJDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
JDD2014: Docker.io - versioned linux containers for JVM devops - Dominik Dorn
 
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
Multimedia support in WebKitGTK and WPE, current status and plans (GStreamer ...
 

Similar to Webinar: Building Embedded Applications from QtCreator with Docker

Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?
msyukor
 
Docker
DockerDocker
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
Mando Stam
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
Al Gifari
 
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
Ajeet Singh Raina
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
Troublemaker Khunpech
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
Chris Swan
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
양재동 코드랩
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
Proto204
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
Thomas Kremmel
 
Part 6 Docker Toolbox - Mac
Part 6 Docker Toolbox - MacPart 6 Docker Toolbox - Mac
Part 6 Docker Toolbox - Mac
Biswajit De
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Jung-Hong Kim
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
Ganesan Narayanasamy
 
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker  on the Edge | OSCONF 2020 JaipurQuantifying Your World with AI & Docker  on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
Ajeet Singh Raina
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
Vincent De Smet
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
sparkfabrik
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
Kontena, Inc.
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
Ben Hall
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
Ben Hall
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
Binary Studio
 

Similar to Webinar: Building Embedded Applications from QtCreator with Docker (20)

Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?Programming IoT with Docker: How to Start?
Programming IoT with Docker: How to Start?
 
Docker
DockerDocker
Docker
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 
Docker engine - Indroduc
Docker engine - IndroducDocker engine - Indroduc
Docker engine - Indroduc
 
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
 
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day ThailandCI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
CI/CD with Jenkins and Docker - DevOps Meetup Day Thailand
 
Flutter Vikings 2022 - Full Stack Dart
Flutter Vikings 2022  - Full Stack DartFlutter Vikings 2022  - Full Stack Dart
Flutter Vikings 2022 - Full Stack Dart
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Présentation de Docker
Présentation de DockerPrésentation de Docker
Présentation de Docker
 
Deploy django apps using docker
Deploy django apps using dockerDeploy django apps using docker
Deploy django apps using docker
 
Part 6 Docker Toolbox - Mac
Part 6 Docker Toolbox - MacPart 6 Docker Toolbox - Mac
Part 6 Docker Toolbox - Mac
 
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on CloudDayta AI Seminar - Kubernetes, Docker and AI on Cloud
Dayta AI Seminar - Kubernetes, Docker and AI on Cloud
 
Deep Learning Edge
Deep Learning Edge Deep Learning Edge
Deep Learning Edge
 
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker  on the Edge | OSCONF 2020 JaipurQuantifying Your World with AI & Docker  on the Edge | OSCONF 2020 Jaipur
Quantifying Your World with AI & Docker on the Edge | OSCONF 2020 Jaipur
 
Develop with docker 2014 aug
Develop with docker 2014 augDevelop with docker 2014 aug
Develop with docker 2014 aug
 
Gitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a proGitlab ci e kubernetes, build test and deploy your projects like a pro
Gitlab ci e kubernetes, build test and deploy your projects like a pro
 
Dockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best PracticesDockerizing Ruby Applications - The Best Practices
Dockerizing Ruby Applications - The Best Practices
 
Scaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container ServiceScaling Docker Containers using Kubernetes and Azure Container Service
Scaling Docker Containers using Kubernetes and Azure Container Service
 
Real World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and ProductionReal World Experience of Running Docker in Development and Production
Real World Experience of Running Docker in Development and Production
 
Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4Academy PRO: Docker. Lecture 4
Academy PRO: Docker. Lecture 4
 

Recently uploaded

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
tolgahangng
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
AstuteBusiness
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
Antonios Katsarakis
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
saastr
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
marufrahmanstratejm
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
saastr
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
Hiike
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
Jakub Marek
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Precisely
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
HarisZaheer8
 

Recently uploaded (20)

Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Serial Arm Control in Real Time Presentation
Serial Arm Control in Real Time PresentationSerial Arm Control in Real Time Presentation
Serial Arm Control in Real Time Presentation
 
Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |Astute Business Solutions | Oracle Cloud Partner |
Astute Business Solutions | Oracle Cloud Partner |
 
Dandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity serverDandelion Hashtable: beyond billion requests per second on a commodity server
Dandelion Hashtable: beyond billion requests per second on a commodity server
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
Deep Dive: AI-Powered Marketing to Get More Leads and Customers with HyperGro...
 
Public CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptxPublic CyberSecurity Awareness Presentation 2024.pptx
Public CyberSecurity Awareness Presentation 2024.pptx
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
Overcoming the PLG Trap: Lessons from Canva's Head of Sales & Head of EMEA Da...
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - HiikeSystem Design Case Study: Building a Scalable E-Commerce Platform - Hiike
System Design Case Study: Building a Scalable E-Commerce Platform - Hiike
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)Main news related to the CCS TSI 2023 (2023/1695)
Main news related to the CCS TSI 2023 (2023/1695)
 
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their MainframeDigital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
Digital Banking in the Cloud: How Citizens Bank Unlocked Their Mainframe
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
AWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptxAWS Cloud Cost Optimization Presentation.pptx
AWS Cloud Cost Optimization Presentation.pptx
 

Webinar: Building Embedded Applications from QtCreator with Docker

  • 1. Copyright 2020, Burkhard Stubert Build and Run Embedded Apps Faster from QtCreator with Docker Burkhard Stubert As a solo consultant, I help teams succeed with Qt embedded systems
  • 2. The Problem 2 App A v3.5 App A v1.0 App B v2.3 App C v4.7 Qt SDK Yocto 2.7 Ubuntu 18.04 Qt SDK Yocto 2.0 Ubuntu 14.04 Qt SDK Yocto 2.4 Ubuntu 16.04 Qt SDK Yocto 3.1 Ubuntu 19.10 Workstation 2x Xeon (32 cores) Ubuntu 16.04 All Qt SDKs built in Docker containers on same workstation How do we best build Apps from QtCreator? ? ? ? ?
  • 3. Solution 1 (Currently Used): Virtual Machines 3 Host OS: Windows, MacOS, Linux App A v3.5 Qt SDK Yocto 2.7 Guest OS: Ubuntu 18.04 Host OS: Windows, MacOS, Linux App A v1.0 Qt SDK Yocto 2.0 Guest OS: Ubuntu 14.04 Host OS: Windows, MacOS, Linux App B v2.3 Qt SDK Yocto 2.4 Guest OS: Ubuntu 16.04 Host OS: Windows, MacOS, Linux App C v4.7 Qt SDK Yocto 3.1 Guest OS: Ubuntu 19.10 2-3 VMs fit on same dev PC Fast workstation and existing containers not used for app builds VMs slower than containers
  • 4. Solution 2 (This Talk): Containers on Local Workstation 4 Workstation: Ubuntu 16.04 QtCreator App A v3.5 Qt SDK Yocto 2.7 Ubuntu 18.04 Container QtCreator App A v1.0 Qt SDK Yocto 2.0 Ubuntu 14.04 Container QtCreator App B v2.3 Qt SDK Yocto 2.4 Ubuntu 16.04 Container QtCreator App C v4.7 Qt SDK Yocto 3.1 Ubuntu 19.10 Container Build details hidden in black box (container) Reuse existing containers on fast workstation
  • 5. Solution 3 (Future): Containers on Remote Workstation 5 Windows QtCreator App A v3.5 Linux QtCreator App A v1.0 Windows QtCreator App B v2.3 MacOS QtCreator App C v4.7 Workstation: Ubuntu 16.04 Qt SDK Yocto 2.7 Ubuntu 18.04 Container Qt SDK Yocto 2.0 Ubuntu 14.04 Container Qt SDK Yocto 2.4 Ubuntu 16.04 Container Qt SDK Yocto 3.1 Ubuntu 19.10 Container Apps developed on different computers Apps built in containers on one or more remote workstations
  • 6. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 6 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 7. Copyright 2020, Burkhard Stubert How QtCreator Calls CMake (Native Build) Stage Working Directory CMake Command Configure project /tmp/QtCreator-YqhjyI/qtc-cmake- MDHAJjOH => <work-dir-1> cmake '-GUnix Makefiles' -C <work-dir-1>/qtcsettings.cmake /public/Work/cuteradio-apps Generate build files /public/Work/build-cuteradio-apps- Desktop_Qt_5_14_2_GCC_64bit- Debug => <work-dir-2> cmake '-GUnix Makefiles' -C <work-dir-2>/qtcsettings.cmake /public/Work/cuteradio-app Compile <work-dir-2> cmake --build . --target all -- -j4 Install <work-dir-2> cmake --build . --target install 7 Call Docker wrapper instead of cmake
  • 8. Docker Wrapper for CMake 8 #!/bin/bash args=$(echo $@ | sed -e "s|-GCodeBlocks - Unix Makefiles|'- GCodeBlocks - Unix Makefiles'|g") docker run --rm -v /public/Work:/public/Work -v /tmp:/tmp -w $(pwd) dr-yocto:sdk-18.04 cmake $args Save script in $HOME/bin/dr-cmake Resurrect single quotes removed by shell /public/Work and /tmp visible both on host PC and in container
  • 9. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 9 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 10. My Setup 10 Workstation: Ubuntu 16.04 QtCreator Cuteradio App Qt SDK for RPi 3 Yocto 2.6 Ubuntu 18.04 Container Only a proof of concept!
  • 11. Copyright 2020, Burkhard Stubert Prerequisites: General • Install Docker on workstation (see [2]) • Create a Docker container (sdk-18.04) for Yocto builds (see [3]) • Build a Linux image with the Docker container (see [3]) • Or: Use a pre-built Boot2Qt image from The Qt Company (see [5] and [6]) • Build Qt SDK with the Docker container (see [4]) • Or: Use a pre-built Boot2Qt SDK from The Qt Company (see [5] and [6]) • Establish SSH connection between workstation and device (see [1] and [4]) 11
  • 12. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 12 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 13. Prerequisites: SSH Access to Device 13 See [1] and [4] how to add device
  • 14. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 14 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 15. Installing Qt SDK in Container 15 $ cd /public/Work $ docker run –t –rm –v /public/Work:/public/Work -v /tmp:/tmp -w $(pwd) dr-yocto:sdk-18.04 On Workstation: # cd cuteradio-thud/build-rpi3/tmp/deploy/sdk/ # ./poky-glibc-x86_64-meta-toolchain-qt5-cortexa7t2hf-neon-vfpv4- toolchain-2.6.4.sh Poky (Yocto Project Reference Distro) SDK installer version 2.6.4 ================================================================= Enter target directory for SDK (default: /opt/poky/2.6.4): /public/Work/qt-sdk-thud ... In Docker container:
  • 16. Setting Up Build Environment in Dockerfile 16 export OECORE_NATIVE_SYSROOT="/public/Work/qt-sdk-thud/sysroots/x86_64-pokysdk-linux" export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT" export OECORE_BASELIB="lib" export OECORE_TARGET_ARCH="arm" export OECORE_TARGET_OS="linux-gnueabi" ... ENV OECORE_NATIVE_SYSROOT="/public/Work/qt-sdk-thud/sysroots/x86_64-pokysdk-linux" ENV OECORE_TARGET_SYSROOT="${SDKTARGETSYSROOT}" ENV OECORE_BASELIB="lib" ENV OECORE_TARGET_ARCH="arm" ENV OECORE_TARGET_OS="linux-gnueabi" ... source environment-setup-cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi Dockerfile Change all environment variables
  • 17. Fixing Environment Variables for QtCreator 17 export CC="arm-poky-linux-gnueabi-gcc -march=armv7ve -mthumb -mfpu=neon-vfpv4 - mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT" export CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types " export CXX="arm-poky-linux-gnueabi-g++ -march=armv7ve -mthumb -mfpu=neon-vfpv4 - mfloat-abi=hard -mcpu=cortex-a7 --sysroot=$SDKTARGETSYSROOT" export CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types " ENV CC="arm-poky-linux-gnueabi-gcc" ENV CFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -march=armv7ve -mthumb - mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=${SDKTARGETSYSROOT}" ENV CXX="arm-poky-linux-gnueabi-g++" ENV CXXFLAGS=" -O2 -pipe -g -feliminate-unused-debug-types -march=armv7ve -mthumb - mfpu=neon-vfpv4 -mfloat-abi=hard -mcpu=cortex-a7 --sysroot=${SDKTARGETSYSROOT}" Do same with LD/LDFLAGS and CPP/CPPFLAGS Move options from CC to CFLAGS and from CXX to CXXFLAGS
  • 18. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 18 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 21. Configuring QtCreator: Kit – CMake Generator 21
  • 22. Configuring QtCreator: Kit – CMake Configuration 22
  • 23. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 23 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 24. Building the App with dr-cmake: Switching to Project "Docker Raspberry Pi" 24
  • 25. Building the App with dr-cmake: Output when Switching the Project 25
  • 26. Building the App with dr-cmake: CMake-Output of Switching to Project 26 15:50:29: Running steps for project cuteradio-apps... 15:50:30: Starting: "/home/burkhard/bin/dr-cmake" --build . --target all [ 16%] Automatic MOC for target cuteradio [ 16%] Built target cuteradio_autogen [ 33%] Automatic RCC for qml.qrc Scanning dependencies of target cuteradio [ 50%] Building CXX object CMakeFiles/cuteradio.dir/cuteradio_autogen/mocs_compilation.cpp.o [ 66%] Building CXX object CMakeFiles/cuteradio.dir/main.cpp.o [ 83%] Building CXX object CMakeFiles/cuteradio.dir/cuteradio_autogen/EWIEGA46WW/qrc_qml.cpp.o [100%] Linking CXX executable cuteradio [100%] Built target cuteradio 15:50:33: The process "/home/burkhard/bin/dr-cmake" exited normally. 15:50:33: Elapsed time: 00:05.
  • 27. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 27 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 30. Copyright 2020, Burkhard Stubert QtCreator-CMake-Docker 30 • Motivation • Idea: Docker Wrapper for CMake • Prerequisites • General • SSH Access to Device • Building App with Docker • Installing Qt SDK in Container • Configuring QtCreator • Building App with Docker-CMake • Running App on Device • Deployment and Run Settings • Running App
  • 31. Running App on Device: Compile Output 31
  • 32. Running App on Device: Application Output 32
  • 33. Copyright 2020, Burkhard Stubert Running App on Device: Instead of a Video 33 Ctrl+R
  • 34. Copyright 2020, Burkhard Stubert References [1] Docker Builds from QtCreator. Basis for this talk. [2] Using Docker Containers for Yocto Builds. How to install Docker. [3] Qt Embedded Systems – Part 1: Building a Linux Image with Yocto. First step to create a Qt SDK. [4] Qt Embedded Systems – Part 2: Building a Qt SDK with Yocto. Creates the Qt SDK used in this talk. [5] The Qt Company, Boot to Qt Software Stack. Official documentation of Boot2Qt. [6] Tino Pyssysalo, Getting Started with Yocto & eLinux. How to install a Qt SDK and start developing an app. 34
  • 35. This presentation is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. Copyright 2020, Burkhard Stubert Thank you  Mail: burkhard.stubert@embeddeduse.com Web: http://www.embeddeduse.com

Editor's Notes

  1. If Ubuntu version newer than Yocto version, Yocto builds fail with strange errors. Ubuntu versions can also be too old so that newer Yocto versions don't build on them. App developers work on different Ubuntu versions for many good reasons. Embedded systems have life times of 10, 15 or even 20 years. As the manufacturer, you must guarantee that systems work that long.
  2. You can run VMs (basically) everywhere: on laptop, dev PC, workstation. Build times for my current project: ~5 minutes in VM on Macbook Pro, 20 seconds natively on workstation. Longer build times sum up. Easily 1-2 days per month per team (3 developers).
  3. All containers have the same interface!!! They are black boxes for QtCreator Reuses existing containers on fast workstation
  4. This is what you do with builds of Linux images and Qt SDKs already – and for release builds. CLion seems to support these remote builds.
  5. The cmake calls are the interface to the Docker containers. They are the same for all containers. The work directories /tmp and /public/Work must be visible in host PC and in Docker container.
  6. QtCreator only passes the binary of the C and C++ compiler (without any options) to CMake. This lets the compiler test fail, because the test binary doesn't have the right floating-point support. QtCreator expects all compiler flags in the CFLAGS and CXXFLAGs and ignores options contained in CC and CXX.
  7. Hit Ctrl+B