[bootlin/training-materials updates] sysdev-ng: agenda/embedded-linux-agenda.tex: implement sysdev-ng (14d657ea)

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Mar 17 22:44:26 CET 2022


Repository : https://github.com/bootlin/training-materials
On branch  : sysdev-ng
Link       : https://github.com/bootlin/training-materials/commit/14d657eafc586322c831ad5c8053a7b53b80eb76

>---------------------------------------------------------------

commit 14d657eafc586322c831ad5c8053a7b53b80eb76
Author: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
Date:   Sun Aug 22 00:01:25 2021 +0200

    agenda/embedded-linux-agenda.tex: implement sysdev-ng
    
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>


>---------------------------------------------------------------

14d657eafc586322c831ad5c8053a7b53b80eb76
 agenda/embedded-linux-agenda.tex | 439 +++++++++++++++++++++++----------------
 1 file changed, 256 insertions(+), 183 deletions(-)

diff --git a/agenda/embedded-linux-agenda.tex b/agenda/embedded-linux-agenda.tex
index 76dc8adb..47bf9dab 100644
--- a/agenda/embedded-linux-agenda.tex
+++ b/agenda/embedded-linux-agenda.tex
@@ -31,6 +31,8 @@
   \item Be able to choose and setup the main Linux filesystems for
     block and flash storage devices, and understand their main
     characteristics.
+  \item Be able to interact with hardware devices, configure the
+    kernel with appropriate drivers and extend the {\em Device Tree}
   \item Be able to select, cross-compile and integrate open-source
     software components (libraries, applications) in an Embedded Linux
     system, and to handle license compliance.
@@ -38,9 +40,6 @@
     build a complete system for an embedded platform.
   \item Be able to develop and debug applications on an embedded Linux
     system.
-  \item Get an understanding of the different solutions available for
-    real-time on embedded Linux systems and be able to setup those
-    solutions on a hardware platform.
     \vspace{-0.5cm}
   \end{itemize}
 }
@@ -66,44 +65,54 @@
     \prerequisiteenglish
   \end{itemize}
 }
