Posts

Showing posts with the label Linux Drivers

Linux Device Drivers - Part 13 : More on Device Numbers

Image
In this session, we are going to discuss following topics     1. Allocating and freeing Device Numbers     2. Best way to allocate Device Numbers     3. Disadvantage of dynamic assignment of device numbers     4. Allocating device numbers to scull device driver Source code of Linux Device Driver examples of O'reilly can be downloaded from below link http://examples.oreilly.com/linuxdrive3/ Watch video here:

Linux Device Drivers Part - 12 : Major and Minor Numbers in Linux Device Driver Programming

Image
In this session we will discuss following topics 1. Books to refer for Linux Device Driver Programming 2. Our mail Goal to achieve in up coming sessions 3. Steps to follow while Linux Device Driver Programming Under this particular topic we will learn about      Gathering information about a Linux Device Driver      Gathering information of SCULL Device Driver      Identifying and defining Major and Minor Number       Representation of Device numbers You can download a softcopy of LDD http://www.oreilly.com/openbook/linuxdrive3/book/ Watch video here :

Linux Device Drivers Part 11: Device Driver Types

Image
In this video session, we will discuss about 1. /dev directory Device Driver types (Character Devices, Block devices and Network Devices) Practical session included at the end. Please subscribe for more videos.

Linux Device Drivers Part 10: Module Parameters

Image
In this video session we will discuss following topics 1.What are Module parameters ? 2.Ways to change these module parameters? 3.Module_param macro 4.Array Module parameters

Linux Device Drivers - Part 8 : Kernel Symbol Tables

Image
In this session we learn about 1. A symbol in Linux 2. How it is exported ? 3. Symbol and Symbol Table relationship 4. Idea behind exporting a Symbol 1. A Symbol in Linux In Linux, symbols are nothing but variables and functions that are needed to implement modularised drivers. Note that each and every symbol has its address in the memory. To make our understanding clear, lets draw a small diagram which shows a Linux Kernel Module with symbols ( Variables and functions ) in it. So in short, symbol is nothing but a variable or function in LKM How Symbols are Exported ? Exporting Kernel Symbols is typically done with  EXPORT_SYMBOL() EXPORT_SYMBOL_GPL() EXPORT_SYMBOL(), which exports a given symbol to all loadable modules  EXPORT_SYMBOL_GPL(), which exports a given symbol to only those modules that have a GPL-compatible license. (The first variation is far more common). GPL here is General Public License is widely used for free software license.