10.06.2015 Views

Buildroot: fast deployment of embedded systems - Mind

Buildroot: fast deployment of embedded systems - Mind

Buildroot: fast deployment of embedded systems - Mind

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Buildroot</strong>:<br />

<strong>fast</strong> <strong>deployment</strong><br />

<strong>of</strong> <strong>embedded</strong> <strong>systems</strong><br />

© 2012 Essensium N.V.<br />

Parts © Thomas Petazzoni, Free Electrons<br />

This work is licensed under a<br />

Creative Commons Attribution-ShareAlike 3.0<br />

Unported License<br />

http://www.mind.be/content/121028_<strong>Buildroot</strong>-Fast-Deployment.pdf


Image © Coolblue N.V.


Image © Atmel<br />

Deploy a board<br />

into the system


Deploy s<strong>of</strong>tware<br />

on the board


<strong>Buildroot</strong>:<br />

<strong>fast</strong> <strong>deployment</strong><br />

<strong>of</strong> <strong>embedded</strong> <strong>systems</strong><br />

© 2012 Essensium N.V.<br />

Parts © Thomas Petazzoni, Free Electrons<br />

This work is licensed under a<br />

Creative Commons Attribution-ShareAlike 3.0<br />

Unported License<br />

http://www.mind.be/content/121028_<strong>Buildroot</strong>-Fast-Deployment.pdf


Fast <strong>deployment</strong> with buildroot<br />

1.<strong>Buildroot</strong> makes it easy<br />

to get the board running<br />

2.How to use buildroot in real life<br />

(demonstration)<br />

3.Comparison with other projects


Build infrastructure<br />

is needed for <strong>fast</strong> <strong>deployment</strong><br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Initial default <strong>deployment</strong> in no time<br />

Fast building<br />

Easy to change configuration<br />

Share with colleagues<br />

Reproducible<br />

Easy to add "packages"


http://buildroot.org<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Kconfig-based interactive configuration<br />

Makefile-based build system<br />

Download, build and install<br />

Patch (cross-compilation fixes)<br />

Toolchain (compiler, library)<br />

– Packages + dependencies<br />

– Boot loader (U-Boot, barebox, grub, ...)<br />

– Linux kernel<br />

– Host tools (openocd, dfu-util, ...)<br />

● Create root filesystem (ext2, jffs2, ubi, ...)


<strong>Buildroot</strong> has a simple workflow<br />

/etc/init.d/S80startapp<br />

/etc/network/interfaces<br />

Makefiles<br />

Kconfigs<br />

patches<br />

make xconfig;<br />

make<br />

libraries<br />

kernel<br />

patches<br />

root<br />

filesystem<br />

Image © Marcello Jo


<strong>Buildroot</strong> deploys on EVM<br />

in no time


<strong>Buildroot</strong> makes it easy<br />

to change the configuration


<strong>Buildroot</strong> makes it easy<br />

to change the configuration


<strong>Buildroot</strong> makes it easy<br />

to change the configuration<br />

make linux-xconfig


<strong>Buildroot</strong> makes it easy<br />

to share with colleagues<br />

Set BR2_DEFCONFIG and BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE<br />

make update-all-config


<strong>Buildroot</strong> is reproducible<br />

●<br />

Configuration files (make update-all-config)<br />

are all that is needed to re-create<br />

exactly the same build<br />

●<br />

Sources can be collected with make source<br />

●<br />

Licenses can be collected with make legal-info


<strong>Buildroot</strong> has conventions<br />

for where to store config<br />

Board configuration goes in board directory:<br />

board//<br />

<strong>Buildroot</strong> configuration goes in configs directory:<br />

configs/_defconfig


<strong>Buildroot</strong> makes it easy<br />

to hack a package<br />

LINUX_OVERRIDE_SRCDIR = /home/arnout/src/linux<br />

make linux-rebuild


<strong>Buildroot</strong> makes it easy<br />

package/foo/foo.mk<br />

to add packages<br />

BR2_PACKAGE_FOO = y<br />

FOO_OVERRIDE_SRCDIR = …/foo<br />

FOO_DEPENDENCIES = opencv libusb<br />

define FOO_BUILD_CMDS<br />

$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)<br />

endef<br />

define FOO_INSTALL_TARGET_CMDS<br />

$(INSTALL) -D -m 0755 $(@D)/foo \<br />

$(TARGET_DIR)/usr/bin/foo<br />

endef<br />

$(eval $(generic-package))


<strong>Buildroot</strong> makes it easy<br />

to cross-compile your source<br />

Use /output/host/usr/-gcc<br />

