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 all those files are present inside /usr/src/linux-2.6.18.35/drivers (for ex version 2.6.18.35).

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.

Regards,
Mani