Developing for Embedded Linux
Linux is often used as an embedded operating system, and yet many still regard it as something of a black art. This course sheds light and brings clarity by showing exactly how to deploy Linux on a typical embedded target board through a combination of theory and practice.
Starting a board without an operating system, delegates will go through a simulated product cycle during which they will build and boot a Linux kernel; build a root file system; write a device driver and a multi-threaded application. Finally, they will review the performance of the resulting system and consider what changes could be made to improve its real-time performance.
Dates:
Course Outline
Introduction:
- Linux in an embedded context
- The 4 basic elements: toolchain, bootloader, kernel, root file system
The Linux Kernel:
- Virtual memory
- Configuration and cross-compiling
Booting Linux:
- The Linux boot sequence
- Boot-loaders: U-boot
- Loading images using TFTP
The root file-system:
- Creating a minimal root file-system using Busybox
- The C library: glibc vs uClibc.
- Creating a RAM disk image
Network configuration:
- Static and dynamic IP addresses
- Mounting the root file system over NFS
Device drivers:
- How to write a simple driver to access GPIO pins
- Kernel modules
Debugging:
- Logging using , syslogd
- Remote debugging using Eclipse and gdbserver.
POSIX programming:
- Processes: fork and exit, scheduling
- Signals and signal handlers
- Time and timers
- Pipes, message queues, semaphores, shared memory
POSIX Threads:
- Threads vs processes
- Synchronising threads using mutexes and condition variables.
Flash memory:
- The Linux Memory Technology Devices Layer
File systems:
- File-system suitable for embedded applications
- Study of cramfs, tmpfs, jffs2 and yaffs
Real time Linux:
- Typical Interrupt latency. kernel pre-emption modes
- The real-time patch
- Practical considerations
Profiling:
- Profiling using using gprof and Oprofile
- The Linux Trace Toolkit
Real time sub-kernels:
- Introduction to writing hard real-time tasks using RTAI
Course Overview
A five day course showing how to implement Linux on a typical development board (ARM core).
Course Objectives:
- Describe the four essential components of an embedded project: tool chain, kernel, bootloader and root file system
- Demonstrate how to control hardware from a device driver (in outline, see EL-504 for a more in-depth treatment)
- Provide an overview of application development, profiling and debugging
- Show how to configure NOR and NAND flash memory for robust code and data storage
- Consider the issues of real-time and Linux
Delegates will learn:
- How to configure and build a customised Linux 2.6 kernel
- How to construct a compact root file system from scratch
- How to develop and debug code for the target board, using the Eclipse IDE
- How to write single and multi-threaded programs using POSIX functions
- Which aspects of the system affect real-time performance and how to reduce scheduling latencies
Who Should Attend:
Software engineers who are developing applications for embedded or real-time Linux. Engineers wishing to assess the suitability of Linux for their next application.
Pre-requisites:
- Good ‘C’ programming skills
- General knowledge of an RTOS, or embedded operating systems
- Experience of using Linux or a version of Unix is useful, but not essential
Duration:
- Five days.
Course Materials:
- Student workbook.
Related Courses:
Course Workshop:
The course presents embedded and real-time concepts applied to Linux using an ARM9 development board as the target (a Digi ConnectCore Wi-9C). The host development system is a standard PC running Linux. We use the target as an example of a simple embedded system which can control hardware via a simple digital I/O interface. Lab sessions follow a logical sequence, and result in “the world’s first Linux-powered web-controlled washing machine”.


