embedded-linux-online-agenda
embedded-linux-online-agenda
Training objectives • Be able to understand the overall architecture of Embedded Linux sys-
tems.
• Be able to choose, build, setup and use a cross-compilation toolchain.
• Be able to understand the booting sequence of an embedded Linux
system, and to set up and use the U-Boot bootloader.
• Be able to select a Linux kernel version, to configure, build and install
the Linux kernel on an embedded system.
• Be able to create from scratch a Linux root filesystem, including all
its elements: directories, applications, configuration files, libraries.
• Be able to choose and setup the main Linux filesystems for block and
flash storage devices, and understand their main characteristics.
• Be able to interact with hardware devices, configure the kernel with
appropriate drivers and extend the Device Tree
• Be able to select, cross-compile and integrate open-source software
components (libraries, applications) in an Embedded Linux system,
and to handle license compliance.
• Be able to setup and use an embedded Linux build system, to build a
complete system for an embedded platform.
• Be able to develop and debug applications on an embedded Linux sys-
tem.
Prerequisites
• Knowledge and practice of UNIX or GNU/Linux commands:
participants must be familiar with the Linux command line. Par-
ticipants lacking experience on this topic should get trained by
themselves, for example with our freely available on-line slides at
bootlin.com/blog/command-line/.
• Minimal English language level: B1, according to the Common
European Framework of References for Languages, for our ses-
sions in English. See bootlin.com/pub/training/cefr-grid.pdf for self-
evaluation.
Required equipment
• Computer with the operating system of your choice, with the Google
Chrome or Chromium browser for videoconferencing.
• Webcam and microphone (preferably from an audio headset)
• High speed access to the Internet
Certificate Only the participants who have attended all training sessions, and who have
scored over 50% of correct answers at the final evaluation will receive a
training certificate from Bootlin.
Disabilities Participants with disabilities who have special needs are invited to contact
us at [email protected] to discuss adaptations to the training course.
Hardware platform for practical demos, option
#1
BeaglePlay board
• Texas Instruments AM625x (4xARM
Cortex-A53 CPU)
• SoC with 3D acceleration, integrated MCU
and many other peripherals.
• 2 GB of RAM
• 16 GB of on-board eMMC storage
• USB host and USB device, microSD,
HDMI
• 2.4 and 5 GHz WiFi, Bluetooth and also
Ethernet
• 1 MicroBus Header (SPI, I2C, UART, ...),
OLDI and CSI connector.
Half day 1
• Booting process of embedded platforms, focus on the x86 and ARM architectures
• Boot process and bootloaders on x86 platforms (legacy and UEFI)
• Boot process on ARM platforms: ROM code, bootloaders, ARM Trusted Firmware
• Focus on U-Boot: configuration, installation, and usage.
• U-Boot commands, U-Boot environment, U-Boot scripts, U-Boot generic distro boot mechanism
Half day 2
• Role and general architecture of the Linux • Clone the mainline Linux tree
kernel • Accessing stable releases
• Separation between kernel and user-space,
and interfaces between user-space and the
Linux kernel
• Understanding Linux kernel versions:
choosing between vendor-provided kernel
and upstream kernel, Long Term Support
versions
• Getting the Linux kernel source code
Lecture - Configuring, compiling and booting Lab - Kernel cross-compiling and booting
the Linux kernel
• Configuring the Linux kernel: ready-made • Configuring the Linux kernel and cross-
configuration files, configuration interfaces compiling it for the embedded hardware
• Concept of Device Tree platform.
• Cross-compiling the Linux kernel • Downloading your kernel on the board
• Study of the generated files and their role through U-boot’s TFTP client.
• Installing and booting the Linux kernel • Booting your kernel.
• The Linux kernel command line • Automating the kernel boot process with U-
Boot scripts.
Half day 3
• How to access hardware on popular busses: • Exploring the contents of /dev and /sys
USB, SPI, I2C, PCI and the devices available on the embedded
• Usage of kernel drivers and direct user- hardware platform.
space access • Using GPIOs and LEDs.
• The Device Tree syntax, and how to use it to • Modifying the Device Tree to control
describe additional devices and pin-muxing pin multiplexing and to declare an I2C-
• Finding Linux kernel drivers for specific connected joystick.
hardware devices • Adding support for a USB audio card using
• Using kernel modules Linux kernel modules
• Hardware access using /dev and /sys • Adding support for the I2C-connected joy-
• User-space interfaces for the most common stick through an out-of-tree module.
hardware devices: storage, network, GPIO,
LEDs, audio, graphics, video Using the embedded hardware platform
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.
Lecture - Embedded system building tools Lab - System build with Buildroot
• Approaches for building embedded Linux • Using Buildroot to rebuild the same basic
systems: build systems and binary distribu- system plus a sound playing server (MPD)
tions and a client to control it (mpc).
• Principle of build systems, overview of • Driving music playback, directly from the
Yocto Project/OpenEmbedded and Build- target, and then remotely through an MPD
root. client on the host machine.
• Principle of binary distributions and useful • Analyzing dependencies between packages.
tools, focus on Debian/Ubuntu
• Specialized software frame- Using the embedded hardware platform
works/distributions: Tizen, AGL, Android
• Presentation of the most important open-source licenses: GPL, LGPL, MIT, BSD, Apache, etc.
• Concept of copyleft licenses
• Differences between (L)GPL version 2 and 3
• Compliance with open-source licenses: best practices
Lecture - Application development and debug- Lab – Application development and debugging
ging
• Programming languages and libraries avail- • Creating an application that uses an I2C-
able. connected joystick to control an audio
• Build system for your application, an player.
overview of CMake and meson • Setting up an IDE to develop and remotely
• The gdb debugger: remote debugging with debug an application.
gdbserver, post-mortem debugging with • Using strace, ltrace, gdbserver and perf to
core files debug/investigate buggy applications on the
• Performance analysis, tracing and profil- embedded board.
ing tools, memory checkers: strace,
ltrace, perf, valgrind Using the embedded hardware platform