SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

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.
 

Was ist angesagt? (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
 

Ähnlich wie Provisioning 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
 

Ähnlich wie Provisioning 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)
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????blackmambaettijean
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 

Kürzlich hochgeladen (20)

Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 

Provisioning 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