Results 1 to 1 of 1
Hi All, This query may be simple one... Under /dev directory we see many character/block device files were created as soon as the system boots up. The driver code for ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-13-2007 #1
- Join Date
- Sep 2007
How to automatically load my driver as kernel boots up
This query may be simple one...
Under /dev directory we see many character/block device files were created as soon as the system boots up. The driver code for all those files are present inside /usr/src/linux-18.104.22.168/drivers (for ex version 22.214.171.124).
1) Where is the code written to create the devices files under /dev directory. At what stage of booting process of kernel that code is executed so that files under /dev are created.
2) Suppose if i want to write my sample driver code which does storing of a string and displaying it when read. And i wanted to create a file under /dev as my kernel boots up and load the driver too.. how should i acheive this...
Like i write my .c file in drivers driectory edit the makefile to compile my .c file ? then how shld i proceed ? where and all i shld make changes.. to load my driver automatically as kernel boots up and create a file under /dev directory...
If any one can suggest me that would be helpful. Just tyring to understand much of kernel source tree.
Thanks in advance.