Linux Device Driver Hacks
This blog will contain the code snippets that are needed to implement particular feature in kernel. I’ll mainly focus on code snippet rather than the explanation. Again! this blog may not be fully correct. You’re expected to “check the facts/code” before applying. Please correct me, if i’m wrong. I’ll be more happy to accept the changes. This Blog is not beginner friendly. Kernel MODULE MACRO Handling module parameters #include <linux/moduleparam.h> // No need to include this. 'linux/module.h' included it. module_param(name, type, perm); MODULE_PARM_DESC(myarr,"this is my array of int"); inmod module.ko param=value Char Device There are 2 way to create char device. Creating the device node through ‘kernel module’ or using mknod ...