Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Udemy

Character Device Drivers in deep

via Udemy

Overview

Linux Kernel Programming - Character Device Drivers

What you'll learn:
  • Write character device driver from scratch
  • Understand the various file operations provided by character driver

Updated on Oct 10: Added Downloads section

What will you learn from this course?

  • Introduction to character drivers

  • What is device number and device file

  • Allocating device number - statically and dynamically

  • Creating device file - Manually(mknod) and automatically (udev)

  • Registering character device and its file operation with Kernel

  • Copying data from user space to kernel space and vice versa

  • Understanding the various structures - struct file and struct inode

  • Implementation of open, release, read, write, llseek, ioctl file operations

  • How to create multiple device nodes and add support for private data

  • Flow of write system call from kernel system call entry point to driver write file operations

  • Handling all the error cases in ioctl implementation

  • Sending a signal to user space from kernel space

  • Various access control mechanisms and capabilities

  • Misc Driver

API's covered in this course:

  • MAJOR

  • MINOR

  • MKDEV

  • register_chrdev_region

  • alloc_chrdev_region

  • class_create

  • device_create

  • class_destroy

  • device_destroy

  • unregister_chrdev_region

  • imajor

  • iminor

  • copy_from_user

  • copy_to_user

  • put_user

  • get_user

  • print_dev_t

  • format_dev_t

  • strnlen_user

  • container_of

  • access_ok

Commands used in this course:

  • mknod

  • udevadm monitor

Syllabus

  • Introduction
  • File Operations
  • IOCTL
  • Access Control and Capabilities
  • Misc Driver
  • Resources

Taught by

Linux Trainer

Reviews

4 rating at Udemy based on 146 ratings

Start your review of Character Device Drivers in deep

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.