I'm currently getting familiar with device drivers, and am reading the Linux Kernel Module Programming Manual. I coded the example in section 6.5, the char_dev.c character device driver. The manual states that, although it is not a strict contract between the user and the kernel, device files should be stores in the /dev directory. Firstly, I add the char_dev.c's object file to the makefile, creating the module char_dev.ko file. Once this is done, I save the .ko module file in the /dev directory. This is where I'm a bit lost. Previously, the simple modules I've been working with have been directly insmod'd and rmmod'd to and form the kernel in a separate directory I created. The char_dev.c device driver should, if it is opened, print out a message stating that it's already been opened N times by the user. It doesn't support any write() operations, and as far as I can tell, it's read() operation doesn't do anything besides copy the message generated from opening the device from kernel space to userspace and return how many bytes are read.
The manual states that through cat'ing /proc/devices I can view it's device file, but doing this doesn't show any char_dev device driver with any kind of major or minor number assigned.
I don't explicitly load the module into the kernel, although I assume I should, but the manual doesn't explicitly say to do this.
Any help would be greatly appreciated as this is my first time writing a / working with device drivers.