Your cart is currently empty!
Yocto Project provides a software development environment based on the OpenEmbedded build system and flexible Image File system formats. It aims to ease the development of embedded Linux applications on multi-core architectures.
Yocto build system components:
- Bitbake
- Openembedded-core
- Poky
What is Bitbake ?
Bitbake is a build tool written in python, it helps to integrate all types of packages in yocto like .c files, .cpp, java, python, Makefile, CmakeFiles, autotools, and other libraries. Bitbake is co-maintained by the yocto project and openembedded project.
bitbake recipe (.bb file) syntax:
DESCRIPTION=””
LICENSE=””
SRC_URI = ""
S="${WORKDIR}"
do_compile(){
}
do_install(){
}
FILES_${PN}=""
Write yocto recipe(.bb) file for hello.c
hello_1.0.bb
DESCRIPTION=” recipe for hello.c"
LICENSE=”CLOSED”
SRC_URI = "file://hello.c"
S="${WORKDIR}"
do_compile(){
cd ${S}
${CC} ${LDFLAGS} hello.c -o hello
}
do_install(){
install -d ${D}/usr/bin
install -m 777 ${S}/hello ${D}/usr/bin
}
FILES_${PN} = "/usr/bin/hello"
Creating recipe (.bb file) for hello.c
hello_1.0-r0.bb
PN_PV-PR.bb
PN=hello # PN= Package Name
PV=1.0 # PV= Package Version
PR= r0 # package revision
what is Openembedded-core ?
Open embedded core provides meta-layers that contain recipes(.bb files), classes(.bbclass), and related configuration (.conf) files.
open embedded-core meta-lare architecture:
meta-layer/
│ ├── conf/
│ │ ├── layer.conf
│ ├──recipes-core/
│ │ ├──hello/hello.c
│ │ │ ├──hello_1.0.bb
What is Poky ?
poky is a Yocto project distribution that comes with a complete set of tools and applications needed to start building embedded Linux systems. It is designed to be used as a drop-in replacement for the original Yocto Project, with the same build environment, package manager, and infrastructure.
poky provides an easy way to build a complete embedded Linux system that consistently includes all pieces that are required for a typical embedded Linux system (i.e., kernel, device tree blobs, toolchain). The poky development environment supports cross-compilation for multiple architectures (x86/x86_64/ARM) on both 32-bit and 64-bit targets.
The poky project has been in active development since 2009, initially under the name poky-lite and later renamed to poky because it was no longer limited to Sparc-based architectures like its predecessors.
Yocto versions:
name | version |
Nanbield | 4.3 |
Mickledore | 4.2 |
Langdale | 4.1 |
kirkstone | 4.0 |
Honister | 3.4 |
Hardknott | 3.3 |
Gatesgarth | 3.2 |
Dunfell | 3.1 |
Zeus | 3.0 |
Warrior | 2.7 |
thud | 2.6 |
sumo | 2.5 |
Rocko | 2.4 |
pyro | 2.3 |
Morty | 2.2 |
krogoth | 2.1 |
Jethro | 2.0 |
fido | 1.8 |
dizzy | 1.7 |
daisy | 1.6 |
dora | 1.5 |
dylan | 1.4 |
danny | 1.3 |
denzil | 1.2 |
edison | 1.1 |
bernard | 1.0 |
laverne | 0.9 |
How to Compile Yocto in Ubuntu ?
Install Host PC dependencies:
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3 xterm python3-subunit mesa-common-dev zstd liblz4-tool
Download the yocto build system:
$ install -d yoctotutor $ cd yoctotutor $ git clone https://git.yoctoproject.org/poky $ git poky $ git checkout kirkstone $ cd ../../ $ source sources/poky/oe-init-build-env $ vim conf/local.conf # edit the your MACHINE=beaglebone-yocto $ build$ bitbake core-image-minimal
Output images present in
$ build$ ls tmp/deploy/images/beaglebone-yocto
core-image-minimal-beaglebone-yocto-20230121071752.rootfs.wic