Yocto Project Developer Day - Advanced Class Summary

undefined
A
d
v
a
n
c
e
d
 
C
l
a
s
s
Randy Witt, Brian Avery, David Reyna, Mark Hatle,
Rudi Streif, Sean Hudson, Henry Bruce
Y
o
c
t
o
 
P
r
o
j
e
c
t
 
D
e
v
e
l
o
p
e
r
 
D
a
y
 
P
o
r
t
l
a
n
d
 
 
2
4
 
F
e
b
r
u
a
r
y
 
2
0
1
7
A
d
v
a
n
c
e
d
 
C
l
a
s
s
C
l
a
s
s
 
C
o
n
t
e
n
t
:
https://wiki.yoctoproject.org/wiki/DevDay_US_2017
R
e
q
u
i
r
e
m
e
n
t
s
:
Wireless
SSH (Windows: e.g. “putty”)
Serial (Linux: “screen”, Windows: e.g. “Teraterm”)
R
e
g
i
s
t
r
a
t
i
o
n
:
 
W
i
r
e
l
e
s
s
 
O
n
l
y
!
Valerie Scott
Direct ethernet does work (but may not work later)
A
g
e
n
d
a
 
 
T
h
e
 
A
d
v
a
n
c
e
d
 
C
l
a
s
s
 
 
9
:
0
0
-
 
9
:
1
5
O
p
e
n
i
n
g
 
s
e
s
s
i
o
n
 
 
9
:
1
5
-
 
9
:
4
5
C
R
O
P
S
:
 
C
r
o
s
s
 
P
l
a
t
f
o
r
m
 
s
u
p
p
o
r
t
 
 
9
:
4
5
-
1
0
:
1
5
 
P
r
e
l
i
n
k
1
0
:
1
5
-
1
0
:
3
0
 
M
o
r
n
i
n
g
 
B
r
e
a
k
1
0
:
3
0
-
1
0
:
4
5
 
A
c
c
o
u
n
t
 
s
e
t
u
p
1
0
:
4
5
-
1
1
:
1
0
W
I
C
:
 
t
h
e
 
O
E
 
I
m
a
g
e
 
C
r
e
a
t
o
r
1
1
:
1
0
-
1
2
:
0
0
 
U
s
e
r
s
p
a
c
e
:
 
p
a
c
k
a
g
i
n
g
,
 
i
n
s
t
a
l
l
a
t
i
o
n
,
 
s
y
s
t
e
m
 
s
e
r
v
i
c
e
s
1
2
:
0
0
-
 
1
:
0
0
 
L
u
n
c
h
 
