agl software development kit - events.static.linuxfound.org · agl software development kit feb 23,...
TRANSCRIPT
![Page 1: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/1.jpg)
AGL Software Development Kit
Stéphane DesneuxCTO at IoT.bzh<[email protected]>
AMM - TokyoWinter 2016
![Page 2: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/2.jpg)
Feb 23, 2016AGL Software Development Kit 2
IoT.bzh● Specialized on Embedded & IoT● Contributing to AGL Project
for Renesas● Expertise domains:
– System architecture– Security– Application Framework– Graphics & Multimedia– Middleware– Linux Kernel
● Located in Brittany, France
![Page 3: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/3.jpg)
Feb 23, 2016AGL Software Development Kit 3
Agenda
● SDK Explained● Building the SDK in a Docker image● Demo - AGL 1.0 SDK● Future enhancements● Demo - AGL next SDK● Q&A
![Page 4: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/4.jpg)
Feb 23, 2016AGL Software Development Kit 4
SDK Explained
![Page 5: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/5.jpg)
Feb 23, 2016AGL Software Development Kit 5
Context
● HTML5, native or hybrid applications on top of the AGL BSP for a specific board
● Bypass shortage of Yocto skills– ~ 0.5M embedded developers– ~ 17M web & mobile apps developers
● Heterogeneous environments: for a good adoption, the SDK should work in various environments: Windows, Linux, Mac OS
![Page 6: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/6.jpg)
Feb 23, 2016AGL Software Development Kit 6
Proposed Features
● IDE - Integrated Development Environment● Develop source code ● Build for a selected AGL target board
(cross-compiling)● Deploy the software package onto a target
board or an emulator● Remotely run & debug the software
package in the target environment
![Page 7: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/7.jpg)
Feb 23, 2016AGL Software Development Kit 7
Proposed architecture
![Page 8: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/8.jpg)
Feb 23, 2016AGL Software Development Kit 8
Benefits● Naturally aligned with the BSP
– a SDK container is built after each BSP container, for every snapshot– applications in the SDK are built with the same toolchain as the BSP.
● Stability & Uniformity– a container provides simple, unbiased build environments– independent of the host system
● Ubiquity– a SDK container may run on the Cloud, on-premises, on developers
hosts …● Cost & Time to market
– out-of-the-box solution– applications developed faster and ready earlier
● Long Term Support– re-create the development environment decades after product release
![Page 9: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/9.jpg)
Feb 23, 2016AGL Software Development Kit 9
Availability
● Available for AGL Albacore 1.0 on Renesas Porter since January 2016
http://iot.bzh/download/public/2016/sdk/
![Page 10: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/10.jpg)
Feb 23, 2016AGL Software Development Kit 10
Building the SDK
![Page 11: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/11.jpg)
Feb 23, 2016AGL Software Development Kit 11
Three base components
1: Base Docker image - Debian 8.x
2: AGL Application Development Toolkit
3: IDE - Eclipse
![Page 12: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/12.jpg)
Feb 23, 2016AGL Software Development Kit 12
1: SDK Base Docker Image● Based on latest Debian 8.x● Meets the requirements for both Yocto ADT
and Eclipse IDE● XRDP Server, very light desktop environment
(OpenBox)● Extra tools:
– gcc, g++ (x86_64 native toolchain), cmake, ccache, git, ...
– nodejs, gulp, bower (HTML5 development)● Upgradable and expandable:
– this is a genuine Debian image, with “full” comfort– apt-get update && apt-get install <whatever>
![Page 13: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/13.jpg)
Feb 23, 2016AGL Software Development Kit 13
2: AGL App Dev Toolkit● produced by bitbake using Yocto/OE tools
and AGL layers
bitbake agl-image-ivi-crosssdk● auto-installable archive, ~400MB● content:
– cross toolchain (gcc, g++, binutils for the target platform)
– C/C++ headers depending on distribution content– static and dynamic libraries– Target sysroot, Native sysroot
● should be built and published in every AGL snapshot/release for all target boards
![Page 14: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/14.jpg)
Feb 23, 2016AGL Software Development Kit 14
3: Integrated Dev Environment
● Eclipse IDE is popular and widely spread
● Maintained by Eclipse.org and Codenvy● Many plugins are available, in
particular:– Yocto ADT plugin– TCF (WindRiver) for deployment, access
and remote debug on a target board (even behind firewalls)
● Eclipse Kepler for Yocto 1.7 compatibility
![Page 15: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/15.jpg)
Feb 23, 2016AGL Software Development Kit 15
Building SDK in a container
● Instantiate a new SDK base container● Copy and install AGL ADT archive● Install Eclipse IDE and plugins● Finalize environment (XRDP server, user
homescreen, extra tools ...)● Commit the container into a new image
![Page 16: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/16.jpg)
Feb 23, 2016AGL Software Development Kit 16
Docker: Publish & Deploy
● Tag the SDK image with unique id:– IMAGE_ID=agl/sdk-porter-snapshot:b141
– docker tag 75293fda2e39 $IMAGE_ID
● Push to Docker hub or private Registry:– docker push $IMAGE_ID
● A developer can then grab and run the image:– docker run -p 3389 --privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro agl/sdk-porter-snapshot:b141
![Page 17: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/17.jpg)
Feb 23, 2016AGL Software Development Kit 17
Deploy without Docker Hub
● Tag the SDK image with unique id:– IMAGE_ID=agl/sdk-porter-snapshot:b141
– docker tag 75293fda2e39 $IMAGE_ID
● Export the image to a file and publish it on the web:– docker save $IMAGE_ID | xz -T0 -c >sdk-porter-snapshot_b141.xz
– scp sdk-porter-snapshot_b141.xz www@webserver:/srv/www/htdocs/downloads/
● A developer can then grab and run the image:– curl http://.../sdk-porter-snapshot_b141.xz | docker load
– docker run -p 3389 --privileged \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro agl/sdk-porter-snapshot:b141
![Page 18: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/18.jpg)
Feb 23, 2016AGL Software Development Kit 18
Demo: AGL 1.0 SDKfor Renesas Porter board
![Page 19: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/19.jpg)
Feb 23, 2016AGL Software Development Kit 19
Renesas Porter Board● R-Car M2 SoC
– ARM Cortex-A15– Dual Core 1.5GHz– Multimedia Engine– GPU PowerVR SGX544MP2
● 2GB DDR3● 2 Flash Mem Chips● Ethernet● Storage: SATA, SD, microSD● Video: Analog In, HDMI Out● Audio: In/Out● USB 2.0● CAN Transceiver
![Page 20: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/20.jpg)
Feb 23, 2016AGL Software Development Kit 20
AGL SDK Initialization● Load the SDK Docker image:
● Instantiate a new SDK Container named 'aglsdk':
● Open a new RDP session on localhost:3389
docker pull docker.iot.bzh/agl/snapshot-stable-sdk:1.0
docker run --publish=3389:3389 --detach=true \ --privileged \ --hostname=aglsdk --name=aglsdk \ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \ docker.iot.bzh/agl/snapshot-stable-sdk:1.0
xfreerdp -u devel -p devel -g 1200x700 localhost
![Page 21: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/21.jpg)
Feb 23, 2016AGL Software Development Kit 21
Connect through RDP
RDP session starting Eclipse IDE Initial Screen
![Page 22: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/22.jpg)
Feb 23, 2016AGL Software Development Kit 22
Build a C/C++ program
Cross-compilation using Yocto & Eclipse
![Page 23: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/23.jpg)
Feb 23, 2016AGL Software Development Kit 23
Remote debugging
Remote debugging on Eclipse using SSH and gdbserver
![Page 24: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/24.jpg)
Feb 23, 2016AGL Software Development Kit 24
Future Enhancements
![Page 25: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/25.jpg)
Feb 23, 2016AGL Software Development Kit 25
Future enhancements
● Use Eclipse Che (next generation IDE)– Web & Containers based– Support for C/C++ and HTML5 apps
● AGL specific plugin for Eclipse can be developed
![Page 26: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/26.jpg)
Feb 23, 2016AGL Software Development Kit 26
Eclipse Che Architecture
https://www.filepicker.io/api/file/O3D1OORwRmCWzuE8mD2s
![Page 27: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/27.jpg)
Feb 23, 2016AGL Software Development Kit 27
Next SDK Architecture
![Page 28: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/28.jpg)
Feb 23, 2016AGL Software Development Kit 28
Technical Improvements
● Smaller SDK image:– Remove RDP– ADT cleanup
● Target board emulation through Qemu● Solve permission conflicts on shared files
due to lack of UID mapping in Docker
![Page 29: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/29.jpg)
Feb 23, 2016AGL Software Development Kit 29
Demo: AGL 2.0 SDK previewbased on Eclipse Che
![Page 30: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/30.jpg)
Feb 23, 2016AGL Software Development Kit 30
Building HTML5 Application
● Standard Web and Mobile build environment:– Angular.js, Foundation for Apps
● Build system:– Code optimization, compression– Support Development/Production modes
● Associated browser:– Debugging in Chromium– LiveReload extension
![Page 31: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/31.jpg)
Feb 23, 2016AGL Software Development Kit 31
HTML5 Apps
Radio, Annex, Rabbit
![Page 32: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/32.jpg)
Feb 23, 2016AGL Software Development Kit 32
Application Framework Design
![Page 33: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/33.jpg)
Feb 23, 2016AGL Software Development Kit 33
Eclipse Che: dashboard
![Page 34: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/34.jpg)
Feb 23, 2016AGL Software Development Kit 34
Eclipse Che: new project
![Page 35: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/35.jpg)
Feb 23, 2016AGL Software Development Kit 35
Eclipse Che: HTML5 workspace
![Page 36: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/36.jpg)
Feb 23, 2016AGL Software Development Kit 36
Q&A
Gulf of Morbihan, south of Brittany, France
![Page 37: AGL Software Development Kit - events.static.linuxfound.org · AGL Software Development Kit Feb 23, 2016 8 Benefits Naturally aligned with the BSP – a SDK container is built after](https://reader030.vdocuments.net/reader030/viewer/2022040212/5e8bda22400ce1338f110aa1/html5/thumbnails/37.jpg)
Feb 23, 2016AGL Software Development Kit 37
Links
● IoT.bzh: www.iot.bzh● AGL SDK downloads:
http://iot.bzh/download/public/2016/sdk/● Eclipse: www.eclipse.org ● Docker: www.docker.com● Yocto Project: www.yoctoproject.org