2010.02.08 When you load this module you will get instructions for creating the appropriate device file with the kernel-assigned major device number (probably 254). For example, mknod ./dev/mydev c 254 0 (do man on mknod). Note that tar files do not like to package up dev files, for fairly obvious reasons (they're not files). 2010.02.01 Nutt Device Driver Lab. First experiment is to get the LKMPG device driver example working for the 2.4 kernel. This example just implements a simple readable character device with a do-nothing write. The module supplies 4 functions: device_open, device_release, device_read, device_write. The device_open keeps a counter of the number of times the file has been opened. The device_read counts every time it has been called since an open and also reports both the open count and the read count. Test the program with the command line "head dev/mydev" that does a finite number of reads. This version never sends back an EOF, so programs like cat will never quit (until ^C). Note that you need to have a device file and you use the mknod command to do that. You can name the device file right in your own directory. I put it in a local subdirectory called dev, but you probably don't need to do that. This version of the program is written to have the kernel assign a major device number for the mknod, but it will probably be 254 for this kernel. The minor device number does not matter. mknod ./dev/mydev c 254 0 (do man on mknod).