SlideShare a Scribd company logo
1 of 24
Download to read offline
Software update for IoT
the current state of play
Chris Simmonds
Embedded World 2017
Software update for IoT 1 Copyright © 2011-2017, 2net Ltd
License
These slides are available under a Creative Commons Attribution-ShareAlike 3.0 license. You can read the full
text of the license here
http://creativecommons.org/licenses/by-sa/3.0/legalcode
You are free to
• copy, distribute, display, and perform the work
• make derivative works
• make commercial use of the work
Under the following conditions
• Attribution: you must give the original author credit
• Share Alike: if you alter, transform, or build upon this work, you may distribute the resulting work only
under a license identical to this one (i.e. include this page exactly as it is)
• For any reuse or distribution, you must make clear to others the license terms of this work
Software update for IoT 2 Copyright © 2011-2017, 2net Ltd
About Chris Simmonds
• Consultant and trainer
• Author of Mastering Embedded Linux Programming
• Working with embedded Linux since 1999
• Android since 2009
• Speaker at many conferences and workshops
"Looking after the Inner Penguin" blog at http://2net.co.uk/
https://uk.linkedin.com/in/chrisdsimmonds/
https://google.com/+chrissimmonds
Software update for IoT 3 Copyright © 2011-2017, 2net Ltd
Overview
• Software update 101
• Software update for embedded Linux
• Over The Air (OTA) update
• Stateless rootfs
Software update for IoT 4 Copyright © 2011-2017, 2net Ltd
What could possibly go wrong?
• Mirai: a recent > 600 Gbps DDoS attack
• Very simple: looks for open Telnet ports
and logs on using default, well-known,
name and password
• Prime target: Dahua IP CCTV cameras
Details on PenTestPartners:
https://www.pentestpartners.com/blog/optimising-mirai-a-better-iot-ddos-botnet
Software update for IoT 5 Copyright © 2011-2017, 2net Ltd
Requirements for SW update
• Secure: must not become an attack vector to hijack the device
• Robust: must not render the device unusable
• Atomic: an update must be installed completely or not at all
• Fail-safe: should fall-back to last known working system if there are
errors
Software update for IoT 6 Copyright © 2011-2017, 2net Ltd
What to update?
Frequency
Ease of update
Bootloader
Kernel
Root file system
System applications
Software update for IoT 7 Copyright © 2011-2017, 2net Ltd
Update granularity
• File:
• not an option: hard to achieve atomicity over a group of file updates
• Package (e.g. RPM, deb):
• apt-get update works fine for servers but not for devices
• Entire filesystem image:
• the most common option: fairy easy to implement and verify
• Atomic differential update
• Uses clever tricks to perform atomic update of groups of files
• Container
• neat idea, so long as you have containerised applications
Software update for IoT 8 Copyright © 2011-2017, 2net Ltd
Device update != server update
• Server
• Secure environment, no power outage, no network outage
• If update fails, human intervention is possible
• Device:
• Intermittent power and network mean update quite likely to be
interrupted
• Failed update may be difficult (and expensive) to resolve
Incremental package updates via RPM/deb are not atomic
Software update for IoT 9 Copyright © 2011-2017, 2net Ltd
Image update
Symmetric A/B (Android after
Nougat)
Bootloader User
data
Boot
flag
OS Copy 1
OS Copy 2
Asymmetric normal/recovery
(Android before Nougat)
Bootloader
Main OS
Recovery OS
User
data
Boot
flag
Software update for IoT 10 Copyright © 2011-2017, 2net Ltd
Examples of image updaters 1/2
• swupdate: http://sbabic.github.io/swupdate/index.html
• Symmetric and asymmetric image update client
• License: GPLv2
• Mender: https://mender.io
• Symmetric image update client
• Integrates with open source OTA update server
• License: Apache 2
Software update for IoT 11 Copyright © 2011-2017, 2net Ltd
Examples of image updaters 2/2
• RAUC (Robust Auto-Update Controller):
https://rauc.readthedocs.org/
• Symmetric and asymmetric image update client
• License: LGPLv2.1
• Android Things:
https://developer.android.com/things/hardware/index.html
• Symmetric and asymmetric image update client
• Android Things is cut-down Android for IoT
• License: Apache 2
Software update for IoT 12 Copyright © 2011-2017, 2net Ltd
Atomic differential update (OSTree)
• OSTree stores data in a "git-like" object repository
• Actual filesystem created from hard links to objects in the repository
• Checkout is atomic
• Pluses
• Updates are incremental: uses less disk space than A/B image update
• Reduced transfer time: update contains only changed files
• Minuses
• Physically there is only one filesystem: cannot recover from filesystem
corruption
Software update for IoT 13 Copyright © 2011-2017, 2net Ltd
Projects using OSTree
• Automotive Grade Linux (agl)
• Yocto Project meta-updater layer
Software update for IoT 14 Copyright © 2011-2017, 2net Ltd
Atomic differential update (swupd)
• Similar to OSTree
• swupd processes updates in bundles
• Bundle contains file updates
• Updates to bundles are applied atomically
Software update for IoT 15 Copyright © 2011-2017, 2net Ltd
Projects using swupd
• Clear Linux
• Ostro OS
• Yocto Project meta-swupd layer
Software update for IoT 16 Copyright © 2011-2017, 2net Ltd
Containerised updaters
• Consists of
• Immutable base OS
• Applications in containers
• Update client running in base OS is able to update the applications
atomically
• But, note that:
• Updates applications only
• Need another mechanism to update kernel and rootfs (e.g image A/B)
Software update for IoT 17 Copyright © 2011-2017, 2net Ltd
Examples of containerised updaters
• resin.io: https://resin.io
• Applications distributed in Docker containers
• Managed on device by Resin Container Engine
• Integrates with OTA update server (not open source)
• Licenses: Client: Apache2; Server: proprietary
• Snappy: https://snapcraft.io
• Containers are called snaps
• A snap contains a squashfs file system, mounted on /snap/[app]
• License: GPLv3
Software update for IoT 18 Copyright © 2011-2017, 2net Ltd
OTA update
Device software
build system
Firmware
images
Sign with
authentication
key
Update
server
Device
Update
agent
Software update for IoT 19 Copyright © 2011-2017, 2net Ltd
Complexities of OTA update
• Authentication (is this update legit?)
• Security (am I receiving what you are sending?)
• Roll-back (if update fails to boot, switch to previous version)
• Scale (roll out to large populations)
• Monitoring (keeping track of status of the population of devices)
Software update for IoT 20 Copyright © 2011-2017, 2net Ltd
Roll-back
• Boot limit count
• Feature of bootloader (e.g U-Boot)
• Increment count in bootloader
• Reset after successful boot
• If reboot with count > 0, bootloader knows boot failed and loads alternate
rootfs
• Hardware watchdog
• If hang in early boot, watchdog times out and resets CPU
• Bootloader checks reset reason
• If watchdog, loads alternate rootfs
Software update for IoT 21 Copyright © 2011-2017, 2net Ltd
Stateless filesystems
• Most of the updaters mentioned require a stateless rootfs
• You need to store run-time changes to files outside filesystems being
updated
• Methods:
• symlink or bind mount files to writeable storage
• modify existing code to keep state separate
• write new code to be stateless
• See https://www.slideshare.net/chrissimmonds/
readonly-rootfs-theory-and-practice
Software update for IoT 22 Copyright © 2011-2017, 2net Ltd
Conclusion
• Image update is well-understood and road tested
• swupdate, RAUC, Mender, Android Things
• Atomic update promises finer granularity and smaller updates
• OSTree, swupd
• Containerised update is trendy, but only solves part of the problem
• resin.io, snappy
• Some projects integrate with OTA update servers
• Mender, resin.io, (swupdate, RAUC via Hawkbit
https://eclipse.org/hawkbit)
• Update is more robust with a stateless rootfs, but this is still a new
concept to many developers
Software update for IoT 23 Copyright © 2011-2017, 2net Ltd
• Questions?
Slides on Slide Share
https://www.slideshare.net/chrissimmonds/
software-update-for-iot-embedded-world-2017
This and other topics associated with building robust embedded systems
are covered in my training courses
http://www.2net.co.uk/training.html
Software update for IoT 24 Copyright © 2011-2017, 2net Ltd

More Related Content

What's hot

Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016Chris Simmonds
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)Chris Simmonds
 
Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Chris Simmonds
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiChris Simmonds
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Chris Simmonds
 