-\feagendasummaryitem{Alternative version}{
-  Reduced version of the Embedded Linux
-  system development training ({\bf 4 days long}) with the following
-  topics removed:
-  \begin{itemize}
-  \item Flash file system
-  \item Real time
-  \end{itemize}
-  Practical labs using an STMicroelectronics STM32MP157D-DK1 Discovery board
-  \url{https://bootlin.com/doc/training/embedded-linux-4d/embedded-linux-4d-agenda.pdf}.
-}
 \ferequiredequipmentonsite{}
 \certificate{}
 \disabilities{}
 
 \feagendatwocolumn
-{Hardware}
+{Hardware platform for practical labs, option \#1}
+{
+  {\bf BeagleBone Black} board
+  \begin{itemize}
+  \item An ARM AM335x (single Cortex-A8) processor from Texas
+    Instruments
+  \item USB powered
+  \item 512 MB of RAM
+  \item 2 or 4 GB of on-board eMMC storage
+  \item USB host and device
+  \item HDMI output
+  \item 2 x 46 pins headers, to access UARTs, SPI buses, I2C buses
+    and more.
+  \end{itemize}
+}
+{}
 {
-	Using the Microchip SAMA5D3 Xplained board in all practical labs
-	SAMA5D36 (Cortex A5) CPU from Microchip, which features:
+  \begin{center}
+    \includegraphics[width=5cm]{../slides/beagleboneblack-board/beagleboneblack.png}
+  \end{center}
+}
 
+\feagendatwocolumn
+{Hardware platform for practical labs, option \#2}
+{
+  {\bf STMicroelectronics STM32MP157D Discovery Kit~1} board
   \begin{itemize}
+  \item STM32MP157D (dual Cortex-A7) processor from STMicroelectronics
   \item USB powered
-  \item 256 MB DDR2 RAM
-  \item 256 MB NAND flash
-  \item 2 Ethernet ports (Gigabit + 100 Mbit)
-  \item 2 USB 2.0 host ports
-  \item 1 USB device port
-  \item 1 MMC/SD slot
-  \item 3.3 V serial port (like Beaglebone Black)
-  \item Arduino R3-compatible header
-  \item Misc: JTAG, buttons, LEDs
+  \item 512 MB DDR3L RAM
+  \item Gigabit Ethernet port
+  \item 4 USB 2.0 host ports
+  \item 1 USB-C OTG port
+  \item 1 Micro SD slot
+  \item On-board ST-LINK/V2-1 debugger
+  \item Arduino compatible headers
+  \item Audio codec, buttons, LEDs
   \end{itemize}
 }
 {}
 {
   \begin{center}
-    \includegraphics[height=5cm]{../slides/xplained-board/xplained-board.png}
+    \includegraphics[width=5cm]{../slides/discovery-board-dk1/discovery-board-dk1.png}
   \end{center}
 }
 
@@ -113,24 +122,16 @@
 {Lecture - Introduction to embedded Linux}
 {
   \begin{itemize}
-  \item Introduction to Free Software
-  \item Reasons for choosing Free Software in embedded operating systems
-  \item Example embedded systems running Linux
-  \item CPU, RAM and storage requirements
-  \item Choosing a hardware platform
-  \item System architecture: main components
-  \item Embedded system development tasks
+  \item Advantages of Linux versus traditional embedded operating
+    systems.
+  \item Typical hardware platforms used to run embedded Linux systems.
+  \item Overall architecture of embedded Linux systems: overview of
+    the major software components.
+  \item Development environment for Embedded Linux development.
   \end{itemize}
 }
-\\
+
 \feagendatwocolumn
-{Lecture - Embedded Linux development environment}
-{
-  \begin{itemize}
-  \item Operating system and tools to use on the development
-        workstation for embedded Linux development.
-  \end{itemize}
-}
 {Lecture - Cross-compiling toolchain and C library}
 {
   \begin{itemize}
@@ -141,86 +142,81 @@
   \item Building a cross-compiling toolchain with automated tools.
   \end{itemize}
 }
-
-\section{Day 1 - Afternoon}
-\feagendatwocolumn
 {Lab - Cross compiling toolchain}
 {
   \begin{itemize}
-  \item Configuring Crosstool-NG
-  \item Executing it to build a custom uClibc toolchain.
+  \item Getting and configuring Crosstool-NG
+  \item Executing it to build a custom cross-compilation toolchain
+  \item Exploring the contents of the toolchain
   \end{itemize}
 }
-{Lecture - Bootloaders}
+
+\section{Day 1 - Afternoon}
+
+\feagendatwocolumn
+{Lecture - Boot process, firmware bootloaders}
 {
   \begin{itemize}
-  \item Available bootloaders
-  \item Bootloader features
-  \item Installing a bootloader
-  \item Detailed study of U-Boot
+  \item Booting process of embedded platforms, focus on the {\em x86}
+    and {\em ARM} architectures
+  \item Boot process and bootloaders on {\em x86} platforms (legacy
+    and UEFI)
+  \item Boot process on ARM platforms: ROM code, bootloaders, {\em ARM
+      Trusted Firmware}
+  \item Boot flow on ARM with {\em ARM Trusted Firmware}
+  \item Focus on U-Boot: configuration, installation, and usage.
+  \item U-Boot commands, U-Boot environment, U-Boot scripts, U-Boot
+    generic distro boot mechanism
   \end{itemize}
 }
-\\
-
-\feagendatwocolumn
 {Lab - Bootloader and U-boot}
 {
-  {\em Using the Microchip SAMA5D3 Xplained board}
   \begin{itemize}
   \item Set up serial communication with the board.
-  \item Configure, compile and install the first-stage bootloader
-        and U-Boot on the Xplained board.
+  \item Configure, compile and install U-Boot for the target hardware.
   \item Become familiar with U-Boot environment and commands.
-  \item Set up TFTP communication with the board. Use TFTP U-Boot commands.
-  \end{itemize}
-}
-{Lecture - Linux kernel}
-{
-  \begin{itemize}
-  \item Role and general architecture of the Linux kernel
-  \item Features available in the Linux kernel,
-        with a focus on features useful for embedded systems
-  \item Kernel user interface
-  \item Getting the sources
-  \item Linux kernel release process. Long Term Support versions.
-  \item Using the patch command
+  \item Set up TFTP communication with the board. Use TFTP U-Boot
+    commands.
   \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform.}
 }
-\\
 
 \section{Day 2 - Morning}
 
 \feagendatwocolumn
-{Lab - Kernel sources}
-{
-  \begin{itemize}
-  \item Downloading kernel sources
-  \item Apply kernel patches
-  \end{itemize}
-}
-{Lecture – Configuring and compiling a Linux kernel}
+{Lecture - Linux kernel}
 {
   \begin{itemize}
-  \item Kernel configuration.
-  \item Using ready-made configuration files for specific
-    architectures and boards.
-  \item Kernel compilation.
-  \item Generated files.
-  \item Using kernel modules
+  \item Role and general architecture of the Linux kernel
+  \item Separation between kernel and user-space, and interfaces
+    between user-space and the Linux kernel
+  \item Understanding Linux kernel versions: chosing between
+    vendor-provided kernel and upstream kernel
+  \item Getting the Linux kernel source code
+  \item Configuring the Linux kernel: ready-made configuration files,
+    configuration interfaces
+  \item Concept of {\em Device Tree}
+  \item Cross-compiling the Linux kernel
+  \item Study of the generated files and their role
+  \item Installing and booting the Linux kernel
+  \item The Linux kernel command line
   \end{itemize}
 }
-
-\feagendaonecolumn
 {Lab - Kernel cross-compiling and booting}
 {
-  {\em Using the Microchip Xplained board}
   \begin{itemize}
-  \item Configuring the Linux kernel and cross-compiling it for the ARM board.
-  \item Downloading your kernel on the board through U-boot's tftp client.
-  \item Booting your kernel from RAM.
-  \item Copying the kernel to flash and booting it from this location.
-  \item Storing boot parameters in flash and automating kernel booting from flash.
+  \item Configuring the Linux kernel and cross-compiling it for the
+    ARM board.
+  \item Downloading your kernel on the board through U-boot's TFTP
+    client.
+  \item Booting your kernel.
+  \item Automating the kernel boot process with U-Boot scripts.
   \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
 }
 
 \section{Day 2 - Afternoon}
@@ -248,29 +244,62 @@
 \feagendaonecolumn
 {Lab – Tiny root filesystem built from scratch with BusyBox}
 {
-  {\em Using the Microchip Xplained board}
   \begin{itemize}
-  \item Now build a basic root filesystem from scratch for your ARM system
   \item Setting up a kernel to boot your system on a workstation
-        directory exported by NFS
+    directory exported by NFS
   \item Passing kernel command line parameters to boot on NFS
   \item Creating the full root filesystem from scratch.
-        Populating it with BusyBox based utilities.
-  \item Creating device files and booting the virtual system.
-  \item System startup using BusyBox /sbin/init
-  \item Using the BusyBox http server.
+    Populating it with BusyBox based utilities.
+  \item System startup using BusyBox \code{init}
+  \item Using the BusyBox HTTP server.
   \item Controlling the target from a web browser on the PC host.
   \item Setting up shared libraries on the target and compiling
-        a sample executable.
+    a sample executable.
   \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
 }
 
 \section{Day 3 - Morning}
 
+\feagendatwocolumn
+{Lecture - Accessing hardware devices}
+{
+  \begin{itemize}
+  \item How to access hardware on popular busses: USB, SPI, I2C, PCI
+  \item Usage of kernel drivers and direct user-space access
+  \item The {\em Device Tree} syntax, and how to use it to describe
+    additional devices and pin-muxing
+  \item Finding Linux kernel drivers for specific hardware devices
+  \item Using kernel modules
+  \item Hardware access using \code{/dev} and \code{sysfs}
+  \item User-space interfaces for the most common hardware devices:
+    storage, network, GPIO, LEDs, audio, graphics, video
+  \end{itemize}
+}
+{Lab - Accessing hardware devices}
+{
+  \begin{itemize}
+  \item Exploring the contents of \code{/dev} and \code{sysfs} and the
+    devices available on the embedded hardware platform.
+  \item Using GPIOs and LEDs
+  \item Modifying the Device Tree to add support for an I2C-connected
+    joystick
+  \item Adding support for a USB audio card using Linux kernel modules
+  \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
+}
+
+\section{Day 3 - Afternoon}
+
 \feagendatwocolumn
 {Lecture - Block filesystems}
 {
   \begin{itemize}
+  \item Accessing and partitioning block devices.
   \item Filesystems for block devices.
   \item Usefulness of journaled filesystems.
   \item Read-only block filesystems.
@@ -281,18 +310,18 @@
 }
 {Lab - Block filesystems}
 {
-  {\em Using the Xplained ARM board}
   \begin{itemize}
-  \item Creating partitions on your block storage
-  \item Booting a system with a mix of filesystems: SquashFS for
-	applications, ext3 for configuration and user data, and
-	tmpfs for temporary system files.
+  \item Creating partitions on your SD card
+  \item Booting a system with a mix of filesystems: {\em SquashFS} for
+    applications, {\em ext3} for configuration and user data, and {\em
+      tmpfs} for temporary system files.
   \end{itemize}
-}
 
-\section{Day 3 - Afternoon}
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
+}
 
-\feagendatwocolumn
+\feagendaonecolumn
 {Lecture - Flash filesystems}
 {
   \begin{itemize}
@@ -303,137 +332,181 @@
   \item Focus on today's best solution, UBI and UBIFS:
 	preparing, flashing and using UBI images.
   \end{itemize}
+
+  \vspace{0.5cm}
+
+  {\em Note: as the embedded hardware platform used for the labs does
+    not have any flash-based storage, this lecture will not be
+    illustrated with a corresponding practical lab.}
 }
-{Lab – Flash filesystems}
+
+\section{Day 4 - Morning}
+
+\feagendatwocolumn
+{Lecture – Cross-compiling user-space libraries and applications}
 {
-  {\em Using the SAMAD3 Xplained ARM board}
   \begin{itemize}
-  \item Defining partitions in U-Boot for your internal
-        flash storage instead of using raw offsets.
-  \item Sharing these definitions with Linux.
-  \item Creating a UBI image on your workstation, flashing
-        it from U-Boot and booting your system on one of
-        the UBI volumes with UBIFS. 
+  \item Configuring, cross-compiling and installing applications and
+    libraries.
+  \item Concept of build system, and overview of a few common build
+    systems used by open-source projects: Makefile, {\em autotools},
+    {\em CMake}, {\em meson}
+  \item Overview of the common issues encountered when
+    cross-compiling.
   \end{itemize}
 }
+{Lab – Cross-compiling applications and libraries}
+{
+  \begin{itemize}
+  \item Manual cross-compilation of several open-source libraries and
+    applications for an embedded platform.
+  \item Learning about common pitfalls and issues, and their
+    solutions.
+  \end{itemize}
 
-\section{Day 4 - Morning}
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
+}
+
+\section{Day 4 - Afternoon}
 
 \feagendatwocolumn
-{Lecture – Leveraging existing open-source components in your system}
+{Lecture - Embedded system building tools}
 {
   \begin{itemize}
-  \item Reasons for leveraging existing components.
-  \item Find existing free and open source software components.
-  \item Choosing the components.
-  \item The different free software licenses and their requirements.
-  \item Overview of well-known typical components used in
-        embedded systems: graphical libraries and systems
-        (framebuffer, Gtk, Qt, etc.), system utilities,
-        network libraries and utilities, multimedia libraries, etc.
-  \item System building: integration of the components.
+  \item Approaches for building embedded Linux systems: build systems
+    and binary distributions
+  \item Principle of {\em build systems}, overview of Yocto
+    Project/OpenEmbedded and Buildroot.
+  \item Principle of {\em binary distributions} and useful tools,
+    focus on Debian/Ubuntu
+  \item Specialized software frameworks/distributions: Tizen, AGL,
+    Android
   \end{itemize}
 }
-{Lecture – Cross-compiling applications and libraries}
+{Lab - System build with Buildroot}
 {
   \begin{itemize}
-  \item Configuring, cross-compiling and installing applications and libraries.
-  \item Details about the build system used in most open-source components.
-  \item Overview of the common issues found when using these components.
+  \item Using Buildroot to rebuild the same system as in the previous
+    lab.
+  \item Seeing how easier it gets.
+  \item Optional: add a package to Buildroot.
   \end{itemize}
-}
 
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
+}
 
