Summer School – Embedded RTLinux Intro 2007
Prague, Czech Republic
June 18th – 22nd, 2007
The first session starts on Monday at 9:00 in Lab K2. See for details.
Lecturer:
Prof. Nicholas McGuire, University of Lanzhou
GOALS
It is the main goal of this training to introduce the free software real-time
variants of Linux based on RTLinux/GPL in a way that allows participants to go
home and install a system from scratch and get to work on real problems. The
focus is thus on mastering the necessary practical skills and not so much on
theoretical issues surrounding RTOS and embedded systems, though we do introduce
the core concepts of RTLinux/GPL in details mapping these core concepts to the
respective code as well as covering the basic design problems of embedded Linux
systems.
This one week training should be sufficient for students to continue with
actual projects based on the know-how and experience gained from this summer
school. It should be noted that we deliberately don't use specialized hardware
to ensure that these experiences can actually be applied with typical PC
components that can be assumed to be available to every student.
Even though this training is based on RTLinux/GPL it is kept general enough
that participants should have no problem working with other flavors of RT-Linux
(RTAI/ADEOS, L4, XtratuM etc.) where possible without disrupting the course flow
differences to other versions are introduced.
STRUCTURE
This session is run 5 days hands-on 9:00–12:00 13:00–18:00,
with a final exam on the last day. The following content outline may change in
details due to updated documentation and/or change of distributions, but the
basic themes will not be changed.
The below schedule has been covered in the above noted sessions with some
slight variations depending on how fast one can advance with the students, in
general most of the topics can be covered, and even if specific topics are
skipped or reduced in scope the general nature of this introductory seminar is
preserved. Some topics that are optionally listed for the case of a very fast
group are marked with an (*).
- Installation of Linux/RTLinux:
- Installing the base system – Slackware
- basic system setup from scratch
- basic configuration of networking
- security issues
- Preparing for RTLinux
- patching the kernel sources
- configuring the kernel to fit your system
- configuring kernel for RTLinux/GPL
- installing the RTLinux executables and kernel modules
- Basic filesystem:
- Building a filesystem from scratch
- what is a filesystem ?
- The naive filesystem by copying files
- testing the filesystem with chroot
- limitations of this approach
- minimum filesystem with UML
- building a real minimum filesystem from source
- configuring the UML kernel
- booting a minimum filesystem under UML
- fixing problems
- (*) networking in UML
- Basic RTLinux concepts:
- How does RTLinux work
- interrupt interception
- what happens to Linux GPOS
- communication
- limitations and outlook towards XtratuM
- The RTLinux API (V3) and compatibility notes
- Introduction to the RTLinux API
- pure POSIX
- interrupt management
- IPC
- Communication
- Interacting with the Linux kernel
- Accessing I/O ports
- Kernel Modules:
- Basics of Linux Kernel Modules
- A simple kernel module
- hello world in kernel space
- symbol management
- oops-ing and decoding an oops
- What do the RTLinux Modules provide
- Passing arguments at module initialization
- the proc interface
- Using Interprocess communication facilities (SHM,FIFO's,signals)
- Modules and Examples:
- The RTLinux kernel modules
- how to run the examples
- passing parameters
- rebuilding cleanly
- limitations of examples
- Using the debugger and tracer
- configuring for debugging
- debugging with gdb via gdb-stubs in rt-context
- concept of the RTLinux tracer
- configuring for tracing
- tracing an example and analyzing results
- Initial benchmarking
- why do it ?
- Interpretation of basic benchmark results
- (*) tuning the system
- platform evaluation issues
- comparing environments
- documentation of configuration
- extended tools available
- Designing an RT-Task:
- Basic Design concepts of RTLinux
- How to split the job
- Communication basics
- when NOT to use RTLinux/GPL
- Interprocess communication
- fifos
- shared memory
- having with signals
- Basic Driver concepts:
- Defining the Interface
- Outlining the structure of a RTLinux driver
- Splitting your rt-application
- Using Linux kernel facilities
- Communicating with the non-RT task.
- Driver Control and Monitoring from the Linux side
- Using Linux logging facilities.
- A Data-acquisition driver line by line:
- init_module
- The driver -module
- Accessing the driver functions
- cleanup_module
- the Makefile
- Integrating the driver with your rt-task
- license issues
The focus of this session is to give the participants enough hands-on
experience that they actually can apply the real-time Linux technologies to real
problmes, we don't expect any prior experience with RTLinux, a bit of Linux
experience as a user is helpful though. A requirement is that participants
have a basic understanding of the C language.