(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
l
e
 
T
o
d
a
y
c
r
o
p
s
/
e
x
t
s
d
k
-
c
o
n
t
a
i
n
e
r
Container that can support Extensible SDKs
Also supports standard SDKs
c
r
o
p
s
/
t
o
a
s
t
e
r
Latest released version of toaster/poky currently morty
c
r
o
p
s
/
t
o
a
s
t
e
r
-
m
a
s
t
e
r
Keeps up with the current master of toaster/poky, kicked off via
webhook so it's quite up to date.
c
r
o
p
/
p
o
k
y
This is an Ubuntu container with the necessary packages to run
poky installed, but not poky itself.  To run poky, you need a copy of
it on your file system which you then map into the container. This
will work equally well for poky or an install of oe-core.
C
R
O
P
S
:
 
S
e
t
u
p
 
D
o
c
k
e
r
I
n
s
t
a
l
l
 
D
o
c
k
e
r
For Linux, Docker is typically available via the distro package
manager, otherwisw go to the Docker web site:
https://docs.docker.com/engine/installation/linux/
For Windows and Mac, follow the CROPS Instructions here:
https://github.com/crops/docker-win-mac-docs/wiki
N
o
t
e
:
 
c
r
o
p
s
/
s
a
m
b
a
 
c
o
n
t
a
i
n
e
r
One of the nice features for windows/mac is the
crops/samba container that exposes the docker volume to
the host side via samba/cifs . This works around the fact that
neither the windows nor mac filesystems have sufficient
features to support a bitbake build. The docker volume is
persistent just like a directory on a linux host would be.
C
R
O
P
S
:
 
E
S
D
K
 
F
i
r
s
t
 
T
i
m
e
F
o
l
l
o
w
 
t
h
e
 
i
n
s
t
r
u
c
t
i
o
n
s
 
a
t
:
h
t
t
p
s
:
/
/
g
i
t
h
u
b
.
c
o
m
/
c
r
o
p
s
/
e
x
t
s
d
k
-
c
o
n
t
a
i
n
e
r
L
i
n
u
x
:
$
 
d
o
c
k
e
r
 
r
u
n
 
-
-
r
m
 
-
i
t
 
-
v
 
/
h
o
m
e
/
m
y
u
s
e
r
/
s
d
k
s
t
u
f
f
:
/
w
o
r
k
d
i
r
c
r
o
p
s
/
e
x
t
s
d
k
-
c
o
n
t
a
i
n
e
r
 
-
-
u
r
l
h
t
t
p
:
/
/
s
o
m
e
s
e
r
v
e
r
/
e
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.
C
R
O
P
S
:
 
E
x
a
m
p
l
e
 
e
S
D
K
 
o
n
 
W
i
n
d
o
w
s
T
h
e
 
f
i
r
s
t
 
t
i
m
e
,
 
f
o
l
l
o
w
 
t
h
e
 
C
R
O
P
S
 
W
i
n
d
o
w
s
 
i
n
s
t
a
l
l
i
n
s
t
r
u
c
t
i
o
n
s
C
o
p
y
 
i
n
 
t
h
e
 
E
S
D
K
 
(
a
n
d
 
h
e
l
l
o
.
c
)
 
v
i
a
 
S
a
m
b
a
 
c
o
n
n
e
c
t
i
o
n
\
\
1
9
2
.
1
6
8
.
9
9
.
1
0
0
\
w
o
r
k
d
i
r
R
u
n
 
t
h
e
 
c
o
n
t
a
i
n
e
r
:
$ docker run --rm -it -v ypvolume:/workdir crops/extsdk-container \
  --url file:///workdir/poky-glibc-x86_64-core-image-base-armv5e-\
toolchain-ext-2.1+snapshot.sh
workdir$ . ./environment-setup-armv5e-poky-linux-gnueabi
workdir$ $CC hello.c
workdir$ file a.out
a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically 
linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, 
BuildID[sha1]=11885f8816
9be4452e8f7ac3e40a4a137ec04d6f, not stripped
workdir$ exit
$
C
R
O
P
S
:
 
E
x
a
m
p
l
e
 
e
S
D
K
 
o
n
 
W
i
n
d
o
w
s
,
 
S
e
c
o
n
d
 
T
i
m
e
W
h
e
n
 
y
o
u
 
c
l
o
s
e
 
a
n
d
 
t
h
e
n
 
r
e
o
p
e
n
 
D
o
c
k
e
r
,
 
y
o
u
 
n
e
e
d
 
t
o
r
e
-
s
e
t
u
p
 
t
h
e
 
E
S
D
K
 
c
o
n
t
a
i
n
e
r
s
 
e
n
v
i
r
o
n
m
e
n
t
N
o
t
e
:
 
i
f
 
y
o
u
 
d
o
 
n
o
t
 
r
e
a
s
s
e
r
t
 
t
h
e
 
e
n
v
i
r
o
n
m
e
n
t
,
 
y
o
u
 
w
i
l
l
g
e
t
 
m
i
s
s
i
n
g
 
p
i
p
e
 
a
n
d
 
f
i
l
e
 
e
r
r
o
r
s
$ # The environment information can be found here:
$ docker-machine env
$ eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
$
$ # Restart the Samba container
$ docker start samba
$
$ # The ESDK is already extracted in the ESDK container, so no “--url”
$ docker run --rm -it -v ypvolume:/workdir crops/extsdk-container 
C
R
O
P
S
:
 
E
x
a
m
p
l
e
 
T
o
a
s
t
e
r
 
o
n
 
M
a
c
R
u
n
 
t
h
e
 
c
o
n
t
a
i
n
e
r
:
$
d
o
c
k
e
r
 
r
u
n
 
-
-
r
m
 
-
i
t
 
 
-
v
 
m
y
v
o
l
:
/
w
d
 
-
p
 
1
2
7
.
0
.
0
.
1
:
1
2
0
0
0
:
8
0
0
0
 
c
r
o
p
s
/
t
o
a
s
t
e
r
 
-
-
w
o
r
k
d
i
r
=
/
w
d
#
#
#
 
S
h
e
l
l
 
e
n
v
i
r
o
n
m
e
n
t
 
s
e
t
 
u
p
 
f
o
r
 
b
u
i
l
d
s
.
 
#
#
#
C
h
e
c
k
 
i
f
 
t
o
a
s
t
e
r
 
c
a
n
 
l
i
s
t
e
n
 
o
n
 
0
.
0
.
0
.
0
:
8
0
0
0
O
K
.
R
u
n
n
i
n
g
 
m
i
g
r
a
t
i
o
n
s
:
 
 
N
o
 
m
i
g
r
a
t
i
o
n
s
 
t
o
 
a
p
p
l
y
.
S
t
a
r
t
i
n
g
 
w
e
b
s
e
r
v
e
r
.
.
.
W
e
b
s
e
r
v
e
r
 
a
d
d
r
e
s
s
:
 
 
h
t
t
p
:
/
/
0
.
0
.
0
.
0
:
8
0
0
0
/
S
u
c
c
e
s
s
f
u
l
 
s
t
a
r
t
.
t
o
a
s
t
e
r
u
s
e
r
@
f
0
7
e
b
e
8
b
1
0
f
e
:
/
w
o
r
k
d
i
r
/
b
u
i
l
d
$
 
C
R
O
P
S
:
 
E
x
a
m
p
l
e
 
P
o
k
y
 
o
n
 
M
a
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
e
n
c
e
T
h
e
 
C
R
O
P
s
 
c
o
m
m
u
n
i
t
y
 
i
s
 
v
e
r
y
 
a
c
t
i
v
e
.
 
H
e
r
e
 
i
s
 
h
o
w
 
y
o
u
 
c
a
n
u
p
d
a
t
e
 
y
o
u
r
 
c
a
c
h
e
d
 
c
o
n
t
a
i
n
e
r
s
:
H
e
r
e
 
i
s
 
a
 
q
u
i
c
k
 
h
e
l
l
o
.
c
 
f
o
r
 
y
o
u
r
 
E
S
D
K
 
c
o
n
t
a
i
n
e
r
L
e
a
d
 
D
e
v
e
l
o
p
e
r
s
:
r
a
n
d
y
.
e
.
w
i
t
t
@
i
n
t
e
l
.
c
o
m
b
r
i
a
n
.
a
v
e
r
y
@
i
n
t
e
l
.
c
o
m
#include <stdio.h>
int main(void)
{
    
printf("Hello Berlin 2016!\n");
    return 0;
}
docker pull crops/extsdk-container
docker pull crops/poky
docker pull crops/toaster
undefined
A
c
t
i
v
i
t
y
 
T
w
o
P
r
e
l
i
n
k
M
a
r
k
 
H
a
t
l
e
I
n
t
r
o
d
u
c
t
i
o
n
W
h
a
t
 
i
s
 
p
r
e
l
i
n
k
i
n
g
?
Need to know what is run-time linking is first
W
h
y
 
p
r
e
l
i
n
k
?
W
h
y
 
N
O
T
 
p
r
e
l
i
n
k
?
H
o
w
 
t
o
 
e
n
a
b
l
e
 
p
r
e
l
i
n
k
i
n
g
R
e
l
a
t
e
d
 
i
t
e
m
s
I
n
t
r
o
d
u
c
t
i
o
n
W
h
a
t
 
i
s
 
r
u
n
-
t
i
m
e
 
l
i
n
k
i
n
g
?
A
t
 
r
u
n
t
i
m
e
,
 
t
h
e
 
d
y
n
a
m
i
c
 
l
i
n
k
e
r
 
(
l
d
.
s
o
)
 
m
u
s
t
 
r
e
s
o
l
v
e
s
h
a
r
e
d
 
o
b
j
e
c
t
 
d
e
p
e
n
d
e
n
c
i
e
s
.
O
n
c
e
 
t
h
e
 
s
h
a
r
e
d
 
o
b
j
e
c
t
s
 
a
r
e
 
l
o
a
d
e
d
,
 
t
h
e
 
s
y
s
t
e
m
d
e
t
e
r
m
i
n
e
s
 
i
f
 
t
h
e
y
 
w
e
r
e
 
l
o
a
d
e
d
 
a
t
 
a
 
p
r
e
d
e
t
e
r
m
i
n
e
d
a
d
d
r
e
s
s
 
(
o
b
j
e
c
t
s
 
b
y
 
d
e
f
a
u
l
t
 
a
r
e
 
u
s
u
a
l
l
y
 
N
O
T
 
l
o
a
d
e
d
 
a
t
a
 
v
a
l
i
d
 
p
r
e
d
e
t
e
r
m
i
n
e
d
 
a
d
d
r
e
s
s
)
.
T
h
e
 
d
y
n
a
m
i
c
 
l
i
n
k
e
r
 
m
u
s
t
 
n
o
w
 
b
i
n
d
/
r
e
s
o
l
v
e
 
a
l
l
 
s
y
m
b
o
l
s
(
p
r
o
v
i
d
e
r
s
 
a
n
d
 
u
s
e
r
s
)
 
t
o
 
s
p
e
c
i
f
i
c
 
a
d
d
r
e
s
s
e
s
.
 
 
T
h
i
s
o
p
e
r
a
t
i
o
n
 
g
e
n
e
r
a
l
l
y
 
c
h
a
n
g
e
s
 
r
e
l
o
c
a
t
i
o
n
 
t
a
b
l
e
s
 
u
s
i
n
g
 
a
C
o
p
y
-
O
n
-
W
r
i
t
e
 
(
C
O
W
)
 
p
r
o
c
e
s
s
.
E
L
F
 
O
b
j
e
c
t
 
(
o
r
i
g
)
Sections:
Idx Name         Size      VMA               LMA               File off  Algn
4 .dynsym        000014b8  00000000004003f0  00000000004003f0  000003f0  2**3
5 .dynstr        00000d1f  00000000004018a8  00000000004018a8  000018a8  2**0
8 .rela.dyn      00000150  00000000004027d8  00000000004027d8  000027d8  2**3
9 .rela.plt      00001230  0000000000402928  0000000000402928  00002928  2**3
11 .plt          00000c30  0000000000403b70  0000000000403b70  00003b70  2**4
12 .text         00033691  00000000004047a0  00000000004047a0  000047a0  2**4
20 .dynamic      000001f0  00000000006f0e00  00000000006f0e00  000f0e00  2**3
21 .got          00000010  00000000006f0ff0  00000000006f0ff0  000f0ff0  2**3
22 .got.plt      00000628  00000000006f1000  00000000006f1000  000f1000  2**3
23 .data         00001220  00000000006f1640  00000000006f1640  000f1640  2**5
24 .bss          00001a68  00000000006f2860  00000000006f2860  000f2860  2**5
E
a
c
h
 
o
f
 
t
h
e
 
a
b
o
v
e
 
c
o
n
t
a
i
n
s
 
s
o
m
e
 
t
y
p
e
 
o
f
 
d
y
n
a
m
i
c
d
a
t
a
D
y
n
a
m
i
c
 
l
i
n
k
e
r
 
(
a
r
c
h
 
s
p
e
c
i
f
i
c
)
 
m
a
y
 
h
a
v
e
 
t
o
 
i
n
s
p
e
c
t
a
n
d
 
m
o
d
i
f
y
 
i
n
-
p
l
a
c
e
 
(
C
O
W
)
 
i
n
f
o
r
m
a
t
i
o
n
 
b
a
s
e
d
 
o
n
 
l
o
a
d
a
d
d
r
e
s
s
W
h
a
t
 
i
s
 
p
r
e
l
i
n
k
i
n
g
?
U
s
i
n
g
 
l
d
.
s
o
,
 
w
e
 
b
i
n
d
 
t
h
e
 
b
i
n
a
r
i
e
s
 
t
o
 
h
e
l
p
 
d
e
t
e
r
m
i
n
e
 
a
p
r
e
-
c
a
l
c
u
l
a
t
e
d
 
l
o
a
d
 
a
d
d
r
e
s
s
 
f
o
r
 
a
l
l
 
E
L
F
 
b
i
n
a
r
i
e
s
.
T
h
i
s
 
l
o
a
d
 
a
d
d
r
e
s
s
 
i
s
 
c
a
l
c
u
l
a
t
e
d
 
(
l
i
b
r
a
r
i
e
s
 
o
n
l
y
)
 
i
n
 
s
u
c
h
a
 
w
a
y
 
t
h
a
t
 
c
o
n
f
l
i
c
t
s
 
s
h
o
u
l
d
 
n
o
t
 
o
c
c
u
r
,
 
t
h
u
s
 
e
n
s
u
r
i
n
g
t
h
a
t
 
o
b
j
e
c
t
s
 
a
r
e
 
l
o
a
d
e
d
 
a
t
 
t
h
e
 
p
r
e
d
e
t
e
r
m
i
n
e
d
 
a
d
d
r
e
s
s
.
T
h
e
 
E
L
F
 
o
b
j
e
c
t
 
i
s
 
m
o
d
i
f
i
e
d
 
t
o
 
i
n
c
l
u
d
e
 
t
h
e
 
c
h
a
n
g
e
s
.
S
o
m
e
 
c
o
n
f
l
i
c
t
 
a
n
d
 
s
y
m
b
o
l
 
r
e
s
o
l
u
t
i
o
n
 
s
t
i
l
l
 
m
a
y
 
b
e
n
e
c
e
s
s
a
r
y
,
 
b
u
t
 
o
n
l
y
 
f
o
r
 
i
t
e
m
s
 
t
h
a
t
 
c
a
n
t
 
b
e
 
p
r
e
-
d
e
t
e
r
m
i
n
e
d
.
E
L
F
 
S
h
a
r
e
d
 
L
i
b
r
a
r
y
 
(
l
i
b
c
.
s
o
)
 
 Version:                           0x1
 
 Entry point address:               0x203b0
 
 
Start of program headers:          64 (bytes into file)
  Start of section headers:          1676576 (bytes into file)
  Flags:                             0x0
  
Relocation section '.rela.dyn' at offset 0x17f68 contains 1273 entries:  
  
Offset          Info           Type           Sym. Value    Sym. Name + Addend
  
0000003937c8  000000000008 R_X86_64_RELATIVE                    398400
  
0000003937d8  000000000008 R_X86_64_RELATIVE                    1fbd0
  0
000003937e0 
 
000000000008 R_X86_64_RELATIVE                    1483a0
  0
000003937e8  000000000008 R_X86_64_RELATIVE                    148400
 
 
Version:                           0x1
  Entry point address:               0x3b4c4203b0
  Start of program headers:          64 (bytes into file)
  Start of section headers:          1681720 (bytes into file)
  Flags:                             0x0
  
Relocation section '.rela.dyn' at offset 0x17f68 contains 1273 entries:  
  
Offset          Info           Type           Sym. Value    Sym. Name + Addend
  
003b4c7937c8  000000000008 R_X86_64_RELATIVE                    3b4c798400
  
003b4c7937d8  000000000008 R_X86_64_RELATIVE                    3b4c41fbd0
  
003b4c7937e0  000000000008 R_X86_64_RELATIVE                    3b4c5483a0
  
003b4c7937e8  000000000008 R_X86_64_RELATIVE                    3b4c548400
W
h
a
t
 
i
s
 
p
r
e
l
i
n
k
i
n
g
?
N
e
w
 
s
e
c
t
i
o
n
s
.
g
n
u
.
l
i
b
l
i
s
t
Contains one ElfNN Lib structure for each shared library which the
object has been pre- linked against, in the order in which they
appear in symbol search scope.
.
g
n
u
.
c
o
n
f
l
i
c
t
Contains one ElfNN Rela structure for each needed prelink conflict
fixup.
.
g
n
u
.
l
i
b
s
t
r
Contains strings for .gnu.liblist section where .gnu.liblist is not
alowed.
.
g
n
u
_
p
r
e
l
i
n
k
_
u
n
d
o
Contains private data to permit prelink --undo operation.
E
L
F
 
O
b
j
e
c
t
 
(
p
r
e
l
i
n
k
e
d
)
Sections:
Idx Name         Size      VMA               LMA               File off  Algn
4 .dynsym        000014b8  0000000000400428  0000000000400428  00000428  2**3
5 .gnu.liblist   00000064  00000000004018e0  00000000004018e0  000018e0  2**2
6 .gnu.conflict  00000888  0000000000401948  0000000000401948  00001948  2**3
9 .rela.dyn      00000150  00000000004027d8  00000000004027d8  000027d8  2**3
10 .rela.plt     00001230  0000000000402928  0000000000402928  00002928  2**3
12 .plt          00000c30  0000000000403b70  0000000000403b70  00003b70  2**4
13 .text         00033691  00000000004047a0  00000000004047a0  000047a0  2**4
21 .dynamic      000001f0  00000000006f0e00  00000000006f0e00  000f0e00  2**3
22 .got          00000010  00000000006f0ff0  00000000006f0ff0  000f0ff0  2**3
23 .got.plt      00000628  00000000006f1000  00000000006f1000  000f1000  2**3
24 .data         00001220  00000000006f1640  00000000006f1640  000f1640  2**5
25 .dynbss       00000808  00000000006f2860  00000000006f2860  000f2860  2**5
26 .bss          00001260  00000000006f3068  00000000006f3068  000f3068  2**5
27 .dynstr       00000d45  00000000008f3068  00000000008f3068  000f3068  2**0
29 .gnu.prelink_undo 000008f8  0000000000000000  0000000000000000  000f3dd0  2**3
M
o
d
i
f
i
e
d
:
 
.
d
y
n
s
y
m
,
 
.
r
e
l
a
.
d
y
n
,
 
.
.
r
e
l
a
.
p
l
t
,
 
,
 
.
d
y
n
s
t
r
N
e
w
:
 
.
g
n
u
.
l
i
b
l
i
s
t
,
 
.
g
n
u
.
c
o
n
f
l
i
c
t
,
 
.
d
y
n
b
s
s
,
.
g
n
u
.
p
r
e
l
i
n
k
_
u
n
d
o
W
h
y
 
p
r
e
l
i
n
k
?
F
a
s
t
e
r
 
A
p
p
l
i
c
a
t
i
o
n
 
L
o
a
d
 
T
i
m
e
s
Avoid unnecessary binding operations
More re-use of cached pages
Faster boot time
L
e
s
s
 
M
e
m
o
r
y
 
R
e
q
u
i
r
e
d
Fewer relocations means few COW pages
More re-use of cached pages
B
a
t
t
e
r
y
/
P
o
w
e
r
 
S
a
v
i
n
g
s
Fewer CPU cycles, more power savings
Less ram used, more power savings
B
i
n
a
r
y
 
L
o
a
d
 
t
i
m
e
s
 
 
B
u
s
y
b
o
x
 
(
/
b
i
n
/
s
h
)
 
a
n
d
 
G
N
U
 
l
d
Using ‘LD_DEBUG=statistics’
’-’ indicates savings, ‘+’ indicates more
L
o
a
d
 
t
i
m
e
s
 
 
b
o
o
t
,
 
l
o
g
i
n
,
 
f
r
e
e
,
 
h
a
l
t
Min 
 core-image-minimal, poky
Base 
 core-image-base, poky
’-’ indicates savings, ‘+’ indicates more
W
h
y
 
N
O
T
 
p
r
e
l
i
n
k
?
L
o
a
d
 
a
d
d
r
e
s
s
e
s
 
a
r
e
 
p
r
e
-
d
e
t
e
r
m
i
n
e
d
.
 
 
C
o
u
l
d
 
m
a
k
e
 
i
t
e
a
s
i
e
r
 
f
o
r
 
a
n
 
a
t
t
a
c
k
e
r
 
t
o
 
c
r
a
f
t
 
c
e
r
t
a
i
n
 
t
y
p
e
s
 
o
f
 
a
t
t
a
c
k
s
.
Incompatible with ASLR (Address Space Layout
Randomization) (limited effectiveness on 32-bit)
Mitigation: use randomized prelink layout option (-R)
N
o
t
 
a
v
a
i
l
a
b
l
e
 
o
n
 
y
o
u
r
 
a
r
c
h
i
t
e
c
t
u
r
e
Arm64 
 work in progress (slowly)
PPC64 not supported (elf v2)
H
o
w
 
t
o
 
e
n
a
b
l
e
/
d
i
s
a
b
l
e
 
p
r
e
l
i
n
k
L
o
c
a
l
.
c
o
n
f
,
 
U
S
E
R
_
C
L
A
S
S
E
S
 
-
 
i
m
a
g
e
-
p
r
e
l
i
n
k
 
# Additional image features
 #
 # The following is a list of additional classes to use when building images which
 # enable extra features. Some available options which can be included in this variable
 # are:
 #   - 'buildstats' collect build statistics
 #   - 'image-mklibs' to reduce shared library files size for an image
 #   - 'image-prelink' in order to prelink the filesystem image
 #   - 'image-swab' to perform host system intrusion detection
 # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink
 USER_CLASSES ?= "buildstats image-mklibs image-prelink
"
R
e
l
a
t
e
d
 
i
t
e
m
s
N
o
r
m
a
l
l
y
 
t
h
e
 
p
r
e
l
i
n
k
e
r
 
u
s
e
s
 
l
d
.
s
o
.
 
 
H
o
w
e
v
e
r
 
y
o
u
 
c
a
n
t
u
s
e
 
l
d
.
s
o
 
i
n
 
a
 
c
r
o
s
s
 
e
n
v
i
r
o
n
m
e
n
t
.
C
r
o
s
s
 
p
r
e
l
i
n
k
e
r
 
a
d
d
s
 
p
r
e
l
i
n
k
-
r
t
l
d
 
t
h
a
t
 
e
m
u
l
a
t
e
s
 
t
h
e
f
u
n
c
t
i
o
n
a
l
i
t
y
 
o
f
 
l
d
.
s
o
.
P
r
e
l
i
n
k
-
r
t
d
 
w
i
l
l
 
l
e
t
 
y
o
u
 
d
u
m
p
 
c
o
n
f
l
i
c
t
s
,
 
l
o
a
d
 
m
a
p
s
,
 
a
s
w
e
l
l
 
a
s
 
s
i
m
p
l
e
 
l
d
d
 
l
i
k
e
 
f
u
n
c
t
i
o
n
a
l
i
t
y
.
l
d
d
:
 
p
r
e
l
i
n
k
-
r
t
l
d
 
-
-
r
o
o
t
=
<
p
a
t
h
>
 
-
-
t
a
r
g
e
t
-
p
a
t
h
s
 
/
b
i
n
/
b
a
s
h
Load addresses are emulated, unless prelinked
ld.so like environment vars, RTLD_DEBUG=
 etc
undefined
A
c
t
i
v
i
t
y
 
T
h
r
e
e
C
l
a
s
s
 
A
c
c
o
u
n
t
 
S
e
t
u
p
N
o
t
e
s
 
f
o
r
 
t
h
e
 
A
d
v
a
n
c
e
d
 
C
l
a
s
s
:
T
h
e
 
c
l
a
s
s
 
w
i
l
l
 
b
e
 
g
i
v
e
n
 
w
i
t
h
 
Y
P
-
2
.
2
 
(
M
o
r
t
y
)
W
i
f
i
 
A
c
c
e
s
s
:
SSID: 
<TBD>
Password: 
<TBD>
Y
o
u
r
 
a
c
c
o
u
n
t
s
 
I
P
 
a
c
c
e
s
s
 
a
d
d
r
e
s
s
e
s
SSH (password “devday”):
ssh ilab01@devday-
a
.yocto.io -p 10000
(+your
session number)
HTTP:
http://
devday-
a
.yocto.io:30000
(+your session number)
Y
o
c
t
o
 
P
r
o
j
e
c
t
 
D
e
v
 
D
a
y
 
L
a
b
 
S
e
t
u
p
T
h
e
 
v
i
r
t
u
a
l
 
h
o
s
t
s
 
r
e
s
o
u
r
c
e
s
 
c
a
n
 
b
e
 
f
o
u
n
d
 
h
e
r
e
:
Your 
Project: "/scratch
/working/build-mbm
Extensible-SDK Install: "/
scratch/sdk/mbm
Sources: "/scratch
/
src“
Poky: "
/scratch/poky"
Downloads: "/scratch
/
downloads"
Sstate-cache: "/scratch
/
sstate-cache"
QEMU/Toaster Install: 
"/
scratch/build
Y
o
u
 
w
i
l
l
 
b
e
 
u
s
i
n
g
 
S
S
H
 
t
o
 
c
o
m
m
u
n
i
c
a
t
e
 
w
i
t
h
 
y
o
u
r
 
v
i
r
t
u
a
l
 
s
e
r
v
e
r
.
Y
o
u
 
m
a
y
 
w
a
n
t
 
t
o
 
c
h
a
n
g
e
 
t
h
e
 
d
e
f
a
u
l
t
 
p
a
s
s
w
o
r
d
 
(
d
e
v
d
a
y
)
 
a
f
t
e
r
y
o
u
 
l
o
g
 
o
n
,
 
i
n
 
c
a
s
e
 
s
o
m
e
o
n
e
 
a
c
c
i
d
e
n
t
l
y
 
u
s
e
s
 
t
h
e
 
s
a
m
e
 
a
c
c
o
u
n
t
a
d
d
r
e
s
s
 
a
s
 
y
o
u
r
s
.
F
Y
I
:
 
H
o
s
t
 
S
e
t
u
p
 
G
o
t
c
h
a
s
Y
P
-
2
.
2
 
h
a
s
 
n
e
w
 
h
o
s
t
 
d
e
p
e
n
d
e
n
c
i
e
s
,
 
f
o
r
 
e
x
a
m
p
l
e
:
Y
P
-
2
.
2
 
P
y
t
h
o
n
 
3
 
a
l
s
o
 
h
a
s
 
s
o
m
e
 
d
e
p
e
n
d
e
n
c
i
e
s
.
If you see the error “
Please use a locale setting which supports
utf-8
”, then you need to update/set your locale
One way to do that is to add this to your “~/.bash_profile”
And run this for good measure:
$ sudo apt-get update
$ sudo apt-get install git-core diffstat unzip texinfo \
    gcc-multilib build-essential chrpath socat libsdl1.2-dev \
    
xterm 
sysstat python python3  xz-utils locales cpio
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
$ sudo locale-gen en_US.utf8
$ sudo dpkg-reconfigure locales      # choose en_US.utf8 as your default locale (~149)
F
Y
I
:
 
H
o
w
 
c
l
a
s
s
 
p
r
o
j
e
c
t
 
w
a
s
 
p
r
e
p
a
r
e
d
 
$ cd /scratch
$ git clone -b morty git://git.yoctoproject.org/poky.git
$ cd poky
$ git clone -b morty git://git.openembedded.org/meta-openembedded
$ git clone -b morty git://git.yoctoproject.org/meta-intel
$ cd /scratch/working
$ source /scratch/poky/oe-init-build-env  build-mbm
$ 
echo "MACHINE = \"intel-corei7-64\"" >> conf/local.conf
$ echo "SSTATE_DIR = \“/scratch/sstate-cache\"" >> conf/local.conf
$ echo "DL_DIR = \“/scratch/downloads\"" >> conf/local.conf
$ echo "IMAGE_INSTALL_append = \" gdbserver openssh libstdc++ \
       nodejs nodejs-npm curl \"" >> conf/local.conf
$ echo "BBLAYERS += \"
/scratch/poky
/meta-intel \"" \
       >> conf/bblayers.conf 
$ echo "BBLAYERS += \"
/scratch/poky
/meta-openembedded/meta-oe \"" \ 
       >> conf/bblayers.conf
$ bitbake core-image-base
$ bitbake nodejs-native
$ bitbake cmake-native
$ bitbake parted-native dosfstools-native mtools-native
F
Y
I
:
 
M
i
n
n
o
w
b
o
a
r
d
 
M
a
x
 
T
u
r
b
o
t
 
S
D
 
C
a
r
d
 
P
r
e
p
H
e
r
e
 
i
s
 
h
o
w
 
t
o
 
f
l
a
s
h
 
t
h
e
 
m
i
c
r
o
S
D
 
c
a
r
d
 
f
o
r
 
t
h
e
 
M
B
M
I
n
s
e
r
t
 
t
h
e
 
m
i
c
r
o
S
D
 
c
a
r
d
 
i
n
t
o
 
y
o
u
r
 
r
e
a
d
e
r
,
 
a
n
d
 
a
t
t
a
c
h
t
h
a
t
 
t
o
 
y
o
u
r
 
h
o
s
t
1.
Find the device number for the card (e.g. “/dev/sdc”). For
example run “dmesg | tail” to find the last attached device
2.
Unmount any existing partitions from the SD card (for
example “umount /media/<user>/boot”)
3.
Flash the image
$ sudo dd if=tmp/deploy/images/intel-corei7-64/core-
image-base-intel-corei7-64.hddimg 
of=<device_id> bs=1M
4.
On the host, right-click and eject the microSD card’s
filesystem so that the image is clean
F
Y
I
:
 
M
i
n
n
o
w
b
o
a
r
d
 
M
a
x
 
T
u
r
b
o
t
 
S
D
 
C
a
r
d
 
P
r
e
p
N
o
t
e
:
 
y
o
u
 
c
a
n
 
i
n
s
t
e
a
d
 
u
s
e
 
t
h
e
 
a
u
t
o
m
a
t
i
c
a
l
l
y
 
g
e
n
e
r
a
t
e
d
W
I
C
 
i
m
a
g
e
1.
Flash the image
$ sudo dd if=scratch/working/build-
mbm/tmp/deploy/images/intel-corei7-64/core-image-base-
intel-corei7-64.wic 
of=<device_id> bs=1M
2.
Note that when the target boots, the WIC version of the
image the kernel boot output does not appear on the serial
console. This means that after 14 seconds of a blank
screen you will then see the login prompt
N
O
T
E
:
 
C
l
e
a
n
 
S
h
e
l
l
s
!
W
e
 
a
r
e
 
g
o
i
n
g
 
t
o
 
d
o
 
a
 
l
o
t
 
o
f
 
d
i
f
f
e
r
e
n
t
 
e
x
e
r
c
i
s
e
s
 
i
n
d
i
f
f
e
r
e
n
t
 
b
u
i
l
d
 
p
r
o
j
e
c
t
s
,
 
e
a
c
h
 
w
i
t
h
 
t
h
e
i
r
 
o
w
n
e
n
v
i
r
o
n
m
e
n
t
s
.
T
o
 
k
e
e
p
 
t
h
i
n
g
s
 
s
a
n
e
,
 
y
o
u
 
s
h
o
u
l
d
 
h
a
v
e
 
a
 
n
e
w
 
c
l
e
a
n
s
h
e
l
l
 
f
o
r
 
e
a
c
h
 
e
x
e
r
c
i
s
e
.
T
h
e
r
e
 
a
r
e
 
t
w
o
 
s
i
m
p
l
e
 
w
a
y
s
 
t
o
 
d
o
 
i
t
:
1.
Close your existing SSH connection and open a new one
-- or –
2.
Do a “bash” before each exercise to get a new sub-shell,
and “exit” at the end to remove it, in order to return to a
pristine state.
undefined
A
c
t
i
v
i
t
y
 
F
o
u
r
W
I
C
E
d
u
a
r
d
 
B
a
r
t
o
s
h
,
 
D
a
v
i
d
 
R
e
y
n
a
W
I
C
:
 
O
p
e
n
 
E
m
b
e
d
d
e
d
 
I
m
a
g
e
 
C
r
e
a
t
i
o
n
Physical devices accept and boot images in various ways
depending on the specifics of the device. If your device
require multiple partitions on an SD card, flash, or an
HDD, you can use wic to create the properly partitioned
image.
The wic command generates partitioned images from
existing OpenEmbedded build artifacts.
Image generation is driven by partitioning commands
contained in an provided or custom Openembedded
kickstart file (.wks)
The wic was designed to be completely extensible through
a plug-in interface
W
I
C
:
 
R
e
q
u
i
r
e
m
e
n
t
s
You need to have the build artifacts already available, e.g.
created an image like "core-image-minimal"
You must build several native tools, which are tools built
to run on the build system:
 
$ bitbake parted-native dosfstools-native mtools-native
You must have sourced one of the build environment
setup scripts (i.e. oe-init-build-env or oe-init-build-env-
memres).
Do this now:
$ 
cd /scratch/working 
$
 
source ../poky/oe-init-build-env build-mbm
W
I
C
:
 
H
e
l
p
Wic is documented on-line here:
 
http://www.yoctoproject.org/docs/2.1/mega-
manual/mega-manual.html#creating-partitioned-images
You can get help from wic, where the available commands
and help topics
The wic help lists the available commands and help
topics, from which you can request deeper help
information
     $ wic help command
     $ wic help help_topic
$ 
wic -h
$
 
wic --help
W
I
C
:
 
H
e
l
p
 You can find out more about the images wic creates
using the existing kickstart files with the form
wic list
<image> help”
 where “<image>” is for example
"directdisk" or "mkefidisk“:
$
 
wic list mkefidisk help
Creates a partitioned EFI disk image that the user
can directly dd to boot media.
$
W
I
C
:
 
O
p
e
r
a
t
i
o
n
a
l
 
M
o
d
e
s
You can use wic in two different modes, depending on
how much control you need for specifying the
Openembedded build artifacts that are used for creating
the image: Raw and Cooked:
Raw Mode: You explicitly specify build artifacts through
command-line arguments.
Cooked Mode: The current MACHINE setting and image
name are used to automatically locate and provide the build
artifacts.
You do not need root privileges to run wic. In fact, you
should not run as root when using the utility.
W
I
C
:
 
C
o
o
k
e
d
 
M
o
d
e
The general form of the wic command using Cooked
Mode is:
     $ wic create 
kickstart_file
 -e 
image_name
kickstart_file
: An OpenEmbedded kickstart file. You can
provide your own custom file or supplied file.
image_name
: Specifies the image built using the
OpenEmbedded build system.
Example:
     $ wic create mkefidisk -e core-image-minimal
W
I
C
:
 
R
a
w
 
M
o
d
e
The general form of the 'wic' command in raw mode is:
$ wic create image_name.wks [options] [...]
W
h
e
r
e
:
i
m
a
g
e
_
n
a
m
e
.
w
k
s
 
(
A
n
 
O
p
e
n
E
m
b
e
d
d
e
d
 
k
i
c
k
s
t
a
r
t
 
f
i
l
e
)
-
o
 
O
U
T
D
I
R
,
 
-
-
o
u
t
d
i
r
=
O
U
T
D
I
R
-
e
 
I
M
A
G
E
_
N
A
M
E
,
 
-
-
i
m
a
g
e
-
n
a
m
e
=
I
M
A
G
E
_
N
A
M
E
-
r
 
R
O
O
T
F
S
_
D
I
R
,
 
-
-
r
o
o
t
f
s
-
d
i
r
=
R
O
O
T
F
S
_
D
I
R
-
b
 
B
O
O
T
I
M
G
_
D
I
R
,
 
-
-
b
o
o
t
i
m
g
-
d
i
r
=
B
O
O
T
I
M
G
_
D
I
R
-
k
 
K
E
R
N
E
L
_
D
I
R
,
 
-
-
k
e
r
n
e
l
-
d
i
r
=
K
E
R
N
E
L
_
D
I
R
-
n
 
N
A
T
I
V
E
_
S
Y
S
R
O
O
T
,
 
-
-
n
a
t
i
v
e
s
y
s
r
o
o
t
=
N
A
T
I
V
E
_
S
Y
S
R
O
O
T
-
s
,
 
-
-
s
k
i
p
-
b
u
i
l
d
-
c
h
e
c
k
-
D
,
 
-
-
d
e
b
u
g
Example:
$ wic create directdisk -r 
rootfs_dir 
-b 
bootimg_dir  
\
   --k 
kernel_dir
 -n 
native_sysroot
W
I
C
:
 
A
v
a
i
l
a
b
l
e
 
k
i
c
k
s
t
a
r
t
 
f
i
l
e
s
You can use wic to get a list of available kickstarts
$ 
wic list images
galileodisk-sd               Galileo Gen 1/2 disk image (SD card)
systemd-bootdisk-uuid        EFI disk image with systemd-boot
galileodisk-usb              Galileo Gen 1/2 disk image (USB storage)
systemd-bootdisk             EFI disk image with systemd-boot
directdisk                   'pcbios' direct disk image
directdisk-multi-rootfs      multi rootfs image using rootfs plugin
directdisk-bootloader-config 'pcbios' direct disk image with custom…
mkhybridiso                  hybrid ISO image
sdimage-bootpart             SD card image with a boot partition
mkgummidisk                  EFI disk image
directdisk-gpt               'pcbios' direct disk image
qemux86-directdisk           qemu machine 'pcbios' direct disk image
mkefidisk                    EFI disk image
$
W
I
C
:
 
E
x
a
m
p
l
e
 
K
i
c
k
s
t
a
r
t
 
F
i
l
e
Here is the “mkefidisk.wks” kickstart file
$ 
cat ../../
poky/scripts/lib/wic/canned-wks/mkefidisk.wks
# short-description: Create an EFI disk image
# long-description: Creates a partitioned EFI disk image that user
# can directly dd to boot media.
part /boot --source bootimg-efi --sourceparams="loader=grub-efi" \
   --ondisk sda --label msdos --active --align 1024
part / --source rootfs --ondisk sda --fstype=ext4 --label platform \
   --align 1024 --use-uuid
part swap --ondisk sda --size 44 --label swap1 --fstype=swap
bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 \
   console=ttyS0,115200 console=tty0“
$
W
I
C
:
 
U
s
i
n
g
 
W
I
C
 
f
o
r
 
M
i
n
n
o
w
B
o
a
r
d
 
M
a
x
$ 
wic create mkefidisk -e core-image-minimal
Checking basic build environment...
Done.
Creating image(s)...
Info: The new image(s) can be found here:
/var/tmp/wic/build/mkefidisk-201310230946-sda.direct
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-…
BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-…
KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/…
NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/…
The image(s) were created using OE kickstart file:
/home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
$ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct \
  of=/dev/sdb bs=1M
$ sudo eject /dev/sdb
W
I
C
:
 
C
u
s
t
o
m
 
K
i
c
k
s
t
a
r
t
 
F
i
l
e
s
You can create your own custom kickstart and easily have
wic find and use them. See the WIC documentation.
Existing kickstart files can be found here, and used as
templates:
     
poky/scripts/lib/wic/canned-wks
You can place your custom kickstart file with the canned
ones, or add it to your layer
Currently wic implementation only supports "partition" and
"bootloader“ (more to come). See also:
http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
W
I
C
:
 
P
l
u
g
-
i
n
s
Plug-ins allow wic functionality to be extended and
specialized by users.
Source plug-ins provide a mechanism to customize
various aspects of the image generation process in wic,
mainly the contents of partitions.
The plug-ins provide a mechanism for mapping values
specified in .wks files using the --source keyword to a
particular plugin implementation that populates a
corresponding partition.
Plug-ins can be included as part of your custom layer.
See the documentation for detailed information and
examples.
W
I
C
:
Wic files can be automatically generated by adding
WKS_FILE to your “local.conf”
New kickstart commands are being added by demand, for
example “include” and “config”
We invite you to add kickstart files to your BSP layers for
fast and easy OOB for your users
Lead Developer:
 
Bartosh, Eduard <eduard.bartosh@intel.com>
I
n
t
r
o
d
u
c
i
n
g
 
B
M
A
P
T
O
O
L
 
:
 
S
p
a
r
s
e
 
B
o
o
t
 
I
m
a
g
e
s
The new BMAPTOOL creates sparse images for fast image disk create (dd
copies all of the blank space)
The example usage of bmaptool is:
$ bitbake bmap-tools-native
$ native bmaptool –version
Documentation:
http://www.yoctoproject.org/docs/2.3/mega-manual/mega-manual.html#flashing-
images-using-bmaptool
Note: the “native” tool runs scipts in the project’s environment. It may get
rename to “oe-native”. Discussion about its name on the mailing list:
http://lists.openembedded.org/pipermail/openembedded-core/2016-
October/127161.html
Here is an info about bmap-tools Ubuntu package:
http://packages.ubuntu.com/xenial/bmap-tools
And about the tool itself:
https://github.com/01org/bmap-tools/tree/master/docs
undefined
A
c
t
i
v
i
t
y
 
F
i
v
e
U
s
e
r
s
p
a
c
e
:
 
A
d
v
a
n
c
e
d
 
T
o
p
i
c
s
R
u
d
i
 
S
t
r
e
i
f
W
h
a
t
 
W
e
 
A
r
e
 
G
o
i
n
g
 
T
o
 
D
o
Most of your development work will likely be developing your own
software packages, building them with the Yocto Project and installing
them into a root file system built with the Yocto Project.
Let’s look at some typical tasks beyond creating the base recipe:
Customizing Packaging
Package Installation Scripts
System Services
A
c
t
i
v
i
t
y
 
S
e
t
u
p
I
n
i
t
i
a
l
i
z
e
 
t
h
e
 
B
u
i
l
d
 
E
n
v
i
r
o
n
m
e
n
t
 
(
I
N
 
A
 
C
L
E
A
N
 
S
H
E
L
L
)
cd /scratch/working
source ../poky/oe-init-build-env build-userspace
Adjust Configuration (DONE FOR YOU)
vi conf/local.conf
Build (DONE FOR YOU)
bitbake -k core-image-minimal
T
e
s
t
runqemu qemux86-64 nographic
MACHINE = "qemux86-64"
DL_DIR ?= "/scratch/downloads"
SSTATE_DIR ?= "/scratch/sstate-cache"
EXTRA_IMAGE_FEATURES ?= "debug-tweaks dbg-pkgs dev-pkgs package-
management"
A
c
t
i
v
i
t
y
 
S
e
t
u
p
 
-
 
C
o
n
t
i
n
u
e
d
Create Layer
devtool create-workspace meta-uspapps
Copy Source Files
cd ..
cp -r /scratch/src/userspace/uspsrc .
P
a
c
k
a
g
i
n
g
Packaging is the process of putting artifacts from the build output into
one or more packages for installation by a package management
system.
Packaging is performed by the package management classes:
package_rpm
 – RPM style packages
package_deb
 – Debian style packages
package_ipk
 – IPK package files used by the OPK package manager
You configure the package management in 
conf/local.conf
:
You can add more than one of the package classes.
Only the first one will be used to create the root file system.
However, this does not install the package manager itself.
Install the  package manager in 
conf/local.conf
:
PACKAGE_CLASSES ?= "package_rpm"
EXTRA_IMAGE_FEATURES ?= "package-management"
P
a
c
k
a
g
e
 
S
p
l
i
t
t
i
n
g
Packaging Splitting is the process of putting artifacts from the build
output into different packages.
Package splitting allows you to select what you need to control the
footprint of your root file system.
Package splitting is controlled by the variables:
PACKAGES
 – list of package names, default:
FILES
 – list of directories and files that belong into the package:
PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc \
   ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
SOLIBS = "*.so.*“
FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* \
   ${libdir}/lib* {SOLIBS} ${sysconfdir} ${sharedstatedir} \
   ${localstatedir} ${base_bindir}/* ${base_sbindir}/* \
   ${base_libdir}/*${SOLIBS} ${base_prefix}/lib/udev/rules.d \
   ${prefix}/lib/udev/rules.d ${datadir}/${BPN}\
   ${libdir}/${BPN}/* ${datadir}/pixmaps \
   ${datadir}/applications ${datadir}/idl ${datadir}/omf \
   ${datadir}/sounds ${libdir}/bonobo/servers"
P
a
c
k
a
g
e
 
S
p
l
i
t
t
i
n
g
 
-
 
C
o
n
t
i
n
u
e
d
The package classes process the 
PACKAGES
 list from left to right,
producing the 
${PN}-dbg
 package first and the 
${PN}
 package last.
The order is important, since a package consumes the files that are
associated with it.
The 
${PN}
 package is pretty much the “kitchen sink”: it consumes all
standard leftover artifacts.
BitBake syntax only allows prepending (+=) or appending (=+) to
variables:
Prepend 
PACKAGES
 – place standard artifacts into different packages
Append 
PACKAGES
 – place any leftover packages in non-standard
installation directories those packages.
The variable 
PACKAGE_BEFORE_PN
 allows you to insert packages
right before the 
${PN}
 package is created.
P
a
c
k
a
g
i
n
g
 
Q
A
The insane class adds plausibility and error checking to the packaging
process.
You can find a list of the checks in the Reference Manual:
http://www.yoctoproject.org/docs/2.3/ref-manual/ref-manual.html#ref-classes-insane
Some of the more common ones:
already-stripped
 – debug symbols already stripped
installed-vs-shipped
 – checks for artifacts that have not been
packaged
l
dflags
 – checks if 
LDFLAGS
 for cross-linking has been passed
packages-list
 – same package has been listed multiple times in
PACKAGES
Sometimes the checks can get into your way…
INSANE_SKIP_<packagename> += “<check>”
Skips <check> for <packagename>.
E
x
a
m
p
l
e
 
 
T
h
e
 
F
i
b
o
n
a
c
c
i
 
L
i
b
r
a
r
y
Source code in /scratch/working/uspsrc/fibonacci-lib
Builds static and dynamic libraries to calculate the Fibonacci series and an
application to test it.
Create development environment
cd /scratch/working/build-userspace
devtool add fibonacci-lib /scratch/working/uspsrc/fibonacci-lib
Build the recipe
bitbake fibonacci-lib
Add to your image (conf/local.conf):
Build and test image
b
itbake core-image-minimal
runqemu qemux86-64 
nographic
IMAGE_INSTALL_append = " fibonacci"
E
x
a
m
p
l
e
 
 
T
h
e
 
F
i
b
o
n
a
c
c
i
 
L
i
b
r
a
r
y
 
(
c
o
n
t
i
n
u
e
d
)
Edit the recipe 
meta-uspapps/recipes/fibonacci-lib/fibonacci-lib.bb
and place the 
fibonacci
 test application into its own package 
${PN}-
examples
Add to your image (
conf/local.conf
):
Build and test image
bitbake core-image-minimal
runqemu qemux86-64 nographic
PACKAGE_BEFORE_PN = "${PN}-examples"
FILES_${PN}-examples = "${bindir}/fibonacci"
IMAGE_INSTALL_append = " libfibonacci libfibonacci-examples"
P
a
c
k
a
g
e
 
I
n
s
t
a
l
l
a
t
i
o
n
 
S
c
r
i
p
t
s
Package management systems have
the ability to run scripts before and
after a package is installed, upgraded,
or removed.
These are typically shell scripts and
they can be provided by the recipe
using these variables:
pkg_preinst_<packagename>
:
Preinstallation script that is run
before the package is installed
.
pkg_postinst_<packagename>
:
Postinstallation script that is run 
after
the package is installed
.
pkg_prerm_<packagename>
: Pre-
uninstallation script that is run 
before
the package is uninstalled
.
pkg_postrm_<packagename>
:
Post-uninstallation script that is run
after the package is uninstalled
.
pkg_postinst_${PN}() {
#!/bin/sh
# shell commands go here
}
pkg_postinst_${PN}() {
#!/bin/sh
if [ x"$D" = "x" ]; then
   # target execution
else
   # build system execution
fi
}
Conditional Execution
Script Skeleton
E
x
a
m
p
l
e
 
 
C
o
n
d
i
t
i
o
n
a
l
l
y
 
r
u
n
n
i
n
g
 
l
d
c
o
n
f
i
g
The Fibonacci library installs a dynamic library 
libfibonacci.so.1.0
on the target system in 
/usr/lib
.
For 
ld
 to be able to locate the library it must be added to the ld cache
and its symbolic name (soname) must be linked. That is done by
running 
ldconfig
 on the target.
Add a post installation script to the 
${PN}
 package that only runs
ldconfig
 when it is run on the target but not when the build system
creates the root file system.
pkg_postinst_${PN}() {
#!/bin/sh
if [ x"$D" = "x" ]; then
   # target execution
   ldconfig
   exit 0
else
   # build system execution
   exit 1
fi
}
I
n
s
t
a
l
l
a
t
i
o
n
 
f
o
r
 
P
a
c
k
a
g
i
n
g
Makefile Installation
Recipe Installation
P
roviding/overriding the do_install task
The build system defines a series of variables for convenience:
 
bindir = 
"
/usr/bin
"
 
sbindir = 
"
/usr/sbin
"
 
libdir = 
"
/usr/lib
"
 
libexe
cdir = 
"
/usr/lib
"
do_install() {
   install –d ${D}${bindir}
   install –m 0755 ${B}/bin/* ${D}{bindir}
}
sysconfdir = 
"
/etc/
"
datadir = 
"
/usr/share
"
mandir = 
"
/use/share/man
"
includedir = 
"
/usr/include
"
INSTALL ?= install
.PHONY: install
Install:
 
$(INSTALL) -d $(DESTDIR)/usr/bin
 
$(INSTALL) -m 0755 $(TARGET) $(DESTDIR)/usr/bin
D
e
b
u
g
g
i
n
g
 
P
a
c
k
a
g
i
n
g
Check the packaging logfiles in 
${WORKDIR}/temp
Check installation of artifacts in 
${WORKDIR}/image
The do_install task installs the artifacts into this directory.
If artifacts are missing they are 
packaged.
Check packaging artifacts in 
${WORKDIR}/package
This where the artifacts are staged for packaging, including the ones
created for the debug packages.
Check package splitting in 
${WORKDIR}/packages-split
Packages and their content are staged here by package name before they
are wrapped by the package manager.
Allows you to verify if the artifacts have indeed been placed into the
correct package.
Check created packages in 
${WORKDIR}/deploy-<pkgmgr>
P
a
c
k
a
g
e
 
A
r
c
h
i
t
e
c
t
u
r
e
The build system distinguishes packages by their hardware
dependencies into three main categories:
Tune – Generic CPU architecture such as core2_32, corei7, armv7, etc.
This is the default and typically appropriate for userspace packages.
Machine – Specific machine architecture. Appropriate for packages that
require particular hardware features of a machine. 
Typically
 applicable to
kernel, drivers, and bootloader.
All – Package applies to all architectures such as shell scripts, managed
runtime code (Python, Lua, Java, …), configuration files, etc.
Package architecture is controlled by the 
PACKAGE_ARCH
 variable:
Tune (default) – 
PACKAGE_ARCH = “${TUNE_PKGARCH}”
Machine – 
PACKAGE_ARCH = “${MACHINE_ARCH}”
All – 
inherit allarch
Note: Package architecture does not simply determine into what
category a package is placed but determines compiler and linker flags
and other build options.
S
y
s
t
e
m
 
S
e
r
v
i
c
e
s
If your software package is a system service that eventually needs to be
started when the system boots you need to add the scripts and service
files.
S
y
s
V
I
n
i
t
Inherit 
update-rc.d
 class.
INITSCRIPT_PACKAGES
 - List of packages that contain the init scripts for this
software package. This variable is optional and defaults to
INITSCRIPT_PACKAGES = "${PN}"
.
INITSCRIPT_NAME
 - The name of the init script.
INITSCRIPT_PARAMS
 - The parameters passed to 
update-rc.d
. This can be
a string such as 
"defaults 80 20"
 to start the service when entering run
levels 2, 3, 4, and 5 and stop it from entering run levels 0, 1, and 6.
S
y
s
t
e
m
d
Inherit 
systemd
 class.
SYSTEMD_PACKAGES
 - List of packages that contain the systemd service files
for the software package. This variable is optional and defaults to
SYSTEMD_PACKAGES = "${PN}"
.
SYSTEMD_SERVICE
 - The name of the service file.
E
x
a
m
p
l
e
 
 
T
h
e
 
F
i
b
o
n
a
c
c
i
 
S
e
r
v
e
r
Source code in /scratch/working/uspsrc/fibonacci-srv
Builds a TCP socket server listening on port 9999 for the number of terms and responds with the
list of Fibonacci terms.
Create development environment
cd /scratch/working/build-userspace
devtool add fibonacci-srv /scratch/working/uspsrc/fibonacci-srv
Add system service startup to the recipe
meta-uspapps/recipes/fibonacci-srv/fibonacci-srv.bb
 
Build the recipe
bitbake fibonacci-lib
Add to your image (conf/local.conf):
Build and test image
b
itbake core-image-minimal
runqemu qemux86-64 
nographic
nc localhost 9999
IMAGE_INSTALL_append = " fibonacci-srv"
inherit update-rc.d systemd
INITSCRIPT_NAME = "fibonacci-srv"
INITSCRIPT_PARAMS = "start 99 3 5 . stop 20 0 1 2 6 ."
SYSTEMD_SERVICE = "fibonacci-srv.service"
C
h
a
n
g
i
n
g
 
t
h
e
 
S
y
s
t
e
m
 
M
a
n
a
g
e
r
SysVInit is the default system manager for the Poky
distribution.
To use systemd add it to your 
conf/local.conf
 file, or
better, to your distribution configuration:
If you exclusively want to use systemd, you can remove
SysVInit from you root file system image with:
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""
undefined
A
c
t
i
v
i
t
y
 
S
i
x
B
o
a
r
d
 
B
r
i
n
g
-
u
p
D
a
v
i
d
 
R
e
y
n
a
B
o
a
r
d
 
B
r
i
n
g
-
u
p
Setting up the board connections
1.
Unpack the target
2.
Insert the provided micro-SD card (pin side up)
3.
Attach the ethernet cable from the target to the hub
4.
A
t
t
a
c
h
 
t
h
e
 
F
T
D
I
 
6
-
p
i
n
 
c
o
n
n
e
c
t
o
r
.
 
T
h
e
 
B
L
A
C
K
 
w
i
r
e
 
i
s
 
o
n
 
p
i
n
 
1
,
 
w
h
i
c
h
h
a
s
 
a
n
 
a
r
r
o
w
 
o
n
 
t
h
e
 
s
i
l
k
-
m
a
s
k
 
a
n
d
 
i
s
 
o
n
 
t
h
e
 
c
e
n
t
e
r
-
s
i
d
e
 
o
f
 
t
h
e
 
6
-
p
i
n
 
i
n
l
i
n
e
c
o
n
n
e
c
t
o
r
 
n
e
a
r
 
t
h
e
 
m
i
c
r
o
S
D
 
c
o
n
n
e
c
t
o
r
5.
Connect the FTDI USB connector to your host
(Note: the USB serial connection will appear on your host as soon as the FTDI
cable is connected, regardless if the target is powered)
Start your host’s console for the USB serial console connection
On Linux, you can use the screen command, using your host’s added
serial device (for example “/dev/ttyUSB0):
$ 
screen /dev/ttyUSB0 115200,cs8
 
 
     
(FYI: “CTRL-A k” to kill/quit)
On Windows, you can use an application like “Teraterm”, set the serial
connection to the latest port (e.g. “COM23”), and set the baud rate to
115200 (“Setup > Serial Port… > Baud Rate…”)
B
o
a
r
d
 
B
r
i
n
g
-
u
p
 
(
2
)
Start the board
1.
Connect the +5 Volt power supply to the target
2.
You should see the board’s EFI boot information appear in your host’s
serial console
Run these commands to boot the kernel
Shell> 
connect -r
Shell> 
map -r
Shell> 
fs0:
Shell> 
bootx64
You should now see the kernel boot
A
t
 
t
h
e
 
l
o
g
i
n
 
p
r
o
m
p
t
,
 
e
n
t
e
r
 
r
o
o
t
Note: see the appendix on instructions on how we create the microSD card images
undefined
A
c
t
i
v
i
t
y
 
S
e
v
e
n
D
e
v
t
o
o
l
 
a
n
d
 
E
x
t
e
n
s
i
b
l
e
 
S
D
K
s
S
e
a
n
 
H
u
d
s
o
n
D
e
v
t
o
o
l
 
a
n
d
 
e
S
D
K
s
 
 
O
v
e
r
v
i
e
w
 
T
h
e
 
d
e
v
t
o
o
l
 
i
s
 
a
 
c
o
l
l
e
c
t
i
o
n
 
o
f
 
t
o
o
l
s
 
t
o
 
h
e
l
p
 
d
e
v
e
l
o
p
m
e
n
t
,
 
i
n
p
a
r
t
i
c
u
l
a
r
 
u
s
e
r
 
s
p
a
c
e
 
d
e
v
e
l
o
p
m
e
n
t
.
I
t
 
u
s
e
s
 
a
 
l
o
c
a
l
 
d
i
r
e
c
t
o
r
y
 
c
a
l
l
e
d
 
w
o
r
k
s
p
a
c
e
 
t
o
 
h
o
l
d
 
i
t
s
 
l
o
c
a
l
 
a
n
d
c
u
s
t
o
m
 
c
o
n
t
e
n
t
I
t
 
s
u
p
p
o
r
t
s
 
f
o
r
 
e
x
a
m
p
l
e
:
Importing applications and creating wrapper recipe files and then packing the
results Patching existing packages Devtool supports both projects and eSDKs.
We will be focusing on eSDKs in this presentation.
T
h
e
 
E
x
t
e
n
s
i
b
l
e
 
S
D
K
 
(
e
S
D
K
)
 
i
s
 
a
 
p
o
r
t
a
b
l
e
 
a
n
d
 
s
t
a
n
d
a
l
o
n
e
d
e
v
e
l
o
p
m
e
n
t
 
e
n
v
i
r
o
n
m
e
n
t
 
,
 
b
a
s
i
c
a
l
l
y
 
a
n
 
S
D
K
 
w
i
t
h
 
a
n
 
a
d
d
e
d
 
b
i
t
b
a
k
e
e
x
e
c
u
t
i
v
e
 
v
i
a
 
d
e
v
t
o
o
l
.
e
S
D
K
s
 
r
u
n
 
o
n
 
L
i
n
u
x
 
h
o
s
t
s
.
 
T
h
e
y
 
d
o
 
n
o
t
 
r
u
n
 
o
n
 
W
i
n
d
o
w
s
 
(
u
n
l
e
s
s
 
y
o
u
u
s
e
 
t
h
e
 
O
E
 
C
R
O
P
S
 
c
o
n
t
a
i
n
e
r
 
t
e
c
h
n
o
l
o
g
y
)
.
N
O
T
E
:
 
b
e
 
c
a
r
e
f
u
l
 
n
o
t
 
t
o
 
m
i
x
 
t
h
e
 
s
h
e
l
l
 
e
n
v
i
r
o
n
m
e
n
t
s
 
o
f
 
t
h
e
 
e
S
D
K
 
a
n
d
 
t
h
e
 
p
r
o
j
e
c
t
,
e
l
s
e
 
u
n
p
r
e
d
i
c
t
a
b
l
e
 
b
e
h
a
v
i
o
r
 
w
i
l
l
 
d
e
f
i
n
i
t
e
l
y
 
o
c
c
u
r
.
D
e
v
t
o
o
l
 
-
 
A
 
t
o
o
l
 
f
o
r
 
t
h
e
 
a
p
p
l
i
c
a
t
i
o
n
 
d
e
v
e
l
o
p
e
r
 
B
e
f
o
r
e
 
d
e
v
t
o
o
l
,
 
d
e
v
e
l
o
p
e
r
 
t
e
a
m
s
 
w
r
i
t
i
n
g
 
n
e
w
 
a
p
p
l
i
c
a
t
i
o
n
s
 
h
a
d
 
t
h
e
f
o
l
l
o
w
i
n
g
 
o
p
t
i
o
n
s
:
1) Use build engineer’s setup & write new recipe & use bitbake to rebuild
image
Drawbacks
:
push changes to repo each iteration
Long build times for image rebuilds
 
2) Use build engineer provided sdk/toolchain
Drawbacks
:
Difficult to update the sdk if app is library or depends on lib in
development - may require multiple sdk updates per day
Doesn’t work for testing distro changes (like systemd-related work)
Can’t easily create/test the updated package as built by build engineer
3
)
 
U
s
e
 
e
x
t
e
r
n
a
l
s
r
c
 
t
o
 
w
o
r
k
 
i
n
 
o
w
n
 
s
a
n
d
b
o
x
,
 
b
u
i
l
d
i
n
g
 
w
i
t
h
 
r
e
c
i
p
e
s
Drawbacks
:
D
i
f
f
i
c
u
l
t
 
t
o
 
g
e
t
 
a
l
l
 
t
h
e
 
d
e
t
a
i
l
s
 
r
i
g
h
t
 
U
N
T
I
L
 
d
e
v
t
o
o
l
D
e
v
t
o
o
l
 
-
 
B
a
k
i
n
g
 
i
n
 
a
 
s
a
n
d
b
o
x
 
C
l
a
s
s
 
w
i
l
l
 
c
o
v
e
r
 
t
h
e
s
e
 
u
s
e
 
c
a
s
e
s
 
f
o
r
 
d
e
v
t
o
o
l
S
e
t
u
p
 
u
s
i
n
g
 
a
n
 
e
x
t
e
n
s
i
b
l
e
 
S
D
K
D
e
v
e
l
o
p
m
e
n
t
 
c
y
c
l
e
 
w
i
t
h
 
a
 
n
e
w
 
r
e
c
i
p
e
Create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c
k
a
g
e
s
A
d
v
a
n
c
e
d
:
 
 
 
 
 
 
 
 
 
c
r
e
a
t
e
-
w
o
r
k
s
p
a
c
e
 
 
 
 
 
S
e
t
 
u
p
 
w
o
r
k
s
p
a
c
e
 
i
n
 
a
n
 
a
l
t
e
r
n
a
t
i
v
e
 
l
o
c
a
t
i
o
n
 
 
 
 
 
 
 
 
 
e
x
t
r
a
c
t
 
 
 
 
 
 
 
 
 
 
 
 
 
 
E
x
t
r
a
c
t
 
t
h
e
 
s
o
u
r
c
e
 
f
o
r
 
a
n
 
e
x
i
s
t
i
n
g
 
r
e
c
i
p
e
 
 
 
 
 
 
 
 
 
s
y
n
c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
S
y
n
c
h
r
o
n
i
z
e
 
t
h
e
 
s
o
u
r
c
e
 
t
r
e
e
 
f
o
r
 
a
n
 
e
x
i
s
t
i
n
g
 
r
e
c
i
p
e
D
e
v
t
o
o
l
 
 
S
t
a
r
t
i
n
g
 
t
h
e
 
E
x
t
e
n
s
i
b
l
e
 
S
D
K
 
S
t
a
r
t
 
a
 
n
e
w
 
S
h
e
l
l
!
 
O
t
h
e
r
w
i
s
e
,
 
t
h
e
 
e
x
i
s
t
i
n
g
 
b
i
t
b
a
k
e
e
n
v
i
r
o
n
m
e
n
t
 
c
a
n
 
c
a
u
s
e
 
u
n
e
x
p
e
c
t
e
d
 
r
e
s
u
l
t
s
<
o
p
e
n
 
n
e
w
 
c
l
e
a
n
 
s
h
e
l
l
>
$
 
c
d
 
/
s
c
r
a
t
c
h
/
s
d
k
/
q
e
m
u
Source the devtool build environment
    
$ . environment-setup-corei7-64-poky-linux
Note that we have a kernel and a rootfs
$ pushd tmp/deploy/images/intel-corei7-64
$ ls *qemux86-64.ext4 *qemux86-64.bin
core-image-base-intel-corei7-64.ext4
$ popd
Note: you can use devtool to re-build the rootfs (it was pre-
built for you)
$ devtool build-image core-image-base
F
Y
I
:
 
D
e
v
t
o
o
l
 
Q
E
M
U
 
E
x
t
e
n
s
i
b
l
e
 
S
D
K
 
H
e
r
e
 
a
r
e
 
i
n
s
t
r
u
c
t
i
o
n
s
 
f
o
r
 
Q
E
M
U
 
i
f
 
y
o
u
r
 
b
o
a
r
d
 
i
s
 
n
o
t
 
r
u
n
n
i
n
g
S
t
a
r
t
 
a
 
n
e
w
 
S
h
e
l
l
!
 
O
t
h
e
r
w
i
s
e
,
 
t
h
e
 
e
x
i
s
t
i
n
g
 
b
i
t
b
a
k
e
 
e
n
v
i
r
o
n
m
e
n
t
 
c
a
n
c
a
u
s
e
 
u
n
e
x
p
e
c
t
e
d
 
r
e
s
u
l
t
s
<
o
p
e
n
 
n
e
w
 
c
l
e
a
n
 
s
h
e
l
l
>
$
 
c
d
 
/
s
c
r
a
t
c
h
/
s
d
k
/
q
e
m
u
Source the devtool build environment
    
$ . environment-setup-core2-64-poky-linux
Note that we have a kernel and a rootfs:
$ pushd tmp/deploy/images/qemux86-64
bzImage-qemux86-64.bin
core-image-base-qemux86-64.ext4
$ popd
Note: you can use devtool to re-build the rootfs (it was pre-built for
you)
$ devtool build-image core-image-base
G
e
n
e
r
a
l
 
D
e
v
t
o
o
l
 
D
e
v
e
l
o
p
m
e
n
t
 
C
y
c
l
e
 
1
.
 
A
d
d
 
a
p
p
l
i
c
a
t
i
o
n
 
t
o
 
w
o
r
k
s
p
a
c
e
:
devtool add [--version xxx] 
myapp /path/to/source
2
.
 
B
u
i
l
d
 
i
t
:
devtool build 
myapp
3
.
 
W
r
i
t
e
 
t
o
 
t
a
r
g
e
t
 
d
e
v
i
c
e
 
(
w
/
n
e
t
w
o
r
k
 
a
c
c
e
s
s
)
:
devtool deploy-target 
myapp root@ipaddr
4
.
 
E
d
i
t
 
s
o
u
r
c
e
 
c
o
d
e
 
&
 
r
e
p
e
a
t
 
s
t
e
p
s
 
2
-
3
 
a
s
 
n
e
c
e
s
s
a
r
y
D
e
v
t
o
o
l
 
-
 
h
o
o
k
i
n
g
 
y
o
u
r
 
a
p
p
l
i
c
a
t
i
o
n
 
i
n
t
o
 
t
h
e
 
b
u
i
l
d
 
R
u
n
 
t
h
e
 
d
e
v
t
o
o
l
 
a
d
d
 
r
e
c
i
p
e
-
n
a
m
e
 
/
p
a
t
h
/
t
o
/
s
o
u
r
c
e
  
$ devtool add --version 1.0 bballs \
            /scratch/src/devtool_example/bballs
 
This generates a minimal recipe in the workspace layer
This adds EXTERNALSRC in an
workspace/appends/bballs_1.0.bbappend file that points to
the source
In other words, the source tree stays where it is, devtool just
creates a wrapper recipe that points to it
N
o
t
e
:
 
t
h
i
s
 
d
o
e
s
 
n
o
t
 
a
d
d
 
y
o
u
r
 
i
m
a
g
e
 
t
o
 
t
h
e
 
o
r
i
g
i
n
a
l
 
b
u
i
l
d
 
e
n
g
i
n
e
e
r
s
i
m
a
g
e
,
 
w
h
i
c
h
 
r
e
q
u
i
r
e
s
 
c
h
a
n
g
i
n
g
 
t
h
e
 
p
l
a
t
f
o
r
m
 
p
r
o
j
e
c
t
s
c
o
n
f
/
l
o
c
a
l
.
c
o
n
f
A
f
t
e
r
 
t
h
e
 
a
d
d
B
u
i
l
d
 
f
i
l
e
s
 
i
n
 
t
h
e
 
s
d
k
 
d
i
r
e
c
t
o
r
y
qemu> ls –FC
buildtools
cache
conf
devtool_example.tar
downloads
environment-setup-core2-64-wrs-
linux
environment-setup-x86-wrsmllib32-
linux
layers
preparing_build_system.log
README_templates
site-config-core2-64-wrs-linux
site-config-x86-wrsmllib32-linux
sstate-cache
sysroots
tmp
version-core2-64-wrs-linux
version-x86-wrsmllib32-linux
workspace
W
o
r
k
s
p
a
c
e
 
l
a
y
e
r
 
l
a
y
o
u
t
qemu> tree workspace
.
├── appends
│   └── bballs_1.0.bbappend
├── conf
│   └── layer.conf
├── README
└── recipes
    └── bballs
        └── bballs_1.0.bb
4 directories, 4 files
D
e
v
t
o
o
l
 
-
 
e
d
i
t
 
r
e
c
i
p
e
 
E
d
i
t
 
t
h
e
 
d
e
f
a
u
l
t
 
w
o
r
k
s
p
a
c
e
 
r
e
c
i
p
e
$ vi workspace/recipes/bballs/bballs_1.0.bb
 
do_install () {
     # NOTE: unable to determine what to put here
     # - there is a Makefile but no target named
     # "install", so you will need to define this
     # yourself
-    :
+    install -d ${D}${bindir}
+    install -m 0755 bballs ${D}${bindir}
 }
 
B
u
i
l
d
 
t
h
e
 
a
p
p
l
i
c
a
t
i
o
n
$ devtool build bballs
D
e
v
t
o
o
l
 
-
 
b
u
i
l
d
/
d
e
p
l
o
y
/
r
u
n
 
a
p
p
 
Q
E
M
U
 
U
S
E
R
S
:
 
I
n
 
a
 
s
e
p
a
r
a
t
e
 
s
h
e
l
l
,
 
s
o
u
r
c
e
 
t
h
e
 
e
S
D
K
 
e
n
v
i
r
o
n
m
e
n
t
 
a
n
d
 
r
u
n
q
e
m
u
 
(
t
h
i
s
 
w
i
l
l
 
b
e
 
y
o
u
r
 
t
a
r
g
e
t
 
t
e
r
m
i
n
a
l
)
<open new clean shell>
$ . environment-setup-corei7-64-poky-linux
$ devtool runqemu nographic
G
e
t
 
t
h
e
 
t
a
r
g
e
t
s
 
I
P
 
a
d
d
r
e
s
s
 
f
r
o
m
 
t
h
e
 
t
a
r
g
e
t
 
s
e
r
i
a
l
 
c
o
n
s
o
l
e
r
o
o
t
@
i
n
t
e
l
-
c
o
r
e
i
7
-
6
4
:
~
#
 
i
f
c
o
n
f
i
g
I
n
 
t
h
e
 
e
S
D
K
 
s
h
e
l
l
,
 
d
e
p
l
o
y
 
t
h
e
 
o
u
t
p
u
t
 
(
t
h
e
 
t
a
r
g
e
t
s
 
i
p
 
a
d
d
r
e
s
s
 
m
a
y
 
c
h
a
n
g
e
)
$ devtool deploy-target -s bballs root@<target_ip>
NOTE: the ‘-s’ option will note any ssh keygen issues, allowing you to (for example) remove/add
this IP address to the known hosts table
I
n
 
t
h
e
 
t
a
r
g
e
t
 
s
h
e
l
l
,
 
r
u
n
 
a
p
p
l
i
c
a
t
i
o
n
,
 
a
n
d
 
o
b
s
e
r
v
e
 
t
h
e
 
d
i
s
p
l
a
y
 
(
2
+
2
+
2
 
b
o
u
n
c
i
n
g
b
a
l
l
s
)
# /usr/bin/bballs
S
t
o
p
 
t
h
e
 
a
p
p
l
i
c
a
t
i
o
n
 
w
i
t
h
 
C
T
R
L
-
C
D
e
v
t
o
o
l
 
R
u
n
 
A
p
p
l
i
c
a
t
i
o
n
R
u
n
 
a
p
p
l
i
c
a
t
i
o
n
 
o
n
 
t
a
r
g
e
t
 
(
C
T
L
R
-
C
 
t
o
 
e
x
i
t
)
root@
intel-corei7-64
:~# 
bballs
^^^^^^^^^^^^^^^^
|              |
|              |
|          <   |
|<        b    |
| *            |
|    b         |
| *            |
|              |
^^^^^^^^^^^^^^^^
^C
root@
intel-corei7-64
:~#
D
e
v
t
o
o
l
 
-
 
i
t
e
r
a
t
e
 
I
t
e
r
a
t
e
 
edit source file to instantiate more balls
$ vi
 
/tmp/devtool_example/bballs/b_main.cpp
-int num_hard = 2;
-int num_soft = 2;
-int num_spin = 2;
+int num_hard = 5;
+int num_soft = 5;
+int num_spin = 5;
…rebuild, redploy, retest, see more stuff bouncing!
 
$ 
devtool build bballs
 
$ 
devtool deploy-target bballs root@192.168.7.2
D
e
v
t
o
o
l
 
R
u
n
 
U
p
d
a
t
e
d
 
A
p
p
l
i
c
a
t
i
o
n
R
e
-
r
u
n
 
a
p
p
l
i
c
a
t
i
o
n
 
o
n
 
t
a
r
g
e
t
 
(
C
T
L
R
-
C
 
t
o
 
e
x
i
t
)
root@
intel-corei7-64
:~# 
bballs
^^^^^^^^^^^^^^^^
| b      b     |
| *            |
|*   < b * *<  |
|            < |
|      <       |
|  *        b  |
|              |
|    b         <
^^^^^^^^^^^^^^^^
^C
root@
intel-corei7-64
:~#
d
e
v
t
o
o
l
 
-
 
s
a
n
d
b
o
x
-
t
o
-
r
e
p
o
 
Y
o
u
 
c
a
n
 
u
s
e
 
m
o
d
i
f
y
 
a
n
d
 
u
p
d
a
t
e
-
r
e
c
i
p
e
 
t
o
 
w
o
r
k
 
w
i
t
h
 
s
o
u
r
c
e
 
i
n
y
o
u
r
 
s
a
n
d
b
o
x
,
 
a
n
d
 
u
p
d
a
t
e
 
t
h
e
 
s
d
k
/
g
i
t
-
r
e
p
o
 
r
e
c
i
p
e
 
a
s
 
a
p
a
t
c
h
/
s
r
c
r
e
v
devtool modify -x ... : extract source from for a recipe in a layer,
into your sandbox
iterate: modify source in sandbox, build , deploy,  test
devtool update-recipe...  create a patch to the eSDK or commit to
the source git repo
NOTE: the source for the existing package ‘which’ (and all the
other packages) was 
included
 in eSDK, and that is why we can
directly edit and compile it. In this case we are going to 
sandbox
those changes in a separate location.
d
e
v
t
o
o
l
 
m
o
d
i
f
y
:
 
E
x
t
r
a
c
t
 
s
o
u
r
c
e
 
a
n
d
 
m
o
d
i
f
y
 
(
N
O
T
E
:
 
I
f
 
y
o
u
 
d
o
 
n
o
t
 
h
a
v
e
 
g
i
t
 
c
o
n
f
i
g
u
r
e
d
 
f
o
r
 
y
o
u
r
 
h
o
s
t
,
 
p
r
e
s
e
t
 
s
o
m
e
 
v
a
l
u
e
s
 
n
o
w
)
$ git config --global user.email 
JoeSmith@nowhere.com
$ git config --global user.name  "Joe Smith"
R
u
n
 
t
h
e
 
d
e
v
t
o
o
l
 
c
o
m
m
a
n
d
 
t
o
 
e
x
t
r
a
c
t
 
s
r
c
 
a
n
d
 
s
e
t
u
p
 
s
a
n
d
b
o
x
$ devtool modify -x which 
/scratch/src/devtool_example
/which
 
M
o
d
i
f
y
 
t
h
e
 
p
a
c
k
a
g
e
 
s
o
u
r
c
e
 
i
n
 
y
o
u
r
 
s
a
n
d
b
o
x
 
(
l
i
n
e
 
4
5
9
)
$ vi 
/scratch/src/devtool_example
/which/which.c
    
- print_usage(stdout);
    
+ printf("hello class!\n");
O
n
 
h
o
s
t
,
 
r
e
b
u
i
l
d
 
t
h
e
 
p
a
c
k
a
g
e
 
a
n
d
 
d
e
p
l
o
y
 
i
t
$ devtool build which
$ devtool deploy-target which root@192.168.7.2
O
n
 
t
a
r
g
e
t
,
 
d
e
m
o
n
s
t
r
a
t
e
 
t
h
e
 
c
h
a
n
g
e
root@
intel-corei7-64
:~
# 
which --help
Hello class
root@
intel-corei7-64
:~
#
 
d
e
v
t
o
o
l
 
u
p
d
a
t
e
-
r
e
c
i
p
e
 
:
 
P
u
s
h
 
c
h
a
n
g
e
s
 
b
a
c
k
 
t
o
e
S
D
K
s
 
r
e
p
o
s
i
t
o
r
y
 
l
a
y
e
r
 
I
n
 
y
o
u
r
 
s
a
n
d
b
o
x
,
 
c
o
m
m
i
t
 
t
h
e
 
c
h
a
n
g
e
 
f
o
r
 
t
h
e
 
t
i
p
 
o
f
 
t
h
e
 
r
e
v
$ pushd 
/scratch/src/devtool_example
/which
$ git add which.c
$ git commit -m "changes for 
class"
$ popd
U
p
d
a
t
e
-
r
e
c
i
p
e
 
t
o
 
m
o
d
i
f
y
 
t
h
e
 
r
e
c
i
p
e
 
i
n
 
t
h
e
 
e
S
D
K
,
 
k
e
e
p
i
n
g
 
e
x
i
s
t
i
n
g
p
a
t
c
h
e
s
$ devtool update-recipe -n which
V
e
r
i
f
y
 
t
h
a
t
 
t
h
e
 
e
S
D
K
 
h
a
s
 
b
e
e
n
 
u
p
d
a
t
e
d
 
w
i
t
h
 
t
h
e
 
p
a
t
c
h
   
$ grep changes-for-class $(find . -name "which*bb")
./layers/oe-core/meta/recipes-extended/which/which_2.21.bb:
file://0001-changes-for-class.patch \
$ find . -name 0001-changes-for-class.patch
./layers/oe-core/meta/recipes-extended/which/which-2.21/0001-
changes-for-class.patch
N
O
T
E
:
 
I
f
 
y
o
u
 
r
e
s
e
t
 
t
h
e
 
r
e
c
i
p
e
,
 
e
x
t
r
a
c
t
 
w
h
i
c
h
 
a
g
a
i
n
,
 
y
o
u
 
w
i
l
l
 
s
e
e
 
t
h
e
 
c
h
a
n
g
e
 
(
b
u
t
e
x
t
r
a
c
t
 
t
o
 
n
e
w
 
l
o
c
a
t
i
o
n
)
d
e
v
t
o
o
l
 
-
 
A
 
f
e
w
 
m
o
r
e
 
c
o
m
m
a
n
d
s
 
W
e
v
e
 
s
h
o
w
n
 
u
s
a
g
e
 
f
o
r
 
s
u
b
-
c
o
m
m
a
n
d
s
 
a
d
d
,
 
m
o
d
i
f
y
,
 
b
u
i
l
d
,
 
 
d
e
p
l
o
y
-
t
a
r
g
e
t
 
(
i
m
p
l
i
c
i
t
l
y
 
u
n
d
e
p
l
o
y
-
t
a
r
g
e
t
)
,
 
r
u
n
q
e
m
u
d
e
v
t
o
o
l
 
s
t
a
t
u
s
:
 
s
h
o
w
s
 
s
t
a
t
u
s
 
o
f
 
w
o
r
k
s
p
a
c
e
$ devtool status
bballs: 
/scratch/src
/devtool_example/bballs
(/scratch/sdk/mbm/workspace/recipes/bballs/bballs_1.0.bb)
which: /
scratch/src
/devtool_example/which
d
e
v
t
o
o
l
 
p
a
c
k
a
g
e
 
<
r
e
c
i
p
e
>
:
 
c
r
e
a
t
e
s
 
i
n
s
t
a
l
l
a
b
l
e
 
p
a
c
k
a
g
e
s
 
f
o
r
 
a
 
r
e
c
i
p
e
$ devtool package bballs
...
NOTE: Your packages are in /…
/
tmp/deploy/rpm
$ pushd tmp/deploy/rpm
$ ls */*bball*
core2_64/bballs-1.0-r0.core2_64.rpm
core2_64/bballs-dbg-1.0-r0.core2_64.rpm
core2_64/bballs-dev-1.0-r0.core2_64.rpm
$ popd
D
e
v
t
o
o
l
 
-
 
A
 
f
e
w
 
m
o
r
e
 
c
o
m
m
a
n
d
s
 
d
e
v
t
o
o
l
 
r
e
s
e
t
 
<
r
e
c
i
p
e
>
:
 
r
e
m
o
v
e
s
 
a
 
r
e
c
i
p
e
 
f
r
o
m
 
t
h
e
w
o
r
k
s
p
a
c
e
,
 
b
u
t
 
n
o
t
 
t
h
e
 
s
o
u
r
c
e
 
t
r
e
e
d
e
v
t
o
o
l
 
e
x
t
r
a
c
t
 
<
r
e
c
i
p
e
>
 
<
d
e
s
t
-
s
r
c
-
t
r
e
e
>
:
 
 
e
x
t
r
a
c
t
s
 
a
r
e
c
i
p
e
s
 
s
o
u
r
c
e
 
f
i
l
e
s
 
t
o
 
a
 
s
o
u
r
c
e
 
t
r
e
e
,
 
b
u
t
 
n
o
t
 
i
n
t
o
w
o
r
k
s
p
a
c
e
,
 
a
n
d
 
n
o
t
 
r
e
a
d
y
 
 
f
o
r
 
b
u
i
l
d
i
n
g
d
e
v
t
o
o
l
 
s
e
a
r
c
h
:
 
 
 
b
r
o
a
d
 
r
e
g
e
x
 
s
e
a
r
c
h
 
i
n
t
o
 
p
a
c
k
a
g
e
d
a
t
a
,
 
i
n
c
l
u
d
i
n
g
 
r
e
c
i
p
e
 
D
E
S
C
I
P
T
I
O
N
 
s
o
 
l
e
s
s
 
u
s
e
f
u
l
 
f
o
r
p
a
c
k
a
g
e
s
 
w
i
t
h
 
n
a
m
e
s
 
l
i
k
e
 
w
h
i
c
h
Y
o
c
t
o
 
d
e
v
t
o
o
l
 
-
 
R
e
f
e
r
e
n
c
e
s
 
1.
Yocto devtool documentation
http://www.yoctoproject.org/docs/latest/dev-manual/dev-
manual.html#using-devtool-in-your-workflow
2.
T
o
o
l
 
A
u
t
h
o
r
 
P
a
u
l
 
E
g
g
l
e
t
o
n
s
 
E
L
C
 
P
r
e
s
e
n
t
a
t
i
o
n
:
http://events.linuxfoundation.org/sites/events/files/slides/yocto_
project_dev_workflow_elc_2015_0.pdf
3.
T
r
e
v
o
r
 
W
o
e
r
n
e
r
s
 
T
u
t
o
r
i
a
l
h
t
t
p
s
:
/
/
d
r
i
v
e
.
g
o
o
g
l
e
.
c
o
m
/
f
i
l
e
/
d
/
0
B
3
K
G
z
Y
5
f
W
7
l
a
Q
m
g
x
V
X
V
T
S
D
J
H
e
F
U
/
v
i
e
w
?
u
s
p
=
s
h
a
r
i
n
g
undefined
A
c
t
i
v
i
t
y
 
E
i
g
h
t
N
o
d
e
.
j
s
H
e
n
r
y
 
B
r
u
c
e
I
n
t
r
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
a
-
n
o
d
e
j
s
D
e
v
t
o
o
l
 
s
u
p
p
o
r
t
 
w
a
s
 
i
n
t
r
o
d
u
c
e
d
 
i
n
 
k
r
o
g
o
t
h
Use morty
T
h
e
r
e
s
 
s
t
i
l
l
 
w
o
r
k
 
t
o
 
d
o
.
 
S
e
e
 
b
u
g
 
#
1
0
6
5
3
.
U
s
i
n
g
 
d
e
v
t
o
o
l
 
t
o
 
g
e
n
e
r
a
t
e
 
r
e
c
i
p
e
G
o
 
t
o
 
t
h
e
 
b
u
i
l
d
 
d
i
r
e
c
t
o
r
y
 
(
w
i
t
h
 
a
 
c
l
e
a
n
 
s
h
e
l
l
)
 
 
$
 
c
d
 
/
s
c
r
a
t
c
h
 
 
$
 
.
 
p
o
k
y
/
o
e
-
i
n
i
t
-
b
u
i
l
d
-
e
n
v
C
r
e
a
t
e
 
r
e
c
i
p
e
 
f
r
o
m
 
m
o
d
u
l
e
 
i
n
 
r
e
g
i
s
t
r
y
a)
$ devtool add "npm://registry.npmjs.org;name=mraa;version=1.5.1“
-- or --
b) $ devtool add /scratch/src/nodejs/
mraa-1.5.1.tgz
P
a
r
s
e
s
 