as the cross-compiler<br />

– Automatically uses cross-include and library paths<br />

– Use /output/host/usr/pkg-config<br />

to get package-specific cflags and ldflags<br />

Cross-build environment can be shared<br />

by setting BR2_HOST_DIR


●<br />

Documentation:<br />

– make help<br />

– make manual<br />

<strong>Buildroot</strong> has good support<br />

– http://buildroot.net/downloads/manual/manual.html<br />

●<br />

Mailing list:<br />

– buildroot@busybox.net<br />

– 40 mails per day (mostly patches)<br />

●<br />

●<br />

●<br />

Release every 3 months<br />

buildroot-2012.11 expected on December 1<br />

20 new packages per month<br />

Automatic tests: 100 builds per day


<strong>Buildroot</strong><br />

<strong>Buildroot</strong> has competition<br />

No package management<br />

Upgrades are system-wide<br />

Fixed-functionality <strong>systems</strong><br />

PtxDist<br />

LTIB<br />

OpenWRT<br />

OpenEmbedded<br />

Yocto<br />

Runtime package management<br />

Upgrades are per-package<br />

Functionality is dynamically added<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


<strong>Buildroot</strong> has competition<br />

<strong>Buildroot</strong><br />

●<br />

●<br />

●<br />

●<br />

PtxDist<br />

Kconfig configuration<br />

Makefiles<br />

LTIB<br />

OpenWRT<br />

Generates completely custom rootfs<br />

Very active community<br />

OpenEmbedded<br />

Yocto<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


PtxDist is very similar to buildroot<br />

Created and maintained <strong>Buildroot</strong> by Pengutronix<br />

PtxDist<br />

●<br />

●<br />

●<br />

●<br />

LTIB<br />

Kconfig configuration<br />

shell scripts<br />

OpenWRT<br />

OpenEmbedded<br />

Generates completely custom rootfs<br />

Active community<br />

Yocto<br />

Gentoo<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

emDebian<br />

Distribution


LTIB is history<br />

Freescale's Linux <strong>Buildroot</strong> distribution<br />

PtxDist<br />

●<br />

●<br />

●<br />

One large Perl script<br />

Small community<br />

LTIB<br />

OpenWRT<br />

OpenEmbedded<br />

Surpassed by the others<br />

Yocto<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


OpenWRT is a buildroot distro<br />

●<br />

●<br />

●<br />

Fork <strong>of</strong> ancient buildroot<br />

<strong>Buildroot</strong><br />

Focus on WLAN routers<br />

PtxDist<br />

Package management & ICU configuration data<br />

LTIB<br />

OpenWRT<br />

OpenEmbedded<br />

Yocto<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


OpenEmbedded is huge<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Bitbake build system<br />

<strong>Buildroot</strong><br />

ipkg package manager<br />

PtxDist<br />

Layered system<br />

LTIB<br />

– build distribution from several sources<br />

OpenWRT<br />

– flexible tracking <strong>of</strong> upstreams<br />

Difficult to change configuration<br />

Hard to understand<br />

Yocto<br />

Gentoo<br />

Slooooooooooooooooooooooooooooooooooooow<br />

emDebian<br />

Root filesystem<br />

generator<br />

OpenEmbedded<br />

Distribution<br />

generator<br />

Distribution


Yocto<br />

●<br />

●<br />

●<br />

OpenEmbedded derivative<br />

<strong>Buildroot</strong><br />

Layer(s) for TI processors<br />

PtxDist<br />

Eclipse integration<br />

LTIB<br />

● Marketing machine OpenWRT<br />

OpenEmbedded<br />

Yocto<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


Desktop distributions<br />

●<br />

●<br />

●<br />

●<br />

Package manager<br />

can also be used for <strong>embedded</strong><br />

<strong>Buildroot</strong><br />

Binaries or source<br />

PtxDist<br />

LTIB<br />

Cross-build turns out OpenWRT to be problematic<br />

OpenEmbedded<br />

Difficult to make it reproducible<br />

Yocto<br />

Gentoo<br />

emDebian<br />

Root filesystem<br />

generator<br />

Distribution<br />

generator<br />

Distribution


Bringing up your device is easy<br />

with <strong>Buildroot</strong>


www.mind.be<br />

www.essensium.com<br />

Essensium NV<br />

<strong>Mind</strong> - Embedded S<strong>of</strong>tware Division<br />

Gaston Geenslaan 9, B-3001 Leuven<br />

Tel : +32 16-28 65 00<br />

Fax : +32 16-28 65 01<br />

email : info@essensium.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!