-\section{Day 4 - Afternoon}
+\section{Day 5 - Morning}
 
 \feagendaonecolumn
-{Lab – Cross-compiling applications and libraries}
+{Lecture - Open source licenses and compliance}
 {
-  {\em If enough time left}
   \begin{itemize}
-  \item Building a system with audio libraries and a sound player application.
-  \item Manual compilation and installation of several free software packages.
-  \item Learning about common techniques and issues.
+  \item Presentation of the most important open-source licenses: GPL,
+    LGPL, MIT, BSD, Apache, etc.
+  \item Concept of {\em copyleft} licenses
+  \item Differences between (L)GPL version 2 and 3
+  \item Compliance with open-source licenses: best practices
   \end{itemize}
 }
 
 \feagendatwocolumn
-{Lecture - Embedded system building tools}
+{Lecture - Overview of major embedded Linux software stacks}
 {
   \begin{itemize}
-  \item Review of existing system building tools.
-  \item Buildroot example.
+  \item \code{systemd} as an {\em init} system
+  \item Hardware management with {\em udev}
+  \item Inter-process communication with {\em D-Bus}
+  \item The connectivity software stack: Ethernet, WiFi, modems,
+    Bluetooth
+  \item The graphics software stack: DRM/KMS, X.org, Wayland, Qt, Gtk,
+    OpenGL
+  \item The multimedia software stack: Video4Linux, GStreamer,
+    Pulseaudio, Pipewire
   \end{itemize}
 }
