SlideShare uma empresa Scribd logo
1 de 81
Baixar para ler offline
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
An Introduction To Building Your Own Images
A brief overview of the
scope and issues
involved with building your own
GNU/Linux-based distributions.
Trevor Woerner
twoerner@gmail.com
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
2 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
●
this talk is not specific to RaspberryPis
●
this time-slot is not long enough to cover every most
aspect/feature/workflow of OpenEmbedded
●
i don't claim to know everything about OpenEmbedded
(or much about anything else, for that matter)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
3 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Why?
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
4 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
why create your own distribution?
●
very difficult to answer for (casual) user
●
easier to answer when building products
●
tight control over installed software
●
tight control over versions of installed software
●
security
●
software updates
●
device lifetime
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
5 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Code Choices
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
6 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux
a
press power
button
bootloader kernel boot init system
display
manager /
login screen
window
manager
gui
display server
protocol
desktop
environment
text
START
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
7 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
in a GNU/Linux system,
only this is "Linux"
kernel boot
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
8 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
bootloader
●
grub
●
u-boot
●
lilo
●
syslinux
●
systemd-boot/gummiboot
●
barebox
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
9 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
kernel boot
●
latest kernel.org
●
LTS
●
evil vendor kernel
●
benevolent distro kernel
●
with or without PREEMPT_RT
●
2.6 / 3.x / 4.x
●
xenomai
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
10 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
a
init system
●
sysvinit
●
systemd
●
upstart
●
busybox init
●
OpenRC
●
runit
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
11 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
display server
protocol
●
X11
●
wayland
●
directfb
●
mir
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
12 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
display
manager /
login screen
●
XDM
●
GDM
●
KDM
●
LXDM
●
CDM
●
xlogin
●
nodm
●
LightDM
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
13 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
desktop
environment
●
GNOME
●
KDE
●
LXDE
●
MATE
●
LXQt
●
Enlightenment
●
Cinnamon
●
Unity
●
Xfce
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
14 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
booting GNU/Linux - drilling down
window
manager
●
Xfwm
●
Openbox
●
KWin
●
i3
●
FVWM
●
TWM
●
compiz
●
Matchbox
●
Metacity
●
Sawfish
●
mwm
●
uwm
●
xmonad
●
ion
●
fluxbox
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
15 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
16 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
17 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
OpenSSH
●
dropbear
SSH
Servers●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
●
glibc
●
uclibc
●
musl
C
Libraries
●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities ●
gcc
●
llvm
C
Compilers
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
18 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
OpenSSH
●
dropbear
SSH
Servers●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
db
●
gdbm
●
sqlite
●
hiera
●
metakit
●
mysql
●
postgresql
Databases
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
●
glibc
●
uclibc
●
musl
C
Libraries
●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
java
●
python
●
go
●
rust
●
nodejs
●
ruby
●
perl
●
mono
●
smalltalk
●
erlang
●
ada
Language
Support
●
gcc
●
llvm
C
Compilers
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
19 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
OpenSSH
●
dropbear
SSH
Servers●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
db
●
gdbm
●
sqlite
●
hiera
●
metakit
●
mysql
●
postgresql
Databases
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
●
glibc
●
uclibc
●
musl
C
Libraries
●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
java
●
python
●
go
●
rust
●
nodejs
●
ruby
●
perl
●
mono
●
smalltalk
●
erlang
●
ada
Language
Support
●
gcc
●
llvm
C
Compilers
●
wolfssl
●
tpm/tpm2
●
swupd/swupdate
●
selinux
●
optee
●
ro-rootfs
●
pentesting/kali
Security ●
lxd/lxc
●
docker
●
openstack
●
criu
●
kubernetes
●
kvm
●
oci
●
xen
Virtualization
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
20 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
OpenSSH
●
dropbear
SSH
Servers●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
db
●
gdbm
●
sqlite
●
hiera
●
metakit
●
mysql
●
postgresql
Databases
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
●
glibc
●
uclibc
●
musl
C
Libraries
●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
java
●
python
●
go
●
rust
●
nodejs
●
ruby
●
perl
●
mono
●
smalltalk
●
erlang
●
ada
Language
Support
●
gcc
●
llvm
C
Compilers
●
wolfssl
●
tpm/tpm2
●
swupd/swupdate
●
selinux
●
optee
●
ro-rootfs
●
pentesting/kali
Security ●
lxd/lxc
●
docker
●
openstack
●
criu
●
kubernetes
●
kvm
●
oci
●
xen
Virtualization
VER
SIO
N
S
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
21 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
NOT booting GNU/Linux - drilling down
●
bash
●
csh
●
tcsh
●
zsh
●
sh
●
ash
●
ksh
●
mosh
●
dsh
Shells
●
gnome-terminal
●
xterm
●
konsole
●
rxvt
●
xfce4-terminal
Terminal
Emulators
●
apache2
●
tomcat
●
jetty
●
lighttpd
●
Nginx
●
cherokee
●
fcgi
●
hiawatha
●
monkey
●
nostromo
Web
Servers
●
OpenSSH
●
dropbear
SSH
Servers●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
db
●
gdbm
●
sqlite
●
hiera
●
metakit
●
mysql
●
postgresql
Databases
●
chromium
●
firefox
●
links
●
epiphany
●
opic
●
midori
●
konqueror
●
qtwebbrowser
●
rekonq
Web
Browsers
●
glibc
●
uclibc
●
musl
C
Libraries
●
coreutils
●
busybox
●
toybox
Basic
Cmdline
Utilities
●
java
●
python
●
go
●
rust
●
nodejs
●
ruby
●
perl
●
mono
●
smalltalk
●
erlang
●
ada
Language
Support
●
gcc
●
llvm
C
Compilers
●
wolfssl
●
tpm/tpm2
●
swupd/swupdate
●
selinux
●
optee
●
ro-rootfs
●
pentesting/kali
Security ●
lxd/lxc
●
docker
●
openstack
●
criu
●
kubernetes
●
kvm
●
oci
●
xen
Virtualization
VER
SIO
N
S
DEPENDENCIES
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
22 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
a GNU/Linux system is not one single, monolithic blob
created by one company/organization
●
individual people/groups, working mostly
autonomously
●
rarely a top-level, rigid, overall, pre-developed spec
●
independent release schedules
●
multiple options at every step
●
choosing a cohesive set → DISTRIBUTION
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
23 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
why "re-invent the wheel" and create alternates of
existing, working projects?
●
code forks due to disagreement in {techincal | legal |
community | leadership | ...} direction
●
real or perceived legal issues
●
re-design in order to
●
add more features
●
support more platforms
●
fundamentally change how something works
(algorithm)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
24 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
why "re-invent the wheel" and create alternates of
existing, working projects?
●
to promote "healthy" competition
●
unaware of existing projects
●
original project is abandoned
●
to "start fresh"
●
for the learning experience
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
25 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Running Code
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
26 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
●
processors are the heart of any device
●
all processor families "speak" their own "language"
(sometimes sub-groups within a family have their own
"dialect")
●
a programmer's intentions, eventually, has to be
expressed in the processor's "language"
●
either by compiling/assembling/linking code
●
or by running the code through an interpreter
●
whether we're talking about compiled code, or
interpreted, at some point compiling needs to take
place (compiling of code, compiling of interpreter)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
27 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
how to compile code
●
fetch code
●
unpack
●
patch
●
configure
●
build/compile
●
stage
●
package
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
28 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
fetch
●
not always obvious from where to get code
●
interact with a repository (svn, cvs, git, hg, perforce,
clearcase, rcs/sccs, darcs, monotone, GNU bazaar,
MS vss...) or tarball releases (e.g. ftp)
●
interact with a code hosting site (github,
sourceforge, bitbucket, gitlab, launchpad,
cloudforge...)
●
branches, tags
●
verify signature/checksum(s)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
29 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
unpack
●
compression
●
gzip, bzip2, xz, z, lzo, lzma
●
archive
●
tar, cpio, shar
●
compression + archive
●
7z, zip, arc, apk, tar.{gz|xz|bzip2|...}
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
30 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
patch
●
when you do something (even slightly) different than
what the people who wrote the code are doing,
patches are often needed
●
different compiler
●
different/newer/older host
●
different C library
●
different versions of dependencies
●
sometimes upstream doesn't accept your patch
●
where to store/maintain these patches?
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
31 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
configure
●
enable/disable features
●
build systems
●
make
●
makefile generators
●
autotools
●
cmake
●
pymake
●
"make" replacements
●
ant
●
maven
●
waf
●
ninja
●
gyp/gn
●
meson
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
32 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
build/compile
●
cross-compiling
●
selecting, patching, configuring a cross-compiler
(and C lib) is non-trivial
●
using the cross-compilier is non-trivial (avoiding
host contamination)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
33 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
stage
●
preparing artifacts for the target
●
packing
●
signing
●
arranging
●
updating/removing
●
only install relevant parts (remove docs, man pages,
include files... unless user wants them explicitly)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
34 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
package
●
ipk
●
deb
●
rpm
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
35 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Target
Device
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
36 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
each device has its own quirks
●
RPi
●
fat + ext partitions
●
config.txt in fat
●
Rockchip
●
multiple partitions, individual chunks per partition
●
all chunks need to run through vendor tool
●
AllWinner
●
special "fex" files (i.e. pre-dt) + script.bin
●
DragonBoard 410c
●
fastboot tools to load eMMC
●
C.H.I.P.
●
special "UBI" image
●
board needs to be in "FEL" mode
●
etc...
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
37 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Putting It
Together
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
38 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
creating a distro
●
choosing amongst 1000's x 1000's of packages,
making sure there's one of each of the required
packages, dependencies, versions, ...
●
preparing the right cross-development tools
●
building (fetching, unpacking, patching, configuring,
cross-compiling, staging, packaging) the software
●
getting that software onto/into the target device in
the proper format
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
39 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
40 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
●
targeting multiple devices!
OpenEmbedded
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
41 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded
●
provides "recipes" for 1000's of packages ~>
2000ish in base layers alone
●
prepares the cross-development tools
●
builds (fetches, unpacks, patches, configures, cross-
compiles, stages, package) the software with a very
sophisticated scheduler with correct dependencies
●
creates an image for the target device in the proper
format
●
targets multiple platforms/devices with small
configuration changes (often a one line change)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
42 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded+
●
has an optional graphical front-end (toaster)
●
optionally integrates into Eclipse
●
can generate image-specific SDK and eSDK
●
the (e)SDK can be used on Linux, Windows, or
MacOS hosts (CROPS)
●
supports many hardware targets (including qemu)
across many architectures (x86, arm, ppc, mips,
riscv) and variants (32bit, 64bit) ~> 600ish
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
43 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
MinnowBoard/Turbot
●
Intel Atom x86_64
●
Intel Graphics
●
1GB - 2GB DDR3
●
uSD, GbE, USB2/3
●
turbot dual/quad dual-eth
●
meta-intel
$99
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
44 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
BeagleBoard/Bone
●
TI OMAP3xxx/Sitara AM3xxx
●
Cortex-A8, Cortex-A15
●
PowerVR
●
256MB - 512MB DDR2
●
SD/uSD, 10/100, USB2, PRU
●
BeagleBoard, BeagleBoard-xM,
BeagleBone, BeagleBone
Black, BeagleBoard x15
●
meta-ti
$55
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
45 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
DragonBoard 410c
●
Qualcomm Snapdragon 410
●
Cortex-A53
●
Adreno 306 → Freedreno
●
2GB DDR3
●
uSD, 8GB eMMC, USB2, WiFi
2.4GHz a/b/g/n, bt 4.1
●
meta-qcom
$75
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
46 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
C.H.I.P. (i.e. the $9 computer)
●
AllWinner R8
●
Cortex-A8
●
Mali-400
●
512MB DDR3
●
4GB eMMC, USB2, WiFi
2.4GHz a/b/g/n, bt 4.0
●
meta-chip
$9
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
47 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Creator Ci20
●
MIPS Ingenic JZ4780
●
PowerVR
●
1GB DDR3
●
8GB eMMC, SD, 10/100, USB2,
WiFi 2.4GHz b/g/n, bt 4.0
●
meta-jz-mips
$72
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
48 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Odroid C1/C2
●
Amlogic S805/S905
●
ARM Cortex-A5, Cortex-A53
●
Mali-450
●
1GB - 2GB DDR3
●
opt eMMC, uSD, GbE, USB2
●
meta-odroid
$40
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
49 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Odroid XU3/XU4
●
Samsung Exynos 5 Octa
●
ARM Cortex-A7 + A15
●
Mali-T628
●
2GB DDR3
●
opt eMMC, uSD, 10/100/GbE,
USB2/3
●
meta-odroid
$74
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
50 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Zybo-Zynq7
●
Xilinx Zynq 7Z007S
●
ARM Cortex-A9
●
512MB DDR3
●
PMOD, uSD, USB2
●
meta-xilinx
$189
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
51 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Pine64
●
AllWinner A64
●
ARM Cortex-A53
●
Mali-400
●
512MB DDR3
●
uSD, 10/100, USB2
●
meta-pine64
$189
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
52 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Firefly-RK3288
●
Rockchip RK3288
●
ARM Cortex-A17
●
Mali-T760
●
2GB - 4GB DDR3
●
16GB eMMC, uSD, GbE, WiFi
a/b/g/n/ac, bt 4.0+ble, USB2
●
meta-rockchip
$129
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
53 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Firefly-RK3399
●
Rockchip RK3399 Hexacore
●
ARM Cortex-A72 + A53
●
Mali-T860
●
2GB - 4GB DDR3
●
16GB - 32GB eMMC, uSD,
GbE, WiFi a/b/g/n/ac, bt 4.1,
USB2/3
●
meta-rockchip
$139
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
54 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Wandboard
●
Freescale iMX6
●
ARM Cortex-A9
●
Vivante → Etnaviv
●
1GB DDR3
●
uSD, GbE, WiFi n, USB2
●
solo, dual, quad
●
meta-freescale-3rdparty
$69
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
55 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Raspberry Pi
●
Broadcom BCM2835 BCM2836
BCM2837
●
ARM11, Cortex-A7, Cortex-A53
●
Broadcom VC4
●
512MB - 1GB DDR2
●
uSD, 10/100, USB2
●
Rpi A/B, Rpi2, Rpi0, Rpi3,
Rpi3B+
●
meta-raspberrypi
$35
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
56 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Banana Pi
●
AllWinner A20
●
Cortex-A7
●
Mali-400
●
1GB DDR3
●
SD, GbE, USB2
●
meta-sunxi
$32
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
57 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Orange Pi
●
AllWinner A20/H2/H3
●
Cortex-A7
●
Mali-400
●
1GB - 2GB DDR3
●
uSD, GbE, USB2
●
meta-sunxi
$25
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
58 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded++
●
runs on most GNU/Linux distributions (debian,
ubuntu, fedora, centOS, openSUSE)
●
is mostly host-independent (builds it own set of
-native tools)
●
extensive test framework (build tests, package unit-
tests, on-target tests, image/boot tests)
●
license/legal audit or constraint
●
speeds up subsequent builds with sophisticated
sstate cache
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
59 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded+++
●
excellent documentation, community, help (ISVs)
●
official Linux Foundation project (Yocto)
do you work for Intel
or the Linux Foundation?
whether to say
"Yocto" or "OE"
say "OE"say "Yocto"
yes no
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
60 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
There are only
two hard things in
Computer Science:
0. off-by-one errors
1. cache invalidation
2. naming things
Phil Karlton
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
61 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
There are only
two hard things in
Computer Science:
0. off-by-one errors
7. asynchronous callbacks
1. cache invalidation
2. naming things
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
62 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded/Yocto/Poky Naming
●
a long time ago, this entire thing was called Poky
(i.e. "the Poky Build System")
●
now Poky is a reference distribution for
testing/releases
●
now the base recipes and classes are called
OpenEmbedded, but was tied too heavily to one
vendor
●
when the LF adopted OE, it was renamed Yocto in
an attempt to make it vendor-neutral
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
63 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
How Does
It Work?
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
64 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
recipes
●
a file with the necessary data to process a package
classes
●
a grouping of similar functionality
layers
●
a set of related recipes, classes, data for a specific
purpose (BSP, software, distro)
bitbake
●
the tool which runs the whole build
configuration files
●
e.g. conf/local.conf
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
65 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
sample recipe (openembedded-core/meta/recipes-graphics/mesa/mesa -- abridged)
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
66 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
preamble
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
67 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
license
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
68 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
alternates of same purpose
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
69 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
adding classes of known functionality
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
70 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
configuration options
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
71 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
dependencies (build and native)
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
72 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
fetch: location, patch, signature verification
SUMMARY = "A free implementation of the OpenGL API"
DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - 
a system for rendering interactive 3D graphics. 
A variety of device drivers allows Mesa to be used in many different environments 
ranging from software emulation to complete hardware acceleration for modern GPUs. 
Mesa is used as part of the overall Direct Rendering Infrastructure and X.org 
environment."
HOMEPAGE = "http://mesa3d.org"
BUGTRACKER = "https://bugs.freedesktop.org"
SECTION = "X11"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4"
DEPENDS = "expat makedepend-native zlib"
PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl"
inherit autotools pkgconfig python3native gettext distro_features_check
PACKAGECONFIG ??= "x11 dri3"
PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence"
SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz 
file://disable-asm-on-non-gcc.patch"
SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d"
SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
73 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
layers (conf/bblayers.conf)
# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "7"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-raspberrypi 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/openembedded-core/meta 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-oe 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-gnome 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-python 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-networking 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-multimedia 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-qt5 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-qt5-extra 
/opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-browser 
"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
74 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
configuration (conf/local.conf -- abridged)
MACHINE ?= "raspberrypi3-64"
DISTRO ?= "nodistro"
DL_DIR ?= "/opt/Downloads"
# gui/gl
MACHINE_FEATURES_append = " vc4graphics"
DISTRO_FEATURES_append = " directfb opengl x11"
PACKAGECONFIG_append_pn-mesa-demos = " glut"
CORE_IMAGE_EXTRA_INSTALL += " glmark2 mesa-demos chromium-x11"
# touchscreen
PACKAGECONFIG_pn-xserver-nodm-init = "nocursor"
WAVESHARE_1024X600_C_2_1 = "1"
# rpi
ENABLE_I2C = "1"
KERNEL_MODULE_AUTOLOAD += "i2c-dev"
ENABLE_SPI_BUS = "1"
ENABLE_UART = "1"
PACKAGE_CLASSES = "package_ipk"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
75 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Case Study
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
76 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
customers
hardware
manufacturers
Comcast
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
77 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Comcast set-top-box
●
purposefully multi-vendor, multi-architecture
●
but expects a base, functioning system
●
needs to add its own software on top
●
needs to tightly control the base system
●
packages
●
versions
●
functionality (e.g. init system, graphics)
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
78 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
OpenEmbedded solution
●
Comcast creates its own distro → RDK (layer)
●
defines packages, behaviour
●
vendors create hardware and provide BSP layers
●
Comcast builds images for each device using distro
layer, BSP layer, as well as others
●
Comcast generates SDKs for their developers
●
Comcast maintains a packagefeed for updates
●
this is not a "home grown" solution, embedded
developers are already familiar with the tools
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
79 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Caveats
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
80 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
●
not all layers work well together
●
OpenEmbedded doesn't catch all mistakes and mis-
matches
●
code is constantly changing, and getting all these
independent projects to work as a cohesive whole
isn't always easy (moving target)
●
layer quality, layer duplications
●
needs a really big build machine
●
works better with a really good connection to the
Internet
●
... and more
April 12, 2018 RaspberryPi Meetup Toronto
twoerner@gmail.com
81 of 81
Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions
Thank you!

