SlideShare a Scribd company logo
Drew Moseley
Technical Solutions Architect
Mender.io
A Million Ways to Provision Embedded Linux Devices
Session Overview
● 1,000,000 barely feels like an exaggeration
● Anatomy of an embedded Linux system
● Discuss storage and provisioning of:
⎻ Bootloader
⎻ Kernel/DTB
⎻ Root filesystem
● Describe specific boards using different models
Goal: Present an overview of all the
provisioning models you will encounter
About Me
Drew Moseley
○ 10 years in Embedded Linux/Yocto development.
○ Longer than that in general Embedded Software.
○ Project Lead and Solutions Architect.
drew.moseley@mender.io
https://twitter.com/drewmoseley
https://www.linkedin.com/in/drewmoseley/
https://twitter.com/mender_io
Mender.io
○ Over-the-air update manager for embedded Linux
○ Open source (Apache 2.0 License)
○ Remote deployment management (server)
○ Under active development
Challenges for Embedded Linux Developers
● No “one way” to get initial images onto boards.
● Mechanisms may vary between development,
manufacturing and CI/QA.
● Mechanisms vary widely between
⎻ Boards
⎻ Manufacturers
● Slow provisioning -> long development cycles
Anatomy of a System
Bootloader: system initialization code starting with
the reset vector.
● Initialize and scrub RAM
● Setup power rails and clocks
● Load the “rest” of the system
Bootloader
Kernel
Device Tree
Root filesystem
Kernel: core operating system functionality
● Resource management
● Process control
● Device drivers
Device Tree: hardware description
Root filesystem: all files, executables, data, etc for the
system
Storage Overview
Bootloader:
1. Separate flash/interface. ie SPI Boot Flash - Compulab CL-SOM-iMX6
2. MTD partition - Compulab CL-SOM-iMX7
3. Inter-partition space - Toradex Colibri i.MX6/eMMC
4. UBI partition - Toradex Colibri i.MX7/NAND
5. File in a partition - Beaglebone
Kernel/DTB:
1. Separate partition - Compulab, Toradex
2. Files in a separate partition - Beaglebone
3. Files in the root filesystem - Mender-enabled boards
4. Files retrieved over network - most boards
Root filesystem:
1. eMMC/SDCard - Beaglebone, Raspberrypi, etc
2. Raw NAND flash - Toradex Colibri
3. USB drive - Raspberrypi (not the default)
4. SATA/SSD - NUC, PC
5. NFS - most boards
Yocto + QEMU - setup
Simple setup for development (9 minute build time with SSTATE):
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib 
build-essential chrpath socat cpio python python3 python3-pip python3-pexpect 
xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev 
xterm
git clone git://git.yoctoproject.org/poky -b yocto-2.7.1
source poky/oe-init-build-env
cat >> conf/local.conf <<'EOF'
SSTATE_MIRRORS = "
file://.* http://sstate.yoctoproject.org/2.6/PATH;downloadfilename=PATH n 
"
EOF
MACHINE=qemux86 bitbake core-image-base
https://www.yoctoproject.org/docs/2.7.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html
http://bit.ly/yocto-qemu-deploy
Yocto + QEMU - run
Standard Block Device:
$ runqemu qemux86 nographic
NFS mounted root filesystem1
:
$ sudo apt-get install rpcbind
$ echo 'OPTIONS="-i -w"' | sudo tee -a /etc/default/rpcbind
$ sudo service portmap restart
$ runqemu qemux86 nfs nographic
The runqemu script hides all the complication of setting this up.
Differences from typical board scenario:
1. No bootloader
2. No DTB
3. Kernel loaded directly from host filesystem
Excellent method for development of non-HW-specific bits.
1
Note that this has worked for me in the past but in my current setup, the system fails to boot.
The above was run on Ubuntu 18.04
Provisioning Model: SD Card
Platform used: Raspberry Pi 3
Proprietary bootloader in ROM
● Loads kernel or u-boot binary as a file from FAT
● DTB loaded as file from FAT
Root filesystem mounted from SD/MMC
Image file generated directly by Yocto
Provisioning done on build platform:
$ sudo dd if=<file>.rpi-sdimg of=/dev/sdb bs=8M
SDCard inserted in board and booted as-is
SDCard
Partition 1: FAT
/boot
├── bcm2710-rpi-cm3.dtb
├── boot.scr
├── kernel7.img
├── overlays
│ ├── i2c-rtc.dtbo
├── start.elf
└── uImage
Partition 1: ext4
/
├── bin
├── boot
├── dev
├── etc
├── home
├── ...
Provisioning Model: eMMC
Platform used: TechNexion PICO-PI-IMX7
Bootloader in unpartitioned space on eMMC
Root filesystem mounted from eMMC
Image file generated directly by Yocto
Load U-Boot image from build platform into RAM:
$ sudo imx_usb SPL
$ sudo imx_usb u-boot.img
From RAM-based U-Boot, install new images
Target board configured as USB gadget mode
usb start
ums 0 mmc 0
Provisioning done on build platform:
$ sudo dd if=<file>.rpi-sdimg of=/dev/sdb bs=8M
eMMC
Raw U-Boot binary
U-Boot environment
Partition 1: FAT
/boot
├── *.dtb
└── zImage
Partition 1: ext4
/
├── bin
├── boot
├── dev
├── etc
├── home
├── ...
Provisioning Model: SPI + eMMC
Platform used: Compulab IOT-GATE-iMX7
Jumper selection for bootloader location: SPI flash or SD
Bootloader configuration determines eMMC or SD for:
● Kernel
● DTB
● Root filesystem
Boot full SD-based image provided by Compulab
Copy Yocto-generated images to USB key
Provisioning done on target platform:
U-Boot:
# flash_erase /dev/mtd0 0 0
# dd if=/usbkey/cl-som-imx7-firmware of=/dev/mtd0
Root filesystem:
# dd if=/usbkey/<image>.sdcard of=/dev/mmcblk2 bs=8M
eMMC
Partition 1: FAT
/boot
├── imx7d-cl-som-imx7.dtb
└── zImage
Partition 1: ext4
/
├── bin
├── boot
├── dev
├── etc
├── home
├── ...
SPI Flash
Raw U-Boot image
Platform used: Toradex Colibri iMX7 + Aster baseboard
Copy Yocto-generated images to SD Card
Short test points to boot in recovery mode
Load U-Boot image from build platform into RAM:
$ sudo imx_usb u-boot-nand.imx
From RAM-based U-Boot, install new images
U-Boot:
nand erase.part u-boot1; nand erase.part u-boot2
load mmc 0:1 ${loadaddr} u-boot-nand.imx
nand write ${loadaddr} u-boot1 ${filesize}
nand write ${loadaddr} u-boot2 ${filesize}
nand erase.part u-boot-env
Root filesystem:
nand erase.part ubi
load mmc 0:1 ${loadaddr} <image>.ubi
nand write ${loadaddr} ubi ${filesize}
Provisioning Model: Raw NAND
UBI
Volume: u-boot1
Volume: u-boot2
Volume: u-boot-env
Volume: rootfs
/
├── bin
├── boot
├── dev
├── etc
├── home
├── ...
Platform used: Dragonboard 410c1
Switch on board to boot in fastboot mode
Load images to board directly from build platform
U-Boot:
$ sudo fastboot flash boot boot-dragonboard-410c.img
Root filesystem:
$ sudo fastboot flash rootfs IMAGE-dragonboard-410c.ext4
Provisioning Model: Android Tools
1
https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/build/open-embedded.md.html
Misc Provisioning Tools
Live Installers
● Toradex Easy Installer
● Compulab cl-deploy tool
● Compulab Auto Install System
● QtCreator
● Desktop Distro Install Disks
Imaging tools
● Balena Etcher
● Win32DiskImager
● ApplePi-Baker
● PiBakery
Protocols
● tftp/NFS
● Rockchip USB
● Imx_usb tool
● NVidia flash.sh
Other Considerations
Product Development:
● CI/CD integration
● Systems developers vs
Application developers
● Heterogenous targets
Manufacturing:
● Unattended installation
● Per-board data
● Registration with
infrastructure
● Burn-in test vs production
images
Thank You!
Q&A
@drewmoseley
drew.moseley@mender.io
@mender_io
https://mender.io
https://docs.mender.io/2.0/getting-started
https://hub.mender.io