p
a
c
k
a
g
e
.
j
s
o
n
 
f
o
r
 
b
a
s
i
s
 
o
f
 
r
e
c
i
p
e
Package name and version
Description, homepage
Location of source
Licenses
R
e
c
u
r
s
i
v
e
l
y
 
g
o
e
s
 
t
h
r
o
u
g
h
 
d
e
p
e
n
d
e
n
c
i
e
s
Creates shrinkwrap and lockdown files
$ devtool edit-recipe mraa
U
n
d
e
r
 
t
h
e
 
h
o
o
d
N
P
M
 
m
a
k
e
s
 
i
t
 
h
a
r
d
 
t
o
 
l
i
m
i
t
 
n
e
t
w
o
r
k
 
a
c
c
e
s
s
 
t
o
 
f
e
t
c
h
t
a
s
k
F
e
t
c
h
 
t
a
s
k
 
w
a
l
k
s
 
d
e
p
e
n
d
e
n
c
y
 
t
r
e
e
 
f
e
t
c
h
i
n
g
 
t
a
r
b
a
l
l
s
f
r
o
m
 
N
P
M
 
r
e
g
i
s
t
r
y
B
u
i
l
d
 
t
a
s
k
 
u
s
e
s
 
n
p
m
 
i
n
s
t
a
l
l
 
