SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Software update for embedded systems - elce2014
Software update for embedded systems - elce2014Stefano 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 projectYen-Chin Lee
 
Userspace drivers-2016
Userspace drivers-2016Userspace drivers-2016
Userspace drivers-2016Chris 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_worldStefano Babic
 
Eclipse IDE Yocto Plugin
Eclipse IDE Yocto PluginEclipse IDE Yocto Plugin
Eclipse IDE Yocto Plugincudma
 
The Yocto Project
The Yocto ProjectThe Yocto Project
The Yocto Projectrossburton
 
Yocto project and open embedded training
Yocto project and open embedded trainingYocto project and open embedded training
Yocto project and open embedded trainingH 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 playChris 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 DistroAll 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.5Chris 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 systemslinuxlab_conf
 
Automotive Grade Linux and systemd
Automotive Grade Linux and systemdAutomotive Grade Linux and systemd
Automotive Grade Linux and systemdAlison 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 primerDrew Fustini
 
Embedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphoneEmbedded Android: Android beyond the smartphone
Embedded Android: Android beyond the smartphoneChris 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 N2Nlinuxlab_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 2013Opersys inc.
 

La actualidad más candente (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 a A million ways to provision embedded linux devices

Building RT image with Yocto
Building RT image with YoctoBuilding RT image with Yocto
Building RT image with YoctoAlexandre 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 TabletSGAndroidDevs
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux DevelopersOpersys 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 2018ICS
 
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 platformDaniel Chiu
 
ChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadChromePad - Chromium OS for ThinkPad
ChromePad - Chromium OS for ThinkPadAndrewWright224
 
ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220ChromePad - Chromium OS ThinkPad X220
ChromePad - Chromium OS ThinkPad X220AndrewWright224
 
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 hoodEmbeddedFest
 
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 2018Mender.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 EnvironmentsNicolas Collery
 
The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012The Deck by Phil Polstra GrrCON2012
The Deck by Phil Polstra GrrCON2012Philip 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 imagesMender.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 ProjectLeon Anavi
 
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 a 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)
 

Más de Mender.io

IoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianIoT Prototyping using BBB and Debian
IoT Prototyping using BBB and DebianMender.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_2018Mender.io
 
IoT Development from Prototype to Production
IoT Development from Prototype to ProductionIoT Development from Prototype to Production
IoT Development from Prototype to ProductionMender.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 2018Mender.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 2018Mender.io
 
Iot development from prototype to production
Iot development from prototype to productionIot development from prototype to production
Iot development from prototype to productionMender.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 2018Mender.io
 
Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Securing the Connected Car - SCaLE 2018
Securing the Connected Car - SCaLE 2018Mender.io
 
Mender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.io | Securing the Connected Car
Mender.io | Securing the Connected CarMender.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 hardeningMender.io
 

Más de 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
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

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