More Related Content

What's hot

Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
Stefano Babic
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
Yen-Chin Lee
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
Chris Simmonds
 
Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_world
Stefano Babic
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
Stefano Babic
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugin
cudma
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
rossburton
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
H Ming
 
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
linuxlab_conf
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015Chris Simmonds
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
Chris Simmonds
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux Distro
All Things Open
 
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
Chris Simmonds
 
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systemsClaudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
linuxlab_conf
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
Alison Chaiken
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Ron Munitz
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primer
Drew Fustini
 
Embedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphoneEmbedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphone
Chris Simmonds
 
Emanuele Faranda - Creating network overlays with IoT devices using N2N
Emanuele Faranda - Creating network overlays with IoT devices using N2NEmanuele Faranda - Creating network overlays with IoT devices using N2N
Emanuele Faranda - Creating network overlays with IoT devices using N2N
linuxlab_conf
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
Opersys inc.
 

What's hot (20)

Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014
 
Build your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto projectBuild your own embedded linux distributions by yocto project
Build your own embedded linux distributions by yocto project
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016
 
Evolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_worldEvolution of ota_update_in_the_io_t_world
Evolution of ota_update_in_the_io_t_world
 
Sw update elce2017
Sw update elce2017Sw update elce2017
Sw update elce2017
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugin
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Project
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded training
 
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
Michele Dionisio & Pietro Lorefice - Developing and testing a device driver w...
 
