+ +
- -
Systèmes d'Exploitation
Calendrier  Détails
Calendrier  Détails
Processeurs ARM
Calendrier  Détails
Processeurs PowerPC
Calendrier  Détails
Calendrier  Détails
+ +
> >
- -

ac6 >> ac6-training >> Systèmes d'Exploitation >> Linux >> Embedded Linux with Yocto Télécharger le catalogue Télécharger la page Ecrivez nous Version imprimable

D1Y Embedded Linux with Yocto

Building embedded Linux platforms using Yocto

Building embedded Linux platforms using Yocto
  • Understanding the architecture of the Linux system
  • Learn how to install Linux on your hardware and create a BSP
  • Explore the Linux system architecture
  • Booting Linux
  • Initializing the system
  • Install existing packages on the target
  • Learn how to install Linux on flash chips
  • Using and customizing Yocto
Labs can be conducted either on qemu or on target boards, that can be:
    Dual Cortex/A7-based "STM32MP15-DISCO" boards from STMicroelectronics.
    Quad Cortex/A9-based "SabreLite" boards from NXP.
    Quad Cortex/A53-based "imx8q-evk" boards from NXP.
We use the latest Yocto version supported by the chip provider
Course environment
  • Printed course material (in English)
  • One Linux PC for two trainees.
  • One target platform for two trainees (if not using qemu)

First Day
Introduction to Linux
  • Linux history and Version management
  • Linux system architecture
    • Processes and MMU
    • System calls
    • Shared libraries
  • Linux components
    • Toolchain
    • Bootloader
    • Kernel
    • Root file system
  • Linux distributions
  • Linux packages
  • The various licenses used by Linux (GPL, LGPL, etc)
Linux tools for embedded systems
  • Boot loaders (UBoot, Redboot, barebox)
  • Optimized libraries (eglibc, uClibc)
  • Toolchains
  • Embedded GUIs
  • Busybox
  • Embedded distributions
    • Commercial
    • Standard
    • Tools for building custom distributions
Introduction to Yocto
  • Overview of Yocto
    • History
    • Yocto, Open Embedded and Poky
    • Purpose of the Yocto project
    • The main projects
  • Yocto build system architecture
    • Overview
    • Recipes and classes
    • Tasks
    • Layers and layer priorities
    • Directory layout
    • Configuration files (local, machine and distribution)
    • The bitbake tool
  • Common options
  • Using Yocto
    • Building a package
    • Building an image (root file system + u-boot + kernel)
  • Miscellaneous tools around Yocto
    • Yocto Application Development Toolkit (ADT)
    • Hob
Exercise :  Building a root file system using Yocto
Second Day
Using U-Boot
  • Introduction to U-Boot
  • Booting the board through U-Boot
    • Booting from NOR
    • Booting from NAND
    • Booting from eMMC
  • U-Boot environment variables
    • User-defined variables
    • Predefined variables
    • Variables substitution
  • The U-Boot minimal shell
    • Writing scripts in variables
    • Executing scripts
    • Using variables in scripts: the set-script pattern
  • U-Boot main commands
    • Booting an OS
    • Accessing flash chips
    • Accessing file systems (NFS, FAT, EXTx, JFFS2…)
  • The full U-Boot shell
    • Script structure
    • Control flow instructions (if, for…)
  • Booting Linux
    • Linux kernel parameters
    • The Linux startup sequence
Exercise :  Writing a script to configure the network and pass this configuration to the Linux kernel
Exercise :  Booting the board on NFS, using pre-existing images
Exercise :  Writing scripts to choose between boot from flash or from the network
Building U-Boot
  • Building and installing U-Boot with its native build system
  • Building U-boot with Yocto
Exercise :  Configuring and building u-boot with its native build system
Exercise :  Building u-boot from Yocto
Building the kernel
  • The Linux build system
  • Downloading stable source code
    • Getting a tarball
    • Using GIT
  • Configuring the kernel
  • Compiling the kernel and its modules
    • Modules delivered in-tree
    • Out-of-tree modules
  • Installing the kernel and the modules
  • Configuring and building the kernel with Yocto
Exercise :  Configuring and compiling a target kernel for the target board with the kernel build system
Exercise :  Configuring and compiling a target kernel for the target board with Yocto
Third Day
Building packages
  • Packages
    • Tools to build packages (gcc, Makefile, pkg-config)
    • Autotools
    • Cross-compiling a package with autotools
  • The all-in-one applications
    • Busybox, the basic utilities
    • Dropbear: encrypted communications (ssh)
  • Automatically starting a program at boot
    • Initialization systems (busybox init, system V init)
Exercise :  Cross-compiling an autotools-based package
Writing package recipes for Yocto
  • Recipe architecture
  • The bitbake language
    • Standard variables and functions
  • Writing recipes in python
    • Introduction to python
    • Using python for writing recipes
  • Various kind of recipes
    • bare program
    • Makefile-based package
    • autotools-based package
    • u-boot
    • kernel
    • out-of-tree module
Exercise :  Writing a package recipe for an autotools-based package
  • Writing new tasks
  • Recipes dependencies
  • Adding patches
  • Adding a new layer
  • Customizing an existing package (.bbappend)
  • Automatically starting a program (class update-rc.d)
Exercise :  Writing a package recipe for an autotools-based package
Embedded file systems
  • Storage interfaces
    • Block devices
    • MTD
  • Flash memories and Linux MTDs
    • NOR flashes
    • NAND flashes
    • ONENAND flashes
  • The various flash file system formats
  • Read-only file system
  • Standard Linux file systems
    • Ext2/3/4, FAT, NFS
  • Ramdisks and initrd
    • Creating an initramfs
    • Booting through an initramfs
  • Choosing the right file system formats
  • Flashing the file system
Creating a root file system
  • Manually building your root file system
    • Device nodes, programs and libraries
    • Configuration files (network, udev, …)
    • Installing modules
    • Looking for and installing the needed libraries
    • Testing file system consistency and completeness
Exercise :  Manually creating a minimal root file system using busybox and dropbear
  • Building a root file system with Yocto
  • Creating a custom root file system
    • Writing an image recipe
    • Selecting the packages to build
    • Selecting the file system types
    • Customizing system configuration files (network, mount points, …)
  • Package management
    • ipkg
Exercise :  Writing and building an image recipe
Exercise :  Creating a JFFS2 or UBIFS image with Yocto and flashing it
Fourth Day
Porting Yocto
  • Porting Yocto to a new board
    • BSP architecture
  • Selecting and configuring u-boot recipe
  • Selecting and configuring kernel recipe
    • Adding a new BSP layer (yocto-bsp create)
Exercise :  Creating a new BSP layer
Porting U-boot
  • Porting source code
    • U-Boot source structure
    • Adding a new board to U-Boot sources
    • U-Boot drivers (RS232, network, flash, SD/MMC)
    • U-Boot startup and board initialization
  • Adding a custom u-boot to Yocto
Exercise :  Creating a board support package in U-Boot and setup of initialization code
Porting the kernel
  • Linux BSP architecture
    • Overall structure
    • The ARM BSP
    • The Linux build system
  • Defining and initializing the board
    • Programmatically (platform, i2c, spi, …)
    • Using the Flattened Device Tree
  • Customizing the Yocto kernel recipe
    • Setting the default configuration
    • Providing a fragment
    • Adding patches
    • Specifying the kernel sources
Exercise :  Create a minimal BSP for the target board