EIEIOTECHNOVATION
← Training programmes

EIEIO / OPERATING SYSTEMS

Embedded Linux and Device Drivers Development Workshop

Course outline

5 days

Duration

5 days

Pre-Requisites

Basic C programming

Familiar with Linux OS, but not essential.

Course Outline

Linux Kernel Internals

  • Introduction to Kernel
  • History of Linux
  • Types of Kernel
  • The Linux kernel
  • Kernel Facilities
  • Kernel Architecture
  • Kernel Version Numbers
  • Configure, Compile Kernel
  • The File System
  • Virtual File system & its role
  • Files associated with a process
  • System Calls
  • Process management
  • Process Defined
  • Process Descriptor Structures in the kernel
  • Process States
  • Process Scheduling
  • Process Creation
  • System calls related to process management
  • Memory Management
  • malloc, calloc, alloca, free
  • Demand Paging defined
  • Process Organization in Memory
  • Virtual Memory Management
  • Buddy System Algorithm
  • Slab Allocator
  • Swapping Memory Areas
  • Memory Mapping
  • Block Device Caching
  • Interrupts - Conceptual Understanding
  • About Interrupts
  • Interrupt Handlers
  • Softirqs
  • Tasklets
  • Work Queues
  • Device Drivers – Conceptual understanding
  • Character Device Drivers
  • Block Device Driers
  • Network Device Drivers
  • Kernel Configuration and Compilation
  • Kernel Building System
  • Patching the Kernel
  • Kernel Configuration
  • Compiling the Linux Kernel
  • Kernel Parameters
  • Build-Time Parameters
  • Boot-Time Parameters
  • Run-Time Parameters
  • Boot Process - understanding Power ON to login prompt process
  • BIOS Level
  • Boot Loader
  • Setup, startup_32 functions
  • Available Bootloaders – GRUB, UBoot, etc.
  • Role of a Bootloader
  • Bootloader Phase
  • Kernel Initialisation Phase
  • The start_kernel() function
  • System Initialisation Phase
  • Understanding Runlevels
  • Various initialization scripts & customizing them
  • Kernel Command-Line Boot Parameters

Linux Advanced Programming

  • Arguments , the environment, and popular system functions
  • Arguments to a program.
  • Retrieving information from the environment.
  • Discovering the date and time
  • Getting system information.
  • File I/O
  • Library functions and system calls for I/O
  • Getting file status information with stat()
  • Processing directories and directory entries.
  • Shell Commands & Shell Scripting
  • Basic Shell commands
  • Bash Shell Essentials
  • Creating Makefiles
  • Makefile basics
  • Creating make files for single or multiple source files project
  • Creating Lilbraries
  • Creating Static Library
  • Creating Shared Library
  • Multi Process Programming
  • Creating child processes
  • fork(). vfork(), exec()
  • Parent synchronization with child
  • Multi Thread Programming
  • Creating multiple threads
  • Parent synchronization with other Threads
  • Inter Process Communication
  • Pipes, FIFO's,
  • Signals
  • System-V IPC's
  • Message queues
  • Shared memory
  • Semaphores
  • Introduction to Sockets
  • An Overview
  • System calls related to TCP and UDP sockets
  • Using Wireshark etc tool for network sniffing
  • Network Programming
  • TCP Server Client Programming
  • UDP Server Client Programming
  • Lab exercises
  • Programming & Debugging Tools
  • Debugging and Analysis Tools
  • strace : Tracing System calls
  • ltrace : Tracing Library calls
  • Using gdb and ddd utilities
  • Core Dump Analysis etc
  • Introduction to Multicore Programming
  • Running programs parallel on multiple cores
  • Making sections of program run on multiple cores
  • Assigning specific program to specific core
  • Changing Priority of program to Real-time for critical applications

Embedded Linux System Development

  • Platforms – RaspberryPi, Beaglebone Black, Friendly ARM
  • Introduction to Embedded Linux
  • What is Embedded System?
  • Anatomy of an Embedded System
  • Why Linux?
  • Is Linux Real-Time Enough?
  • The Status of Embedded Linux Today
  • Which Embedded Linux Distribution to Choose?
  • Embedded Linux Architecture
  • Basic requirements for Embedded Linux Product Development - The four basic elements: toolchain, bootloader, kernel, root file system
  • Configuration, compilation and cross-compiling
  • Building Development Environment
  • Toolchain installation
  • Cross compilation using Toolchain
  • Target & Host Setup
  • Setting Up Networking Services
  • Network Settings
  • Static and Dynamic IP addresses
  • Subnet mask
  • Loading files using TFTP, HTTP, FTP etc.
  • Bootloader commands and usage
  • Getting familiar with bootloader commands
  • Downloading kernel images and RootFS on Target board.
  • Loading RootFS in Platform by various techniques -
  • Configuring TFTP and downloading kernel image over TFTP.
  • Configuring NFS and using rootfs over NFS.
  • Using SD-Card for rootfs.
  • Using USB for rootfs.
  • Building an Embedded File System from Scratch -
  • Creating a minimal root file-system using Busybox
  • Creating a RAM disk image
  • Intro to Building Own Embedded Linux Distribution -
  • Buildroot
  • Scratchbox
  • OpenEmbedded
  • Crosstool
  • Angstrom – Narcissus
  • Kernel Configuration and Compilation
  • Kernel Building System
  • Patching the Kernel
  • Kernel Configuration for Embedded Systems Settings (Porting)
  • Cross-compiling the Linux Kernel
  • Booting Linux - The Linux boot sequence - boot-loaders : U-boot
  • System Initialization Scripts
  • Bring up X11 (X-Windows) on Embedded Platform (GUI)
  • Loading various RootFS (Distributions) in platform
  • Angstrom, Ubuntu, Fedora etc. RootFS

Linux Device Driver Programming

  • An introduction to device drivers - User space vs Kernel space
  • Kernel Architecture or Model
  • Splitting the kernel
  • Kernel modules
  • Kernel Module vs Applications
  • Role of the Device Drivers
  • Classes of devices and modules
  • Kernel Module Programming Basics
  • Modules Defined
  • Data Type in the Kernel
  • Version dependency
  • Building and Running Modules
  • Types of Modules in the kernel
  • Writing Your first kernel module
  • Module Related Commands
  • Statically linked vs Dynamically linked drivers/modules
  • The kernel symbol table
  • Exporting symbols from modules
  • Module Parameters
  • Lab exercises for above mentioned topics
  • Kernel Debugging Techniques
  • Kernel Debugging: dmesg, printk
  • Lab exercises for above mentioned topics
  • Accessing Hardware Mechanisms
  • System Memory
  • Device Memory
  • I/O Ports
  • I/O ports vs. memory mapping
  • Allocating and mapping I/O space
  • Functions for reading and writing I/O ports
  • Side effects and compiler optimization
  • Accessing hardware from User Space
  • Example: the Parallel Port
  • Driver example
  • Barriers
  • User-Mode Access to Devices
  • open, close, read, write
  • ioctl
  • ioperm, iopl, inb, outb
  • mmap, munmap
  • The proc file system programming
  • Using /proc
  • Creating proc file system entries

Programme scope, delivery arrangements and suitability are confirmed during enquiry.