Buildroot Slides PDF
Buildroot Slides PDF
Buildroot Slides PDF
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Latest update: January 7, 2016.
Document updates and sources:
http://free- electrons.com/doc/training/buildroot
Corrections, suggestions, contributions and translations are welcome!
Send them to feedback@free-electrons.com
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
1/326
Rights to copy
Copyright 2004-2016, Free Electrons
License: Creative Commons Attribution - Share Alike 3.0
http://creativecommons.org/licenses/by-sa/3.0/legalcode
You are free:
to copy, distribute, display, and perform the work
to make derivative works
to make commercial use of the work
Under the following conditions:
Attribution. You must give the original author credit.
Share Alike. If you alter, transform, or build upon this work, you may distribute
the resulting work only under a license identical to this one.
For any reuse or distribution, you must make clear to others the license terms of
this work.
Any of these conditions can be waived if you get permission from the copyright
holder.
Your fair use and other rights are in no way aected by the above.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
2/326
Regular hyperlinks:
http://kernel.org/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
3/326
Head count: 9
Only Free Software enthusiasts!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
4/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
5/326
Generic course
information
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
6/326
(4 GB in Rev C)
USB host and USB device ports
microSD slot
HDMI port
2 x 46 pins headers, with access to many
7/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
8/326
Participate!
During the lectures...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
9/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
10/326
Lab commands
Cross-compiling kernel:
export ARCH=arm
export CROSS_COMPILE=arm-linuxmake sama5_defcong
Booting kernel through tftp:
setenv bootargs console=ttyS0 root=/dev/nfs
setenv bootcmd tftp 0x21000000 zImage; tftp
0x22000000 dtb; bootz 0x21000000 - 0x2200...
Making ubifs images:
mkfs.ubifs -d rootfs -o root.ubifs -e 124KiB
-m 2048 -c 1024
Encountered issues:
Restart NFS server after editing /etc/exports!
gedit ~/lab-history.txt
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
11/326
Cooperate!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
12/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
13/326
vi basic commands
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
14/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
15/326
Introduction to
Embedded Linux
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
16/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
17/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
18/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
19/326
ALL
toolchain
toolchain-buildroot
busybox
host-libgtk3
xlib_libXrandr
harfbuzz
xproto_randrproto
atk
xlib_libXcursor
libsha1
libglib2
glibc
linux-headers
host-gcc-initial
xproto_renderproto
host-gdk-pixbuf
host-gawk
cairo
xproto_damageproto
libffi
host-mpc
host-libffi
host-automake
host-mpfr
host-autoconf
host-gmp
xlib_libXinerama
xlib_libXfixes
xproto_fixesproto
libpng
host-gettext
xlib_libXi
xlib_libXft
gdk-pixbuf
pixman
fontconfig
xproto_xcmiscproto
xproto_xineramaproto
xlib_libXres
xlib_libXxf86vm
xproto_resourceproto
libpthread-stubs
host-libpng
xproto_xextproto
xcb-proto
zlib
xproto_inputproto
host-xcb-proto
host-python
host-zlib
xproto_kbproto
host-intltool
host-libxml-parser-perl
xproto_xf86dgaproto
rootfs-tar
host-fakeroot
mcookie
xdata_xbitmaps
xproto_bigreqsproto
xproto_compositeproto
xkeyboard-config
xproto_videoproto
host-xapp_xkbcomp
freetype
libxcb
xlib_libXdmcp
xproto_xproto
xlib_xtrans
xlib_libXau
xutil_util-macros
host-libxcb
host-libxslt
xfont_encodings
host-libpthread-stubs
host-libxml2
host-freetype
host-expat
host-xapp_mkfontdir
host-xlib_libX11
xproto_fontsproto
host-xproto_xf86bigfontproto
host-xproto_inputproto
host-xproto_kbproto
host-makedevs
xlib_libxkbfile
xfont_font-cursor-misc
host-xlib_libxkbfile
xlib_libXfont
xlib_libfontenc
xproto_glproto
xproto_xf86vidmodeproto
xlib_libXext
xlib_libX11
xproto_xf86bigfontproto
host-libglib2
host-binutils
xapp_xkbcomp
xserver_xorg-server
xlib_libXdamage
xlib_libXrender
host-gcc-final
libgtk3
pango
xfont_font-misc-misc
host-xapp_bdftopcf
xfont_font-alias
host-xfont_font-util
xfont_font-util
host-xlib_libXfont
host-xproto_xextproto
host-xapp_mkfontscale
host-xlib_xtrans
host-xfont_encodings
host-xproto_fontsproto
xproto_presentproto
host-xlib_libfontenc
host-xlib_libXau
host-xproto_xproto
host-xlib_libXdmcp
host-xutil_util-macros
expat
host-pkgconf
host-libtool
host-m4
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
20/326
Pros
Full exibility
Learning experience
Binary distribution
Debian, Ubuntu, Fedora, etc.
Build systems
Buildroot, Yocto, PTXdist, etc.
Cons
Dependency hell
Need to understand a lot of details
Version compatibility
Lack of reproducibility
Hard to customize
Hard to optimize (boot time, size)
Hard to rebuild the full system
from source
Large system
Uses native compilation (slow)
No well-dened mechanism to generate an image
Lots of mandatory dependencies
Not available for all architectures
Not as easy as a binary distribution
Build time
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
21/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
22/326
Yocto/OpenEmbedded
Builds a complete Linux distribution with binary packages.
Powerful, but somewhat complex, and quite steep learning
curve.
Buildroot
Builds a root lesystem image, no binary packages. Much
simpler to use, understand and modify.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
23/326
Introduction to Buildroot
Introduction to
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
24/326
Buildroot at a glance
Vendor neutral
Active community, regular releases
http://buildroot.org
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
25/326
Simple to use
Simple to customize
Reproducible builds
Small root lesystem
Relatively fast boot
Easy to understand
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
26/326
System makers
Google
Barco
Rockwell Collins
Processor vendors
Imagination Technologies
Marvell
Atmel
Analog Devices
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
27/326
Getting Buildroot
http://buildroot.org/downloads/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
28/326
Using Buildroot
Implemented in make
.
$ cd buildroot/
$
. make help
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
29/326
Conguring Buildroot
make
make
make
make
menuconfig
nconfig
xconfig
gconfig
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
30/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
31/326
As simple as:
.
.$ make
.
.$ make 2>&1 | tee build.log
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
32/326
Build results
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
33/326
Get Buildroot
Do the build
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
34/326
Managing the
build and the
conguration
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
35/326
By default:
O = output
CONFIG_DIR = $(TOPDIR)
TOPDIR = $(shell pwd)
buildroot/
.config
arch/
package/
output/
fs/
...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
36/326
.config
.config
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
37/326
.
make
O=../foo-output/ menuconfig
.
.
.make -C ../buildroot/ O=$(pwd) menuconfig
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
38/326
5. Adjust the conguration again, restart the build, clean the build:
.
$ make menuconfig
$ make
$
. make clean
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
39/326
A defcong stores only the values for options for which the
non-default value is chosen.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
40/326
defcong: example
.
.BR2_arm=y
If then you also enable the stress package, the defcong will
be just two lines:
.
BR2_arm=y
BR2_PACKAGE_STRESS=y
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
41/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
42/326
Existing defcongs
.
$ make qemu_arm_vexpress_defconfig
$
. make
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
43/326
.
platform1.frag
.
BR2_arm=y
BR2_TOOLCHAIN_BUILDROOT_WCHAR=y
BR2_GCC_VERSION_4_9_X=y
.
.
platform2.frag
.
BR2_mipsel=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS201405=y
.
.
packages.frag
.
BR2_PACKAGE_STRESS=y
BR2_PACKAGE_MTD=y
BR2_PACKAGE_LIBCONFIG=y
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
44/326
BR2_ENABLE_DEBUG=y
BR2_PACKAGE_STRACE=y
.
.
Build a release system for platform1
.
.
Build a debug system for platform2
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
45/326
Cleaning targets
.
.$ make clean
.
.$ make distclean
Verbose build
.
.$ make V=1
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
46/326
Buildroot source
and build trees
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
47/326
Source tree
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
48/326
Makefile
Config.in
arch/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
49/326
toolchain/
system/
linux/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
50/326
package/
fs/
boot/
bootloader packages
at91bootstrap3/, barebox/, grub/, syslinux/, uboot/, etc.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
51/326
configs/
board/
support/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
52/326
docs/
Buildroot documentation
Written in AsciiDoc, can generate HTML, PDF, TXT versions:
make manual
90 pages PDF document
Also available pre-generated online.
http://buildroot.org/downloads/manual/manual.html
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
53/326
Build tree
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
54/326
output/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
55/326
output/
build/
buildroot-config/
busybox-1.22.1/
host-pkgconf-0.8.9/
kmod-1.18/
build-time.log
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
56/326
output/
host/
usr/lib
usr/bin
usr/sbin
usr/<tuple>/sysroot/bin
usr/<tuple>/sysroot/lib
usr/<tuple>/sysroot/usr/lib
usr/<tuple>/sysroot/usr/bin
Contains both the tools built for the host (cross-compiler, etc.)
and the sysroot of the toolchain
Variable: HOST_DIR
Host tools are directly in host/usr
The sysroot is in host/<tuple>/sysroot/usr
<tuple> is an identier of the architecture, vendor, operating
system, C library and ABI. E.g:
arm-unknown-linux-gnueabihf.
Variable for the sysroot: STAGING_DIR
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
57/326
output/
staging/
Just a symbolic link to the sysroot, i.e. to
host/<tuple>/sysroot/.
Available for convenience
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
58/326
output/
target/
bin/
etc/
lib/
usr/bin/
usr/lib/
usr/share/
usr/sbin/
THIS_IS_NOT_YOUR_ROOT_FILESYSTEM
...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
59/326
output/
images/
zImage
armada-370-mirabox.dtb
rootfs.tar
rootfs.ubi
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
60/326
output/
graphs/
Visualization of Buildroot operation: dependencies between
packages, time to build the dierent packages
make graph-depends
make graph-build
Variable: GRAPHS_DIR
See the section Analyzing the build later in this training.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
61/326
output/
legal-info/
manifest.csv
host-manifest.csv
licenses.txt
licenses/
sources/
...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
62/326
Toolchains in Buildroot
Toolchains in
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
63/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
64/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
65/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
66/326
target/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
67/326
Several options:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
68/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
69/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
70/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
71/326
target/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
72/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
73/326
Target optimizations
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
74/326
Managing the
Linux kernel
conguration
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
75/326
Introduction
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
76/326
Use a defconfig
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
77/326
make
make
make
make
linux-menuconfig
linux-nconfig
linux-xconfig
linux-gconfig
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
78/326
Typical ow
1. make menuconfig
6. make linux-update-defconfig
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
79/326
Root lesystem in
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
80/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
81/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
82/326
Installation of packages
This is really the step that will bring the vast majority of the
les in the root lesystem.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
83/326
Cleanup step
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
84/326
85/326
Post-build scripts
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
86/326
# Generate a file identifying the build (git commit and build date)
echo $(git describe) $(date +%Y-%M-%d-%H:%m:%S) > \
$TARGET_DIR/etc/build-id
# Create /applog mountpoint, and adjust /etc/fstab
mkdir -p $TARGET_DIR/applog
grep -q "^/dev/mtdblock7" $TARGET_DIR/etc/fstab || \
echo "/dev/mtdblock7\t\t/applog\tjffs2\tdefaults\t\t0\t0" >> \
$TARGET_DIR/etc/fstab
# Remove unneeded files
rm
. -rf $TARGET_DIR/usr/share/icons/bar
.
Buildroot conguration
.
.BR2_ROOTFS_POST_BUILD_SCRIPT="board/myproject/post-build.sh"
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
87/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
88/326
Permission table
By default, all les are owned by the root user, and the
permissions with which they are installed in $(TARGET_DIR)
are preserved.
.
Permission table example
.
#<name>
/dev
/tmp
/var/www
<type> <mode>
d
755
d
1777
d
755
<uid>
0
0
33
<gid>
0
0
33
<major>
-
<minor>
-
<start>
-
<inc>
-
<count>
-
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
89/326
Device table
BR2_ROOTFS_STATIC_DEVICE_TABLE contains a
space-separated list of device table les.
Packages can also specify their own device les. See the
Advanced package aspects section for details.
.
Device table example
.
# <name>
/dev/mem
/dev/kmem
/dev/i2c-
<type>
c
c
c
<mode> <uid>
640
0
640
0
666
0
<gid>
0
0
0
<major>
1
1
89
<minor>
1
2
0
<start>
0
0
0
<inc>
0
0
1
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
<count>
4
90/326
Users table
Packages can also specify their own users. See the Advanced
package aspects section for details.
.
Users table example
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
91/326
Post-image scripts
Once all the lesystem images have been created, at the very
end of the build, post-image scripts are called.
They allow to do any custom action at the end of the build.
For example:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
92/326
Init mechanism
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
93/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
94/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
95/326
NFS booting
initramfs
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
96/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
97/326
Two solutions:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
98/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
99/326
Download
infrastructure in
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
100/326
Introduction
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
101/326
Download location
1.
2.
3.
4.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
102/326
Primary site
It does not fall back on the original site and the backup
Buildroot mirror
Guarantees that all downloads must be in the primary site
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
103/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
104/326
DL_DIR
By default, $(TOPDIR)/dl
Can be changed
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
105/326
Example: avrdudeeabe067c4527bc2eedc5db9288ef5cf1818ec720.tar.gz
This tarball will be re-used for the next builds, and attempts
are made to download it from the primary and backup sites.
Due to this, always use a tag name or a full commit id, and
never a branch name: the code will never be re-downloaded
when the branch is updated.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
106/326
.
Hash checking message
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
107/326
make source
make external-deps
make source-check
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
108/326
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
109/326
Introduction
http://www.gnu.org/software/make/manual/make.html
http://www.nostarch.com/gnumake
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
110/326
.
TARGET ...: PREREQUISITES ...
RECIPE
...
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
111/326
Rule example
.
Makele
.
clean:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
112/326
.
define FOOBAR
line 1
line 2
endef
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
113/326
Conditions
ifeq ($(BR2_CCACHE),y)
CCACHE := $(HOST_DIR)/usr/bin/ccache
endif
distclean: clean
ifeq ($(DL_DIR),$(TOPDIR)/dl)
rm -rf $(DL_DIR)
endif
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
114/326
$(BUILD_DIR)/%/.stamp_extracted:
[...]
@$(call MESSAGE,"Extracting")
define legal-license-nofiles # pkg, {HOST|TARGET}
$(call legal-license-header,$(1),unknown license file(s),$(2))
endef
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
115/326
$(foreach incdir,$(TI_GFX_HDR_DIRS),
$(INSTALL) -d $(STAGING_DIR)/usr/include/$(notdir $(incdir)); \
$(INSTALL) -D -m 0644 $(@D)/include/$(incdir)/*.h \
$(STAGING_DIR)/usr/include/$(notdir $(incdir))/
)
And many more, see the GNU Make manual for details.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
116/326
Writing recipes
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
117/326
Integrating new
packages in
Buildroot
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
118/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
119/326
A directory, package/foo
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
120/326
Config.in le
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
121/326
package/<pkg>/Config.in: basics
config BR2_PACKAGE_STRACE
bool "strace"
help
A useful diagnostic, instructional, and debugging tool.
Allows you to track what system calls a program makes
while it is running.
http://sourceforge.net/projects/strace/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
122/326
package/<pkg>/Config.in: inclusion
.
package/Cong.in
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
123/326
package/<pkg>/Config.in: dependencies
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
124/326
.
btrfs-progs package
.
config BR2_PACKAGE_BTRFS_PROGS
bool "btrfs-progs"
depends on BR2_USE_WCHAR # util-linux
depends on BR2_USE_MMU # util-linux
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_ACL
select BR2_PACKAGE_ATTR
select BR2_PACKAGE_E2FSPROGS
select BR2_PACKAGE_LZO
select BR2_PACKAGE_UTIL_LINUX
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
select BR2_PACKAGE_UTIL_LINUX_LIBUUID
select BR2_PACKAGE_ZLIB
help
Btrfs filesystem utilities
https://btrfs.wiki.kernel.org/in...
comment "btrfs-progs needs a toolchain w/ wchar, threads"
depends on BR2_USE_MMU
depends on !BR2_USE_WCHAR || \
!BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU,
because the package uses
fork(). Note that there is
no comment displayed
about this dependency,
because it's a limitation of
the architecture.
depends on BR2_USE_WCHAR
and depends on BR2_
TOOLCHAIN_HAS_THREADS,
because the package
requires wide-char and
thread support from the
toolchain. There is an
associated comment,
because such support can
be added to the toolchain.
Multiple
select BR2_PACKAGE_*,
because the package needs
numerous libraries.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
125/326
Dependency propagation
.
libglib2 package
.
config BR2_PACKAGE_LIBGLIB2
bool "libglib2"
select BR2_PACKAGE_GETTEXT if ...
select BR2_PACKAGE_LIBICONV if ...
select BR2_PACKAGE_LIBFFI
select BR2_PACKAGE_ZLIB
[...]
depends on BR2_USE_WCHAR # gettext
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # fork()
[...]
.
neard package
.
config BR2_PACKAGE_NEARD
bool "neard"
depends on BR2_USE_WCHAR # libglib2
# libnl, dbus, libglib2
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on BR2_USE_MMU # dbus, libglib2
select BR2_PACKAGE_DBUS
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBNL
[...]
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
126/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
127/326
Config.in.host example
.
package/Cong.in.host
.
menu "Host utilities"
source
source
source
source
"package/genimage/Config.in.host"
"package/lpc3250loader/Config.in.host"
"package/openocd/Config.in.host"
"package/qemu/Config.in.host"
.
.
package/openocd/Cong.in.host
.
endmenu
config BR2_PACKAGE_HOST_OPENOCD
bool "host openocd"
help
OpenOCD - Open On-Chip Debugger
http://openocd.org
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
128/326
Config.in sub-options
Additional
sub-options can be
dened to further
congure the
package, to enable or
disable extra features.
The value of such
options can then be
fetched from the
package .mk le to
adjust the build
accordingly.
Run-time
conguration does
not belong to
Config.in.
.
package/pppd/Cong.in
.
config BR2_PACKAGE_PPPD
bool "pppd"
depends on !BR2_STATIC_LIBS
depends on BR2_USE_MMU
...
if BR2_PACKAGE_PPPD
config BR2_PACKAGE_PPPD_FILTER
bool "filtering"
select BR2_PACKAGE_LIBPCAP
help
Packet filtering abilities for pppd. If enabled,
the pppd active-filter and pass-filter options
are available.
config BR2_PACKAGE_PPPD_RADIUS
bool "radius"
help
Install RADIUS support for pppd
endif
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
129/326
Package infrastructures
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
130/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
131/326
Package infrastructures
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
132/326
generic-package infrastructure
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
133/326
generic-package: steps
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
134/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
135/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
136/326
The <pkg>.mk le
FOOBAR_SITE = http://foobar.com/downloads/
define FOOBAR_BUILD_CMDS
$(MAKE) -C $(@D)
endef
$(eval $(generic-package))
$(eval $(autotools-package))
$(eval $(host-autotools-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
137/326
Naming conventions
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
138/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
139/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
140/326
From a package .mk le, one can directly use such variables:
ifeq ($(BR2_PACKAGE_LIBCURL),y)
...
endif
.
.NODEJS_MODULES_LIST = $(call qstrip,$(BR2_PACKAGE_NODEJS_MODULES_ADDITIONAL))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
141/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
142/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
143/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
144/326
Examples:
.
sysvinit.mk
.
S
.YSVINIT_PATCH = sysvinit_$(SYSVINIT_VERSION)dsf-13.1+squeeze1.diff.gz
.
perl.mk
.
PERL_CROSS_SITE = http://raw.github.com/arsv/perl-cross/releases
PERL_CROSS_SOURCE = perl-$(PERL_CROSS_BASE_VERSION)-cross-$(PERL_CROSS_VERSION).tar.gz
PERL_EXTRA_DOWNLOADS = $(PERL_CROSS_SITE)/$(PERL_CROSS_SOURCE)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
145/326
Describing dependencies
.
python.mk
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
146/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
147/326
.
package/ntp/Cong.in
.
config BR2_PACKAGE_NTP
bool "ntp"
select BR2_PACKAGE_LIBEVENT
[...]
.
.
package/ntp/ntp.mk
.
[...]
NTP_DEPENDENCIES = host-pkgconf libevent
[...]
ifeq ($(BR2_PACKAGE_OPENSSL),y)
NTP_CONF_OPTS += --with-crypto
NTP_DEPENDENCIES += openssl
else
NTP_CONF_OPTS += --without-crypto --disable-openssl-random
endif
[...]
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
148/326
menuconfig BR2_PACKAGE_MPD
bool "mpd"
depends on BR2_INSTALL_LIBSTDCPP
[...]
select BR2_PACKAGE_BOOST
select BR2_PACKAGE_LIBGLIB2
select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
[...]
config BR2_PACKAGE_MPD_FLAC
bool "flac"
select BR2_PACKAGE_FLAC
help
Enable flac input/streaming support.
Select this if you want to play back FLAC files.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
149/326
.
package/mpd/mpd.mk
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
150/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
151/326
installs to $(BINARIES_DIR)
must set <pkg>_INSTALL_IMAGES = YES
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
152/326
.
libyaml.mk
.
L. IBYAML_INSTALL_STAGING = YES
.
eigen.mk
.
EIGEN_INSTALL_STAGING = YES
EIGEN_INSTALL_TARGET
= NO
.
.
linux.mk
.
L. INUX_INSTALL_IMAGES = YES
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
153/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
154/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
155/326
.
eeprog.mk
.
EEPROG_VERSION = 0.7.6
EEPROG_SITE = http://www.codesink.org/download
EEPROG_LICENSE = GPLv2+
EEPROG_LICENSE_FILES = eeprog.c
define EEPROG_BUILD_CMDS
$(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
endef
define EEPROG_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 -D $(@D)/eeprog $(TARGET_DIR)/usr/bin/eeprog
endef
$(eval
$(generic-package))
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
156/326
$(eval $(generic-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
157/326
autotools-package infrastructure
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
158/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
159/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
160/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
161/326
.
libyaml.mk
.
LIBYAML_VERSION = 0.1.6
LIBYAML_SOURCE = yaml-$(LIBYAML_VERSION).tar.gz
LIBYAML_SITE = http://pyyaml.org/download/libyaml
LIBYAML_INSTALL_STAGING = YES
LIBYAML_LICENSE = MIT
LIBYAML_LICENSE_FILES = LICENSE
$(eval
$(autotools-package))
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
162/326
POPPLER_VERSION = 0.32.0
POPPLER_SOURCE = poppler-$(POPPLER_VERSION).tar.xz
POPPLER_SITE = http://poppler.freedesktop.org
POPPLER_DEPENDENCIES = fontconfig
POPPLER_LICENSE = GPLv2+
POPPLER_LICENSE_FILES = COPYING
POPPLER_INSTALL_STAGING = YES
POPPLER_CONF_OPTS = \
--with-font-configuration=fontconfig
ifeq ($(BR2_PACKAGE_LCMS2),y)
POPPLER_CONF_OPTS += --enable-cms=lcms2
POPPLER_DEPENDENCIES += lcms2
else
POPPLER_CONF_OPTS += --enable-cms=none
endif
ifeq ($(BR2_PACKAGE_TIFF),y)
POPPLER_CONF_OPTS += --enable-libtiff
POPPLER_DEPENDENCIES += tiff
else
POPPLER_CONF_OPTS += --disable-libtiff
endif
.
[...]
ifeq ($(BR2_PACKAGE_POPPLER_QT),y)
POPPLER_DEPENDENCIES += qt
POPPLER_CONF_OPTS += --enable-poppler-qt4
else
POPPLER_CONF_OPTS += --disable-poppler-qt4
endif
ifeq ($(BR2_PACKAGE_OPENJPEG),y)
POPPLER_DEPENDENCIES += openjpeg
POPPLER_CONF_OPTS += \
-enable-libopenjpeg=openjpeg1
else
POPPLER_CONF_OPTS += -enable-libopenjpeg=none
endif
$(eval $(autotools-package))
[...]
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
163/326
python-package infrastructure
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
164/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
165/326
.
python-serial.mk
.
PYTHON_SERIAL_VERSION = 2.6
PYTHON_SERIAL_SOURCE = pyserial-$(PYTHON_SERIAL_VERSION).tar.gz
PYTHON_SERIAL_SITE = http://pypi.python.org/packages/source/p/pyserial
PYTHON_SERIAL_LICENSE = Python Software Foundation License
PYTHON_SERIAL_LICENSE_FILES = LICENSE.txt
PYTHON_SERIAL_SETUP_TYPE = distutils
$(eval
$(python-package))
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
166/326
.
python-serial.mk
.
PYTHON_LXML_VERSION = 3.4.2
PYTHON_LXML_SITE = http://lxml.de/files
PYTHON_LXML_SOURCE = lxml-$(PYTHON_LXML_VERSION).tgz
[...]
PYTHON_LXML_SETUP_TYPE = setuptools
PYTHON_LXML_DEPENDENCIES = libxml2 libxslt zlib
PYTHON_LXML_BUILD_OPTS = \
--with-xslt-config=$(STAGING_DIR)/usr/bin/xslt-config \
--with-xml2-config=$(STAGING_DIR)/usr/bin/xml2-config
$(eval
$(python-package))
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
167/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
168/326
Host packages
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
169/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
170/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
171/326
.
package/bison/bison.mk
.BISON_VERSION = 3.0.4
BISON_SOURCE = bison-$(BISON_VERSION).tar.xz
BISON_SITE = $(BR2_GNU_MIRROR)/bison
BISON_LICENSE = GPLv3+
BISON_LICENSE_FILES = COPYING
HOST_BISON_DEPENDENCIES = host-m4
$(eval $(host-autotools-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
172/326
.
package/dfu-util/Cong.in.host
.
config BR2_PACKAGE_HOST_DFU_UTIL
bool "host dfu-util"
help
Dfu-util is the host side implementation of the DFU 1.0
specification of the USB forum. DFU is intended to download
and upload firmware to devices connected over USB.
http://dfu-util.gnumonks.org/
.
.
package/dfu-util/dfu-util.mk
.DFU_UTIL_VERSION = 0.6
DFU_UTIL_SITE = http://dfu-util.gnumonks.org/releases
DFU_UTIL_LICENSE = GPLv2+
DFU_UTIL_LICENSE_FILES = COPYING
HOST_DFU_UTIL_DEPENDENCIES = host-libusb
$(eval $(host-autotools-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
173/326
.
package/e2tools/e2tools.mk
.
E2TOOLS_VERSION = 3158ef18a903ca4a98b8fa220c9fc5c133d8bdf6
E2TOOLS_SITE = $(call github,ndim,e2tools,$(E2TOOLS_VERSION))
# Source coming from GitHub, no configure included.
E2TOOLS_AUTORECONF = YES
E2TOOLS_LICENSE = GPLv2
E2TOOLS_LICENSE_FILES = COPYING
E2TOOLS_DEPENDENCIES = e2fsprogs
E2TOOLS_CONF_ENV = LIBS="-lpthread"
HOST_E2TOOLS_CONF_ENV = LIBS="-lpthread"
$(eval $(autotools-package))
$(eval $(host-autotools-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
174/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
175/326
Advanced package
aspects
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
176/326
Licensing report
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
177/326
Generated using:
.
$
. make legal-info
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
178/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
179/326
<pkg>_LICENSE
<pkg>_LICENSE_FILES
<pkg>_REDISTRIBUTE
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
180/326
.
linux.mk
.
LINUX_LICENSE = GPLv2
LINUX_LICENSE_FILES
= COPYING
.
.
acl.mk
.
ACL_LICENSE = GPLv2+ (programs), LGPLv2.1+ (libraries)
ACL_LICENSE_FILES
= doc/COPYING doc/COPYING.LGPL
.
.
owl-linux.mk
.
OWL_LINUX_LICENSE = PROPRIETARY
OWL_LINUX_LICENSE_FILES = LICENSE
OWL_LINUX_REDISTRIBUTE
= NO
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
181/326
Patching packages
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
182/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
183/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
184/326
Patch conventions
.
ls package/nginx/*.patch
.
0001-auto-type-sizeof-rework-autotest-to-be-cross-compila.patch
0002-auto-feature-add-mechanism-allowing-to-force-feature.patch
0003-auto-set-ngx_feature_run_force_result-for-each-featu.patch
0004-auto-lib-libxslt-conf-allow-to-override-ngx_feature_.patch
0005-auto-unix-make-sys_nerr-guessing-cross-friendly.patch
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
185/326
Patch example
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
186/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
187/326
$ ls package/strace/*.patch
0001-linux-aarch64-add-missing-header.patch
$ find ~/patches/
~/patches/
~/patches/strace/
~/patches/strace/0001-Demo-strace-change.patch
$ grep ^BR2_GLOBAL_PATCH_DIR .config
BR2_GLOBAL_PATCH_DIR="$(HOME)/patches"
$ make strace
[...]
>>> strace 4.10 Patching
Applying 0001-linux-aarch64-add-missing-header.patch using patch:
patching file linux/aarch64/arch_regs.h
Applying 0001-Demo-strace-change.patch using patch:
patching file README
[...]
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
188/326
Generating patches
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
189/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
190/326
191/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
192/326
Package-specic users
.
define <pkg>_USERS
username uid group gid password home shell groups comment
endef
.
Examples:
define AVAHI_USERS
avahi -1 avahi -1 * - - endef
.
define MYSQL_USERS
mysql -1 nogroup -1 * /var/mysql - - MySQL daemon
endef
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
193/326
.
define <pkg>_PERMISSIONS
name type mode uid gid major minor start inc count
endef
.
The major, minor, start, inc and count elds are not used.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
194/326
define SUDO_PERMISSIONS
/usr/bin/sudo f 4755 0 0 - - - - endef
.
define NGINX_PERMISSIONS
/var/lib/nginx d 755 33 33 - - - - endef
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
195/326
Devices
.
define <pkg>_DEVICES
name type mode uid gid major minor start inc count
endef
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
196/326
Devices: example
.
xenomai.mk
.
define XENOMAI_DEVICES
/dev/rtheap c 666 0
/dev/rtscope c 666 0
/dev/rtp
c 666 0
endef
.
0 10 254 0 0
0 10 253 0 0
0 150 0
0 1
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
32
197/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
198/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
199/326
.
bind.mk
.
define BIND_INSTALL_INIT_SYSV
$(INSTALL) -m 0755 -D package/bind/S81named \
$(TARGET_DIR)/etc/init.d/S81named
endef
define BIND_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/bind/named.service \
$(TARGET_DIR)/usr/lib/systemd/system/named.service
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
ln -sf /usr/lib/systemd/system/named.service \
$(TARGET_DIR)/etc/systemd/system/[...]/named.service
endef
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
200/326
Cong scripts
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
201/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
202/326
.
libpng.mk
.
LIBPNG_CONFIG_SCRIPTS = \
libpng$(LIBPNG_SERIES)-config libpng-config
.
.
imagemagick.mk
.
IMAGEMAGICK_CONFIG_SCRIPTS = \
$(addsuffix -config,Magick MagickCore MagickWand Wand)
ifeq ($(BR2_INSTALL_LIBSTDCPP)$(BR2_USE_WCHAR),yy)
IMAGEMAGICK_CONFIG_SCRIPTS += Magick++-config
endif
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
203/326
.
Without <pkg>_CONFIG_SCRIPTS
.
.
.
With <pkg>_CONFIG_SCRIPTS
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
204/326
Hooks
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
205/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
206/326
There are pre and post hooks available for all steps of the
package compilation process:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
207/326
Hooks: examples
.
libungif.mk:
.
define LIBUNGIF_BINS_CLEANUP
rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(LIBUNGIF_BINS))
endef
LIBUNGIF_POST_INSTALL_TARGET_HOOKS
+= LIBUNGIF_BINS_CLEANUP
.
.
vsftpd.mk:
.
adjust conguration
define VSFTPD_ENABLE_SSL
$(SED) 's/.*VSF_BUILD_SSL/#define VSF_BUILD_SSL/' \
$(@D)/builddefs.h
endef
ifeq ($(BR2_PACKAGE_OPENSSL),y)
VSFTPD_DEPENDENCIES += openssl
VSFTPD_LIBS += -lssl -lcrypto
VSFTPD_POST_CONFIGURE_HOOKS += VSFTPD_ENABLE_SSL
endif
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
208/326
Overriding commands
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
209/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
210/326
.
jquery:
.
JQUERY_SITE = http://code.jquery.com
JQUERY_SOURCE = jquery-$(JQUERY_VERSION).min.js
define JQUERY_EXTRACT_CMDS
cp $(DL_DIR)/$(JQUERY_SOURCE) $(@D)
endef
.
.
tftpd:
.
define TFTPD_INSTALL_TARGET_CMDS
$(INSTALL) -D $(@D)/tftp/tftp $(TARGET_DIR)/usr/bin/tftp
$(INSTALL) -D $(@D)/tftpd/tftpd $(TARGET_DIR)/usr/sbin/tftpd
endef
$(eval
$(autotools-package))
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
211/326
Legacy handling
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
212/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
213/326
Virtual packages
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
214/326
Virtual packages
OpenGL is an API
Each HW vendor typically provides its own OpenGL
implementation, each packaged as separate Buildroot packages
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
215/326
config BR2_PACKAGE_HAS_LIBGLES
bool
config BR2_PACKAGE_PROVIDES_LIBGLES
depends on BR2_PACKAGE_HAS_LIBGLES
string
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
216/326
.
libgles/libgles.mk
.
.$(eval $(virtual-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
217/326
config BR2_PACKAGE_SUNXI_MALI
bool "sunxi-mali"
select BR2_PACKAGE_HAS_LIBEGL
select BR2_PACKAGE_HAS_LIBGLES
config BR2_PACKAGE_PROVIDES_LIBGLES
default "sunxi-mali"
.
.
sunxi-mali/sunxi-mali.mk
.
[...]
SUNXI_MALI_PROVIDES = libegl libgles
[...]
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
218/326
config BR2_PACKAGE_QT5BASE_OPENGL_ES2
bool "OpenGL ES 2.0+"
depends on BR2_PACKAGE_HAS_LIBGLES
help
Use OpenGL ES 2.0 and later versions.
.
.
qt5/qt5base/qt5base.mk
.
ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_DESKTOP),y)
QT5BASE_CONFIGURE_OPTS += -opengl desktop
QT5BASE_DEPENDENCIES += libgl
else ifeq ($(BR2_PACKAGE_QT5BASE_OPENGL_ES2),y)
QT5BASE_CONFIGURE_OPTS += -opengl es2
QT5BASE_DEPENDENCIES += libgles
else
QT5BASE_CONFIGURE_OPTS += -no-opengl
endif
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
219/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
220/326
Analyzing the
build
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
221/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
222/326
Dependency graphing
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
223/326
toolchain
busybox
strace
toolchain-buildroot
host-gcc-final
uclibc
rootfs-ubifs
host-mtd
host-e2fsprogs
linux-headers
host-binutils
host-mpc
host-makedevs
host-zlib
host-pkgconf
host-gcc-initial
host-fakeroot
host-lzo
host-automake
host-autoconf
host-mpfr
host-libtool
host-gmp
host-m4
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
224/326
All options that this script supports can be passed using the
BR2_GRAPH_DEPS_OPTS variable when calling
make graph-depends
Example
BR2_GRAPH_OUT=png \
BR2_GRAPH_DEPS_OPTS="--colours red,blue,green --stop-on=host-automake" \
make openssh-graph-depends
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
225/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
226/326
extract
patch
configure
build
install-target
install-staging
install-images
install-host
Time (seconds)
80
60
40
20
0
f
fig
pler
qpd
pop
pe
con
glib
tcon
fon
at
lib2
ty
free
libg
exp
pcre
t-lib
hos
libff
g
t-pk
nf
ake
ttex
ffi
tom
t-zlib
hos
hos
t-lib
hos
ext
t-ge
s2
hos
lcm
gett
zlib
ijs
t-au
hos
al
xtern
toco
too
t-au
hos
t-lib
t-m
hos
hos
ybo
cup
bus
in
in-e
lcha
lcha
too
too
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
227/326
Instrumentation scripts
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
228/326
$ make BR2_INSTRUMENTATION_SCRIPTS="./instrumentation.sh"
strace now starts extract
>>> strace 4.10 Extracting
xzcat /home/thomas/dl/strace-4.10.tar.xz | tar --strip-components=1 \
-C /home/thomas/projets/buildroot/output/build/strace-4.10 -xf strace now ends extract
strace now starts patch
>>> strace 4.10 Patching
Applying 0001-linux-aarch64-add-missing-header.patch using patch:
patching file linux/aarch64/arch_regs.h
>>> strace 4.10 Updating config.sub and config.guess
for file in config.guess config.sub; do for i in $(find \
/home/thomas/projets/buildroot/output/build/strace-4.10 -name $file); do \
cp support/gnuconfig/$file $i; done; done
>>> strace 4.10 Patching libtool
strace now ends patch
strace now starts configure
>>> strace 4.10 Configuring
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
229/326
Advanced topics
Advanced topics
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
230/326
BR2_EXTERNAL: principle
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
231/326
project/
buildroot/
external/
output-build1/
output-build2/
custom-app/
custom-lib/
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
232/326
BR2_EXTERNAL: mechanism
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
233/326
+-|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+-|
|
+-|
|
|
|
|
|
|
|
+-+--
board/
+-- <company>/
+-- <boardname>/
+-- linux.config
+-- busybox.config
+-- <other configuration files>
+-- post_build.sh
+-- post_image.sh
+-- rootfs_overlay/
| +-- etc/
| +-- <some file>
+-- patches/
+-- foo/
| +-- <some patch>
+-- libbar/
+-- <some other patches>
configs/
+-- <boardname>_defconfig
package/
+-- <company>/
+-- package1/
|
+-- Config.in
|
+-- package1.mk
+-- package2/
+-- Config.in
+-- package2.mk
Config.in
external.mk
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
234/326
BR2_EXTERNAL/Config.in
.
Example $(BR2_EXTERNAL)/Config.in
.
source "$BR2_EXTERNAL/package/package1/Config.in"
source
"$BR2_EXTERNAL/package/package2/Config.in"
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
235/326
BR2_EXTERNAL/external.mk
.
Example $(BR2_EXTERNAL)/external.mk
.
i. nclude $(sort $(wildcard $(BR2_EXTERNAL)/package/*/*.mk))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
236/326
Using BR2_EXTERNAL
.
make
BR2_EXTERNAL=/path/to/external
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
237/326
BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL)/board/<company>/<boardname>/patches/"
...
BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL)/board/<company>/<boardname>/rootfs_overlay/"
...
BR2_ROOTFS_POST_BUILD_SCRIPT="$(BR2_EXTERNAL)/board/<company>/<boardname>/post_build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL)/board/<company>/<boardname>/post_image.sh"
...
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(BR2_EXTERNAL)/board/<company>/<boardname>/linux.config"
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
238/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
239/326
$ make strace
>>> strace 4.10 Extracting
>>> strace 4.10 Patching
>>> strace 4.10 Updating config.sub and config.guess
>>> strace 4.10 Patching libtool
>>> strace 4.10 Configuring
>>> strace 4.10 Building
>>> strace 4.10 Installing to target
$ make strace-build
... nothing ...
$ make ltrace-patch
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Extracting
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Patching
$ make ltrace
>>> argp-standalone 1.3 Extracting
>>> argp-standalone 1.3 Patching
>>> argp-standalone 1.3 Updating config.sub and config.guess
>>> argp-standalone 1.3 Patching libtool
[...]
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Configuring
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Autoreconfiguring
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Patching libtool
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Building
>>> ltrace 0896ce554f80afdcba81d9754f6104f863dea803 Installing to target
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
240/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
241/326
$ make strace
>>> strace 4.10 Extracting
>>> strace 4.10 Patching
>>> strace 4.10 Updating config.sub and config.guess
>>> strace 4.10 Patching libtool
>>> strace 4.10 Configuring
>>> strace 4.10 Building
>>> strace 4.10 Installing to target
$ ls output/build/
strace-4.10 [...]
$ make strace-dirclean
rm -Rf /home/thomas/projets/buildroot/output/build/strace-4.10
$ ls output/build/
[... no strace-4.10 directory ...]
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
242/326
$ make strace
>>> strace 4.10 Extracting
>>> strace 4.10 Patching
>>> strace 4.10 Updating config.sub and config.guess
>>> strace 4.10 Patching libtool
>>> strace 4.10 Configuring
>>> strace 4.10 Building
>>> strace 4.10 Installing to target
$ make strace-rebuild
>>> strace 4.10 Building
>>> strace 4.10 Installing to target
$ make strace-reconfigure
>>> strace 4.10 Configuring
>>> strace 4.10 Building
>>> strace 4.10 Installing to target
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
243/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
244/326
Build the packages that have not been built in a previous build
and install them to the target
Cleanup the target root lesystem from useless les
Run post-build scripts, copy rootfs overlays
Generate the root lesystem images
Run post-image scripts
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
245/326
Nothing happens.
You can force Buildroot to rebuild this package using
make <pkg>-reconfigure or make <pkg>-rebuild.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
246/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
247/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
248/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
249/326
Application development
Application
development
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
250/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
251/326
.
Building a C program for the host
.
.
Building a C program for the target
.
$ export PATH=$(pwd)/output/host/usr/bin:$PATH
$ arm-linux-gcc -o foobar foobar.c
$ file foobar
.foobar: ELF 32-bit LSB executable, ARM, EABI5 version 1...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
252/326
.
Using the Buildroot pkg-config
.
$ export PATH=$(pwd)/output/host/usr/bin:$PATH
$ pkg-config --cflags libpng
-I.../output/host/usr/arm-buildroot-linux-uclibcgnueabi/
sysroot/usr/include/libpng16
$ pkg-config --libs libpng
-L.../output/host/usr/arm-buildroot-linux-uclibcgnueabi/
sysroot/usr/lib -lpng16
.
Note: too long lines have been splitted.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
253/326
$ export PATH=.../buildroot/output/host/usr/bin/:$PATH
$
. ./configure --host=arm-linux
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
254/326
But Buildroot also downloads them for you, and keeps the
source code in the package build directory.
Not very practical during development:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
255/326
Without <pkg>_OVERRIDE_SRCDIR
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
256/326
Eect of <pkg>_OVERRIDE_SRCDIR
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
257/326
Passing <pkg>_OVERRIDE_SRCDIR
.
Example local.mk
.
LIBPNG_OVERRIDE_SRCDIR = $(HOME)/projects/libpng
LINUX_OVERRIDE_SRCDIR
= $(HOME)/projects/linux
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
258/326
<pkg>_OVERRIDE_SRCDIR workow
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
259/326
Disabled by default.
Sub-options allow to control the amount of debugging symbols
(i.e. gcc options -g1, -g2 and -g3).
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
260/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
261/326
A cross-debugger
gdbserver
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
262/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
263/326
strace
ltrace
LTTng
perf
sysdig
sysprof
OProle
valgrind
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
264/326
Warnings:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
265/326
Eclipse plug-in
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
266/326
Use <pkg>_OVERRIDE_SRCDIR
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
267/326
Understanding
Buildroot internals
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
268/326
Conguration system
CONFIG_CONFIG_IN = Config.in
CONFIG = support/kconfig
BR2_CONFIG = $(CONFIG_DIR)/.config
-include $(BR2_CONFIG)
$(BUILD_DIR)/buildroot-config/%onf:
mkdir -p $(@D)/lxdialog
$(MAKE) ... -C $(CONFIG) -f Makefile.br $(@F)
menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
269/326
Conguration hierarchy
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
270/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
271/326
endef # inner-generic-package
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
272/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
273/326
$(BUILD_DIR)/%/.stamp_downloaded:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_extracted:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_patched:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_configured:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_built:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_host_installed:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_staging_installed:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_images_installed:
# Do some stuff here
$(Q)touch $@
$(BUILD_DIR)/%/.stamp_target_installed:
# Do some stuff here
$(Q)touch $@
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
274/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
275/326
# Build
$(BUILD_DIR)/%/.stamp_built::
@$(call step_start,build)
@$(call MESSAGE,"Building")
$(foreach hook,$($(PKG)_PRE_BUILD_HOOKS),$(call $(hook))$(sep))
+$($(PKG)_BUILD_CMDS)
$(foreach hook,$($(PKG)_POST_BUILD_HOOKS),$(call $(hook))$(sep))
$(Q)touch $@
@$(call step_end,build)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
276/326
In package/zlib/zlib.mk:
ZLIB_... = ...
$(eval $(generic-package))
$(eval $(host-generic-package))
Leads to:
.
$(call inner-generic-package,zlib,ZLIB,ZLIB,target)
$(call
inner-generic-package,host-zlib,HOST_ZLIB,ZLIB,host)
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
277/326
$(2)_TYPE
=
$(2)_NAME
=
$(2)_RAWNAME =
$(4)
$(1)
$$(patsubst host-%,%,$(1))
.
Expanded for host-zlib
.
HOST_ZLIB_TYPE
= host
HOST_ZLIB_NAME
= host-zlib
HOST_ZLIB_RAWNAME = zlib
$(2)_BASE_NAME = $(1)-$$($(2)_VERSION)
$(2)_DIR
= $$(BUILD_DIR)/$$($(2)_BASE_NAME)
HOST_ZLIB_BASE_NAME =
host-zlib-$(HOST_ZLIB_VERSION)
HOST_ZLIB_DIR
=
$(BUILD_DIR)/host-zlib-$(HOST_ZLIB_VERSION)
ifndef $(2)_SOURCE
ifdef $(3)_SOURCE
$(2)_SOURCE = $$($(3)_SOURCE)
else
$(2)_SOURCE ?=
$$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
endif
endif
ifndef HOST_ZLIB_SOURCE
ifdef ZLIB_SOURCE
HOST_ZLIB_SOURCE = $(ZLIB_SOURCE)
else
HOST_ZLIB_SOURCE ?=
zlib-$(HOST_ZLIB_VERSION).tar.gz
endif
endif
ifndef $(2)_SITE
ifdef $(3)_SITE
$(2)_SITE = $$($(3)_SITE)
endif
endif
ifndef HOST_ZLIB_SITE
ifdef ZLIB_SITE
HOST_ZLIB_SITE = $(ZLIB_SITE)
endif
endif
...
...
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
278/326
inner-generic-package: dependencies
.
ifeq ($(4),host)
$(2)_DEPENDENCIES ?= $$(filter-out host-toolchain $(1),\
$$(patsubst host-host-%,host-%,$$(addprefix host-,$$($(3)_DEPENDENCIES))))
endif
ifeq ($(4),target)
ifeq ($$($(2)_ADD_TOOLCHAIN_DEPENDENCY),YES)
$(2)_DEPENDENCIES += toolchain
endif
endif
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
279/326
$(2)_TARGET_INSTALL_TARGET =
$(2)_TARGET_INSTALL_STAGING =
$(2)_TARGET_INSTALL_IMAGES =
$(2)_TARGET_INSTALL_HOST =
$(2)_TARGET_BUILD =
$(2)_TARGET_CONFIGURE =
$(2)_TARGET_RSYNC =
$(2)_TARGET_RSYNC_SOURCE =
$(2)_TARGET_PATCH =
$(2)_TARGET_EXTRACT =
$(2)_TARGET_SOURCE =
$(2)_TARGET_DIRCLEAN =
$$($(2)_TARGET_INSTALL_TARGET):
$$($(2)_TARGET_INSTALL_STAGING):
$$($(2)_TARGET_INSTALL_IMAGES):
$$($(2)_TARGET_INSTALL_HOST):
[...]
$$($(2)_DIR)/.stamp_target_installed
$$($(2)_DIR)/.stamp_staging_installed
$$($(2)_DIR)/.stamp_images_installed
$$($(2)_DIR)/.stamp_host_installed
$$($(2)_DIR)/.stamp_built
$$($(2)_DIR)/.stamp_configured
$$($(2)_DIR)/.stamp_rsynced
$$($(2)_DIR)/.stamp_rsync_sourced
$$($(2)_DIR)/.stamp_patched
$$($(2)_DIR)/.stamp_extracted
$$($(2)_DIR)/.stamp_downloaded
$$($(2)_DIR)/.stamp_dircleaned
PKG=$(2)
PKG=$(2)
PKG=$(2)
PKG=$(2)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
280/326
inner-generic-package: sequencing
.
Step sequencing for target packages
.
$(1):
$(1)-install
$(1)-install:
$(1)-install-target:
$$($(2)_TARGET_INSTALL_TARGET)
$$($(2)_TARGET_INSTALL_TARGET): $$($(2)_TARGET_BUILD)
$(1)-build:
$$($(2)_TARGET_BUILD)
$$($(2)_TARGET_BUILD): $$($(2)_TARGET_CONFIGURE)
$(1)-configure:
$$($(2)_TARGET_CONFIGURE):
$$($(2)_TARGET_CONFIGURE):
$$($(2)_TARGET_CONFIGURE)
| $$($(2)_FINAL_DEPENDENCIES)
$$($(2)_TARGET_PATCH)
$(1)-patch:
$$($(2)_TARGET_PATCH)
$$($(2)_TARGET_PATCH): $$($(2)_TARGET_EXTRACT)
$(1)-extract:
$$($(2)_TARGET_EXTRACT):
$(1)-source:
$$($(2)_TARGET_EXTRACT)
$$($(2)_TARGET_SOURCE)
$$($(2)_TARGET_SOURCE)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
281/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
282/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
283/326
.
pkg-generic.mk
.
$$($(2)_TARGET_SOURCE): | dirs prepare
$$($(2)_TARGET_SOURCE):
| dependencies
.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
284/326
Rebuilding packages?
$(1)-clean-for-rebuild:
rm
rm
rm
rm
rm
$(1)-rebuild:
-f
-f
-f
-f
-f
$$($(2)_TARGET_BUILD)
$$($(2)_TARGET_INSTALL_STAGING)
$$($(2)_TARGET_INSTALL_TARGET)
$$($(2)_TARGET_INSTALL_IMAGES)
$$($(2)_TARGET_INSTALL_HOST)
$(1)-clean-for-rebuild $(1)
$(1)-clean-for-reconfigure: $(1)-clean-for-rebuild
rm -f $$($(2)_TARGET_CONFIGURE)
$(1)-reconfigure:
$(1)-clean-for-reconfigure $(1)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
285/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
286/326
.
package/ann/ann.mk
.
FLANN_VERSION = d0c04f4d290ebc3aa9411a3322992d298e51f5aa
FLANN_SITE = $(call github,mariusmuja,flann,$(FLANN_VERSION))
FLANN_INSTALL_STAGING = YES
FLANN_LICENSE = BSD-3c
FLANN_LICENSE_FILES = COPYING
FLANN_CONF_OPT = \
-DBUILD_C_BINDINGS=ON \
-DBUILD_PYTHON_BINDINGS=OFF \
-DBUILD_MATLAB_BINDINGS=OFF \
-DBUILD_EXAMPLES=$(if $(BR2_PACKAGE_FLANN_EXAMPLES),ON,OFF) \
-DBUILD_TESTS=OFF \
-DBUILD_DOC=OFF \
-DUSE_OPENMP=$(if $(BR2_GCC_ENABLE_OPENMP),ON,OFF) \
-DPYTHON_EXECUTABLE=OFF
$(eval $(cmake-package))
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
287/326
define inner-cmake-package
$(2)_CONF_ENV
$(2)_CONF_OPT
...
?=
?=
$(2)_SRCDIR
$(2)_BUILDDIR
= $$($(2)_DIR)/$$($(2)_SUBDIR)
= $$($(2)_SRCDIR)
ifndef $(2)_CONFIGURE_CMDS
ifeq ($(4),target)
define $(2)_CONFIGURE_CMDS
(cd $$($$(PKG)_BUILDDIR) && \
$$($$(PKG)_CONF_ENV) $$(HOST_DIR)/usr/bin/cmake $$($$(PKG)_SRCDIR) \
-DCMAKE_TOOLCHAIN_FILE="$$(HOST_DIR)/usr/share/buildroot/toolchainfile.cmake" \
...
$$($$(PKG)_CONF_OPT) \
)
endef
else
define $(2)_CONFIGURE_CMDS
... host case ...
endef
endif
endif
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
288/326
$(2)_DEPENDENCIES += host-cmake
ifndef $(2)_BUILD_CMDS
ifeq ($(4),target)
define $(2)_BUILD_CMDS
$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT)
-C $$($$(PKG)_BUILDDIR)
endef
else
... host case ...
endif
endif
... other commands ...
ifndef $(2)_INSTALL_TARGET_CMDS
define $(2)_INSTALL_TARGET_CMDS
$$(TARGET_MAKE_ENV) $$($$(PKG)_MAKE_ENV) $$($$(PKG)_MAKE) $$($$(PKG)_MAKE_OPT)
$$($$(PKG)_INSTALL_TARGET_OPT) -C $$($$(PKG)_BUILDDIR)
endef
endif
$(call inner-generic-package,$(1),$(2),$(3),$(4))
endef
cmake-package = $(call inner-cmake-package,$(pkgname),...,target)
host-cmake-package = $(call inner-cmake-package,host-$(pkgname),...,host)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
289/326
Autoreconf in pkg-autotools.mk
Implementation in pkg-autotools.mk
define AUTORECONF_HOOK
@$$(call MESSAGE,"Autoreconfiguring")
$$(Q)cd $$($$(PKG)_SRCDIR) && $$($$(PKG)_AUTORECONF_ENV) $$(AUTORECONF)
$$($$(PKG)_AUTORECONF_OPTS)
...
endef
ifeq ($$($(2)_AUTORECONF),YES)
...
$(2)_PRE_CONFIGURE_HOOKS += AUTORECONF_HOOK
$(2)_DEPENDENCIES += host-automake host-autoconf host-libtool
endif
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
290/326
Toolchain support
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
291/326
ALL
toolchain
toolchain-buildroot
host-binutils, installed in
$(HOST_DIR)/usr/bin
host-gcc-final
$(STAGING_DIR)/usr/include
uclibc
host-gcc-initial
host-binutils
linux-headers
host-mpc
Installed in $(STAGING_DIR)/lib,
$(STAGING_DIR)/usr/include and of course
$(TARGET_DIR)/lib
We build the nal compiler host-gcc-final,
host-mpfr
host-gmp
host-m4
installed in $(HOST_DIR)/usr/bin
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
292/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
293/326
Once all the targets in $(TARGETS) have been built, it's time
to create the root lesystem images
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
294/326
fs/common.mk
.
define ROOTFS_TARGET_INTERNAL
ROOTFS_$(2)_DEPENDENCIES += host-fakeroot host-makedevs \
$$(if $$(PACKAGES_USERS),host-mkpasswd)
$$(BINARIES_DIR)/rootfs.$(1): target-finalize $$(ROOTFS_$(2)_DEPENDENCIES)
@$$(call MESSAGE,"Generating root filesystem image rootfs.$(1)")
$$(foreach hook,$$(ROOTFS_$(2)_PRE_GEN_HOOKS),$$(call $$(hook))$$(sep))
...
echo "chown -h -R 0:0 $$(TARGET_DIR)" >> $$(FAKEROOT_SCRIPT)
echo "$$(HOST_DIR)/usr/bin/makedevs -d $$(FULL_DEVICE_TABLE) $$(TARGET_DIR)" >> \
$$(FAKEROOT_SCRIPT)
echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
chmod a+x $$(FAKEROOT_SCRIPT)
PATH=$$(BR_PATH) $$(HOST_DIR)/usr/bin/fakeroot -- $$(FAKEROOT_SCRIPT)
...
rootfs-$(1): $$(BINARIES_DIR)/rootfs.$(1) $$(ROOTFS_$(2)_POST_TARGETS)
ifeq ($$(BR2_TARGET_ROOTFS_$(2)),y)
TARGETS_ROOTFS += rootfs-$(1)
endif
endef
define ROOTFS_TARGET
$(call ROOTFS_TARGET_INTERNAL,$(1),$(call UPPERCASE,$(1)))
endef
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
295/326
fs/ubifs/ubifs.mk
UBIFS_OPTS := -e $(BR2_TARGET_ROOTFS_UBIFS_LEBSIZE) \
-c $(BR2_TARGET_ROOTFS_UBIFS_MAXLEBCNT) \
-m $(BR2_TARGET_ROOTFS_UBIFS_MINIOSIZE)
ifeq ($(BR2_TARGET_ROOTFS_UBIFS_RT_ZLIB),y)
UBIFS_OPTS += -x zlib
endif
...
UBIFS_OPTS += $(call qstrip,$(BR2_TARGET_ROOTFS_UBIFS_OPTS))
ROOTFS_UBIFS_DEPENDENCIES = host-mtd
define ROOTFS_UBIFS_CMD
$(HOST_DIR)/usr/sbin/mkfs.ubifs -d $(TARGET_DIR) $(UBIFS_OPTS) -o $@
endef
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
296/326
Final example
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
297/326
Buildroot
community:
support and
contribution
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
298/326
Documentation
make manual
or just make manual-html, make manual-pdf,
make manual-epub, make manual-text,
make manual-split-html
A number of tools need to be installed on your machine, see
the manual itself.
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
299/326
Getting support
Free support
Commercial support
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
300/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
301/326
Release schedule
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
302/326
Contribution process
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
303/326
Patchwork
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
304/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
305/326
autobuild.buildroot.org
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
306/326
:
:
:
:
301
50
1
352
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
307/326
What's new in
Buildroot?
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
308/326
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
309/326
In 2013.08 (1)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
310/326
In 2013.08 (2)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
311/326
In 2013.11
glibc support
upstream uClibc xes
uClibc 0.9.31 for avr32
internal crosstool-ng backend removed
external musl toolchain support
gcc 4.8.2
updated Linaro external toolchains
Fortran and objective-C support deprecated
mudap support
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
312/326
In 2014.02
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
313/326
In 2014.05 (1)
Architectures:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
314/326
In 2014.05 (2)
Toolchains:
Infrastructure:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
315/326
In 2014.08 (1)
Architectures:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
316/326
In 2014.08 (2)
Infrastructure:
graph-depends improvements
Download handling is now done using helper scripts.
Integrity of downloads can now be veried using hashes
Legal-info: License info of local or overridden packages are
saved as well. Toolchain packages are also taken into account.
autotools: Static linking with libtool / v1.5 improvements
Gettextize support, similar to autoreconf
kcong package infrastructure added
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
317/326
In 2014.11
Toolchains:
Buildroot is now less noisy when built with the silent option
(make -s)
A number of package infrastructure variables have been
renamed from *_OPT to *_OPTS for consistency
Option to choose what shell /bin/sh points to
Documentation:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
318/326
In 2015.02 (1)
Toolchain:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
319/326
In 2015.02 (2)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
320/326
In 2015.05 (1)
Architectures:
Toolchains:
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
321/326
In 2015.05 (2)
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
322/326
In 2015.08
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
323/326
Acknowledgements
Thomas De Schampheleire
Peter Korsgaard
Yann E. Morin
Arnout Vandecappelle
Gustavo Zacarias
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
324/326
Last slides
Last slides
Embedded Linux
Experts
free electrons
Copyright 2004-2016, Free Electrons.
Creative Commons BY-SA 3.0 license.
Corrections, suggestions, contributions and translations are welcome!
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
325/326
Last slide
Thank you!
And may the Source be with you
free electrons - Embedded Linux, kernel, drivers and Android - Development, consulting, training and support. http://free-electrons.com
326/326