Linux field-update-2015
Linux field-update-2015Linux field-update-2015
Linux field-update-2015
 
Software update for IoT: the current state of play
Software update for IoT: the current state of playSoftware update for IoT: the current state of play
Software update for IoT: the current state of play
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux Distro
 
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
 
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systemsClaudio Scordino - Handling mixed criticality on embedded multi-core systems
Claudio Scordino - Handling mixed criticality on embedded multi-core systems
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemd
 
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
Android As a Server- Building Android for the Cloud (AnDevCon SF 2013)
 
Embedded Linux primer
Embedded Linux primerEmbedded Linux primer
Embedded Linux primer
 
Embedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphoneEmbedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphone
 
Emanuele Faranda - Creating network overlays with IoT devices using N2N
Emanuele Faranda - Creating network overlays with IoT devices using N2NEmanuele Faranda - Creating network overlays with IoT devices using N2N
Emanuele Faranda - Creating network overlays with IoT devices using N2N
 
Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013Android Internals at Linaro Connect Asia 2013
Android Internals at Linaro Connect Asia 2013
 

Similar to A million ways to provision embedded linux devices

Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
NEEVEE Technologies
 
Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with Yocto
Alexandre LAHAYE
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
RuggedBoardGroup
 
Build Your Own Android Tablet
Build Your Own Android TabletBuild Your Own Android Tablet
Build Your Own Android Tablet
SGAndroidDevs
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
Opersys inc.
 
An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
ICS
 
Build and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platformBuild and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platform
Daniel Chiu
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
AndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
AndrewWright224
 
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
EmbeddedFest
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
Mender.io
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Opersys inc.
 
