CS430 Project 2: Adding to the Kernel
Due Monday, March 10, but please give it a try by February 10
Create a kernel module that allows the user to control blinking of keyboard LEDs using a file in /proc. The file should be ready for user input whenever the module is loaded, and accept two messages:
- L%d : Two characters, an L and a number (in ASCII). The number indicates the keyboard LEDs that ought to blink, and is in the range 0-7, so %d is an integer in the range 0-7
- D%d : Two characters, a D and a number that indicates the divisor for HZ in the delay. This will adjust the speed of the blinking. %d is an integer in the range 0-9, delivered as an ASCII character.
You'll need to convert the wait time and the ALL_LEDS from #define to global variables, which can be changed upon proper user input. Demos have been placed in kmod in the class examples area to demonstrate keyboard LED blinking and /proc usage.
Start this project (and all others, but particularly this one) well in advance of the deadline. In fact, I would recommend making a significant beginning immediately, while you still remember basics of kernel modules.
Turning in the assignment
Upload your completed kernel module source code to the class website.