w
i
t
h
 
r
e
g
i
s
t
r
y
 
d
i
s
a
b
l
e
d
(
O
E
 
s
p
e
c
i
f
i
c
 
p
a
t
c
h
)
 
t
o
 
c
r
e
a
t
e
 
n
o
d
e
_
m
o
d
u
l
e
s
I
n
s
t
a
l
l
 
t
a
s
k
s
 
p
u
t
s
 
n
o
d
e
_
m
o
d
u
l
e
s
 
i
n
 
c
o
r
r
e
c
t
 
p
l
a
c
e
B
u
i
l
d
i
n
g
 
a
n
d
 
d
e
p
l
o
y
i
n
g
B
u
i
l
d
 
i
s
 
r
e
a
l
l
y
 
a
 
p
r
e
-
p
a
c
k
a
g
e
 
t
a
s
k
 
(
a
p
a
r
t
 
f
r
o
m
 
n
a
t
i
v
e
g
y
p
 
b
u
i
l
d
s
)
$ devtool build mraa
D
e
p
l
o
y
 
a
s
 
n
o
r
m
a
l
$ devtool deploy-target -s mraa
root@target_addr
I
s
 
m
o
d
u
l
e
 
i
n
s
t
a
l
l
e
d
 
o
n
 
t
h
e
 