the NML project
the NML projectthe NML project
the NML projectLei Yang
 
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened EnvironmentsLet Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
Nicolas Collery
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
Philip Polstra
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server
Naohiro Tamura
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
Mender.io
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
Leon Anavi
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
SysPlay eLearning Academy for You
 
How to create your own Linux distribution (embedded-gothenburg)
How to create your own Linux distribution (embedded-gothenburg)How to create your own Linux distribution (embedded-gothenburg)
How to create your own Linux distribution (embedded-gothenburg)
Dimitrios Platis
 

Similar to A million ways to provision embedded linux devices (20)

Building Embedded Linux UDOONEO
Building Embedded Linux UDOONEOBuilding Embedded Linux UDOONEO
Building Embedded Linux UDOONEO
 
Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with Yocto
 
Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)Embedded Linux BSP Training (Intro)
Embedded Linux BSP Training (Intro)
 
Build Your Own Android Tablet
Build Your Own Android TabletBuild Your Own Android Tablet
Build Your Own Android Tablet
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018An Introduction to the Yocto Embedded Framework 2018
An Introduction to the Yocto Embedded Framework 2018
 
Build and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platformBuild and Run Android N Source Ccode on NXP SABRESD platform
Build and Run Android N Source Ccode on NXP SABRESD platform
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPad
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220
 
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hoodEmbedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
Embedded Fest 2019. Игорь Опанюк. Das U-boot v2019: a look under the hood
 
Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018Embedded Linux Build Systems - Texas Linux Fest 2018
Embedded Linux Build Systems - Texas Linux Fest 2018
 
Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013Working with the AOSP - Linaro Connect Asia 2013
Working with the AOSP - Linaro Connect Asia 2013
 
the NML project
the NML projectthe NML project
the NML project
 
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened EnvironmentsLet Me Pick Your Brain - Remote Forensics in Hardened Environments
Let Me Pick Your Brain - Remote Forensics in Hardened Environments
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012
 
Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server Getting started with LinuxBoot Firmware on AArch64 Server
Getting started with LinuxBoot Firmware on AArch64 Server
 
Strategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and imagesStrategies for developing and deploying your embedded applications and images
Strategies for developing and deploying your embedded applications and images
 
Creating new Tizen profiles using the Yocto Project
Creating new Tizen profiles  using the Yocto ProjectCreating new Tizen profiles  using the Yocto Project
Creating new Tizen profiles using the Yocto Project
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
How to create your own Linux distribution (embedded-gothenburg)
How to create your own Linux distribution (embedded-gothenburg)How to create your own Linux distribution (embedded-gothenburg)
How to create your own Linux distribution (embedded-gothenburg)
 

More from Mender.io

IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and Debian
Mender.io
 
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
Mender.io
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to Production
Mender.io
 
Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018
Mender.io
 
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Mender.io
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to production
Mender.io
 
Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018
Mender.io
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018
Mender.io
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected Car
Mender.io
 
Linux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningLinux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardening
Mender.io
 

More from Mender.io (10)

IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and Debian
 
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
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to Production
 
Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018Software Updates for Connected Devices - OSCON 2018
Software Updates for Connected Devices - OSCON 2018
 
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
Linux IOT Botnet Wars and the Lack of Basic Security Hardening - OSCON 2018
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to production
 
Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018Linux IoT Botnet Wars - ESC Boston 2018
Linux IoT Botnet Wars - ESC Boston 2018
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected Car
 
Linux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardeningLinux IoT Botnet Wars and the lack of basic security hardening
Linux IoT Botnet Wars and the lack of basic security hardening
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 

