Our in-depth introduction to Embedded Linux. From the basics to Interprocess Communication and Real-Time Linux.
Course Objectives
The aim of this course is to teach the basics of Embedded Linux.
We’ll see topics like those:
- How do the Puzzle pieces fit together?
- What components are needed to build an embedded Linux system?
- Where to get them from and how to configure/build/install them?
- How can you get help from the “Community”?
- What about software licenses and Open Source license compliance?
- Interprocess Communication basics
- Real-Time
Hands-on exercises provide you with the necessary practical experience to go ahead and develop your own embedded Linux systems after completing this workshop successfully.
Description
In this five-day course, the concepts of Embedded Linux are illustrated through practical exercises combined with theory. Hands-on sessions are carried out on the host with a Yocto Project® Software Development Kit (SDK) and target hardware (e.g. i.mx6). The entire workshop is designed to bring you up to speed as quickly as possible. The philosophy, concepts, and commands necessary to use Embedded Linux effectively are described through a unique combination of theory and practice. Instead of trying to figure it all out yourself, learn from an experienced trainer and incorporate the newly acquired knowledge of Embedded Linux into your own embedded development projects.
Prerequisites
- Basic familiarity with using a Linux system (e.g. Ubuntu) as an end user in user space
- Basic familiarity with a command-line shell
- Familiarity with embedded C concepts and programming
- The ability to develop software using C syntax
- Basic knowledge concerning embedded processors and development boards
- …and/or no fear to learn more of the above…
Course Roadmap
Who should attend?
Managers, project managers, software-, hardware-, development-, systems engineers, testers, administrators, technicians, and other parties interested in the technology, who want to understand as quickly as possible how Embedded Linux works.
- You must be using Linux or you can have the luxury of deciding whether or not it makes sense to use it.
- Maybe you already tried to use Embedded Linux, but are not quite sure that you did everything the right way.
- You currently use a different operating system and want to figure out whether Linux might be better and/or cheaper.
Course Outline
Day 1
Introduction
- History of Unix/Linux | Licensing | Standards | Working with Free Software | Spelunking | Unix Philosophy
Host playground
- architecture |
shell
| user | su | file hierarchy standard (FHS) | daemons | static libraries/shared libraries | permissions | access control | umask | hard Links | soft Links | more permission bits | (cross) compile Framework | real/effectiveuser id
(uid) | real/effective group id(gid)
Day 2
Processes and Inter-Process Communication (IPC)
- Linux architecture | What’s an operating system? | What’s a
scheduler
? | Linux: scheduler(s) – priorities –scheduling
classes | Process, Task, Thread| errno | fork |
process termination | process states | zombies | How can you investigate processes? - simple interprocess communication (IPC)
- shell redirection | shelling out | tmpfiles
- advanced interprocess communication (IPC)
- generic
| pipe |
signal |interrupted system call
|message queue
| semaphore | mutex |shared memory
| socket | select | poll
- generic
- other interprocess communication methods | Interprocess communication techniques that should be avoided
Day 3
Linux Hardware Kit
- How does Linux boot on a PC and on the evaluation board? | Boot sequence | SD card partitions | See it booting
What’s needed on…
- host
- Toolkit
- The Yocto Project® | Install the Yocto Project® SDK
- SD card preparation | terminal emulation
screen | byobu | minicom
- servers
tftp |
NFS
- root file systems
- Toolkit
- target system
git |
u-boot- scripting | fancy stuff | checkout | config | build | install | variables and commands
- Flat device tree (fdt)
- what is a fdt? | device tree compiler | examples
- kernel
checkout
| config-kconfig |
build-kbuild
- Flat device tree (fdt)
- build | install
- kernel modules
- build | install
Day 4
Root File Systems
- prepare minimal rootfs
| tftp
server for tests - ramdisk | mtd | jffs2 | mtdparts | cramfs | roEXT2 | rootfs comparison
Customizations
- system hangs | pseudo
tty | getty | runlevel |
static ip| mount
nfs| ssh
server
User Space Debugging
- What is a bug/debugging? | Types of bugs | Debugging strategy
- Simple tools
lsof | ltrace | strace | procfs | top | netstat | syslog |
…
- Advanced tools
- What’s a debugger?
gdb
:gdb
on the target system| gdb
withremote debugging
JTAG Debugging (optional)
- JTAG | JTAG setup | How to debug u-boot before Relocation | other possibilities
Profiling/Tracing
- Profiling as opposed to Tracing
- Profiling/Tracing tools:
strace |
system timers
| gprof | gcov | perf
- top and similar programs:
top | powertop | powerdebug
crash
:gdb
on steroids
Day 5
Real-Time
- prerequisites
- Difference between kernel and userspace | program sections | interrupts | re-entrant code
- Real-Time Intro
- What is Real-Time? | What is hard Real-Time?
- Real-Time Linux
- Hypervisor | Dual kernel | Fully Preemptive Kernel
- Degrees of Real-Time behavior
- explicit/implicit preemption points | real-time preemption patch | fully preemptive kernel | hard real-time extensions
- (optional) patch/config/build kernel | test it on the target system
- Dual Kernel
- RTLinux | Real-time application interface (RTAI) | Xenomai
- Xenomai compared to RTAI | Adaptive Domain Environment for Operating Systems (ADEOS) | Xenomai architecture/SW stack/Skins
- (optional) patch/config/build kernel | test it on the target system
- RTLinux | Real-time application interface (RTAI) | Xenomai
- Measurement results: non real-time kernel | preempt-rt kernel | Dual Kernel (Xenomai)
- Real-Time Myths
Related Courses
- ”Refresher to Embedded Linux & Intro to the Yocto Project (5 days)”
- ”Embedded Linux Kernel Internals and Device Drivers (5 days)”
- ”The Yocto Project – A thorough Overview (4 days)”
- ”Introduction to Embedded Linux & Real-Time, bird’s eye view of the Yocto Project (4 days)”
- ”Introduction to Embedded Linux in Theory and Practice – a Crash Course (3 days)”
- ”(Embedded) Linux debugging (3 days)”
- ”FreeRTOS in Theory and Practice (3 days)”