t
a
r
g
e
t
?
# npm -g ls mraa
R
u
n
n
i
n
g
 
o
n
 
t
a
r
g
e
t
# export NODE_PATH=/usr/lib/node_modules
# node
> var mraa = require(‘mraa’)
> console.log(‘mraa board: ‘ + mraa.getPlatformName())
> var gpio = new mraa.Gpio(360, true, true)
> gpio.dir(mraa.DIR_OUT)
> gpio.write(1)
D
e
v
e
l
o
p
i
n
g
 
o
n
 
t
a
r
g
e
t
M
a
n
y
 
w
a
y
s
 
o
f
 
d
o
i
n
g
 
t
h
i
s
.
 
L
e
t
s
 
k
e
e
p
 
i
t
 
s
i
m
p
l
e
O
n
 
y
o
u
r
 
t
a
r
g
e
t
# mkdir mmax-blinker
# cd mmax-blinker
W
r
i
t
e
 
s
o
m
e
 
c
o
d
e
 
a
n
d
 
t
e
s
t
 
i
t
# cp $NODE_PATH/mraa/examples/javascript/Blink-IO.js .
# vi Blink-IO.js
change GPIO to “raw” id 360
add #!/usr/bin/node
# node Blink-IO.js
C
r
e
a
t
e
 
N
P
M
 
m
o
d
u
l
e
 
o
n
 
t
a
r
g
e
t
C
r
e
a
t
e
 
p
a
c
k
a
g
e
.
j
s
o
n
# cp $NODE_PATH/mraa/COPYING .
# npm init
# vi package.json
Add “bin” entry. Local dependency for mraa (or skip)
I
n
s
t
a
l
l
# npm -g install
T
e
s
t
# mmax-blinker
C
r
e
a
t
e
 
p
a
c
k
a
g
e
 
f
o
r
 
y
o
u
r
 
a
p
p
l
i
c
a
t
i
o
n
C
o
p
y
 
f
i
l
e
s
 
t
o
 
b
u
i
l
d
 
h
o
s
t
scp –r 
root@x.x.x.x:mmax-blinker
 mmax-blinker
C
h
e
c
k
 
d
e
p
e
n
d
e
n
c
i
e
s
Local dependencies are for development only
N
o
w
 
c
r
e
a
t
e
 
p
a
c
k
a
g
e
$ devtool add /path/to/mmax-blinker
$ devtool edit-recipe mmax-blinker
B
u
i
l
d
,
 
d
e
p
l
o
y
 
a
n
d
 
r
u
n
 
a
p
p
l
i
c
a
t
i
o
n
B
u
i
l
d
$ devtool build mmax-blinker
D
e
p
l
o
y
$ devtool deploy-target mmax-blinker 
root@x.x.x.x
# ln -s /usr/lib/node_modules/mmax-blinker/Blink-IO.js
/usr/bin/mmax-blinker
# chmod +x /usr/bin/mmax-blinker
R
u
n
# mmax-blinker
K
e
e
p
 
i
n
 
T
o
u
c
h
h
t
t
p
s
:
/
/
w
i
k
i
.
y
o
c
t
o
p
r
o
j
e
c
t
.
o
r
g
/
w
i
k
i
/
N
o
d
e
j
s
_
W
o
r
k
f
l
o
w
_
I
m
p
r
o
v
e
m
e
n
t
s
undefined
A
c
t
i
v
i
t
y
 
N
i
n
e
A
n
a
l
y
t
i
c
s
 
a
n
d
 
t
h
e
 
E
v
e
n
t
 
S
y
s
t
e
m
D
a
v
i
d
 
R
e
y
n
a
I
n
t
r
o
d
u
c
t
i
o
n
T
h
e
s
i
s
:
The bitbake event system, together with the event database that comes
with Toaster, can be used to generate and provide access to analytical
data and provide a new unique toolset to solve difficult problems
W
h
a
t
 
w
e
 
w
i
l
l
 
c
o
v
e
r
 
t
o
d
a
y
:
The problem space for extracting and analyzing data
Introduce the bitbake event system, interfaces
Event Examples: Toaster, CLI tools, customized bitbake UI
Resources
T
h
e
 
f
u
l
l
 
p
r
e
s
e
n
t
a
t
i
o
n
 
c
a
n
 
b
e
 
f
o
u
n
d
 
h
e
r
e
:
http://events.linuxfoundation.org/sites/events/files/slides/BitbakeAnalytics_
ELC_Portland.pdf
W
h
a
t
 
t
h
a
t
 
p
r
e
s
e
n
t
a
t
i
o
n
 
a
d
d
i
t
i
o
n
a
l
l
y
 
c
o
v
e
r
s
:
Deep dive on the event system code and components
Event database, database schema, custom events, custom tools, use
cases, gotchas
T
h
e
 
P
r
o
b
l
e
m
 
S
p
a
c
e
 
(
a
s
 
I
 
s
e
e
 
i
t
)
T
y
p
e
s
 
o
f
 
a
d
d
r
e
s
s
a
b
l
e
 
p
r
o
b
l
e
m
s
 
w
i
t
h
 
a
n
a
l
y
t
i
c
s
:
Issues with time or coincident sensitivity
Issues with transient data values
Issues with transient UFOs (Unidentified Failing Objects)
Issues with trends (size, time, cache misses, scaling)
If the problem is a needle, where is the haystack to look in
W
e
 
n
e
e
d
:
Easy access to deep data, time, and ordering
Reliable interaction with bitbake
Easy access to the data with tools, both provided and custom
Ability to acquire long term data, from a day to many months
Keep bitbake as pristine as possible
M
y
 
b
u
i
l
d
s
 
a
r
e
 
w
o
r
k
i
n
g
,
 
d
o
 
I
 
n
e
e
d
 
t
h
i
s
?
Excellent, you are in good shape! However, if they stop working or when
you do new work or try to scale, here are additional tools for your toolbox
T
h
e
 
P
r
o
b
l
e
m
 
S
p
a
c
e
 
(
2
)
W
e
l
l
 
k
n
o
w
n
 
a
n
d
 
d
o
c
u
m
e
n
t
e
d
 
d
a
t
a
 
f
r
o
m
 
b
i
t
b
a
k
e
 