A million ways to provision embedded linux devices

  • 1. Drew Moseley Technical Solutions Architect Mender.io A Million Ways to Provision Embedded Linux Devices
  • 2. Session Overview ● 1,000,000 barely feels like an exaggeration ● Anatomy of an embedded Linux system ● Discuss storage and provisioning of: ⎻ Bootloader ⎻ Kernel/DTB ⎻ Root filesystem ● Describe specific boards using different models Goal: Present an overview of all the provisioning models you will encounter
  • 3. About Me Drew Moseley ○ 10 years in Embedded Linux/Yocto development. ○ Longer than that in general Embedded Software. ○ Project Lead and Solutions Architect. drew.moseley@mender.io https://twitter.com/drewmoseley https://www.linkedin.com/in/drewmoseley/ https://twitter.com/mender_io Mender.io ○ Over-the-air update manager for embedded Linux ○ Open source (Apache 2.0 License) ○ Remote deployment management (server) ○ Under active development
  • 4. Challenges for Embedded Linux Developers ● No “one way” to get initial images onto boards. ● Mechanisms may vary between development, manufacturing and CI/QA. ● Mechanisms vary widely between ⎻ Boards ⎻ Manufacturers ● Slow provisioning -> long development cycles
  • 5. Anatomy of a System Bootloader: system initialization code starting with the reset vector. ● Initialize and scrub RAM ● Setup power rails and clocks ● Load the “rest” of the system Bootloader Kernel Device Tree Root filesystem Kernel: core operating system functionality ● Resource management ● Process control ● Device drivers Device Tree: hardware description Root filesystem: all files, executables, data, etc for the system
  • 6. Storage Overview Bootloader: 1. Separate flash/interface. ie SPI Boot Flash - Compulab CL-SOM-iMX6 2. MTD partition - Compulab CL-SOM-iMX7 3. Inter-partition space - Toradex Colibri i.MX6/eMMC 4. UBI partition - Toradex Colibri i.MX7/NAND 5. File in a partition - Beaglebone Kernel/DTB: 1. Separate partition - Compulab, Toradex 2. Files in a separate partition - Beaglebone 3. Files in the root filesystem - Mender-enabled boards 4. Files retrieved over network - most boards Root filesystem: 1. eMMC/SDCard - Beaglebone, Raspberrypi, etc 2. Raw NAND flash - Toradex Colibri 3. USB drive - Raspberrypi (not the default) 4. SATA/SSD - NUC, PC 5. NFS - most boards
  • 7. Yocto + QEMU - setup Simple setup for development (9 minute build time with SSTATE): sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat cpio python python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev xterm git clone git://git.yoctoproject.org/poky -b yocto-2.7.1 source poky/oe-init-build-env cat >> conf/local.conf <<'EOF' SSTATE_MIRRORS = " file://.* http://sstate.yoctoproject.org/2.6/PATH;downloadfilename=PATH n " EOF MACHINE=qemux86 bitbake core-image-base https://www.yoctoproject.org/docs/2.7.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html http://bit.ly/yocto-qemu-deploy
  • 8. Yocto + QEMU - run Standard Block Device: $ runqemu qemux86 nographic NFS mounted root filesystem1 : $ sudo apt-get install rpcbind $ echo 'OPTIONS="-i -w"' | sudo tee -a /etc/default/rpcbind $ sudo service portmap restart $ runqemu qemux86 nfs nographic The runqemu script hides all the complication of setting this up. Differences from typical board scenario: 1. No bootloader 2. No DTB 3. Kernel loaded directly from host filesystem Excellent method for development of non-HW-specific bits. 1 Note that this has worked for me in the past but in my current setup, the system fails to boot. The above was run on Ubuntu 18.04
  • 9. Provisioning Model: SD Card Platform used: Raspberry Pi 3 Proprietary bootloader in ROM ● Loads kernel or u-boot binary as a file from FAT ● DTB loaded as file from FAT Root filesystem mounted from SD/MMC Image file generated directly by Yocto Provisioning done on build platform: $ sudo dd if=<file>.rpi-sdimg of=/dev/sdb bs=8M SDCard inserted in board and booted as-is SDCard Partition 1: FAT /boot ├── bcm2710-rpi-cm3.dtb ├── boot.scr ├── kernel7.img ├── overlays │ ├── i2c-rtc.dtbo ├── start.elf └── uImage Partition 1: ext4 / ├── bin ├── boot ├── dev ├── etc ├── home ├── ...
  • 10. Provisioning Model: eMMC Platform used: TechNexion PICO-PI-IMX7 Bootloader in unpartitioned space on eMMC Root filesystem mounted from eMMC Image file generated directly by Yocto Load U-Boot image from build platform into RAM: $ sudo imx_usb SPL $ sudo imx_usb u-boot.img From RAM-based U-Boot, install new images Target board configured as USB gadget mode usb start ums 0 mmc 0 Provisioning done on build platform: $ sudo dd if=<file>.rpi-sdimg of=/dev/sdb bs=8M eMMC Raw U-Boot binary U-Boot environment Partition 1: FAT /boot ├── *.dtb └── zImage Partition 1: ext4 / ├── bin ├── boot ├── dev ├── etc ├── home ├── ...
  • 11. Provisioning Model: SPI + eMMC Platform used: Compulab IOT-GATE-iMX7 Jumper selection for bootloader location: SPI flash or SD Bootloader configuration determines eMMC or SD for: ● Kernel ● DTB ● Root filesystem Boot full SD-based image provided by Compulab Copy Yocto-generated images to USB key Provisioning done on target platform: U-Boot: # flash_erase /dev/mtd0 0 0 # dd if=/usbkey/cl-som-imx7-firmware of=/dev/mtd0 Root filesystem: # dd if=/usbkey/<image>.sdcard of=/dev/mmcblk2 bs=8M eMMC Partition 1: FAT /boot ├── imx7d-cl-som-imx7.dtb └── zImage Partition 1: ext4 / ├── bin ├── boot ├── dev ├── etc ├── home ├── ... SPI Flash Raw U-Boot image
  • 12. Platform used: Toradex Colibri iMX7 + Aster baseboard Copy Yocto-generated images to SD Card Short test points to boot in recovery mode Load U-Boot image from build platform into RAM: $ sudo imx_usb u-boot-nand.imx From RAM-based U-Boot, install new images U-Boot: nand erase.part u-boot1; nand erase.part u-boot2 load mmc 0:1 ${loadaddr} u-boot-nand.imx nand write ${loadaddr} u-boot1 ${filesize} nand write ${loadaddr} u-boot2 ${filesize} nand erase.part u-boot-env Root filesystem: nand erase.part ubi load mmc 0:1 ${loadaddr} <image>.ubi nand write ${loadaddr} ubi ${filesize} Provisioning Model: Raw NAND UBI Volume: u-boot1 Volume: u-boot2 Volume: u-boot-env Volume: rootfs / ├── bin ├── boot ├── dev ├── etc ├── home ├── ...
  • 13. Platform used: Dragonboard 410c1 Switch on board to boot in fastboot mode Load images to board directly from build platform U-Boot: $ sudo fastboot flash boot boot-dragonboard-410c.img Root filesystem: $ sudo fastboot flash rootfs IMAGE-dragonboard-410c.ext4 Provisioning Model: Android Tools 1 https://www.96boards.org/documentation/consumer/dragonboard/dragonboard410c/build/open-embedded.md.html
  • 14. Misc Provisioning Tools Live Installers ● Toradex Easy Installer ● Compulab cl-deploy tool ● Compulab Auto Install System ● QtCreator ● Desktop Distro Install Disks Imaging tools ● Balena Etcher ● Win32DiskImager ● ApplePi-Baker ● PiBakery Protocols ● tftp/NFS ● Rockchip USB ● Imx_usb tool ● NVidia flash.sh
  • 15. Other Considerations Product Development: ● CI/CD integration ● Systems developers vs Application developers ● Heterogenous targets Manufacturing: ● Unattended installation ● Per-board data ● Registration with infrastructure ● Burn-in test vs production images