-{Lab - System build with Buildroot}
+{Lab - Integration of additional software stacks}
 {
-  {\em Using the Microchip Xplained board}
   \begin{itemize}
-  \item Using Buildroot to rebuild the same system as in the previous lab.
-  \item Seeing how easier it gets.
-  \item Optional: add a package to Buildroot.
+  \item Integration of {\em udev} for device management
+  \item Integration of {\em D-Bus} for inter-process communication
+  \item Integration of an audio stack
   \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
 }
 
-\section{Day 5 - Morning}
+\section{Day 5 - Afternoon}
 
-\feagendaonecolumn
+\feagendatwocolumn
 {Lecture - Application development and debugging}
 {
   \begin{itemize}
   \item Programming languages and libraries available.
-  \item Overview of the C library features for application development.
-  \item Build system for your application,
-        how to use existing libraries in your application.
-  \item Debuggers. Debugging remote applications with gdb and gdbserver.
-        Post-mortem debugging with core files.
-  \item Code checkers, memory checkers, profilers.
+  \item Build system for your application, an overview of {\em CMake}
+    and {\em meson}
+  \item The {\em gdb} debugger: remote debugging with {\em gdbserver},
+    post-mortem debugging with \code{core} files
+  \item Performance analysis, tracing and profiling tools, memory
+    checkers: \code{strace}, \code{ltrace}, \code{perf},
+    \code{valgrind}
   \end{itemize}
 }
