http://tuxology.net/courses/linux-internals/
Tuxology
team May 15th, 2008
Overview
This course focuses on the basic elements of the Linux kernel, which
allow programmers to build modules and device drivers. The students
will gain a general understanding of the basic tools and interfaces, in
order to successfully modify features and develop new aspects of the
kernel. Major topics include full code examples and hands on exercises.
The course is based on kernel 2.6.
Skills
On completion, delegates will be able to:
- Explain the core elements of the Linux kernel
- Be able to modify and build a new modified kernel
- Be able to modify the Linux boot loader
- Build complex kernel modules
- Debug a kernel module and a kernel oops
- Explain the way the kernel manages memory
- Explain the use of interrupt handlers
- Understand the flow between user space and kernel space
- Write character device modules
- Write simple block device modules
- Write network device modules
Audience
Programmers, software designers, and technical managers who plan to
use Linux below the application level and to develop kernel space
modules and device drivers
Prerequisites
Advanced UNIX Programming is recommended. Strong C programming
skills and an intermediate knowledge of UNIX/Linux shell commands are
required UNIX/Linux application development experience is recommended
Content
Introduction to the Linux
kernel
- The system boot process
- LILO, GRUB and the MBR
- Linux kernel session overview
- What is a device driver
- Kernel configuration and compilation
- Building the kernel
- Programming concepts
- The sysctl utility
- Ways of debugging a module and a kernel oops
Writing a Simple Kernel Module
- A simple kernel module structure
- Implicit steps of compiling modules in Linux kernel version 2.6
- Using shell commands to manipulate modules
- Using the printk function
- The do-while(0) idiom
Runtime Information
- Passing parameters to the module
- Exporting symbols
- The /proc file system
Memory Management
- Memory areas
- Memory page frames
- Requesting and releasing page frames
- Allocating contiguous virtual memory area
- The slab allocator
- Memory caches and allocations
- Managing slabs
- Creating and destroying caches
- User space memory access
Interrupt Handling
- Hardware interrupt handling basics
- Interrupt handler and control
- Low level handling
- Wait queues technique
Bottom Halves
- Differing work
- Using software interrupts
- Tasklets
- Timers & RTC
- Work queues
Locking Mechanisms
- Locking requirements
- Preemption
- Atomic bit operations
- Interrupt disabling
- Spin locks
- Semaphores
Implementing a character device file
- The VFS structure
- Initialization and termination
- Opening the device file
- IOCTL
- Implementing base operations
Block Device Drivers
- Registration and un-registration
- RAMFS manipulations
- Adding a new simple file system
- Low level hardware geometry
Network device drivers
- The layer model
- Registration and un-registration
- Socket buffers, allocations and manipulations
- Network headers
- Softnet basics
- Packet reception
- Packet transmission
- Network device allocation
- Device initialization
- NAPI
- Writing a simple dummy device module
- Detecting a PCI device
- Finding hardware registration information
- Hardware considerations
- Initializing device operation
- MAC address
- The xmit function
- Network queues
Slides
Usage Rights
The course materials were created by the following authors:
- Original course slides © Michael Opdenacker from Free Electrons
- Networking slides © Oron
Peled
- Additional slides and material by Gilad Ben-Yossef, ©
Codefidence ltd.
- Tux Image Copyright: © 1996 Larry Ewing
- Linux is a registered trademark of Linus Torvalds.
- All other trademarks are property of their respective owners.
To unsubscribe from this group, send email to linuxkernelnewbies+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.