KEMBAR78
Yocto | PDF | Booting | Kernel (Operating System)
0% found this document useful (0 votes)
72 views9 pages

Yocto

The Yocto Project allows building embedded Linux systems for a variety of architectures. It provides tools and metadata to build these systems from source. Key components include the bootloader, which initializes the system and loads the kernel. The bootloader passes information to the kernel like hardware details and the device tree, which describes the system components. Bootloaders expect kernel images in certain formats, like zImage or uImage, depending on the target architecture.

Uploaded by

Bala Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views9 pages

Yocto

The Yocto Project allows building embedded Linux systems for a variety of architectures. It provides tools and metadata to build these systems from source. Key components include the bootloader, which initializes the system and loads the kernel. The bootloader passes information to the kernel like hardware details and the device tree, which describes the system components. Bootloaders expect kernel images in certain formats, like zImage or uImage, depending on the target architecture.

Uploaded by

Bala Krishna
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

YOCTO

Project

सस्
ु वगतम ्
நல்வரவு
ସୁସ୍ୱାଗତମ୍
సుస్వాగతం
સુસ્વાગતમ
সুস্বাগতম
ಸುಸ್ವಾಗತ
സുസവാഗതം
ਸੁਆਗਤਮ
‫خوش آمدید‬
Installing Yocto
▪ The Poky project incorporates a stable BitBake
release, so to get started with Yocto, we only need to
install Poky in our Linux host system
- $ sudo install -o $(id -u) -g $(id -g) -d /opt/yocto
- $ cd /opt/yocto
- $ git clone --branch kirkstone git://git.yoctoproject.org/poky
▪ Poky contains three metadata directories, meta,
meta-poky, and meta-yocto-bsp, as well as a
template metadata layer, meta-skeleton, which can
be used as a base for new layers.
Slide 2
One Vision. One Goal... Advanced Computing for Human Advancement…
Bootloader
▪ The bootloader is the second element of embedded Linux. It is
the part that starts the system and loads the operating system
kernel.
▪ Bootloader has two main jobs: to initialize the system to a basic
level and to load the kernel.
▪ The final act of the bootloader is to load the kernel into RAM
and create an execution environment for it.
▪ The bootloader-kernel interface
- pass a pointer to a structure containing information about the
hardware configuration.
- pass a pointer to the kernel command line.
▪ The kernel command line is a text string that controls the
behavior of Linux.
Slide 3
One Vision. One Goal... Advanced Computing for Human Advancement…
Boot Process
▪ Phase 1 – ROM Code
- The ROM code is capable of loading a small chunk of code from one
of several pre-programmed locations into the SRAM(Does not need
memory controller).
- In SoCs, where the SRAM is not large enough to load a full bootloader
such as U-Boot, there has to be an intermediate loader called the
secondary program loader (SPL).
▪ Phase 2- SPL
- The SPL must set up the memory controller and other essential parts of
the system in preparation for loading the Tertiary Program Loader (TPL)
into DRAM.
▪ Phase 3 - Tertiary Program Loader (TPL)
- At this point, we are running a full bootloader, such as U-Boot from
DRAM

Slide 4
One Vision. One Goal... Advanced Computing for Human Advancement…
Bootloader to Kernel
▪ When the bootloader passes control to the kernel, it has to
pass some basic information, which includes the following:
- The machine number, which is used on PowerPC and Arm
platforms without support for a device tree, to identify the type of
the SoC.
- Basic details of the hardware that's been detected so far,
including (at the very least) the size and location of the physical
RAM and the CPU's clock speed.
- The kernel command line.
- Optionally, the location and size of a device tree binary.
- Optionally, the location and size of an initial RAM disk, called the
initial RAM file system (initramfs).
Slide 5
One Vision. One Goal... Advanced Computing for Human Advancement…
Device Tree
▪ A device tree is a flexible way of defining the
hardware components of a computer system.
▪ Usually, the device tree is loaded by the
bootloader and passed to the kernel, it is also
possible to bundle the device tree with the kernel
image.
▪ The device tree represents a computer system as
a collection of components joined together in a
hierarchy, such as a tree.
Slide 6
One Vision. One Goal... Advanced Computing for Human Advancement…
Device Tree Details
▪ The Compatible property is used by kernel to find
a matching device driver by comparing it with
the strings that are exported by each device
driver in a ‘of_device_id’ structure
▪ The device tree compiler (dtc) is used to compile
device tree files into a dtb (device tree binary) file

Slide 7
One Vision. One Goal... Advanced Computing for Human Advancement…
Bootloaders and Kernel
▪ U-Boot doesn't have a filesystem.
▪ To build a kernel image, you need to know what
your bootloader expects.
- U-Boot: Traditionally, U-Boot has required uImage, but
newer versions can load
- a zImage file using the bootz command.
- x86 targets: Requires a bzImage file.
- Most other bootloaders: Require a zImage file.

Slide 8
One Vision. One Goal... Advanced Computing for Human Advancement…
Bootloaders and Kernel
▪ A kernel build generates two files in the top-level
directory: vmlinux and System.map. The vmlinux is
the kernel as an ELF binary. System.map contains
the symbol table in a human-readable form.
- Image: vmlinux converted to raw binary format.
- zImage: For the PowerPC architecture, this is just a
compressed version of Image, which implies that the
bootloader must do the decompression.
- uImage: zImage plus a 64-byte U-Boot header.
Slide 9
One Vision. One Goal... Advanced Computing for Human Advancement…

You might also like