b
u
i
l
d
s
:
Logs (Build/Error logs)
Artifacts (Kernel, Images, SDKs)
Manifests (Image content, Licenses)
Variables (bitbake -e)
Dependencies
H
o
w
e
v
e
r
These only capture the final results of the build, not how the build progressed nor
the intermediate or analytical information.
It is hard for example to correlate logs with other logs, let alone with other builds
T
h
e
 
A
n
s
w
e
r
!
The bitbake event system
The bitbake event database
Events are 
easy
 to create, fire, listen to, and catch
There are more than 40 existing event types
Uses IPC over python xmlrpc sockets, with automatic data marshalling
T
o
a
s
t
e
r
 
A
n
a
l
y
t
i
c
s
 
 
I
n
t
e
r
m
e
d
i
a
t
e
 
D
a
t
a
 
E
x
a
m
p
l
e
T
h
e
 
T
o
a
s
t
e
r
 
d
a
t
a
b
a
s
e
/
G
U
I
 
c
a
n
 
f
o
r
 
e
x
a
m
p
l
e
 
d
i
s
p
l
a
y
 
t
h
e
 
i
n
t
e
r
m
e
d
i
a
t
e
v
a
l
u
e
s
 
o
f
 
b
i
t
b
a
k
e
 
v
a
r
i
a
b
l
e
s
,
 
s
p
e
c
i
f
i
c
a
l
l
y
 
e
a
c
h
 
v
a
r
i
a
b
l
e
s
 
m
o
d
i
f
i
c
a
t
i
o
n
h
i
s
t
o
r
y
 
d
o
w
n
 
t
o
 
t
h
e
 
f
i
l
e
 
a
n
d
 
l
i
n
e
.
O
v
e
r
v
i
e
w
 
o
f
 
A
v
a
i
l
a
b
l
e
 
E
v
e
n
t
s
B
u
i
l
d
I
n
i
t
|
B
u
i
l
d
C
o
m
p
l
e
t
e
d
|
B
u
i
l
d
S
t
a
r
t
e
d
C
o
n
f
i
g
P
a
r
s
e
d
|
R
e
c
i
p
e
P
a
r
s
e
d
P
a
r
s
e
C
o
m
p
l
e
t
e
d
|
P
a
r
s
e
P
r
o
g
r
e
s
s
|
P
a
r
s
e
S
t
a
r
t
e
d
M
u
l
t
i
p
l
e
P
r
o
v
i
d
e
r
s
|
N
o
P
r
o
v
i
d
e
r
r
u
n
Q
u
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
b
l
e
 
t
h
e
 
T
o
a
s
t
e
r
 
U
I
 
i
n
 
a
 
C
I
 
s
y
s
t
e
m
,
 
y
o
u
 
c
a
n
 
a
d
d
i
t
i
o
n
a
l
l
y
 
g
e
t
 
t
h
e
e
v
e
n
t
 
a
r
t
i
f
a
c
t
s
 
t
o
g
e
t
h
e
r
 
w
i
t
h
 
y
o
u
r
 
b
u
i
l
d
 
a
r
t
i
f
a
c
t
s
 
(
y
o
u
 
w
i
l
l
 
d
e
f
i
n
i
t
e
l
y
 
n
e
e
d
t
o
 
s
e
l
e
c
t
 
a
 
p
r
o
d
u
c
t
i
o
n
 
l
e
v
e
l
 
d
a
t
a
b
a
s
e
)
Bitbake
Event Database (SQL)
Toaster Event Client
Knotty Event Client
C
o
n
t
i
n
u
o
u
s
 
I
n
t
e
g
r
a
t
i
o
n
 
B
u
i
l
d
 
S
y
s
t
e
m
Lost
event
data
A
d
d
i
n
g
 
B
u
i
l
d
 
D
a
t
a
 
t
o
 
t
h
e
 
E
v
e
n
t
 
D
a
t
a
b
a
s
e
T
h
e
r
e
 
a
r
e
 
t
w
o
 
e
a
s
y
 
w
a
y
s
 
t
o
 
g
e
t
 
b
u
i
l
d
 
d
a
t
a
 
i
n
t
o
 
t
h
e
 
e
v
e
n
t
d
a
t
a
b
a
s
e
Create and execute your builds from within the Toaster GUI
Start Toaster, and run your command line builds in that environment
T
h
e
 
s
o
u
r
c
e
 
t
o
a
s
t
e
r
 
p
e
r
f
o
r
m
s
 
t
h
e
s
e
 
t
a
s
k
s
Creates the event database if not present, applies any schema updates
Starts the web client (this can be ignored for command line usage)
Sets the command line environment to use Toaster as the UI for bitbake
(“BITBAKE_UI”)
  $ cd /scratch 
  $ source poky/oe-init-build-env
  $ source toaster start webport=0.0.0.0:8000   # local only: “127.0.0.1:8000”
 
 
$
 
f
i
r
e
f
o
x
 
l
o
c
a
l
h
o
s
t
:
8
0
0
0
 
 
 
#
 
h
e
r
e
,
 
c
o
n
n
e
c
t
 
b
r
o
w
s
e
r
 
f
r
o
m
 
y
o
u
r
 
u
s
i
n
g
 
T
o
a
s
t
e
r
 
U
R
L
  $ . Poky/oe-init-build-env
  $ source toaster start webport=0.0.0.0:8000
 
 
$
 
b
i
t
b
a
k
e
 
<
w
h
a
t
e
v
e
r
>
undefined
E
x
a
m
p
l
e
 
1
:
 
C
u
s
t
o
m
 
c
o
m
m
a
n
d
 
l
i
n
e
 
a
n
a
l
y
t
i
c
 
t
o
o
l
M
i
n
i
m
a
l
 
E
v
e
n
t
 
D
a
t
a
b
a
s
e
 
P
y
t
h
o
n
 
S
c
r
i
p
t
A
c
c
e
s
s
i
n
g
 
t
h
e
 
d
a
t
a
 
i
n
 
t
h
e
 
e
v
e
n
t
 
d
a
t
a
b
a
s
e
 
i
s
 
v
e
r
y
 
s
i
m
p
l
e
.
 
I
n
 
t
h
i
s
 
e
x
a
m
p
l
e
 
w
e
 
w
i
l
l
 
p
r
i
n
t
 
t
h
e
 
d
a
t
a
f
r
o
m
 
t
h
e
 
f
i
r
s
t
-
m
o
s
t
 
B
u
i
l
d
 
r
e
c
o
r
d
,
 
a
n
d
 
a
l
s
o
 
l
o
o
k
 
u
p
 
a
n
d
 
p
r
i
n
t
 
t
h
e
 
a
s
s
o
c
i
a
t
e
d
 
T
a
r
g
e
t
 
r
e
c
o
r
d
$ 
cat sample_toaster_db_read.py
#!/usr/bin/env python3
import sqlite3
conn = sqlite3.connect('toaster.sqlite')
c = conn.cursor()
c.execute("SELECT * FROM orm_build")
build=c.fetchone()
print('Build=%s' % str(build))
c.execute("SELECT * FROM orm_target where build_id = '%s'" % build[0])
print('Target=%s' % str(c.fetchone()))
$
$ 
./sample_toaster_db_read.py
Build=(1, 'qemux86-64', 'poky', '2.2.1', '2017-02-12 23:55:52.137355', \
'2017-02-13 00:16:30.794711', 0, '/…/build_20170212_235552.805.log', \
'1.32.0', 1, 1478, 1478, '20170212235604')
Target=(1, 'core-image-base', '', 1, 0, ‘/…/license.manifest', 1, \
'/…/core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
n
 
(
e
.
g
.
 
p
y
b
o
o
t
c
h
a
r
t
)
,
t
h
e
 
p
o
i
n
t
 
i
s
 
t
h
a
t
 
(
a
)
 
t
h
i
s
 
w
a
s
 
v
e
r
y
 
e
a
s
y
 
a
n
d
 
f
a
s
t
 
t
o
 
w
r
i
t
e
,
 
a
n
d
 
(
b
)
y
o
u
 
c
a
n
 
n
o
w
 
f
u
l
l
y
 
c
u
s
t
o
m
i
z
e
 
t
h
e
 
a
n
a
l
y
s
i
s
 
a
n
d
 
o
u
t
p
u
t
 
t
o
 
y
o
u
r
n
e
e
d
s
 
a
n
d
 
d
e
s
i
r
e
s
.
T
a
s
k
 
a
n
d
 
R
e
c
i
p
e
 
B
u
i
l
d
 
A
n
a
l
y
s
i
s
 
S
c
r
i
p
t
H
e
r
e
 
i
s
 
t
h
e
 
l
i
s
t
 
o
f
 
a
v
a
i
l
a
b
l
e
 
c
o
m
m
a
n
d
s
 
a
n
d
 
f
e
a
t
u
r
e
s
$ 
more event_overlap.py 
# see db setup and schema info
$
 ./event_overlap.py --help
Commands: 
?
 ?                           : show help
 b,build   [build_id]        : show or select builds
 d,data                      : show histogram data
 t,task    [task]            : show task database
 r,recipe  [recipe]          : show recipes database
 e,events  [task]            : show task time events
 E,Events  [recipe]          : show recipe time events
 o,overlap [task|0|n]        : show task|zero|n_max execution overlaps
 O,Overlap [recipe|0|n]      : show recipe|zero|n_max execution overlaps
 g,graph   [task]   [> file] : graph task execution overlap
 G,Graph   [recipe] [> file] : graph recipe execution overlap
 h,html    [task]   [> file] : HTML graph task execution overlap [to file]
 H,Html    [recipe] [> file] : HTML graph recipe execution overlap [to file]
 q,quit                      : quit
Examples: 
  * Recipe/task filters accept wild cards, like 'native-*, '*-lib*'
  * Recipe/task filters get an automatic wild card at the end
  * Task names are in the form 'recipe:task', so 'acl*patch' 
    will specifically match the 'acl*:do_patch' task
  * Use 'o 2' for the tasks in the two highest overlap count sets
  * Use 'O 0' for the recipes with zero overlaps
  
H
i
s
t
o
g
r
a
m
 
o
f
 
P
a
r
a
l
l
e
l
 
T
a
s
k
/
R
e
c
i
p
e
 
E
x
e
c
u
t
i
o
n
 
(
d
)
 
Commands: 
d
Histogram:For each task, max number of tasks executing in parallel
       0   1   2   3   4   5   6   7   8   9
    ----------------------------------------
  0)   0 
621
  16  22  50  49  56  83  94  45
 10)  57  82  87  81  47  56  58  62  64  88
 20) 121 182 268 221 
148
 
Histogram:For each recipe's task set, max number of recipes executing in parallel
       0   1   2   3   4   5   6   7   8   9
    ----------------------------------------
  0)   
0
   5   1   1   1   1   1   1   3   3
 10)   1   2   2   2   2   1   1   3   1   6
 20)   1   1   2   1   1   2   2   1   1   1
 30)   1   1   2   2   1   3   1   2   2   1
 40)   1   1   1   1   1   1   1   1   3   1
 50)   1   2   4   2   2   1   1   1   1   2
 60)   1   2   1   1   1   2   1   1   1   2
 70)   1   1   2   2   2   2   1   3   3   1
 80)   3   2   1   1   1  10   7   8   8   8
 90)   7   7   2   2   3   2   2   1   1   2
100)   2   1   1   1   2   2   1   3   2   3
110)   2   1   2   1   1   1   1   2   1   1
120)   2   1   1   2   1   1   1   2   1   2
130)   1   1   1  
 1
H
i
s
t
o
g
r
a
m
 
o
f
 
O
v
e
r
l
a
p
p
i
n
g
 
T
a
s
k
/
R
e
c
i
p
e
 
E
x
e
c
u
t
i
o
n
 
Histogram:For each task, max number of tasks that overlap its build
       0   1   2   3   4   5   6   7   8   9
    ----------------------------------------
  0) 
614
   9  10  29  28  42  46  55  51  47
10)  56  52  48  59  28  33  63  29  43  60
20)  60  94 119 223 105  95  53  57  36  40
30)  20  26  15  17  13   8  11   9   9   2
40)   7  10   9   7   3   6   6   3   6   6
50)   6   6   6   2   2   5   3   1   3   1
60)   4   2   5   1   2   2   1   2   3   5
... (sparse) ...
980)   0   0   
1
Histogram:For each recipe's task set, max number of recipes that overlap its build
       0   1   2   3   4   5   6   7   8   9
    ----------------------------------------
  0)  
67
   0   0   0   0   0   0   0   0   0
 10)   0   0   0   0   0   0   0   0   0   0
... (all zeros) ...
 80)   0   0   0   0   5   1   1   8   4   1
 90)   3   2   0   1   4   4   3   0   0   0
100)   0   0   0   0   0   0   2   1   0   0
110)   2   0   1   2   0   0   3   0   1   2
120)   0   0   0   0   0   0   0   0   2   0
130)   0  26   8   5   2   6   5   0   0   1
... (sparse) ...
170)   0   4   0   0   0   0   0   0   0   0
180)   0   0   0   0   0   0  
69
I
n
i
t
i
a
l
 
R
e
s
u
l
t
s
H
e
r
e
 
a
r
e
 
s
o
m
e
 
i
n
i
t
i
a
l
 
r
e
s
u
l
t
s
 
w
h
e
n
 
e
x
a
m
i
n
i
n
g
 
a
 
c
o
r
e
-
i
m
a
g
e
-
m
i
n
i
m
a
l
 
p
r
o
j
e
c
t
 
w
i
t
h
 
T
a
s
k
 
C
o
u
n
t
=
2
6
5
8
 
a
n
d
 
R
e
c
i
p
e
 
C
o
u
n
t
=
2
5
4
W
e
 
h
a
v
e
 
a
s
 
m
a
n
y
 
a
s
 
1
4
8
 
t
a
s
k
s
 
b
e
i
n
g
 
a
b
l
e
 
t
o
 
r
u
n
 
w
i
t
h
 
a
l
l
 
2
4
 
a
v
a
i
l
a
b
l
e
t
h
r
e
a
d
s
 
u
s
e
d
T
h
e
r
e
 
w
e
r
e
 
6
2
1
 
t
a
s
k
s
 
t
h
a
t
 
r
a
n
 
s
o
l
o
T
h
e
r
e
 
w
e
r
e
 
z
e
r
o
 
r
e
c
i
p
e
s
 
t
h
a
t
 
r
a
n
 
s
o
l
o
T
h
e
r
e
 
w
a
s
 
o
n
e
 
t
a
s
k
 
l
i
n
u
x
-
y
o
c
t
o
:
d
o
_
f
e
t
c
h
 
w
h
o
s
e
 
e
x
e
c
u
t
i
o
n
 
o
v
e
r
l
a
p
p
e
d
w
i
t
h
 
9
8
3
 
o
t
h
e
r
 
t
a
s
k
s
;
 
t
h
e
 
s
e
c
o
n
d
 
m
o
s
t
 
o
v
e
r
l
a
p
 
w
a
s
 
p
y
t
h
o
n
3
-
n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-image-base, Task=''
  BuildId=2) CompletedOn=2017-02-13 00:46:40.724932, Outcome=FAILED, 
     Project=Command line builds, Target=core-image-base, Task=populate_sdk_ext
  BuildId=3) CompletedOn=2017-02-13 00:46:26.513568, Outcome=SUCCEEDED, 
     Project=Command line builds, Target=core-image-base, Task=''
  BuildId=4) CompletedOn=2017-02-23 09:02:31.109727, Outcome=SUCCEEDED, 
     Project=Command line builds, Target=quilt-native, Task=''
Command: 
b 4
Fetching build #4
Build: CompletedOn=2017-02-23 09:02:31.109727, Outcome=SUCCEEDED, 
   Project='Command line builds‘ Target='quilt-native', Task='', Machine='qemux86-64'
Success: build #4, Task Count=9, Recipe Count=1
I
n
i
t
i
a
l
 
R
e
s
u
l
t
s
N
o
w
 
s
e
l
e
c
t
 
t
h
e
 
l
a
r
g
e
 
b
u
i
l
d
 
(
#
1
)
 
a
n
d
 
e
x
p
l
o
r
e
.
 
W
e
 
s
h
a
l
l
 
u
s
e
 
t
h
e
r
e
c
i
p
e
 
f
i
l
t
e
r
 
z
l
i
b
 
t
o
 
l
i
m
i
t
 
t
h
e
 
o
u
t
p
u
t
:
M
a
k
e
 
s
u
r
e
 
y
o
u
r
 
w
i
n
d
o
w
 
i
s
 
v
e
r
y
 
w
i
d
e
,
 
a
n
d
 
t
h
e
n
 
r
u
n
 
t
h
i
s
 
c
o
m
m
a
n
d
t
o
 
s
e
e
 
a
 
g
r
a
p
h
 
o
f
 
t
h
e
 
t
a
s
k
 
o
v
e
r
l
a
p
s
 
f
o
r
 
z
l
i
b
:
Command: 
b 1
Command: 
o zlib
Command: 
e zlib
Command: 
t zlib
Command: 
r zlib
Command: 
o zlib
Command: 
O 0
Command: 
g zlib
S
a
m
p
l
e
 
H
T
M
L
 
O
u
t
p
u
t
 
o
f
 
T
a
s
k
 
O
v
e
r
l
a
p
undefined
E
x
a
m
p
l
e
 
2
:
 
C
u
s
t
o
m
 
E
v
e
n
t
 
I
n
t
e
r
f
a
c
e
 
(
k
n
i
c
e
)
C
u
s
t
o
m
 
E
v
e
n
t
 
U
I
I
f
 
t
h
e
 
k
n
o
t
t
y
 
U
I
 
i
s
 
t
o
o
 
s
i
m
p
l
e
 
(
s
i
n
c
e
 
i
t
 
d
o
e
s
 
n
o
t
 
c
o
l
l
e
c
t
 
d
a
t
a
)
 
a
n
d
 
t
h
e
T
o
a
s
t
e
r
 
U
I
 
t
o
o
 
l
a
r
g
e
 
f
o
r
 
y
o
u
r
 
a
n
a
l
y
t
i
c
 
n
e
e
d
s
,
 
y
o
u
 
c
a
n
 
m
a
k
e
 
y
o
u
r
 
o
w
n
b
i
t
b
a
k
e
 
U
I
 
a
n
d
 
h
a
v
e
 
i
t
 
h
a
n
d
l
e
 
s
p
e
c
i
f
i
c
 
e
v
e
n
t
s
 
a
s
 
y
o
u
 
n
e
e
d
.
 
H
e
r
e
 
i
s
 
a
s
i
m
p
l
e
 
t
u
t
o
r
i
a
l
 
o
n
 
h
o
w
 
t
o
 
d
o
 
t
h
a
t
.
W
h
a
t
 
w
e
 
w
i
l
l
 
d
o
 
i
s
 
s
t
a
r
t
 
w
i
t
h
 
t
h
e
 
k
n
o
t
t
y
 
U
I
,
 
a
n
d
 
t
h
e
n
 
c
u
s
t
o
m
i
z
e
 
i
t
 
a
s
t
h
e
 
k
n
i
c
e
 
U
I
.
W
e
 
m
a
k
e
 
a
 
s
i
m
p
l
e
 
c
h
a
n
g
e
:
N
o
w
 
w
e
 
r
u
n
 
i
t
:
$ 
pushd ../bitbake/lib/bb/ui
$ 
cp knotty.py knice.py
$ 
sed –i –e "s/notty/nice/g" knice.py
$
 vi knice.py
-
print("Nothing to do.  Use 'bitbake world' to build everything, \
    or run 'bitbake --help' for usage information.")