-
-\feagendaonecolumn
 {Lab – Application development and debugging}
 {
-  {\em On the Microchip Xplained board}
   \begin{itemize}
-  \item Develop and compile an application relying on the ncurses library
-  \item Using strace, ltrace and gdbserver to debug a crappy application
-        on the remote system.
-  \item Post mortem analysis: exploit a {\em core dump} to find out where an application
-        crashed.
+  \item Creating an application that uses an I2C-connected joystick to
+    control an audio player.
+  \item Using {\em strace}, {\em ltrace} and {\em gdbserver} to debug
+    a buggy application on the remote system.
   \end{itemize}
+
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
 }
 
+\section{Extra topics if time left}
 
-\section{Day 5 - Afternoon}
+The following topics will only be covered if enough time is left in
+the course.
 
 \feagendaonecolumn
-{Lecture - Linux and real-time}
+{Lecture - Embedded Linux security}
 {
-  {\em Very useful for many kinds of devices, industrial or multimedia systems.}
   \begin{itemize}
-  \item Understanding the sources of latency in standard Linux.
-  \item Soft real-time solutions for Linux: improvements included
-        in the mainline Linux version.
-  \item Understanding and using the latest RT preempt patches for
-        mainline Linux.
-  \item Real-time kernel debugging. Measuring and analyzing latency.
-  \item Xenomai, a hard real-time solution for Linux: features, concepts,
-        implementation and examples.
+  \item Main principles of security for embedded Linux systems
+  \item Access control and regular Unix permissions
+  \item Linux Security Modules: SELinux, AppArmor
+  \item Secure boot
+  \item Filesystem encryption
+  \item Security vulnerabilities: CVEs
+  \item Strategy for software updates
   \end{itemize}
 }
 
-\feagendaonecolumn
-{Lab - Linux latency tests}
+\feagendatwocolumn
+{Lecture - Factory flashing and Over-The-Air updates}
 {
   \begin{itemize}
-  \item Tests performed on the Xplained ARM board.
-  \item Latency tests on standard Linux, with preemption options.
-  \item Latency tests using the \code{PREEMPT_RT} kernel patchset.
-  \item Setting up Xenomai.
-  \item Latency tests with Xenomai.
+  \item Factory flashing: principle and main techniques
+  \item System update strategies: complete system update, packages,
+    filesystem-level, A/B partioning, rescue system
+  \item Over-The-Air open-source solutions: {\em swupdate}, {\em
+      RAUC}, {\em Mender}, {\em OSTree}
   \end{itemize}
 }
+{Lab - Factory flashing and Over-The-Air updates}
+{
+  \begin{itemize}
+  \item Preparing a ready-to-use SD card image
+  \item Integrating {\em swupdate} for complete system updates with an
+    A/B partitioning scheme
+  \end{itemize}
 
-\end{document}
+  \vspace{0.5cm}
+  {\em Using the embedded hardware platform}
+}
 
+\end{document}




More information about the training-materials-updates mailing list