Skill Set Name: Device Driver Development

Topics Level Sub topics Skill Category No Code Share comment
Linux kernel I

Understand the basics of Linux Architecture.

9-5-1-I
Linux kernel II

Use kernel primitive functions.


  • Use various kernel memory primitives including kmalloc() / kfree(), vmalloc() / vfree(), alloc_page() / free_page(), slab primitives
  • Understand the process control primitives such as schedule(), sleep() and wakeup()
  • Understand kobject
  • Use primitive functions for /proc, /sys file system
  • Use the macros and primitives to handle kernel lists and queues
  • Understand kernel timer data structures and primitives
9-5-1-II
Kernel debugging I

Setup remote debugging environment and debug.

9-5-2-I
Kernel debugging II

Monitor and debug kernel remotely.


  • Monitor kernel event and behavior with /proc, /sys, prink()
  • Use KGDB to trace kernel code, watch kernel data
  • Debug LKM (loadable kernel module)
  • Understand and use the capability of ICE (in circuit emulator) to debug kernel
9-5-2-II
kernel configuration I

Configure Linux Kernel.


  • Configure Linux Kernel with kconfig system
  • Build kernel image (vmlinux, bzImage) both in source directory and separate object directory
  • Configure, build and install kernel module
  • Configure Linux kernel for remote debugging with KGDB (serial or Ethernet)
  • Configure Linux kernel for
9-5-3-I
Kernel configuration II

Understand the method to add new items to kernel.


  • Understand the method to add new items to kernel
  • Modify kconfig system
  • Configure, build and install external kernel module

 

9-5-3-II
Character device driver II

Implement character device driver as a kernel module.


  • Register and unregister character device driver with specified major, minor number
  • Implement system call API such as open(), read(), write(), ioctl(), release()
  • Implement data availability API such as poll(), fasync()
  • Implement a device driver such as a Linux kernel module
9-5-4-II
Character device driver III

Implement device driver which uses interrupt and/or DMA.


  • Implement device drive which uses hardware interrupt by setting up IRQ
  • Understand execution context (user / kernel / interrupt)
  • Understand the do’s and don’ts in ISR
  • Understand and use delayed execution such as Top Half/Bottom Half
9-5-4-III
Other device drivers III

Implement all kinds of device drivers.


  • Implement the bus drivers including I2C, SPI, PCI, PCMCIA/CF
  • Understand USB software architecture and implement USB class driver
  • Implement block device driver
  • Implement network interface driver
  • Implement video frame buffer driver
  • Implement audio driver using open sound system
  • Implement camera driver for video for Linux
  • Implement device drivers as a user space application
9-5-5-III
Building target system I

Configure boot loaders and manage boot sequences, Build root file system.


  • Configure bootloader such as uBoot, Redboot, and etc.
  • Use flash commands to fuse bootloader/kernel/root file system
  • Configure DHCP/BOOTP/NFS for network boot
  • Use boot load command or specify kernel options for network boot
  • Build root file system from scratch
  • Build Initramfs file system
  • Configure, build and install busybox
  • Configure mtd device and use it as Linux file systems
9-5-6-I
Kernel synchronization primitives II

Implement device driver with concurrent access.


  • Implement process level synchronization using sleep() / wakeup() / wait_event()
  • Implement mutual exclusion with kernel mutex primitives such as spin lock, read write lock, atomic operations
  • Understand when spin_lock_irq() is required
  • Use up/down, completion semaphore
9-5-7-II
Kernel thread II

Implement kernel thread.


  • Create and daemonize a kernel thread
  • Understand and use softirq/tasklet
9-5-8-II
Power management III

Implement power efficient device driver.


  • Understand Linux power management architecture
    • ACPI states
  • Understand standby and wakeup mechanism
  • Use ACPI to manage power consumption
9-5-9-III