+
print(“
NICE: 
Nothing to do.  Use 'bitbake world' to build everything, \
    or run 'bitbake --help' for usage information.")
$ 
popd
$
 
bitbake -u knice
NICE
:
 Nothing to do.  Use 'bitbake world' to build everything, or run 
'bitbake --help' for usage information.
C
u
s
t
o
m
 
E
v
e
n
t
 
U
I
 
(
2
)
N
o
w
 
l
e
t
 
u
s
 
i
n
s
t
r
u
m
e
n
t
 
a
n
 
e
v
e
n
t
 
b
y
 
u
p
d
a
t
i
n
g
 
k
n
i
c
e
.
p
y
.
F
i
r
s
t
,
 
l
e
t
 
u
s
 
a
d
d
 
"
b
b
.
e
v
e
n
t
.
D
e
p
T
r
e
e
G
e
n
e
r
a
t
e
d
 
t
o
 
t
h
e
 
e
v
e
n
t
 
l
i
s
t
N
o
w
 
l
e
t
 
u
s
 
a
d
d
 
a
 
p
r
i
n
t
 
s
t
a
t
e
m
e
n
t
 
t
o
 
t
h
e
 
o
t
h
e
r
w
i
s
e
 
e
m
p
t
y
"
b
b
.
e
v
e
n
t
.
D
e
p
T
r
e
e
G
e
n
e
r
a
t
e
d
 
 
h
a
n
d
l
e
r
 
c
o
d
e
N
o
w
 
w
e
 
r
u
n
 
i
t
 
a
n
d
 
s
e
e
 
o
u
r
 
c
o
d
e
 
r
u
n
!
$
 
vi
 
../bitbake/lib/bb/ui/knice.py
-
    "bb.event.ProcessFinished"]
+
    "bb.event.ProcessFinished"
,"bb.event.DepTreeGenerated"
]
     if isinstance(event, bb.event.DepTreeGenerated):
+
        logger.info("NICE: bb.event.DepTreeGenerated received!")
         continue
[build]$ 
bitbake -u knice quilt-native [ | grep NICE ]
...
NOTE: NICE: bb.event.DepTreeGenerated received!         
| ETA:  0:00:00
...
R
e
s
o
u
r
c
e
s
S
o
u
r
c
e
 
c
o
d
e
 
a
n
d
 
e
x
a
m
p
l
e
 
e
v
e
n
t
 
d
a
t
a
b
a
s
e
This is available as part of the Yocto Project Developer Day Advanced
Class (see 
https://www.yoctoproject.org/yocto-project-dev-day-north-
america-2017
, and 
https://wiki.yoctoproject.org/wiki/DevDay_US_2017
 )
H
e
r
e
 
i
s
 
t
h
e
 
T
o
a
s
t
e
r
 
d
o
c
u
m
e
n
t
a
t
i
o
n
,
 
a
n
d
 
Y
o
u
t
u
b
e
 
v
i
d
e
o
!
http://www.yoctoproject.org/docs/latest/toaster-manual/toaster-
manual.html#toaster-manual-start
https://youtu.be/BlXdOYLgPxA
B
a
s
i
c
 
i
n
f
o
r
m
a
t
i
o
n
 
a
b
o
u
t
 
b
i
t
b
a
k
e
 
U
I
s
http://elinux.org/Bitbake_Cheat_Sheet
H
e
r
e
 
i
s
 
d
e
s
i
g
n
 
i
n
f
o
r
m
a
t
i
o
n
 
o
n
 
t
h
e
 
e
v
e
n
t
 
m
o
d
e
l
 
f
o
r
 
T
o
a
s
t
e
r
https://wiki.yoctoproject.org/wiki/Event_information_model_for_Toaster
H
e
r
e
 
i
s
 
t
h
e
 
o
r
i
g
i
n
a
l
 
d
e
s
i
g
n
 
i
n
f
o
r
m
a
t
i
o
n
 
o
n
 
T
o
a
s
t
e
r
 
a
n
d
 
b
i
t
b
a
k
e
c
o
m
m
u
n
i
c
a
t
i
o
n
https://wiki.yoctoproject.org/wiki/Toaster_and_bitbake_communications
undefined
B
o
n
u
s
 
E
x
a
m
p
l
e
 
3
:
 
C
u
s
t
o
m
 
e
v
e
n
t
 
t
y
p
e
s
C
u
s
t
o
m
 
e
v
e
n
t
s
N
o
r
m
a
l
l
y
,
 
f
o
r
 
a
 
c
u
s
t
o
m
 
e
v
e
n
t
 
y
o
u
 
m
e
r
e
l
y
 
s
u
b
-
c
l
a
s
s
 
t
h
e
 
e
v
e
n
t
c
l
a
s
s
 
o
r
 
s
o
m
e
 
o
t
h
e
r
 
e
x
i
s
t
i
n
g
 
c
l
a
s
s
,
 
a
n
d
 
a
d
d
 
y
o
u
r
 
n
e
w
 
c
o
n
t
e
n
t
I
n
 
t
h
i
s
 
e
x
a
m
p
l
e
,
 
w
e
 
s
h
o
w
 
h
o
w
 
w
e
 
c
a
n
 
e
a
s
i
l
y
 
e
x
t
e
n
d
"
M
e
t
a
d
a
t
a
E
v
e
n
t
"
 
a
n
d
 
u
s
e
 
i
t
 
o
n
 
t
h
e
 
f
l
y
,
 
s
i
n
c
e
 
t
h
e
 
s
u
b
-
e
v
e
n
t
 
'
t
y
p
e
'
i
s
 
a
n
 
a
r
b
i
t
r
a
r
y
 
s
t
r
i
n
g
 
a
n
d
 
t
h
e
 
d
a
t
a
 
l
o
a
d
 
i
s
 
a
 
s
i
m
p
l
e
 
d
i
c
t
i
o
n
a
r
y
.
E
v
e
n
t
 
c
r
e
a
t
i
o
n
:
E
v
e
n
t
 
h
a
n
d
l
e
r
:
my_event_data = {
  "TOOLCHAIN_OUTPUTNAME": d.getVar("TOOLCHAIN_OUTPUTNAME")
}
bb.event.fire(bb.event.MetadataEvent("MyMetaEvent", my_event_data), d)
if isinstance(event, bb.event.MetadataEvent):
    if event.type == "MyMetaEvent":
        my_toochain = event.data["TOOLCHAIN_OUTPUTNAME"]
undefined
B
o
n
u
s
 
E
x
a
m
p
l
e
 
4
:
 
D
e
b
u
g
g
i
n
g
 
c
o
i
n
c
i
d
e
n
t
 
d
a
t
a
 
i
n
b
i
t
b
a
k
e
U
s
i
n
g
 
E
v
e
n
t
s
 
f
o
r
 
d
e
b
u
g
g
i
n
g
 
b
i
t
b
a
k
e
Y
o
u
 
c
a
n
 
a
l
s
o
 
u
s
e
 
t
h
e
 
e
v
e
n
t
 
s
y
s
t
e
m
 
i
n
 
d
e
b
u
g
g
i
n
g
 
b
i
t
b
a
k
e
 
o
r
 
y
o
u
r
c
l
a
s
s
e
s
.
E
x
a
m
p
l
e
 
1
:
 
T
h
e
 
q
u
i
n
t
e
s
s
e
n
t
i
a
l
 
e
x
a
m
p
l
e
 
i
s
 
t
o
 
u
s
e
 
l
o
g
g
e
r
.
i
n
f
o
(
)
 
t
o
 
i
n
s
e
r
t
p
r
i
n
t
 
s
t
a
t
e
m
e
n
t
s
 
i
n
t
o
 
t
h
e
 
c
o
d
e
.
 
T
h
i
s
 
i
s
 
i
m
p
l
e
m
e
n
t
e
d
 
a
s
 
a
n
 
e
v
e
n
t
,
m
e
a
n
i
n
g
 
t
h
a
t
 
w
i
l
l
 
i
t
 
b
e
 
p
a
s
s
e
d
 
t
o
 
t
h
e
 
c
o
r
r
e
c
t
 
e
x
t
e
r
n
a
l
 
U
I
 
a
n
d
 
n
o
t
 
l
o
s
t
 
i
n
s
o
m
e
 
r
a
n
d
o
m
 
l
o
g
 
f
i
l
e
.
E
x
a
m
p
l
e
 
2
:
 
T
h
e
 
E
S
D
K
 
f
i
l
e
 
u
s
e
d
 
t
o
 
b
e
 
c
o
p
i
e
d
 
t
o
 
t
h
e
 
b
u
i
l
d
s
 
d
e
p
l
o
y
/
s
d
k
d
i
r
e
c
t
o
r
y
 
a
s
 
p
a
r
t
 
o
f
 
t
h
e
 
t
a
s
k
 
p
o
p
u
l
a
t
e
_
s
d
k
_
e
x
t
.
 
H
o
w
e
v
e
r
,
 
i
t
 
i
s
s
o
m
e
h
o
w
 
h
a
p
p
e
n
i
n
g
 
l
a
t
e
r
,
 
a
n
d
 
i
t
 
i
s
 
h
a
r
d
 
r
e
a
d
i
n
g
 
t
h
e
 
c
o
d
e
 
t
o
 
d
e
t
e
r
m
i
n
e
w
h
e
n
 
a
n
d
 
w
h
e
r
e
 
t
h
a
t
 
i
s
 
n
o
w
 
o
c
c
u
r
r
i
n
g
.
 
W
e
 
c
a
n
 
u
s
e
 
t
h
e
 
e
v
e
n
t
 
s
t
r
e
a
m
 
t
o
h
e
l
p
 
n
a
r
r
o
w
 
d
o
w
n
 
t
h
e
 
c
a
n
d
i
d
a
t
e
s
.
First, we add a log call into the event read loop in “bitbake/lib/bb/ui/toasterui.py”.
This will provide a log of the received events as they go by, and also reveal when
the ESDK file is created.
I
 
t
h
e
n
 
r
u
n
 
a
 
b
u
i
l
d
 
(
i
n
 
t
h
e
 
T
o
a
s
t
e
r
 
c
o
n
t
e
x
t
)
:
logger.info(“FOO:"+str(event)+","+
    str(os.path.isfile('<path_to_esdk_file>')) )
U
s
i
n
g
 
E
v
e
n
t
s
 
f
o
r
 
d
e
b
u
g
g
i
n
g
 
b
i
t
b
a
k
e
 
(
2
)
Second, we then run a build (in the Toaster context) and collect the
events:
Third, we 
examine the log to find when the file’s state changed.
We see that the existing ESDK file was removed after
“bb.event.DepTreeGenerated”, and placed after “sstate-build-
populate_sdk_ext”. In other words it was moved out of the main
“populate_sdk_ext” task and into its sstate task. QED.
$ bitbake do_populate_sdk_ext > my_eventlog.txt
...
NOTE: FOO:<bb.event.DepTreeGenerated object at 0x7f94ec829710>,True
NOTE: FOO:<bb.event.MetadataEvent object at 0x7f94ec829358>,
False
...
NOTE: FOO:<LogRecord: ... "Executing buildhistory_get_extra_sdkinfo ...">,False
...
NOTE: FOO:<LogRecord: BitBake.Main, ... sstate-build-populate_sdk_ext ...">,False
NOTE: FOO:<bb.build.TaskSucceeded object at 0x7f94e7f5f358>,
True
undefined
B
o
n
u
s
 
E
x
a
m
p
l
e
 
5
:
 
T
o
a
s
t
e
r
A
d
d
i
n
g
 
B
u
i
l
d
 
D
a
t
a
 
t
o
 
t
h
e
 
E
v
e
n
t
 
D
a
t
a
b
a
s
e
T
h
e
r
e
 
a
r
e
 
m
a
n
y
 
e
x
i
s
t
i
n
g
 
a
n
a
l
y
t
i
c
 
v
i
e
w
s
 
i
n
 
T
o
a
s
t
e
r
S
t
a
r
t
 
t
h
e
 
T
o
a
s
t
e
r
 
G
U
I
 
i
n
 
t
h
e
 
b
u
i
l
d
 
d
i
r
e
c
t
o
r
y
 
(
w
i
t
h
 
o
p
e
n
 
p
o
r
t
s
)
O
n
 
y
o
u
r
 
h
o
s
t
,
 
o
p
e
n
 
y
o
u
r
 
b
r
o
w
s
e
r
 
t
o
:
h
t
t
p
:
/
/
d
e
v
d
a
y
-
a
.
y
o
c
t
o
.
i
o
:
3
0
0
0
0
(
+
y
o
u
r
 
s
e
s
s
i
o
n
 
n
u
m
b
e
r
)
C
l
i
c
k
 
o
n
 
A
l
l
 
B
u
i
l
d
s
,
 
a
n
d
 
s
e
l
e
c
t
 
a
 
b
u
i
l
d
C
l
i
c
k
 
o
n
 
T
i
m
e
,
 
C
P
U
 
U
s
a
g
e
,
 
a
n
d
 
D
i
s
k
 
I
/
O
C
l
i
c
k
 
o
n
 
T
a
s
k
s
,
 
a
n
d
 
s
e
e
 
t
h
e
 
t
a
s
k
 
o
r
d
e
r
 
a
n
d
 
c
a
c
h
e
 
u
s
a
g
e
 
 
 
 
$
 
s
o
u
r
c
e
 
t
o
a
s
t
e
r
 
s
t
a
r
t
 
w
e
b
p
o
r
t
=
0
.
0
.
0
.
0
:
8
0
0
0
E
x
i
s
t
i
n
g
 
T
o
a
s
t
e
r
 
A
n
a
l
y
t
i
c
s
T
h
e
 
T
o
a
s
t
e
r
 
G
U
I
 
a
l
r
e
a
d
y
 
p
r
o
v
i
d
e
s
 
a
n
a
l
y
t
i
c
a
l
 
d
a
t
a
 
o
n
 
b
u
i
l
d
s
,
 
f
o
r
 
e
x
a
m
p
l
e
o
n
 
s
s
t
a
t
e
 
c
a
c
h
e
 
s
u
c
c
e
s
s
 
r
a
t
e
,
 
t
a
s
k
 
e
x
e
c
u
t
i
o
n
 
t
i
m
e
,
 
C
P
U
 
u
s
a
g
e
,
 
a
n
d
 
D
i
s
k
I
/
O
undefined
A
c
t
i
v
i
t
y
 
N
i
n
e
K
e
r
n
e
l
 
A
n
d
 
S
e
c
u
r
i
t
y
 
O
p
e
n
 
F
o
r
u
m
S
t
a
f
f
T
o
p
i
c
s
Is the YP-2.2 kernel already obsolete?
Kernel fragments for any kernel without explicit inherit?
Enhanced kernel audit details?
D
i
s
t
r
o
 
a
n
d
 
k
e
r
n
e
l
 
f
e
a
t
u
r
e
 
i
n
t
e
g
r
a
t
i
o
n
?
undefined
Q
u
e
s
t
i
o
n
s
 
a
n
d
 
A
n
s
w
e
r
s
undefined
T
h
a
n
k
 
y
o
u
 
f
o
r
 
y
o
u
r
p
a
r
t
i
c
i
p
a
t
i
o
n
!
Slide Note
Embed
Share

Explore the agenda, activities, and key details of the Yocto Project Developer Day Advanced Class. Learn about CROPS, containers for Yocto Project, available SDKs, Docker setup, and more. Discover how CROPS provides a consistent developer experience across different operating systems through the use of containers.

  • Yocto Project
  • Developer Day
  • Advanced Class
  • CROPS
  • Containers

