Shopping Cart :Check Out
EMAIL : contact@embeddedact.com

Embedded Linux device drivers Workshop

Course Objectives:

• To get real-world exposure to embedded Linux
• To develop an application to run on an embedded Linux system
• To understand what is required to set-up a Linux cross development environment
• To understand the different approaches to making Linux “realtime” Delegates will learn:
• How to configure a standard Linux kernel for use in a cross development system.
• The steps to write, compile, download and debug an embedded Linux application with real hardware.
• How threaded applications fit into Linux.
• How drivers work in x86 and embedded environment.

Pre-requisites:

• Good ‘C' programming skills.
• Required considerable knowledge of Linux System Programming concepts like signals, processes, file operations, system calls and sockets which are covered in our “Workshop 1 : Linux Internals & Programming Essentials Course”.

Days:

• 3 days

Course Contents

Embedded Linux System Development
Introduction to Embedded Linux ( Obisense ) Basic requirements for Embedded Linux Product Development Building Development Environment ( Obisense )
What is Embedded System? The four basic elements: toolchain, bootloader, kernel, root file system Toolchain installation
Anatomy of an Embedded System Configuration, compilation and cross-compiling Cross compilation using Toolchain
Why Linux?
Is Linux Real-Time Enough? Target & Host Setup
The Status of Embedded Linux Today
Which Embedded Linux Distribution to Choose?
Embedded Linux Architecture
Setting Up Networking Services Bootloader commands and usage Loading RootFS in Platfrom by various techniques
Network Settings Getting familiar with bootloader commands Configuring TFTP and downloading kernel image over TFTP.
Static and Dynamic IP addresses Downloading kernel images and RootFS on Target board. Configuring NFS and using rootfs over NFS.
Subnet mask Using SD-Card for rootfs.
Setting up services Using USB for rootfs.
TFTP
DHCP Building an Embedded File System from Scratch - Building Your Own Embedded Linux Distribution -
HTTP Creating a minimal root file-system using Busybox Buildroot
FTP etc Creating a RAM disk image Scratchbox
SNMP OpenEmbedded
Telnet Crosstool
SSHD Angstrom – narcissus
loading files using TFTP, HTTP, FTP etc.
Kernel Configuration and Compilation Booting Linux Bring up X11 (X-Windows) on Embedded Platform (GUI)
Kernel Building System The Linux boot sequence Loading various RootFS (Distributions) in platform
Patching the Kernel boot-loaders : U-boot Angstrom
Kernel Configuration for Embedded Systems Settings (Porting) System Initialization Scripts Ubuntu
Cross-compiling the Linux Kernel Fedora etc. RootFS
Linux Device Driver Programming
An introduction to device drivers Kernel Module Programming Basics Kernel Debugging Techniques
User space vs Kernel space Modules Defined Kernel Debugging: dmesg, printk
Kernel Architecture or Model Data Type in the Kernel Lab exercises for above mentioned topics
Splitting the kernel Version dependency Accessing Hardware Mechanisms
Kernel modules Building and Running Modules System Memory
Kernel Module vs Applications Types of Modules in the kernel Device Memory
Role of the Device Drivers Writing Your first kernel module I/O Ports
Classes of devices and modules Module Related Commands I/O ports vs. memory mapping
Statically linked vs Dynamically linked drivers/modules Allocating and mapping I/O space
The kernel symbol table
Exporting symbols from modules Functions for reading and writing I/O ports
Module Parameters Side effects and compiler optimization
Lab exercises for above mentioned topics I/O APIs
Driver example
Barriers
Accessing hardware from User Space
The proc file system programming Communicating with Hardware Hardware and Interrupt Handling
Using /proc Using I/O Ports Installing and implementing an interrupt handler
Creating proc file system entries Example: the Parallel Port Restrictions of kernel code running in interrupt context
Registration Side effects and compiler optimization IRQs & their Registration
Reading from /proc I/O APIs IRQ Handling & Control
Writing to /proc The hardware Top & Bottom Halves
Lab exercises Driver example Autodetecting IRQ's
Barriers Kernel Help in detecting IRQ's
Accessing hardware from User Space Probing for the interrupt source
User-Mode Access to Devices Enabling and Disabling Interrupts
open, close, read, write Lab exercises
ioctl
ioperm, iopl, inb, outb
mmap, munmap
Tasklets and Bottom halves Kernel Threads Sleep and wakeup (wait queues)
Task queues Lab exercises
Lab exercises boot-loaders : U-boot Buffer allocation
Memory Mapping and DMA Concurrency and Race Conditions Time, Delays and Deferred Work
Direct Memory Access/Bus Mastering UP vs SMP Issues Kernel Timers
Consistent Mapping Combating Race Conditions Timer handling
Streaming Mapping Atomic Operations HZ and Jiffies
Scatter/Gather Mapping Semaphores Time of Day
Memory Management Spin Locks Delayed Execution
Allocating Memory Kernel Timers
Accessing Memory Current time
Get Some Space (kmalloc()), kfree(), various flags
Get Some Pages (get_free_page())
Get Some Virtual Memory - vmalloc()
Get Some Boot-time Space
The Linux Device Model
Character Device Drivers Writing various Character Drivers Programming with ioctl( )
Registering a character device driver Memory Based Driver writing device driver with ioctl()
The file structure IO PORT (Hardware) Based Driver Adding ioctl's in an existing device driver
Major and minor numbers Enhanced Character Device Drivers Lab exercises
Character Device Methods open(), release(), read(), write() Driver and Device Control with 'ioctl()'
Data Transfers between User Process and Driver Blocking VS Non-Blocking I/O
copy_from_user(), copy_to_user() Sleep vs Wakeup
Making a Device File poll()
Memory Access in Kernel Space llseek()
Programming with ioctl( ), mmap() Access Control through Drivers
devfs / lseek /ioctl
Lab exercises
Netlink socket interface Network Drivers Block Device Drivers
point to point, multicast and broadcast The net_device structure in detail Handling requests
UDP, TCP and Raw sockets Packet transmission Ram Disk Driver
Writed kernel module and userspace applilcations using Netlink sockets Packet reception Block drivers structures
Lab exercises Simulating a network device Block Device Driver Registration
Lab exercises Block Device Operations & its related Kernel DS
Request Queues & their Processing
Lab exercises
Adding a Driver to the Kernel Tree
A sample device driver project

Training Programs