Embedded Linux Development
Developers building embedded solutions using Linux often need
to make certain decisions and complete tasks such as: selecting the proper
tool-chain, software versions, changing and adding some kernel code (device
drivers) and system code, and also evaluating the time needed to deliver working
solution. Within 5 intensive days of lectures and exercises this advanced
course will provide you with the knowledge and experience needed to use Linux within
your project (regardless whether you are already using it, or just evaluating).
You will gain a complete understanding of all aspects of building and deploying
an embedded Linux system: from boot-loader and system boot-strapping, through
kernel drivers programing, and code organization, system level programing, to
creating GUI and network embedded applications, making use of high-level open
source software and finally debugging, profiling and optimizing system.
Supporting tools and lots of code examples are provided too.
You will develop and test code running on an ARM target board . Through hands-on
exercises, you will gain experience of device drivers, protocols and components
often found in embedded systems, such as: RS-232C, I2C, SPI, MMC, USB (host and
client), Bluetooth, LCD, touch screen, analog to digital converters and many
- 4-days (32h)
- Linux embedded systems fundamentals
- Setting an embedded board, building, configuring, and running Linux system on it.
- Cross-Development environments: goals, needs, techniques, automatic build environments.
- In-kernel programming and debugging.
- Linux device model and kernel debugging.
- Specific kernel subsystems for embedded: Serial, I2C, SPI, Framebuffer (display), USB, GPIO.
- Root filesystem choices and best practices.
- Boot-loaders, board bring-up, U-Boot, Barebox.
- System debugging, profiling and real time issues.
- Flash memory and embedded filesystems.
- System programming and userspace applications with examples: graphics (incl. 3D), multimedia, camera, Java, scripts etc..
During the training more subjects are discussed with corresponding
These are extensive topics, such as: licenses, ownage and control of open-source
code, system security and even some aspects of Linux administration (needed in
embedded context). Other general topics, are: keeping latency at the lowest possible
level, optimizing work, reusing code, being close to standards and maintaining
Day 1. Linux embedded systems fundamentals
- cross-compiler - design and planning, common design decisions and pitfalls
(binary toolchain vs. self-build one)
- building, configuring and running simple Linux system for embedded (using
various development boards)
- automatic and semi-automatic tools supporting work (working examples):
crosstool-ng, buildroot, ptxdist, scratchbox, LTIB.
- booting the same system on emulated system.
- booting (process and its optimizations).
After ‘Day 1’:
Participants will be able to select proper tool-chain for a task, prepare simple
Linux system: configure kernel, select drivers and mechanisms, configure it:
create boot scripts, configure standard system services (such as network
connectivity) and security (users and permissions). This system will become a
base for further research and optimization.
Day 2. In-kernel programming and debugging
- configuring kernel, kernel programming preview, working with kernel source code
- in - kernel programming (characteristic, legal issues – licenses, view from userspace)
- kernel modules (common container for code)
- devices: character, block and network devices (all Unix device types)
- kernel-space - userspace interaction - methods of accessing
- drivers data from userspace (from configuration flags to big data chunks): procfs, sysfs, debugfs, device files, mmap.
- synchronization and locking
- files and processes (filesystems for SD cards, measuring system load).
After ‘Day 2’:
All about Linux kernel programming is the layer based design and framework.
Participants will understand the design of Linux kernel and will be able to
extend code (adding and adjusting drivers) as well as to select a proper layer
and framework for a given task (not all tasks need in-kernel programming, some
can be resolved totally in userspace). Many code snippets and working examples
will be presented.
Day 3. Linux device model, kernel debugging and specific embedded
- Linux device model with working examples:
- serial ports
- USB hosts and devices
- network devices
- Input devices (driver for steering wheel)
- Debugging the kernel (internal and external debugging methods, invalid code, memory leeks etc.), tracing
After ‘Day 3’:
Today nobody implements drivers by creating code for all its layers (from
userspace interaction to hardware handling) as there are frameworks for almost
Day 4. Root filesystem strategies, filesystems, building and debugging system as a whole, userspace programming.
- Advanced system programming
- Linux userspace APIs, POSIX
- processes and threads
- IPC (inter-process-communication)
- libraries (with examples)
- GUI: DirectFB, QT (short time, with)
- system scripting: LUA, Perl, Python, PHP, Java
- making use of various open source projects
- HTTP, SSH and other network services
- multimedia (encoding/decoding audio/video), MPlayer, Gstreamer
- making use of various Embedded Linux distributions as rapid development platforms (Emdebian, OpenEmbedded, Yocto, etc.)
- Embedded Linux system security - best practices.
- Root filesystem strategies (ramdisk vs. solid-state)
- block devices and filesystems: ext4, XFS (with real-time), squashfs
- flash memories and filesystems: JFFS2, YAFFS, UBI, flash transaction layer.
After ‘Day 4’:
The complete system will be deployed to a development board. Participants will be given overview of potentially interesting tools and technologies.
Again, with numerous working examples and code snippets, such as: embedded controller with GUI in QT, embedded measuring device with network access and control via WEB interface, wireless connected device, multimedia appliances, and so on.