Mais conteúdo relacionado

Mais procurados

Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
Using Git in Eclipse - Eclipse Summit Europe 2010-11-03Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
msohn
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
dmgerman
 
Tizen architecture-solutionslinux-20130529
Tizen architecture-solutionslinux-20130529Tizen architecture-solutionslinux-20130529
Tizen architecture-solutionslinux-20130529
Phil www.rzr.online.fr
 

Mais procurados (20)

Using Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHubUsing Git Inside Eclipse, Pushing/Cloning from GitHub
Using Git Inside Eclipse, Pushing/Cloning from GitHub
 
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHubAIS Technical Development Workshop 3: Getting Started with Git and GitHub
AIS Technical Development Workshop 3: Getting Started with Git and GitHub
 
How Linux uses Git
How Linux uses GitHow Linux uses Git
How Linux uses Git
 
Tizen contrib-fosdem-20140201
Tizen contrib-fosdem-20140201Tizen contrib-fosdem-20140201
Tizen contrib-fosdem-20140201
 
Why Open Source is Important and What are We Doing About it?
Why Open Source is Important and What are We Doing About it?Why Open Source is Important and What are We Doing About it?
Why Open Source is Important and What are We Doing About it?
 
Distributions and package management in the containers era
Distributions and package management in the containers eraDistributions and package management in the containers era
Distributions and package management in the containers era
 
