Open the terminal First you log in as a super user $ su $ password: ******* After you log in as a super user, download these packages given below. yum install arduino yum install java-1.7.0-openjdk After running these two commands … Continue reading
Following are the important points to note while writing data from user space to kernel space 1. The memory we allocate for creating qsets are architecture dependent, because qsets are the array of pointers which points to quantums i.e. they … Continue reading
RCS file: writef.c,v Working file: writef.c head: 1.15 branch: locks: strict root: 1.15 access list: symbolic names: keyword substitution: kv total revisions: 15; selected revisions: 15 description: chardev_write() function reside here. —————————- revision 1.15 locked by: root; date: 2014/03/01 11:19:07; … Continue reading
RCS file: wwrite.c,v Working file: wwrite.c head: 1.7 branch: locks: strict raghav: 1.7 access list: symbolic names: keyword substitution: kv total revisions: 7; selected revisions: 7 description: The file_operations structure is defined in linux/fs.h —————————- revision 1.7 locked by: raghav; … Continue reading
RCS file: clean.c,v Working file: clean.c head: 1.3 branch: locks: strict raghav: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: to delete the chr_dev structure which we had initialized during chr_dev init —————————- … Continue reading
Driver Modules can take command line arguments, but not with the argc/argv you might be used to. To allow arguments to be passed to your module, declare the variables that will take the values of the command line arguments as … Continue reading
RCS file: x.c,v Working file: x.c raghav: 1.5 access list: keyword substitution: kv total revisions: 5; selected revisions: 5 description: Program to delete any file using file handling in c With function remove() we can delete/remove any file from the … Continue reading
There are few steps to follow to open a file inside kernel from application layer. 1. Insert your character device driver inside the kernel using insmod and check its entry in the device driver table using cat /proc/devices and note … Continue reading
There are some points which we have to note down while working in character device driver: 1. The second argument of unregister_chrdev_region function means the number of devices to unregister from the device table …. should be matched with the … Continue reading
Implementing cdev_add and cdev_init RCS file: header.h,v Working file: header.h head: 1.4 branch: locks: strict raghav: 1.4 access list: symbolic names: keyword substitution: kv total revisions: 4; selected revisions: 4 description: This is a seperate header file where i have … Continue reading
There are some problems which we faced in un- registering the driver 1. there is no return type of unregister_chrdev_region , so you can check the result only by using vim /proc/devices after rmmod command 2. suppose if you are … Continue reading
RCS file: header.h,v Working file: header.h head: 1.3 branch: locks: strict raghav: 1.3 access list: symbolic names: keyword substitution: kv total revisions: 3; selected revisions: 3 description: This is a seperate header file where i have included all the necessary … Continue reading
RCS file: entry.c,v Working file: entry.c head: 1.6 branch: locks: strict raghav: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: program to insert a driver file inside our kernel —————————- revision 1.6 locked … Continue reading
RCS file: test1.c,v Working file: test1.c head: 1.6 branch: locks: strict raghav: 1.6 access list: symbolic names: keyword substitution: kv total revisions: 6; selected revisions: 6 description: Implementing semaphore in a single process to check what if …we set the … Continue reading
“Process management” as name itself means to manage the processes. And in terms of Linux OS, processes means “executing instance” of a program or we can use a word “tasks” for processes. Example: when ever we copy a file or … Continue reading