10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easier10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easierChris Simmonds
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded LinuxChris Simmonds
 
Reducing the boot time of Linux devices
Reducing the boot time of Linux devicesReducing the boot time of Linux devices
Reducing the boot time of Linux devicesChris Simmonds
 
A timeline for embedded Linux
A timeline for embedded LinuxA timeline for embedded Linux
A timeline for embedded LinuxChris Simmonds
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1Qualcomm Developer Network
 
Fast-paced Introduction to Android Internals
Fast-paced Introduction to Android InternalsFast-paced Introduction to Android Internals
Fast-paced Introduction to Android InternalsHamilton Turner
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2Qualcomm Developer Network
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsBenjamin Zores
 
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...Anne Nicolas
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesChris Simmonds
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamRyo Jin
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6Gary Bisson
 
Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019Marco Cavallini
 
Introduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkIntroduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkBenjamin Zores
 

What's hot (20)

Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)The end of embedded Linux (as we know it)
The end of embedded Linux (as we know it)
 
Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019Android rpi-csimmonds-fosdem-2019
Android rpi-csimmonds-fosdem-2019
 
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry PiRunning Android on the Raspberry Pi: Android Pie meets Raspberry Pi
Running Android on the Raspberry Pi: Android Pie meets Raspberry Pi
 
Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5Embedded Linux Quick Start Guide v1.5
Embedded Linux Quick Start Guide v1.5
 
