Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ......
Transcript of Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ......
![Page 1: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/1.jpg)
Device Creation with Qt Enterprise Embedded
Andy Nichols
![Page 2: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/2.jpg)
2
Overview
• The challenges of device creation
• What is Qt Enterprise Embedded
• Prototyping a device
• Device creation
![Page 3: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/3.jpg)
3
The Challenges of Device Creation
![Page 4: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/4.jpg)
4
The Application is just one step
• Qt is used to more easily produce Applications
• Easy to share code across multiple platforms
![Page 5: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/5.jpg)
5
The Application dictates the hardware
![Page 6: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/6.jpg)
6
The Application and Hardware dictate the OS
![Page 7: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/7.jpg)
7
Provide your own SDK
• Toolchain to generate binaries for your hardware
• System image to flash to device
• Sysroot containing the development files
![Page 8: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/8.jpg)
8
Device Creation with Qt
• Qt abstracts away the details of the OS and hardware
• It is still up to you to provide the platform
![Page 9: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/9.jpg)
9
What is Qt Enterprise Embedded?
• Qt
• Platform
• Tooling
![Page 10: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/10.jpg)
10
Qt + Additional tools for Device Creators
• Latest Qt Release
• Virtual Keyboard
• Enterprise Qt Quick Controls
• Wifi Utilities
• Charts API
• 3D Data Visualisation
• Qt WebEngine
• Qt Quick Compiler
![Page 11: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/11.jpg)
11
Virtual Keyboard
![Page 12: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/12.jpg)
12
Enterprise Qt Quick Controls
![Page 13: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/13.jpg)
13
Wifi Utilities
![Page 14: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/14.jpg)
14
Charts and 3D Data Visualisation APIs
![Page 15: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/15.jpg)
15
Qt WebEngine
![Page 16: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/16.jpg)
16
What is Qt Enterprise Embedded?
• Qt
• Platform
• Tooling
![Page 17: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/17.jpg)
17
Qt Enterprise Embedded provides the platform
![Page 18: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/18.jpg)
18
Embedded Linux Platform
• Using Yocto Project tools
• b2qt-meta layer to provide barebones distro for Qt 5
• Yocto is the industry standard
• Many meta layers available for you to mix-n-match
![Page 19: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/19.jpg)
19
Embedded Android
• Android Injection
• No need to build the AOSP, use existing device images
• Android without Java, Using Platform Developers APIs
• Take advantage of a device that already fits your needs
![Page 20: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/20.jpg)
20
What is Qt Enterprise Embedded?
• Qt
• Platform
• Tooling
![Page 21: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/21.jpg)
21
Qt Creator IDE
![Page 22: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/22.jpg)
22
Pre-configured Kits for your Device
• Linux: Use the SDK built by Yocto
• Android: Just select the version of Android that is on your device
![Page 23: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/23.jpg)
23
One Click Deploy
• USB
• Ethernet
![Page 24: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/24.jpg)
24
Remote Debugging of C++ and QML
![Page 25: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/25.jpg)
25
Remote Profiling
![Page 26: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/26.jpg)
26
Device Emulator
![Page 27: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/27.jpg)
27
Prototyping a Device
![Page 28: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/28.jpg)
28
Reference Hardware
• Pre-built Images
• SDKs
• Start prototyping on hardware from Day 1
![Page 29: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/29.jpg)
29
Linux Reference Hardware
• Beaglebone Black
• Raspberry Pi
• Emulator
• Toradex Apalis iMX6
• Freescale Sabre
• Boundary Devices Nitrogen6x
![Page 30: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/30.jpg)
30
Android Reference Devices• Nexus 7 (2012/2013)
• Beaglebone Black
• Freescale Sabre
• Boundary Devices Nitrogen6x
• Emulator
![Page 31: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/31.jpg)
31
Getting Started
• Install the SDK for the device from the Qt Installer
• Flash the image to the device with our deploy scripts
• Plug in the USB and launch your App from Qt Creator
![Page 32: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/32.jpg)
32
Benefits of Prototyping on real hardware
• Test an SOC to see if its a good fit for your product
• Have a mock up to show your boss or VC
• The code can be reused for the actual product
![Page 33: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/33.jpg)
33
Device Creation
![Page 34: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/34.jpg)
34
Linux device SDK
• Use Yocto to generate base system image and SDK
• Build Qt, Add-ons, and B2Qt Utilities
• Register new SDK with Qt Creator
![Page 35: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/35.jpg)
35
Using Yocto
• Base image and SDK for device
• Vendor specific meta-layers
• Define additional features and 3rd party libraries
• Modify the kernel to meet your needs
![Page 36: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/36.jpg)
36
Build your own stack
#Setup Yocto tools/repos!cd <BuildDir>!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-yocto-meta/b2qt-init-build-env .!export TEMPLATECONF=meta-b2qt/conf!export MACHINE=beaglebone!source poky/oe-init-build-env build-beaglebone!!
#build base image!bitbake b2qt-embedded-image!!
#build SDK (toolchain/sysroot)!bitbake meta-toolchain-b2qt-embedded-sdk
![Page 37: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/37.jpg)
37
Need help with Yocto?
• Yocto User Manual
• Yocto eBook
• The Qt Company and its partners
![Page 38: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/38.jpg)
38
Building Qt, Add-ons, B2Qt Utils
#Setup Build Environment!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-common/init_build_env.sh <INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-linux/config.beaglebone!!#Build Qt Libraries!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-linux/build_qt.sh!!#Build Add-ons and Utils!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-linux/build_extras.sh!!#Generate new boot Image!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-linux/build_image.sh!!
![Page 39: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/39.jpg)
39
Building Qt for custom machines
• config.${MACHINE}
• appcontroller.conf.${MACHINE}
• qt.conf.${MACHINE}
![Page 40: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/40.jpg)
40
config.${MACHINE}
#beaglebone config!export PLATFORM="eLinux"!export MACHINE="beaglebone"!export DEVICE="linux-beaglebone-g++"!export ARCH="arm"!export SYSROOT="armv7ahf-vfp-neon-poky-linux-gnueabi"!export COMPILER="arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-"
![Page 41: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/41.jpg)
41
appcontroller.conf.${MACHINE}
#beaglebone appcontroller environment!env=QML2_IMPORT_PATH=/data/user/qt/qmlplugins!env=QT_IM_MODULE=qtvirtualkeyboard!env=QT_QPA_EGLFS_FORCE888=0!base=linux!platform=beaglebone
![Page 42: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/42.jpg)
42
qt.conf.${MACHINE}
#beaglebone qt.conf![Paths]!Sysroot=../../toolchain/sysroots/armv7ahf-vfp-neon-poky-linux-gnueabi!Prefix=/bin/../../../../qt5!HostPrefix=..!
![Page 43: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/43.jpg)
43
Register new SDK with Qt Creator
#Register new Kit in Qt Creator!<INSTALL_DIR>/Boot2Qt-3.x/sources/b2qt-build-scripts/embedded-common/setup_qtcreator.sh
![Page 44: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/44.jpg)
44
Android Device SDK
• Android 4.2 or Android 4.4
• Root access
• Unlocked bootloader
![Page 45: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/45.jpg)
45
Android Injection
• Modify init.rc
• Deploy payload based on Android version
![Page 46: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/46.jpg)
46
Android Injection: Nexus 4
#Modify boot image!abootimg -x ../boot.img!mkdir initrd!cd initrd!cat ../initrd.img | gunzip | cpio -vid!!#Modify the init.rc file using the sed file!sed -f <INSTALL_DIR>/Boot2Qt-3.x/generic-4.2-eAndroid/images/generic/modify_init_rc.sed -i init.rc!!#Repackage the boot.img!find . | cpio --create --format='newc' | gzip > ../myinitrd.img!abootimg --create myboot.img -f bootimg.cfg -k zImage -r myinitrd.img!!#Flash the new boot.img to the device!fastboot flash boot myboot.img!fastboot reboot
![Page 47: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/47.jpg)
47
Android Injection: Nexus 4
#Push Data Payload to the device!mkdir data!tar xf <INSTALL_DIR>/Qt/Boot2Qt-3.x/generic-4.2-eAndroid/images/data.tar.xz -C data/!find data -type d -exec adb shell mkdir -p /{} \;!adb push data/. /data 2>&1 | grep -v '\ ->\ '!#Push System Payload to the device!mkdir system!tar -xf <INSTALL_DIR>/Boot2Qt-3.x/generic-4.2-eAndroid/images/system.tar.xz -C system/!cp <INSTALL_DIR>/Boot2Qt-3.x/generic-4.2-eAndroid/images/nexus7/appcontroller.conf .!cp appcontroller.conf system/bin/!cp <INSTALL_DIR>/Boot2Qt-3.x/generic-4.2-eAndroid/images/common/gdbserver system/bin/!adb remount!find system -type d -exec adb shell mkdir -p /{} \;!adb push system/. /system 2>&1 | grep -v '\ ->\ '
![Page 48: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/48.jpg)
48
Demo Time!
![Page 49: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/49.jpg)
49
Future Research
• Build Everything in Yocto
• Low end profile (DirectFB)
• Multi-process support (Wayland)
![Page 50: Device creation with Qt Enterprise Embedded - · PDF file• Using Yocto Project tools ... • Beaglebone Black ... Device creation with Qt Enterprise Embedded Created Date:](https://reader031.fdocuments.in/reader031/viewer/2022012403/5aa3c5737f8b9a2f048b546f/html5/thumbnails/50.jpg)
50
Questions?