Uploaded on Sep 07, 2024 | 1 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Advanced Class Randy Witt, Brian Avery, David Reyna, Mark Hatle, Rudi Streif, Sean Hudson, Henry Bruce Yocto Project Developer Day Portland 24 February 2017

  2. Advanced Class Class Content: https://wiki.yoctoproject.org/wiki/DevDay_US_2017 Requirements: Wireless SSH (Windows: e.g. putty ) Serial (Linux: screen , Windows: e.g. Teraterm ) Registration: Wireless Only! Valerie Scott Direct ethernet does work (but may not work later) 2

  3. Agenda The Advanced Class 9:00- 9:15 9:15- 9:45 9:45-10:15 10:15-10:30 10:30-10:45 10:45-11:10 11:10-12:00 12:00- 1:00 1:00- 1:30 1:30- 2:30 2:30- 2:45 2:45- 3:00 3:00- 3:30 3:30- 4:00 4:00- 4:30 4:30- 5:00 Opening session CROPS: Cross Platform support Prelink Morning Break Account setup WIC: the OE Image Creator Userspace: packaging, installation, system services Lunch (and board pass-out) Board bring-up Devtool and ESDK Afternoon Break Class news Node.js Analytics and the Event System Kernel/Security Forum Q and A 3

  4. Activity One CROPS Randy Witt, Brian Avery, David Reyna

  5. CROPS: Containers for Yocto Project CROss PlatformS (CROPS) provides a consistent developer experience across Windows, Mac OS X and Linux distros through the use of containers Why Containers? Avoid host contamination Easy route to multiple OS support, including Linux! Repeatable builds Fewer Linux distros to test A path to tools in the cloud 5

  6. CROPS: Available Today crops/extsdk-container Container that can support Extensible SDKs Also supports standard SDKs crops/toaster Latest released version of toaster/poky currently morty crops/toaster-master Keeps up with the current master of toaster/poky, kicked off via webhook so it's quite up to date. crop/poky This is an Ubuntu container with the necessary packages to run poky installed, but not poky itself. To run poky, you need a copy of it on your file system which you then map into the container. This will work equally well for poky or an install of oe-core. 6

  7. CROPS: Setup Docker Install Docker For Linux, Docker is typically available via the distro package manager, otherwisw go to the Docker web site: https://docs.docker.com/engine/installation/linux/ For Windows and Mac, follow the CROPS Instructions here: https://github.com/crops/docker-win-mac-docs/wiki Note: crops/samba container One of the nice features for windows/mac is the crops/samba container that exposes the docker volume to the host side via samba/cifs . This works around the fact that neither the windows nor mac filesystems have sufficient features to support a bitbake build. The docker volume is persistent just like a directory on a linux host would be. 7

  8. CROPS: ESDK First Time Follow the instructions at: https://github.com/crops/extsdk-container Linux: $ docker run --rm -it -v /home/myuser/sdkstuff:/workdir crops/extsdk-container --url http://someserver/extensible_sdk_installer.sh Windows: $ docker run --rm -it -v myvolume:/workdir crops/extsdk-container --url http://someserver/extensible_sdk_installer.sh 8

  9. CROPS: ESDK url command The --url tells the CROPS ESDK container where to find the ESDK That can be a website or you could copy into the container s workdir, and use: --url=file:///workdir/extensible_sdk_installer.sh or even url=/workdir/extensible_sdk_installer.sh On Windows, that would be provided via the Samba connection A useful CROPS ESDK command is --help This will print out all the startup options for the container. 9

  10. CROPS: Example eSDK on Windows The first time, follow the CROPS Windows install instructions Copy in the ESDK (and hello.c) via Samba connection \\192.168.99.100\workdir Run the container: $ docker run --rm -it -v ypvolume:/workdir crops/extsdk-container \ --url file:///workdir/poky-glibc-x86_64-core-image-base-armv5e-\ toolchain-ext-2.1+snapshot.sh workdir$ . ./environment-setup-armv5e-poky-linux-gnueabi workdir$ $CC hello.c workdir$ file a.out a.out: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=11885f8816 9be4452e8f7ac3e40a4a137ec04d6f, not stripped workdir$ exit $ 10

  11. CROPS: Example eSDK on Windows, Second Time When you close and then reopen Docker, you need to re-setup the ESDK container s environment $ # The environment information can be found here: $ docker-machine env $ eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env) $ $ # Restart the Samba container $ docker start samba $ $ # The ESDK is already extracted in the ESDK container, so no --url $ docker run --rm -it -v ypvolume:/workdir crops/extsdk-container Note: if you do not reassert the environment, you will get missing pipe and file errors 11

  12. CROPS: Example Toaster on Mac Run the container: $docker run --rm -it -v myvol:/wd -p 127.0.0.1:12000:8000 crops/toaster --workdir=/wd ### Shell environment set up for builds. ### Check if toaster can listen on 0.0.0.0:8000 OK . Running migrations: No migrations to apply. Starting webserver... Webserver address: http://0.0.0.0:8000/ Successful start. toasteruser@f07ebe8b10fe:/workdir/build$ 12

  13. CROPS: Example Poky on Mac Run the container: docker run --rm -it -v pokyvol:/wd crops/poky --workdir=/wd pokyuser@5451bf7edfec:/wd$ ls pokyuser@5451bf7edfec:/wd$ git clone git://git.yoctoproject.org/poky Cloning into 'poky'... remote: Counting objects: 354342, done. remote: Compressing objects: 100% (85618/85618), done. remote: Total 354342 (delta 263023), reused 353729 (delta 262410) Receiving objects: 100% (354342/354342), 130.36 MiB | 11.28 MiB/s, done. Resolving deltas: 100% (263023/263023), done. Checking connectivity... done. pokyuser@5451bf7edfec:/wd$ . ./poky/oe-init-build-env pokyuser@5451bf7edfec:/wd/build$ 13

  14. CROPS: Toaster and Poky The CROPS Poky can be found here: https://hub.docker.com/r/crops/poky/ The CROPS Toaster release can be found here: https://hub.docker.com/r/crops/toaster/ The CROPS Toaster master can be found here: https://hub.docker.com/r/crops/toaster-master/ 14

  15. CROPS: Future Target for 2.4 is an Eclipse plugin leveraging crops + devtool that should make app development easier and the same across host os's. Eclipse plug-in will evolve to provide UI for devtool commands You can use the Docker infrastructure (docker commit to an image, docker save to a tar.gz ) to capture your container and pass it to others for exact analysis, for example for errors and regressions 15

  16. CROPS: Class activity Users are typically able to get Docker and CROPs up and running on a Windows host in less than 30 minutes, most of that is the Docker and CROPS container installation time See if you can do that as fast on your host today or this week, and build and run hello.c . 16

  17. Reference The CROPs community is very active. Here is how you can update your cached containers: docker pull crops/extsdk-container docker pull crops/poky docker pull crops/toaster Here is a quick hello.c for your ESDK container #include <stdio.h> int main(void) { printf("Hello Berlin 2016!\n"); return 0; } Lead Developers: randy.e.witt@intel.com brian.avery@intel.com 17

  18. Activity Two Prelink Mark Hatle

  19. Introduction What is prelinking? Need to know what is run-time linking is first Why prelink? Why NOT prelink? How to enable prelinking Related items 19

  20. Introduction What is run-time linking? At runtime, the dynamic linker (ld.so) must resolve shared object dependencies. Once the shared objects are loaded, the system determines if they were loaded at a predetermined address (objects by default are usually NOT loaded at a valid predetermined address). The dynamic linker must now bind/resolve all symbols (providers and users) to specific addresses. This operation generally changes relocation tables using a Copy-On-Write (COW) process. 20

  21. ELF Object (orig) Sections: Idx Name Size VMA LMA File off Algn 4 .dynsym 000014b8 00000000004003f0 00000000004003f0 000003f0 2**3 5 .dynstr 00000d1f 00000000004018a8 00000000004018a8 000018a8 2**0 8 .rela.dyn 00000150 00000000004027d8 00000000004027d8 000027d8 2**3 9 .rela.plt 00001230 0000000000402928 0000000000402928 00002928 2**3 11 .plt 00000c30 0000000000403b70 0000000000403b70 00003b70 2**4 12 .text 00033691 00000000004047a0 00000000004047a0 000047a0 2**4 20 .dynamic 000001f0 00000000006f0e00 00000000006f0e00 000f0e00 2**3 21 .got 00000010 00000000006f0ff0 00000000006f0ff0 000f0ff0 2**3 22 .got.plt 00000628 00000000006f1000 00000000006f1000 000f1000 2**3 23 .data 00001220 00000000006f1640 00000000006f1640 000f1640 2**5 24 .bss 00001a68 00000000006f2860 00000000006f2860 000f2860 2**5 Each of the above contains some type of dynamic data Dynamic linker (arch specific) may have to inspect and modify in-place (COW) information based on load address 21

  22. What is prelinking? Using ld.so, we bind the binaries to help determine a pre-calculated load address for all ELF binaries. This load address is calculated (libraries only) in such a way that conflicts should not occur, thus ensuring that objects are loaded at the predetermined address. The ELF object is modified to include the changes. Some conflict and symbol resolution still may be necessary, but only for items that can t be pre- determined. 22

  23. ELF Shared Library (libc.so) Version: 0x1 Entry point address: 0x203b0 Start of program headers: 64 (bytes into file) Start of section headers: 1676576 (bytes into file) Flags: 0x0 Relocation section '.rela.dyn' at offset 0x17f68 contains 1273 entries: Offset Info Type Sym. Value 0000003937c8 000000000008 R_X86_64_RELATIVE 398400 0000003937d8 000000000008 R_X86_64_RELATIVE 1fbd0 0000003937e0 000000000008 R_X86_64_RELATIVE 1483a0 0000003937e8 000000000008 R_X86_64_RELATIVE 148400 Sym. Name + Addend Version: 0x1 Entry point address: 0x3b4c4203b0 Start of program headers: 64 (bytes into file) Start of section headers: 1681720 (bytes into file) Flags: 0x0 Relocation section '.rela.dyn' at offset 0x17f68 contains 1273 entries: Offset Info Type Sym. Value 003b4c7937c8 000000000008 R_X86_64_RELATIVE 3b4c798400 003b4c7937d8 000000000008 R_X86_64_RELATIVE 3b4c41fbd0 003b4c7937e0 000000000008 R_X86_64_RELATIVE 3b4c5483a0 003b4c7937e8 000000000008 R_X86_64_RELATIVE 3b4c548400 Sym. Name + Addend 23

  24. What is prelinking? New sections .gnu.liblist Contains one ElfNN Lib structure for each shared library which the object has been pre- linked against, in the order in which they appear in symbol search scope. .gnu.conflict Contains one ElfNN Rela structure for each needed prelink conflict fixup. .gnu.libstr Contains strings for .gnu.liblist section where .gnu.liblist is not alowed. .gnu_prelink_undo Contains private data to permit prelink --undo operation. 24

  25. ELF Object (prelinked) Sections: Idx Name Size VMA LMA File off Algn 4 .dynsym 000014b8 0000000000400428 0000000000400428 00000428 2**3 5 .gnu.liblist 00000064 00000000004018e0 00000000004018e0 000018e0 2**2 6 .gnu.conflict 00000888 0000000000401948 0000000000401948 00001948 2**3 9 .rela.dyn 00000150 00000000004027d8 00000000004027d8 000027d8 2**3 10 .rela.plt 00001230 0000000000402928 0000000000402928 00002928 2**3 12 .plt 00000c30 0000000000403b70 0000000000403b70 00003b70 2**4 13 .text 00033691 00000000004047a0 00000000004047a0 000047a0 2**4 21 .dynamic 000001f0 00000000006f0e00 00000000006f0e00 000f0e00 2**3 22 .got 00000010 00000000006f0ff0 00000000006f0ff0 000f0ff0 2**3 23 .got.plt 00000628 00000000006f1000 00000000006f1000 000f1000 2**3 24 .data 00001220 00000000006f1640 00000000006f1640 000f1640 2**5 25 .dynbss 00000808 00000000006f2860 00000000006f2860 000f2860 2**5 26 .bss 00001260 00000000006f3068 00000000006f3068 000f3068 2**5 27 .dynstr 00000d45 00000000008f3068 00000000008f3068 000f3068 2**0 29 .gnu.prelink_undo 000008f8 0000000000000000 0000000000000000 000f3dd0 2**3 Modified: .dynsym, .rela.dyn, ..rela.plt, , .dynstr New: .gnu.liblist, .gnu.conflict, .dynbss, .gnu.prelink_undo 25

  26. Why prelink? Faster Application Load Times Avoid unnecessary binding operations More re-use of cached pages Faster boot time Less Memory Required Fewer relocations means few COW pages More re-use of cached pages Battery/Power Savings Fewer CPU cycles, more power savings Less ram used, more power savings 26

  27. Binary Load times Busybox (/bin/sh) and GNU ld Conf arm - BB arm - ld mips - BB mips - ld x86 - BB x86 - ld x86-64 -BB x86-64 - ld relocs -96 -374 -119 -928 -99 -489 -93 -482 cached +28 -1653 +21 +20 +30 -3432 +71 -3306 Rel relocs -1218 -6323 0 0 -1264 -17802 -1201 -17717 Reloc time Obj Ld Tm -13595365 -130749928 -18293460 -55978938 Using LD_DEBUG=statistics - indicates savings, + indicates more 27

  28. Load times boot, login, free, halt Arch arm - min arm - base mips - min mips - base x86 - min x86 - base x86-64-min x86-64-base Min core-image-minimal, poky Base core-image-base, poky Lifetime -3.7s -8.0s -5.0s -9.0s -2.9s -5.9s -4.9s -7.6s Free mem -120k -188k -180k +620k +84k -60k +196k -172k Shared 0k 0k 0k -11k 0k 0k 0k 0k Buffers 0k -8k -12k +8k 0k -16k +120k +8k Cached -80k +44k +56k +180k +8k -40k +60k -79k - indicates savings, + indicates more 28

  29. Why NOT prelink? Load addresses are pre-determined. Could make it easier for an attacker to craft certain types of attacks. Incompatible with ASLR (Address Space Layout Randomization) (limited effectiveness on 32-bit) Mitigation: use randomized prelink layout option (-R) Not available on your architecture Arm64 work in progress (slowly) PPC64 not supported (elf v2) 29

  30. How to enable/disable prelink Local.conf, USER_CLASSES - image-prelink # Additional image features # # The following is a list of additional classes to use when building images which # enable extra features. Some available options which can be included in this variable # are: # - 'buildstats' collect build statistics # - 'image-mklibs' to reduce shared library files size for an image # - 'image-prelink' in order to prelink the filesystem image # - 'image-swab' to perform host system intrusion detection # NOTE: if listing mklibs & prelink both, then make sure mklibs is before prelink USER_CLASSES ?= "buildstats image-mklibs image-prelink" 30

  31. Related items Normally the prelinker uses ld.so. However you can t use ld.so in a cross environment. Cross prelinker adds prelink-rtld that emulates the functionality of ld.so. Prelink-rtd will let you dump conflicts, load maps, as well as simple ldd like functionality. ldd: prelink-rtld --root=<path> --target-paths /bin/bash Load addresses are emulated, unless prelinked ld.so like environment vars, RTLD_DEBUG= etc 31

  32. Activity Three Class Account Setup

  33. Notes for the Advanced Class: The class will be given with YP-2.2 (Morty) Wifi Access: SSID: <TBD> Password: <TBD> Your account s IP access addresses SSH (password devday ): ssh ilab01@devday-a.yocto.io -p 10000(+your session number) HTTP: http://devday-a.yocto.io:30000(+your session number) 33

  34. Yocto Project Dev Day Lab Setup The virtual host s resources can be found here: Your Project: "/scratch/working/build-mbm Extensible-SDK Install: "/scratch/sdk/mbm Sources: "/scratch/src Poky: "/scratch/poky" Downloads: "/scratch/downloads" Sstate-cache: "/scratch/sstate-cache" QEMU/Toaster Install: "/scratch/build You will be using SSH to communicate with your virtual server. You may want to change the default password ( devday ) after you log on, in case someone accidently uses the same account address as yours. 34

  35. FYI: Host Setup Gotchas YP-2.2 has new host dependencies, for example: $ sudo apt-get update $ sudo apt-get install git-core diffstat unzip texinfo \ gcc-multilib build-essential chrpath socat libsdl1.2-dev \ xterm sysstat python python3 xz-utils locales cpio YP-2.2 Python 3 also has some dependencies. If you see the error Please use a locale setting which supports utf-8 , then you need to update/set your locale One way to do that is to add this to your ~/.bash_profile export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 And run this for good measure: $ sudo locale-gen en_US.utf8 $ sudo dpkg-reconfigure locales # choose en_US.utf8 as your default locale (~149) 35

  36. FYI: How class project was prepared $ cd /scratch $ git clone -b morty git://git.yoctoproject.org/poky.git $ cd poky $ git clone -b morty git://git.openembedded.org/meta-openembedded $ git clone -b morty git://git.yoctoproject.org/meta-intel $ cd /scratch/working $ source /scratch/poky/oe-init-build-env build-mbm $ echo "MACHINE = \"intel-corei7-64\"" >> conf/local.conf $ echo "SSTATE_DIR = \ /scratch/sstate-cache\"" >> conf/local.conf $ echo "DL_DIR = \ /scratch/downloads\"" >> conf/local.conf $ echo "IMAGE_INSTALL_append = \" gdbserver openssh libstdc++ \ nodejs nodejs-npm curl \"" >> conf/local.conf $ echo "BBLAYERS += \"/scratch/poky/meta-intel \"" \ >> conf/bblayers.conf $ echo "BBLAYERS += \"/scratch/poky/meta-openembedded/meta-oe \"" \ >> conf/bblayers.conf $ bitbake core-image-base $ bitbake nodejs-native $ bitbake cmake-native $ bitbake parted-native dosfstools-native mtools-native 36

  37. FYI: Minnowboard Max Turbot SD Card Prep Here is how to flash the microSD card for the MBM Insert the microSD card into your reader, and attach that to your host 1. Find the device number for the card (e.g. /dev/sdc ). For example run dmesg | tail to find the last attached device 2. Unmount any existing partitions from the SD card (for example umount /media/<user>/boot ) 3. Flash the image $ sudo dd if=tmp/deploy/images/intel-corei7-64/core- image-base-intel-corei7-64.hddimg of=<device_id> bs=1M 4. On the host, right-click and eject the microSD card s filesystem so that the image is clean 37

  38. FYI: Minnowboard Max Turbot SD Card Prep Note: you can instead use the automatically generated WIC image 1. Flash the image $ sudo dd if=scratch/working/build- mbm/tmp/deploy/images/intel-corei7-64/core-image-base- intel-corei7-64.wic of=<device_id> bs=1M 2. Note that when the target boots, the WIC version of the image the kernel boot output does not appear on the serial console. This means that after 14 seconds of a blank screen you will then see the login prompt 38

  39. NOTE: Clean Shells! We are going to do a lot of different exercises in different build projects, each with their own environments. To keep things sane, you should have a new clean shell for each exercise. There are two simple ways to do it: 1. Close your existing SSH connection and open a new one -- or 2. Do a bash before each exercise to get a new sub-shell, and exit at the end to remove it, in order to return to a pristine state. 39

  40. Activity Four WIC Eduard Bartosh, David Reyna

  41. WIC: Open Embedded Image Creation Physical devices accept and boot images in various ways depending on the specifics of the device. If your device require multiple partitions on an SD card, flash, or an HDD, you can use wic to create the properly partitioned image. The wic command generates partitioned images from existing OpenEmbedded build artifacts. Image generation is driven by partitioning commands contained in an provided or custom Openembedded kickstart file (.wks) The wic was designed to be completely extensible through a plug-in interface 41

  42. WIC: Requirements You need to have the build artifacts already available, e.g. created an image like "core-image-minimal" You must build several native tools, which are tools built to run on the build system: $ bitbake parted-native dosfstools-native mtools-native You must have sourced one of the build environment setup scripts (i.e. oe-init-build-env or oe-init-build-env- memres). Do this now: $ cd /scratch/working $ source ../poky/oe-init-build-env build-mbm 42

  43. WIC: Help Wic is documented on-line here: http://www.yoctoproject.org/docs/2.1/mega- manual/mega-manual.html#creating-partitioned-images You can get help from wic, where the available commands and help topics $ wic -h $ wic --help The wic help lists the available commands and help topics, from which you can request deeper help information $ wic help command $ wic help help_topic 43

  44. WIC: Help You can find out more about the images wic creates using the existing kickstart files with the form wic list <image> help where <image> is for example "directdisk" or "mkefidisk : $ wic list mkefidisk help Creates a partitioned EFI disk image that the user can directly dd to boot media. $ 44

  45. WIC: Operational Modes You can use wic in two different modes, depending on how much control you need for specifying the Openembedded build artifacts that are used for creating the image: Raw and Cooked: Raw Mode: You explicitly specify build artifacts through command-line arguments. Cooked Mode: The current MACHINE setting and image name are used to automatically locate and provide the build artifacts. You do not need root privileges to run wic. In fact, you should not run as root when using the utility. 45

  46. WIC: Cooked Mode The general form of the wic command using Cooked Mode is: $ wic create kickstart_file -e image_name kickstart_file: An OpenEmbedded kickstart file. You can provide your own custom file or supplied file. image_name: Specifies the image built using the OpenEmbedded build system. Example: $ wic create mkefidisk -e core-image-minimal 46

  47. WIC: Raw Mode The general form of the 'wic' command in raw mode is: $ wic create image_name.wks [options] [...] Where: image_name.wks (An OpenEmbedded kickstart file) -o OUTDIR, --outdir=OUTDIR -e IMAGE_NAME, --image-name=IMAGE_NAME -r ROOTFS_DIR, --rootfs-dir=ROOTFS_DIR -b BOOTIMG_DIR, --bootimg-dir=BOOTIMG_DIR -k KERNEL_DIR, --kernel-dir=KERNEL_DIR -n NATIVE_SYSROOT, --nativesysroot=NATIVE_SYSROOT -s, --skip-build-check -D, --debug Example: $ wic create directdisk -r rootfs_dir -b bootimg_dir \ --k kernel_dir -n native_sysroot 47

  48. WIC: Available kickstart files You can use wic to get a list of available kickstarts $ wic list images galileodisk-sd Galileo Gen 1/2 disk image (SD card) systemd-bootdisk-uuid EFI disk image with systemd-boot galileodisk-usb Galileo Gen 1/2 disk image (USB storage) systemd-bootdisk EFI disk image with systemd-boot directdisk 'pcbios' direct disk image directdisk-multi-rootfs multi rootfs image using rootfs plugin directdisk-bootloader-config 'pcbios' direct disk image with custom mkhybridiso hybrid ISO image sdimage-bootpart SD card image with a boot partition mkgummidisk EFI disk image directdisk-gpt 'pcbios' direct disk image qemux86-directdisk qemu machine 'pcbios' direct disk image mkefidisk EFI disk image $ 48

  49. WIC: Example Kickstart File Here is the mkefidisk.wks kickstart file $ cat ../../poky/scripts/lib/wic/canned-wks/mkefidisk.wks # short-description: Create an EFI disk image # long-description: Creates a partitioned EFI disk image that user # can directly dd to boot media. part /boot --source bootimg-efi --sourceparams="loader=grub-efi" \ --ondisk sda --label msdos --active --align 1024 part / --source rootfs --ondisk sda --fstype=ext4 --label platform \ --align 1024 --use-uuid part swap --ondisk sda --size 44 --label swap1 --fstype=swap bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 \ console=ttyS0,115200 console=tty0 $ 49

  50. WIC: Using WIC for MinnowBoard Max $ wic create mkefidisk -e core-image-minimal Checking basic build environment... Done. Creating image(s)... Info: The new image(s) can be found here: /var/tmp/wic/build/mkefidisk-201310230946-sda.direct The following build artifacts were used to create the image(s): ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow- BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow- KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/ NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/ The image(s) were created using OE kickstart file: /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct \ of=/dev/sdb bs=1M $ sudo eject /dev/sdb 50

Related


More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#