OpenStack: Community driven development, For Real!
OpenStack: Community driven development, For Real!OpenStack: Community driven development, For Real!
OpenStack: Community driven development, For Real!
 
tizen-maintain-20150413rzr
tizen-maintain-20150413rzrtizen-maintain-20150413rzr
tizen-maintain-20150413rzr
 
Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
Using Git in Eclipse - Eclipse Summit Europe 2010-11-03Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
Using Git in Eclipse - Eclipse Summit Europe 2010-11-03
 
FFmpeg: A Retrospective
FFmpeg: A RetrospectiveFFmpeg: A Retrospective
FFmpeg: A Retrospective
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
OSGi Versioning & Testing
OSGi Versioning & TestingOSGi Versioning & Testing
OSGi Versioning & Testing
 
How Git and Gerrit make you more productive
How Git and Gerrit make you more productiveHow Git and Gerrit make you more productive
How Git and Gerrit make you more productive
 
Droidcon Italy 2015: can you work without open source libraries?
Droidcon Italy 2015: can you work without open source libraries?Droidcon Italy 2015: can you work without open source libraries?
Droidcon Italy 2015: can you work without open source libraries?
 
The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...The adoption of FOSS workfows in commercial software development: the case of...
The adoption of FOSS workfows in commercial software development: the case of...
 