10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easier10 ways hardware engineers can make software integration easier
10 ways hardware engineers can make software integration easier
 
Reducing boot time in embedded Linux
Reducing boot time in embedded LinuxReducing boot time in embedded Linux
Reducing boot time in embedded Linux
 
Reducing the boot time of Linux devices
Reducing the boot time of Linux devicesReducing the boot time of Linux devices
Reducing the boot time of Linux devices
 
A timeline for embedded Linux
A timeline for embedded LinuxA timeline for embedded Linux
A timeline for embedded Linux
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 1
 
Android Booting Scenarios
Android Booting ScenariosAndroid Booting Scenarios
Android Booting Scenarios
 
Fast-paced Introduction to Android Internals
Fast-paced Introduction to Android InternalsFast-paced Introduction to Android Internals
Fast-paced Introduction to Android Internals
 
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
Developing for Industrial IoT with Linux OS on DragonBoard™ 410c: Session 2
 
Droidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded SystemsDroidcon 2013 france - The Growth of Android in Embedded Systems
Droidcon 2013 france - The Growth of Android in Embedded Systems
 
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...
Embedded Recipes 2017 - An easy-to-install real world embedded Linux distribu...
 
Booting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot imagesBooting Android: bootloaders, fastboot and boot images
Booting Android: bootloaders, fastboot and boot images
 
Memory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform TeamMemory Management in TIZEN - Samsung SW Platform Team
Memory Management in TIZEN - Samsung SW Platform Team
 
Quickboot on i.MX6
Quickboot on i.MX6Quickboot on i.MX6
Quickboot on i.MX6
 
Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019Autobuilder2 Yocto Project Summit Lyon 2019
Autobuilder2 Yocto Project Summit Lyon 2019
 
Introduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux FrameworkIntroduction to OpenBricks: an Embedded Linux Framework
Introduction to OpenBricks: an Embedded Linux Framework
 

Viewers also liked

презентація виховного заходу
презентація виховного заходупрезентація виховного заходу
презентація виховного заходуltasenko
 
περιστροφικη κινηση και δευτερος νομος νευτωνα
περιστροφικη κινηση και δευτερος νομος νευτωναπεριστροφικη κινηση και δευτερος νομος νευτωνα
περιστροφικη κινηση και δευτερος νομος νευτωναEvagelos Zampas
 
As funcions sociais da lingua
As funcions sociais da linguaAs funcions sociais da lingua
As funcions sociais da linguaolgaamigodevesa
 
O galego entre_1900_e_1936
O galego entre_1900_e_1936O galego entre_1900_e_1936
O galego entre_1900_e_1936olgaamigodevesa
 
List imzo 1828_25072016
List imzo 1828_25072016List imzo 1828_25072016
List imzo 1828_25072016ltasenko
 
