Course outline
This Linux kernel is now the most widely used operating system on the planet and many development teams need to know how to add device support to it, understand it’s performance characteristics, tune it, compile it, reduce it’s size, provide board support for it, develop platforms based on it, understand it’s real time support and much more.
This course is all about the Linux kernel but is focused on writing device drivers for the kernel as this is the first typical thing one learns when becoming a kernel developer.
Upcoming meetings
There are no upcoming meetings for this course. Contact us to schedule this course, which will be customized specifically for your organization.
info@hackerupro.comModules
- System and kernel overview
- Kernel code specifics
- Kernel subsystems
- History and versioning scheme
- Understanding the development process
- Specific legal issues
- Kernel user interface
- Getting the sources
- Using the patch command
- Structure of source files
- Kernel source code browsers
- Kernel configuration
- Useful settings for embedded systems
- Compiling
- Generated files
- Make commands for configuring, compiling or installing a kernel
- Linux system booting overview
- The boot-loader’s job
- Review of Linux boot-loaders
- U-boot details
- Linux kernel booting
- Advantages of initramfs over initrd
- Booting parameters
- NFS boot example
- System startup
- Kernel cross-compiling setup
- Ready-made configuration files for specific architectures & boards
- Cross-compiling
- Linux device drivers
- A simple module
- Programming constraints
- Loading, unloading modules
- Module parameters and dependencies
- Adding sources to the kernel tree
- Linux memory management
- Physical and virtual (kernel and user) address spaces
- Linux memory management implementation
- Allocating with kmalloc, by pages and with vmalloc
- I/O register and memory range registration
- I/O register and memory access
- Read / write memory barriers
- Device numbers
- Getting free device numbers
- File operations
- Character driver registration
- Using printk, /proc or /sys
- Debugfs
- Using an ioctl interface, gdb and kgdb
- Process life
- Timer frequency
- Priorities and timeslices
- Sleeping and waking up API
- Waiting for the availability of resources
- Interrupt handler registration
- Scheduling deferred work
- Managing concurrent access to resources: mutexes, spinlocks
- Atomic operations
- Getting help and contributions
- Bug report and patch submission to Linux developers
- References: websites, books & international conferences
- Detailed description of the kernel boot-up process, from execution by the boot-loader to the execution of the first userspace program
- Initcalls: how to register your own initialization routines?
- Board Support Packages (BSP)
- Porting U-boot and the Linux kernel
- Creating board dependent code
- Studying code for an ARM board
- Supporting frequency scaling
- CPU and board specific power management
- Power management in device drivers
- Control from user space
- Saving power in the idle loop
- Studying power management implementations in the Linux kernel
- Understanding the sources of latency in standard Linux
- Soft real-time solutions for Linux: improvements in Linux 2.6
- Use the latest RT preempt patches for mainstream Linux
- Real-time kernel debugging
- Measuring and analyzing latency
- Hard real-time solutions for Linux
- RTLinux issues, the RTAI and Xenomai projects
- Comparing with RT preempt patches
- Real-time offerings from commercial Linux vendors: MontaVista, TimeSys, Wind River, LynuxWorks etc
- Choosing the target C library
- Ready to use cross-compiling tool-chains
- Building a cross-compiling tool-chain with automated tools
- Installing cross-compiled libraries in the root filesystem
- Commercial toolsets and distributions
- Community toolsets (focus on Buildroot & Scratchbox)
- How to find existing Free Software for a particular need
Prerequisites
- 01 No kernel prior knowledge is required but knowledge of Linux user space API and programming tools is required.