Tizen store-z1-20150228rzr
Tizen store-z1-20150228rzrTizen store-z1-20150228rzr
Tizen store-z1-20150228rzr
 
Git & git hub
Git & git hubGit & git hub
Git & git hub
 
Tizen architecture-solutionslinux-20130529
Tizen architecture-solutionslinux-20130529Tizen architecture-solutionslinux-20130529
Tizen architecture-solutionslinux-20130529
 
Open Source and the Girl Geek (English)
Open Source and the Girl Geek (English)Open Source and the Girl Geek (English)
Open Source and the Girl Geek (English)
 
Let's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeadsLet's Go @ St. Louis CocoaHeads
Let's Go @ St. Louis CocoaHeads
 

Semelhante a Using OpenEmbedded

GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
Weaveworks
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
Opersys inc.
 
GitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott RigbyGitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott Rigby
Weaveworks
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
Opersys inc.
 

Semelhante a Using OpenEmbedded (20)

OE Hands-On
OE Hands-OnOE Hands-On
OE Hands-On
 
LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101LCE12: Intro Training: Upstreaming 101
LCE12: Intro Training: Upstreaming 101
 
libreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux DistrolibreCMC : The Libre Embedded GNU/Linux Distro
libreCMC : The Libre Embedded GNU/Linux Distro
 
SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101SFO15-TR2: Upstreaming 101
SFO15-TR2: Upstreaming 101
 
LCA13: Upstreaming 101
LCA13: Upstreaming 101LCA13: Upstreaming 101
LCA13: Upstreaming 101
 
Upstreaming 1013
Upstreaming 1013Upstreaming 1013
Upstreaming 1013
 
Nimble - iOS dependency management
Nimble - iOS dependency managementNimble - iOS dependency management
Nimble - iOS dependency management
 
GitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott RigbyGitOps for Helm Users by Scott Rigby
GitOps for Helm Users by Scott Rigby
 
RootStack - Devfactory
RootStack - DevfactoryRootStack - Devfactory
RootStack - Devfactory
 
Git In One Evening
Git In One EveningGit In One Evening
Git In One Evening
 
LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101LAS16-TR02: Upstreaming 101
LAS16-TR02: Upstreaming 101
 
[scala.by] Launching new application fast
[scala.by] Launching new application fast[scala.by] Launching new application fast
[scala.by] Launching new application fast
 
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
Source Control with Domino Designer 8.5.3 and Git (DanNotes, November 28, 2012)
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 
GitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott RigbyGitOps (& Flux) for Helm Users with Scott Rigby
GitOps (& Flux) for Helm Users with Scott Rigby
 
Automated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build ServiceAutomated Snap Package build processes without the Build Service
Automated Snap Package build processes without the Build Service
 
Rejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform GainRejekts 24 EU No GitOps Pain, No Platform Gain
Rejekts 24 EU No GitOps Pain, No Platform Gain
 
Get your FLOSS problems solved
Get your FLOSS problems solvedGet your FLOSS problems solved
Get your FLOSS problems solved
 
My "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails ProjectsMy "Perfect" Toolchain Setup for Grails Projects
My "Perfect" Toolchain Setup for Grails Projects
 
Is Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon VIs Android the New Embedded Linux? at AnDevCon V
Is Android the New Embedded Linux? at AnDevCon V
 

Mais de Trevor Woerner

Mais de Trevor Woerner (6)

Sensing Temperature with a RaspberryPi
Sensing Temperature with a RaspberryPiSensing Temperature with a RaspberryPi
Sensing Temperature with a RaspberryPi
 
Yocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-onYocto Project Kernel Lab hands-on
Yocto Project Kernel Lab hands-on
 
Yocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-OnYocto Project Kernel Lab, Hands-On
Yocto Project Kernel Lab, Hands-On
 
GSoC/EVoC Overview
GSoC/EVoC OverviewGSoC/EVoC Overview
GSoC/EVoC Overview
 
Getting Started with Buildroot - Lab
Getting Started with Buildroot - LabGetting Started with Buildroot - Lab
Getting Started with Buildroot - Lab
 