Industrial Sickness and Its Symptoms: Lehman Brothers Example
Industrial Sickness and Its Symptoms: Lehman Brothers ExampleIndustrial Sickness and Its Symptoms: Lehman Brothers Example
Industrial Sickness and Its Symptoms: Lehman Brothers ExampleNathan Fernandes
 
քրիստոնեություն
քրիստոնեությունքրիստոնեություն
քրիստոնեությունMane Boyakhyan
 
Bienio conservador 1933-1936
Bienio conservador 1933-1936Bienio conservador 1933-1936
Bienio conservador 1933-1936anga
 
Quantified self et biohacking
Quantified self et biohackingQuantified self et biohacking
Quantified self et biohackingBenoit Lacherez
 
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκια
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκιαAυτός που αγαπώ έχει δύο ρόδινα αυτάκια
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκιαΓιώργος Γαμβρινός
 

Viewers also liked (15)

բուդդա
բուդդաբուդդա
բուդդա
 
հուդաիզմ
հուդաիզմհուդաիզմ
հուդաիզմ
 
презентація виховного заходу
презентація виховного заходупрезентація виховного заходу
презентація виховного заходу
 
Debates em Psiquiatria
Debates em PsiquiatriaDebates em Psiquiatria
Debates em Psiquiatria
 
περιστροφικη κινηση και δευτερος νομος νευτωνα
περιστροφικη κινηση και δευτερος νομος νευτωναπεριστροφικη κινηση και δευτερος νομος νευτωνα
περιστροφικη κινηση και δευτερος νομος νευτωνα
 
As funcions sociais da lingua
As funcions sociais da linguaAs funcions sociais da lingua
As funcions sociais da lingua
 
O galego entre_1900_e_1936
O galego entre_1900_e_1936O galego entre_1900_e_1936
O galego entre_1900_e_1936
 
Debates em Psiquiatria
Debates em PsiquiatriaDebates em Psiquiatria
Debates em Psiquiatria
 
List imzo 1828_25072016
List imzo 1828_25072016List imzo 1828_25072016
List imzo 1828_25072016
 
Industrial Sickness and Its Symptoms: Lehman Brothers Example
Industrial Sickness and Its Symptoms: Lehman Brothers ExampleIndustrial Sickness and Its Symptoms: Lehman Brothers Example
Industrial Sickness and Its Symptoms: Lehman Brothers Example
 
քրիստոնեություն
քրիստոնեությունքրիստոնեություն
քրիստոնեություն
 
Bienio conservador 1933-1936
Bienio conservador 1933-1936Bienio conservador 1933-1936
Bienio conservador 1933-1936
 
Quantified self et biohacking
Quantified self et biohackingQuantified self et biohacking
Quantified self et biohacking
 
Gentica
Gentica Gentica
Gentica
 
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκια
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκιαAυτός που αγαπώ έχει δύο ρόδινα αυτάκια
Aυτός που αγαπώ έχει δύο ρόδινα αυτάκια
 

Similar to Software update for IoT Embedded World 2017

Kubernetes Robotics Edge Cluster System
Kubernetes Robotics Edge Cluster SystemKubernetes Robotics Edge Cluster System
Kubernetes Robotics Edge Cluster SystemTomoya Fujita
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth Pilli
 
Eminence team
Eminence teamEminence team
Eminence teamVivin NL
 
Packaging tool options
Packaging tool optionsPackaging tool options
Packaging tool optionsLen Bass
 
Choisir le bon business model et la bonne licence pour la survie de son proje...
Choisir le bon business model et la bonne licence pour la survie de son proje...Choisir le bon business model et la bonne licence pour la survie de son proje...
Choisir le bon business model et la bonne licence pour la survie de son proje...Open Source Experience
 
Mender: The open-source software update solution
Mender: The open-source software update solutionMender: The open-source software update solution
Mender: The open-source software update solutionMender.io
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...ICS
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil KumarXP Conference India
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Mender.io
 
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfZephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfAswathRangaraj1
 
What’s New in UniVerse 11.2
What’s New in UniVerse 11.2What’s New in UniVerse 11.2
What’s New in UniVerse 11.2Rocket Software
 
Migrate from WS2003 to WS2008 or WS2012 in One Step
Migrate from WS2003 to WS2008 or WS2012 in One Step Migrate from WS2003 to WS2008 or WS2012 in One Step
Migrate from WS2003 to WS2008 or WS2012 in One Step AppZero Inc
 
VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014ESUG
 
Mender; the open-source software update solution
Mender; the open-source software update solutionMender; the open-source software update solution
Mender; the open-source software update solutionMender.io
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Microsoft
 

Similar to Software update for IoT Embedded World 2017 (20)

Kubernetes Robotics Edge Cluster System
Kubernetes Robotics Edge Cluster SystemKubernetes Robotics Edge Cluster System
Kubernetes Robotics Edge Cluster System
 
Srikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latestSrikanth_PILLI_CV_latest
Srikanth_PILLI_CV_latest
 
Eminence team
Eminence teamEminence team
Eminence team
 
Packaging tool options
Packaging tool optionsPackaging tool options
Packaging tool options
 
Choisir le bon business model et la bonne licence pour la survie de son proje...
Choisir le bon business model et la bonne licence pour la survie de son proje...Choisir le bon business model et la bonne licence pour la survie de son proje...
Choisir le bon business model et la bonne licence pour la survie de son proje...
 
Mender: The open-source software update solution
Mender: The open-source software update solutionMender: The open-source software update solution
Mender: The open-source software update solution
 
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
Software Update Mechanisms: Selecting the Best Solutin for Your Embedded Linu...
 
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform  Suryakiran Kasturi & Akhil KumarAdopting agile in an embedded platform  Suryakiran Kasturi & Akhil Kumar
Adopting agile in an embedded platform Suryakiran Kasturi & Akhil Kumar
 
Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018Why the yocto project for my io t project elc_edinburgh_2018
Why the yocto project for my io t project elc_edinburgh_2018
 
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdfZephyr Introduction - Nordic Webinar - Sept. 24.pdf
Zephyr Introduction - Nordic Webinar - Sept. 24.pdf
 
Node-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using ElectronNode-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using Electron
 
Lick my Lollipop
Lick my LollipopLick my Lollipop
Lick my Lollipop
 
What’s New in UniVerse 11.2
What’s New in UniVerse 11.2What’s New in UniVerse 11.2
What’s New in UniVerse 11.2
 
Migrate from WS2003 to WS2008 or WS2012 in One Step
Migrate from WS2003 to WS2008 or WS2012 in One Step Migrate from WS2003 to WS2008 or WS2012 in One Step
Migrate from WS2003 to WS2008 or WS2012 in One Step
 
VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014VA Smalltalk Update ESUG2014
VA Smalltalk Update ESUG2014
 
Zephyr: Creating a Best-of-Breed, Secure RTOS for IoT
Zephyr: Creating a Best-of-Breed, Secure RTOS for IoTZephyr: Creating a Best-of-Breed, Secure RTOS for IoT
Zephyr: Creating a Best-of-Breed, Secure RTOS for IoT
 
Syncitall
SyncitallSyncitall
Syncitall
 
Mender; the open-source software update solution
Mender; the open-source software update solutionMender; the open-source software update solution
Mender; the open-source software update solution
 
Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015Red Hat Forum Benelux 2015
Red Hat Forum Benelux 2015
 
Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4Introduction to Code Composer Studio 4
Introduction to Code Composer Studio 4
 

Recently uploaded

Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotEdgard Alejos
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfkalichargn70th171
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...Bert Jan Schrijver
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jNeo4j
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Rob Geurden
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsJean Silva
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdfAndrey Devyatkin
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingShane Coughlan
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesVictoriaMetrics
 

Recently uploaded (20)

Copilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform CopilotCopilot para Microsoft 365 y Power Platform Copilot
Copilot para Microsoft 365 y Power Platform Copilot
 
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdfPros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
Pros and Cons of Selenium In Automation Testing_ A Comprehensive Assessment.pdf
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
JavaLand 2024 - Going serverless with Quarkus GraalVM native images and AWS L...
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4jGraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
GraphSummit Madrid - Product Vision and Roadmap - Luis Salvador Neo4j
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...Simplifying Microservices & Apps - The art of effortless development - Meetup...
Simplifying Microservices & Apps - The art of effortless development - Meetup...
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Strategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero resultsStrategies for using alternative queries to mitigate zero results
Strategies for using alternative queries to mitigate zero results
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News UpdateVictoriaMetrics Q1 Meet Up '24 - Community & News Update
VictoriaMetrics Q1 Meet Up '24 - Community & News Update
 
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
2024-04-09 - From Complexity to Clarity - AWS Summit AMS.pdf
 
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full RecordingOpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
OpenChain Education Work Group Monthly Meeting - 2024-04-10 - Full Recording
 
