Drew Moseley Solutions Architect Mender - Io
Drew Moseley Solutions Architect Mender - Io
Drew Moseley
Solutions Architect
Mender.io
Session overview
Hardware variety
Storage Media
Cross development
Facts:
● These systems are huge
● Dependency Hell is a thing
● Builds take a long time
● Builds take a lot of resources
● Embedded applications require
significant customization
● Developers need to modify
from defaults
Build System Defined
“It’s not an embedded Linux distribution -- it creates a custom one for you”1
Products:
● Root filesystem image
● Kernel, Bootloader, Toolchain
● Package Feed
1
See more at https://www.yoctoproject.org
Yocto Project - Details
Organized into independent layers:
● Separation of functionality
● Allows different release schedules
● Expandability
○ Recipes developed in python and bash
SDK mechanism
● Separation of system and application devs
● Easily allows multiple developers to contribute
Optimizations:
● Faster build time reusing prebuilt binaries
● Parallel builds
Previous ELC talk estimated ~ 8400 software
packages available
Yocto Project - Getting Started
$ git clone -b rocko \
git://git.yoctoproject.org/poky.git
$ source poky/oe-init-build-env
$ MACHINE=qemux86 bitbake \
core-image-minimal
$ runqemu qemux86
Yocto Project - Summary
Pros: Cons:
● Widely supported by board and ● Steep learning curve
semiconductor vendors ● Unfamiliar environment to
● Active developer community non-embedded developers
● Wide functionality and board ● Resource-intensive
support enabled by layer ○ Long initial build times
mechanism ○ Disk space
● Customizable and expandable
● Minimal native tooling required
Buildroot - Overview
Products:
● Root filesystem image
● Kernel, Bootloader, Toolchain
1
See more at https://buildroot.org/
Buildroot - Details
Uses Makefiles and Kconfig
● Widely support and well-known
Relatively small images and quick builds
BR2_EXTERNAL mechanism
● Local additions stored outside the Buildroot
source tree
● Package recipes, defconfigs, etc.
Recipes developed in kconfig and make
SDK mechanism
● Separation of system and application devs
● Easily allows multiple developers to contribute
Previous ELC talk estimated ~ 1800 software
packages available
Buildroot - Getting Started
Pros: Cons:
● Little corporate involvement ● Little corporate involvement
● Quick to get started ● Configuration changes require
● Easy to understand full rebuild
● Active developer community ● No reusable shared state by
● Broad architecture and board default
support
OpenWRT - Overview
“OpenWrt provides a fully writable filesystem with package management.”1
Products:
○ Firmware image in device-specific format
○ Network available package repositories
1
See more at https://openwrt.org/
OpenWRT - Build System
Pros: Cons:
● Great choice as replacement ● Less flexible for general
firmware Embedded applications
● Good choice for: ● Policy imposed by OpenWRT
○ Router/networking device design
○ If your application needs ● Package based updates can make
package-based updates fleet management difficult
Desktop Distros - Overview
You can.
Sometimes.
Desktop Distros - Details
Pros: Cons:
● Lots of choices to start with ● Policy imposed by vendor
● Developer familiarity ● Difficulty in removing packages
● Large selection of prebuilt due to dependencies
packages ● Reproducibility is complicated
● Quick getting started ● On-target builds may be slow
● Simplicity ● Off-target builds may be difficult
● On-target builds are possible or impossible
Other Criteria
● Hardware vendor
provided material
● Training and
documentation
● Vendor for support
● Developer experience
Related Tools
uClinux (http://www.uclinux.org/)
● Port of Linux to systems without a Memory
Management Unit
● Kernel 2.6, user applications, libraries and
tool chains.
crosstool-NG (https://crosstool-ng.github.io/)
● Cross-toolchain generator
● Uses kConfig
Other Build Options
ELBE (https://github.com/linutronix/elbe)
To Be
ISAR (https://github.com/ilbers/isar/)
Android ((https://source.android.com/)
...
Continued...
Summary - Use Cases
● Beginner/hobbyist/maker:
○ Commercial dev board/easy getting started
○ Desktop distro or OpenWRT
● Commercial use, single configuration
○ Fast build time/easy getting started
○ Buildroot
● Commercial use, multiple configurations
○ Modular/HW vendor support
○ Yocto Project
Summary
Expandability
Configurability
Ease of Getting
Started
Package
Availability
Industry Support
Thank You!
Q&A
@drewmoseley
[email protected]