Getting Started with Buildroot
Getting Started with BuildrootGetting Started with Buildroot
Getting Started with Buildroot
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Vancouver Psychic Readings, Attraction spells,Br...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Using OpenEmbedded

  • 1. Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions An Introduction To Building Your Own Images A brief overview of the scope and issues involved with building your own GNU/Linux-based distributions. Trevor Woerner twoerner@gmail.com
  • 2. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 2 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions ● this talk is not specific to RaspberryPis ● this time-slot is not long enough to cover every most aspect/feature/workflow of OpenEmbedded ● i don't claim to know everything about OpenEmbedded (or much about anything else, for that matter)
  • 3. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 3 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Why?
  • 4. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 4 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions why create your own distribution? ● very difficult to answer for (casual) user ● easier to answer when building products ● tight control over installed software ● tight control over versions of installed software ● security ● software updates ● device lifetime
  • 5. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 5 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Code Choices
  • 6. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 6 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux a press power button bootloader kernel boot init system display manager / login screen window manager gui display server protocol desktop environment text START
  • 7. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 7 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions in a GNU/Linux system, only this is "Linux" kernel boot
  • 8. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 8 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down bootloader ● grub ● u-boot ● lilo ● syslinux ● systemd-boot/gummiboot ● barebox
  • 9. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 9 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down kernel boot ● latest kernel.org ● LTS ● evil vendor kernel ● benevolent distro kernel ● with or without PREEMPT_RT ● 2.6 / 3.x / 4.x ● xenomai
  • 10. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 10 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down a init system ● sysvinit ● systemd ● upstart ● busybox init ● OpenRC ● runit
  • 11. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 11 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down display server protocol ● X11 ● wayland ● directfb ● mir
  • 12. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 12 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down display manager / login screen ● XDM ● GDM ● KDM ● LXDM ● CDM ● xlogin ● nodm ● LightDM
  • 13. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 13 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down desktop environment ● GNOME ● KDE ● LXDE ● MATE ● LXQt ● Enlightenment ● Cinnamon ● Unity ● Xfce
  • 14. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 14 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions booting GNU/Linux - drilling down window manager ● Xfwm ● Openbox ● KWin ● i3 ● FVWM ● TWM ● compiz ● Matchbox ● Metacity ● Sawfish ● mwm ● uwm ● xmonad ● ion ● fluxbox
  • 15. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 15 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators
  • 16. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 16 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers
  • 17. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 17 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● OpenSSH ● dropbear SSH Servers● coreutils ● busybox ● toybox Basic Cmdline Utilities ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers ● glibc ● uclibc ● musl C Libraries ● coreutils ● busybox ● toybox Basic Cmdline Utilities ● gcc ● llvm C Compilers
  • 18. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 18 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● OpenSSH ● dropbear SSH Servers● coreutils ● busybox ● toybox Basic Cmdline Utilities ● db ● gdbm ● sqlite ● hiera ● metakit ● mysql ● postgresql Databases ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers ● glibc ● uclibc ● musl C Libraries ● coreutils ● busybox ● toybox Basic Cmdline Utilities ● java ● python ● go ● rust ● nodejs ● ruby ● perl ● mono ● smalltalk ● erlang ● ada Language Support ● gcc ● llvm C Compilers
  • 19. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 19 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● OpenSSH ● dropbear SSH Servers● coreutils ● busybox ● toybox Basic Cmdline Utilities ● db ● gdbm ● sqlite ● hiera ● metakit ● mysql ● postgresql Databases ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers ● glibc ● uclibc ● musl C Libraries ● coreutils ● busybox ● toybox Basic Cmdline Utilities ● java ● python ● go ● rust ● nodejs ● ruby ● perl ● mono ● smalltalk ● erlang ● ada Language Support ● gcc ● llvm C Compilers ● wolfssl ● tpm/tpm2 ● swupd/swupdate ● selinux ● optee ● ro-rootfs ● pentesting/kali Security ● lxd/lxc ● docker ● openstack ● criu ● kubernetes ● kvm ● oci ● xen Virtualization
  • 20. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 20 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● OpenSSH ● dropbear SSH Servers● coreutils ● busybox ● toybox Basic Cmdline Utilities ● db ● gdbm ● sqlite ● hiera ● metakit ● mysql ● postgresql Databases ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers ● glibc ● uclibc ● musl C Libraries ● coreutils ● busybox ● toybox Basic Cmdline Utilities ● java ● python ● go ● rust ● nodejs ● ruby ● perl ● mono ● smalltalk ● erlang ● ada Language Support ● gcc ● llvm C Compilers ● wolfssl ● tpm/tpm2 ● swupd/swupdate ● selinux ● optee ● ro-rootfs ● pentesting/kali Security ● lxd/lxc ● docker ● openstack ● criu ● kubernetes ● kvm ● oci ● xen Virtualization VER SIO N S
  • 21. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 21 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions NOT booting GNU/Linux - drilling down ● bash ● csh ● tcsh ● zsh ● sh ● ash ● ksh ● mosh ● dsh Shells ● gnome-terminal ● xterm ● konsole ● rxvt ● xfce4-terminal Terminal Emulators ● apache2 ● tomcat ● jetty ● lighttpd ● Nginx ● cherokee ● fcgi ● hiawatha ● monkey ● nostromo Web Servers ● OpenSSH ● dropbear SSH Servers● coreutils ● busybox ● toybox Basic Cmdline Utilities ● db ● gdbm ● sqlite ● hiera ● metakit ● mysql ● postgresql Databases ● chromium ● firefox ● links ● epiphany ● opic ● midori ● konqueror ● qtwebbrowser ● rekonq Web Browsers ● glibc ● uclibc ● musl C Libraries ● coreutils ● busybox ● toybox Basic Cmdline Utilities ● java ● python ● go ● rust ● nodejs ● ruby ● perl ● mono ● smalltalk ● erlang ● ada Language Support ● gcc ● llvm C Compilers ● wolfssl ● tpm/tpm2 ● swupd/swupdate ● selinux ● optee ● ro-rootfs ● pentesting/kali Security ● lxd/lxc ● docker ● openstack ● criu ● kubernetes ● kvm ● oci ● xen Virtualization VER SIO N S DEPENDENCIES
  • 22. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 22 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions a GNU/Linux system is not one single, monolithic blob created by one company/organization ● individual people/groups, working mostly autonomously ● rarely a top-level, rigid, overall, pre-developed spec ● independent release schedules ● multiple options at every step ● choosing a cohesive set → DISTRIBUTION
  • 23. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 23 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions why "re-invent the wheel" and create alternates of existing, working projects? ● code forks due to disagreement in {techincal | legal | community | leadership | ...} direction ● real or perceived legal issues ● re-design in order to ● add more features ● support more platforms ● fundamentally change how something works (algorithm)
  • 24. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 24 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions why "re-invent the wheel" and create alternates of existing, working projects? ● to promote "healthy" competition ● unaware of existing projects ● original project is abandoned ● to "start fresh" ● for the learning experience
  • 25. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 25 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Running Code
  • 26. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 26 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions ● processors are the heart of any device ● all processor families "speak" their own "language" (sometimes sub-groups within a family have their own "dialect") ● a programmer's intentions, eventually, has to be expressed in the processor's "language" ● either by compiling/assembling/linking code ● or by running the code through an interpreter ● whether we're talking about compiled code, or interpreted, at some point compiling needs to take place (compiling of code, compiling of interpreter)
  • 27. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 27 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions how to compile code ● fetch code ● unpack ● patch ● configure ● build/compile ● stage ● package
  • 28. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 28 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions fetch ● not always obvious from where to get code ● interact with a repository (svn, cvs, git, hg, perforce, clearcase, rcs/sccs, darcs, monotone, GNU bazaar, MS vss...) or tarball releases (e.g. ftp) ● interact with a code hosting site (github, sourceforge, bitbucket, gitlab, launchpad, cloudforge...) ● branches, tags ● verify signature/checksum(s)
  • 29. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 29 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions unpack ● compression ● gzip, bzip2, xz, z, lzo, lzma ● archive ● tar, cpio, shar ● compression + archive ● 7z, zip, arc, apk, tar.{gz|xz|bzip2|...}
  • 30. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 30 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions patch ● when you do something (even slightly) different than what the people who wrote the code are doing, patches are often needed ● different compiler ● different/newer/older host ● different C library ● different versions of dependencies ● sometimes upstream doesn't accept your patch ● where to store/maintain these patches?
  • 31. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 31 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions configure ● enable/disable features ● build systems ● make ● makefile generators ● autotools ● cmake ● pymake ● "make" replacements ● ant ● maven ● waf ● ninja ● gyp/gn ● meson
  • 32. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 32 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions build/compile ● cross-compiling ● selecting, patching, configuring a cross-compiler (and C lib) is non-trivial ● using the cross-compilier is non-trivial (avoiding host contamination)
  • 33. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 33 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions stage ● preparing artifacts for the target ● packing ● signing ● arranging ● updating/removing ● only install relevant parts (remove docs, man pages, include files... unless user wants them explicitly)
  • 34. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 34 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions package ● ipk ● deb ● rpm
  • 35. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 35 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Target Device
  • 36. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 36 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions each device has its own quirks ● RPi ● fat + ext partitions ● config.txt in fat ● Rockchip ● multiple partitions, individual chunks per partition ● all chunks need to run through vendor tool ● AllWinner ● special "fex" files (i.e. pre-dt) + script.bin ● DragonBoard 410c ● fastboot tools to load eMMC ● C.H.I.P. ● special "UBI" image ● board needs to be in "FEL" mode ● etc...
  • 37. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 37 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Putting It Together
  • 38. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 38 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions creating a distro ● choosing amongst 1000's x 1000's of packages, making sure there's one of each of the required packages, dependencies, versions, ... ● preparing the right cross-development tools ● building (fetching, unpacking, patching, configuring, cross-compiling, staging, packaging) the software ● getting that software onto/into the target device in the proper format
  • 39. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 39 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded
  • 40. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 40 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions ● targeting multiple devices! OpenEmbedded
  • 41. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 41 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded ● provides "recipes" for 1000's of packages ~> 2000ish in base layers alone ● prepares the cross-development tools ● builds (fetches, unpacks, patches, configures, cross- compiles, stages, package) the software with a very sophisticated scheduler with correct dependencies ● creates an image for the target device in the proper format ● targets multiple platforms/devices with small configuration changes (often a one line change)
  • 42. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 42 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded+ ● has an optional graphical front-end (toaster) ● optionally integrates into Eclipse ● can generate image-specific SDK and eSDK ● the (e)SDK can be used on Linux, Windows, or MacOS hosts (CROPS) ● supports many hardware targets (including qemu) across many architectures (x86, arm, ppc, mips, riscv) and variants (32bit, 64bit) ~> 600ish
  • 43. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 43 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions MinnowBoard/Turbot ● Intel Atom x86_64 ● Intel Graphics ● 1GB - 2GB DDR3 ● uSD, GbE, USB2/3 ● turbot dual/quad dual-eth ● meta-intel $99
  • 44. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 44 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions BeagleBoard/Bone ● TI OMAP3xxx/Sitara AM3xxx ● Cortex-A8, Cortex-A15 ● PowerVR ● 256MB - 512MB DDR2 ● SD/uSD, 10/100, USB2, PRU ● BeagleBoard, BeagleBoard-xM, BeagleBone, BeagleBone Black, BeagleBoard x15 ● meta-ti $55
  • 45. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 45 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions DragonBoard 410c ● Qualcomm Snapdragon 410 ● Cortex-A53 ● Adreno 306 → Freedreno ● 2GB DDR3 ● uSD, 8GB eMMC, USB2, WiFi 2.4GHz a/b/g/n, bt 4.1 ● meta-qcom $75
  • 46. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 46 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions C.H.I.P. (i.e. the $9 computer) ● AllWinner R8 ● Cortex-A8 ● Mali-400 ● 512MB DDR3 ● 4GB eMMC, USB2, WiFi 2.4GHz a/b/g/n, bt 4.0 ● meta-chip $9
  • 47. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 47 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Creator Ci20 ● MIPS Ingenic JZ4780 ● PowerVR ● 1GB DDR3 ● 8GB eMMC, SD, 10/100, USB2, WiFi 2.4GHz b/g/n, bt 4.0 ● meta-jz-mips $72
  • 48. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 48 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Odroid C1/C2 ● Amlogic S805/S905 ● ARM Cortex-A5, Cortex-A53 ● Mali-450 ● 1GB - 2GB DDR3 ● opt eMMC, uSD, GbE, USB2 ● meta-odroid $40
  • 49. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 49 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Odroid XU3/XU4 ● Samsung Exynos 5 Octa ● ARM Cortex-A7 + A15 ● Mali-T628 ● 2GB DDR3 ● opt eMMC, uSD, 10/100/GbE, USB2/3 ● meta-odroid $74
  • 50. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 50 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Zybo-Zynq7 ● Xilinx Zynq 7Z007S ● ARM Cortex-A9 ● 512MB DDR3 ● PMOD, uSD, USB2 ● meta-xilinx $189
  • 51. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 51 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Pine64 ● AllWinner A64 ● ARM Cortex-A53 ● Mali-400 ● 512MB DDR3 ● uSD, 10/100, USB2 ● meta-pine64 $189
  • 52. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 52 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Firefly-RK3288 ● Rockchip RK3288 ● ARM Cortex-A17 ● Mali-T760 ● 2GB - 4GB DDR3 ● 16GB eMMC, uSD, GbE, WiFi a/b/g/n/ac, bt 4.0+ble, USB2 ● meta-rockchip $129
  • 53. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 53 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Firefly-RK3399 ● Rockchip RK3399 Hexacore ● ARM Cortex-A72 + A53 ● Mali-T860 ● 2GB - 4GB DDR3 ● 16GB - 32GB eMMC, uSD, GbE, WiFi a/b/g/n/ac, bt 4.1, USB2/3 ● meta-rockchip $139
  • 54. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 54 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Wandboard ● Freescale iMX6 ● ARM Cortex-A9 ● Vivante → Etnaviv ● 1GB DDR3 ● uSD, GbE, WiFi n, USB2 ● solo, dual, quad ● meta-freescale-3rdparty $69
  • 55. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 55 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Raspberry Pi ● Broadcom BCM2835 BCM2836 BCM2837 ● ARM11, Cortex-A7, Cortex-A53 ● Broadcom VC4 ● 512MB - 1GB DDR2 ● uSD, 10/100, USB2 ● Rpi A/B, Rpi2, Rpi0, Rpi3, Rpi3B+ ● meta-raspberrypi $35
  • 56. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 56 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Banana Pi ● AllWinner A20 ● Cortex-A7 ● Mali-400 ● 1GB DDR3 ● SD, GbE, USB2 ● meta-sunxi $32
  • 57. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 57 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Orange Pi ● AllWinner A20/H2/H3 ● Cortex-A7 ● Mali-400 ● 1GB - 2GB DDR3 ● uSD, GbE, USB2 ● meta-sunxi $25
  • 58. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 58 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded++ ● runs on most GNU/Linux distributions (debian, ubuntu, fedora, centOS, openSUSE) ● is mostly host-independent (builds it own set of -native tools) ● extensive test framework (build tests, package unit- tests, on-target tests, image/boot tests) ● license/legal audit or constraint ● speeds up subsequent builds with sophisticated sstate cache
  • 59. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 59 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded+++ ● excellent documentation, community, help (ISVs) ● official Linux Foundation project (Yocto) do you work for Intel or the Linux Foundation? whether to say "Yocto" or "OE" say "OE"say "Yocto" yes no
  • 60. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 60 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions There are only two hard things in Computer Science: 0. off-by-one errors 1. cache invalidation 2. naming things Phil Karlton
  • 61. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 61 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions There are only two hard things in Computer Science: 0. off-by-one errors 7. asynchronous callbacks 1. cache invalidation 2. naming things
  • 62. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 62 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded/Yocto/Poky Naming ● a long time ago, this entire thing was called Poky (i.e. "the Poky Build System") ● now Poky is a reference distribution for testing/releases ● now the base recipes and classes are called OpenEmbedded, but was tied too heavily to one vendor ● when the LF adopted OE, it was renamed Yocto in an attempt to make it vendor-neutral
  • 63. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 63 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions How Does It Work?
  • 64. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 64 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions recipes ● a file with the necessary data to process a package classes ● a grouping of similar functionality layers ● a set of related recipes, classes, data for a specific purpose (BSP, software, distro) bitbake ● the tool which runs the whole build configuration files ● e.g. conf/local.conf
  • 65. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 65 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions sample recipe (openembedded-core/meta/recipes-graphics/mesa/mesa -- abridged) SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 66. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 66 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions preamble SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 67. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 67 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions license SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 68. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 68 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions alternates of same purpose SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 69. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 69 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions adding classes of known functionality SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 70. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 70 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions configuration options SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 71. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 71 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions dependencies (build and native) SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 72. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 72 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions fetch: location, patch, signature verification SUMMARY = "A free implementation of the OpenGL API" DESCRIPTION = "Mesa is an open-source implementation of the OpenGL specification - a system for rendering interactive 3D graphics. A variety of device drivers allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs. Mesa is used as part of the overall Direct Rendering Infrastructure and X.org environment." HOMEPAGE = "http://mesa3d.org" BUGTRACKER = "https://bugs.freedesktop.org" SECTION = "X11" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://docs/license.html;md5=725f991a1cc322aa7a0cd3a2016621c4" DEPENDS = "expat makedepend-native zlib" PROVIDES = "virtual/libgl virtual/libgles1 virtual/libgles2 virtual/egl" inherit autotools pkgconfig python3native gettext distro_features_check PACKAGECONFIG ??= "x11 dri3" PACKAGECONFIG[dri3] = "--enable-dri3,--disable-dri3,dri3proto presentproto libxshmfence" SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz file://disable-asm-on-non-gcc.patch" SRC_URI[md5sum] = "203d1a79156ab6926f2d253b377e9d9d" SRC_URI[sha256sum] = "8f9d9bf281c48e4a8f5228816577263b4c655248dc7666e75034ab422951a6b1"
  • 73. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 73 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions layers (conf/bblayers.conf) # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly LCONF_VERSION = "7" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-raspberrypi /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/openembedded-core/meta /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-oe /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-gnome /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-python /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-networking /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-openembedded/meta-multimedia /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-qt5 /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-qt5-extra /opt/oe/configs/z/build-master/rpi3-64-vc4/layers/meta-browser "
  • 74. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 74 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions configuration (conf/local.conf -- abridged) MACHINE ?= "raspberrypi3-64" DISTRO ?= "nodistro" DL_DIR ?= "/opt/Downloads" # gui/gl MACHINE_FEATURES_append = " vc4graphics" DISTRO_FEATURES_append = " directfb opengl x11" PACKAGECONFIG_append_pn-mesa-demos = " glut" CORE_IMAGE_EXTRA_INSTALL += " glmark2 mesa-demos chromium-x11" # touchscreen PACKAGECONFIG_pn-xserver-nodm-init = "nocursor" WAVESHARE_1024X600_C_2_1 = "1" # rpi ENABLE_I2C = "1" KERNEL_MODULE_AUTOLOAD += "i2c-dev" ENABLE_SPI_BUS = "1" ENABLE_UART = "1" PACKAGE_CLASSES = "package_ipk" EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
  • 75. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 75 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Case Study
  • 76. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 76 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions customers hardware manufacturers Comcast
  • 77. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 77 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Comcast set-top-box ● purposefully multi-vendor, multi-architecture ● but expects a base, functioning system ● needs to add its own software on top ● needs to tightly control the base system ● packages ● versions ● functionality (e.g. init system, graphics)
  • 78. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 78 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions OpenEmbedded solution ● Comcast creates its own distro → RDK (layer) ● defines packages, behaviour ● vendors create hardware and provide BSP layers ● Comcast builds images for each device using distro layer, BSP layer, as well as others ● Comcast generates SDKs for their developers ● Comcast maintains a packagefeed for updates ● this is not a "home grown" solution, embedded developers are already familiar with the tools
  • 79. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 79 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Caveats
  • 80. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 80 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions ● not all layers work well together ● OpenEmbedded doesn't catch all mistakes and mis- matches ● code is constantly changing, and getting all these independent projects to work as a cohesive whole isn't always easy (moving target) ● layer quality, layer duplications ● needs a really big build machine ● works better with a really good connection to the Internet ● ... and more
  • 81. April 12, 2018 RaspberryPi Meetup Toronto twoerner@gmail.com 81 of 81 Using OpenEmbeddedUsing OpenEmbeddedAn Introduction To Building Your Own Distributions Thank you!