What’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 UpdatesWhat’s New in VictoriaMetrics: Q1 2024 Updates
What’s New in VictoriaMetrics: Q1 2024 Updates
 

Software update for IoT Embedded World 2017

  • 1. Software update for IoT the current state of play Chris Simmonds Embedded World 2017 Software update for IoT 1 Copyright © 2011-2017, 2net Ltd
  • 2. License These slides are available under a Creative Commons Attribution-ShareAlike 3.0 license. You can read the full text of the license here http://creativecommons.org/licenses/by-sa/3.0/legalcode You are free to • copy, distribute, display, and perform the work • make derivative works • make commercial use of the work Under the following conditions • Attribution: you must give the original author credit • Share Alike: if you alter, transform, or build upon this work, you may distribute the resulting work only under a license identical to this one (i.e. include this page exactly as it is) • For any reuse or distribution, you must make clear to others the license terms of this work Software update for IoT 2 Copyright © 2011-2017, 2net Ltd
  • 3. About Chris Simmonds • Consultant and trainer • Author of Mastering Embedded Linux Programming • Working with embedded Linux since 1999 • Android since 2009 • Speaker at many conferences and workshops "Looking after the Inner Penguin" blog at http://2net.co.uk/ https://uk.linkedin.com/in/chrisdsimmonds/ https://google.com/+chrissimmonds Software update for IoT 3 Copyright © 2011-2017, 2net Ltd
  • 4. Overview • Software update 101 • Software update for embedded Linux • Over The Air (OTA) update • Stateless rootfs Software update for IoT 4 Copyright © 2011-2017, 2net Ltd
  • 5. What could possibly go wrong? • Mirai: a recent > 600 Gbps DDoS attack • Very simple: looks for open Telnet ports and logs on using default, well-known, name and password • Prime target: Dahua IP CCTV cameras Details on PenTestPartners: https://www.pentestpartners.com/blog/optimising-mirai-a-better-iot-ddos-botnet Software update for IoT 5 Copyright © 2011-2017, 2net Ltd
  • 6. Requirements for SW update • Secure: must not become an attack vector to hijack the device • Robust: must not render the device unusable • Atomic: an update must be installed completely or not at all • Fail-safe: should fall-back to last known working system if there are errors Software update for IoT 6 Copyright © 2011-2017, 2net Ltd
  • 7. What to update? Frequency Ease of update Bootloader Kernel Root file system System applications Software update for IoT 7 Copyright © 2011-2017, 2net Ltd
  • 8. Update granularity • File: • not an option: hard to achieve atomicity over a group of file updates • Package (e.g. RPM, deb): • apt-get update works fine for servers but not for devices • Entire filesystem image: • the most common option: fairy easy to implement and verify • Atomic differential update • Uses clever tricks to perform atomic update of groups of files • Container • neat idea, so long as you have containerised applications Software update for IoT 8 Copyright © 2011-2017, 2net Ltd
  • 9. Device update != server update • Server • Secure environment, no power outage, no network outage • If update fails, human intervention is possible • Device: • Intermittent power and network mean update quite likely to be interrupted • Failed update may be difficult (and expensive) to resolve Incremental package updates via RPM/deb are not atomic Software update for IoT 9 Copyright © 2011-2017, 2net Ltd
  • 10. Image update Symmetric A/B (Android after Nougat) Bootloader User data Boot flag OS Copy 1 OS Copy 2 Asymmetric normal/recovery (Android before Nougat) Bootloader Main OS Recovery OS User data Boot flag Software update for IoT 10 Copyright © 2011-2017, 2net Ltd
  • 11. Examples of image updaters 1/2 • swupdate: http://sbabic.github.io/swupdate/index.html • Symmetric and asymmetric image update client • License: GPLv2 • Mender: https://mender.io • Symmetric image update client • Integrates with open source OTA update server • License: Apache 2 Software update for IoT 11 Copyright © 2011-2017, 2net Ltd
  • 12. Examples of image updaters 2/2 • RAUC (Robust Auto-Update Controller): https://rauc.readthedocs.org/ • Symmetric and asymmetric image update client • License: LGPLv2.1 • Android Things: https://developer.android.com/things/hardware/index.html • Symmetric and asymmetric image update client • Android Things is cut-down Android for IoT • License: Apache 2 Software update for IoT 12 Copyright © 2011-2017, 2net Ltd
  • 13. Atomic differential update (OSTree) • OSTree stores data in a "git-like" object repository • Actual filesystem created from hard links to objects in the repository • Checkout is atomic • Pluses • Updates are incremental: uses less disk space than A/B image update • Reduced transfer time: update contains only changed files • Minuses • Physically there is only one filesystem: cannot recover from filesystem corruption Software update for IoT 13 Copyright © 2011-2017, 2net Ltd
  • 14. Projects using OSTree • Automotive Grade Linux (agl) • Yocto Project meta-updater layer Software update for IoT 14 Copyright © 2011-2017, 2net Ltd
  • 15. Atomic differential update (swupd) • Similar to OSTree • swupd processes updates in bundles • Bundle contains file updates • Updates to bundles are applied atomically Software update for IoT 15 Copyright © 2011-2017, 2net Ltd
  • 16. Projects using swupd • Clear Linux • Ostro OS • Yocto Project meta-swupd layer Software update for IoT 16 Copyright © 2011-2017, 2net Ltd
  • 17. Containerised updaters • Consists of • Immutable base OS • Applications in containers • Update client running in base OS is able to update the applications atomically • But, note that: • Updates applications only • Need another mechanism to update kernel and rootfs (e.g image A/B) Software update for IoT 17 Copyright © 2011-2017, 2net Ltd
  • 18. Examples of containerised updaters • resin.io: https://resin.io • Applications distributed in Docker containers • Managed on device by Resin Container Engine • Integrates with OTA update server (not open source) • Licenses: Client: Apache2; Server: proprietary • Snappy: https://snapcraft.io • Containers are called snaps • A snap contains a squashfs file system, mounted on /snap/[app] • License: GPLv3 Software update for IoT 18 Copyright © 2011-2017, 2net Ltd
  • 19. OTA update Device software build system Firmware images Sign with authentication key Update server Device Update agent Software update for IoT 19 Copyright © 2011-2017, 2net Ltd
  • 20. Complexities of OTA update • Authentication (is this update legit?) • Security (am I receiving what you are sending?) • Roll-back (if update fails to boot, switch to previous version) • Scale (roll out to large populations) • Monitoring (keeping track of status of the population of devices) Software update for IoT 20 Copyright © 2011-2017, 2net Ltd
  • 21. Roll-back • Boot limit count • Feature of bootloader (e.g U-Boot) • Increment count in bootloader • Reset after successful boot • If reboot with count > 0, bootloader knows boot failed and loads alternate rootfs • Hardware watchdog • If hang in early boot, watchdog times out and resets CPU • Bootloader checks reset reason • If watchdog, loads alternate rootfs Software update for IoT 21 Copyright © 2011-2017, 2net Ltd
  • 22. Stateless filesystems • Most of the updaters mentioned require a stateless rootfs • You need to store run-time changes to files outside filesystems being updated • Methods: • symlink or bind mount files to writeable storage • modify existing code to keep state separate • write new code to be stateless • See https://www.slideshare.net/chrissimmonds/ readonly-rootfs-theory-and-practice Software update for IoT 22 Copyright © 2011-2017, 2net Ltd
  • 23. Conclusion • Image update is well-understood and road tested • swupdate, RAUC, Mender, Android Things • Atomic update promises finer granularity and smaller updates • OSTree, swupd • Containerised update is trendy, but only solves part of the problem • resin.io, snappy • Some projects integrate with OTA update servers • Mender, resin.io, (swupdate, RAUC via Hawkbit https://eclipse.org/hawkbit) • Update is more robust with a stateless rootfs, but this is still a new concept to many developers Software update for IoT 23 Copyright © 2011-2017, 2net Ltd
  • 24. • Questions? Slides on Slide Share https://www.slideshare.net/chrissimmonds/ software-update-for-iot-embedded-world-2017 This and other topics associated with building robust embedded systems are covered in my training courses http://www.2net.co.uk/training.html Software update for IoT 24 Copyright © 2011-2017, 2net Ltd