Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.06 KB

README.md

File metadata and controls

42 lines (33 loc) · 1.06 KB

linux smile device

linux kernel module for char device with similar to /dev/zero functionality, but instead of nulls generates smiles ^^

image

build

run

$ make

to build the module

NOTE you need some kernel headers to build the module, if it fails on your system see Chapter 2 of the book mentioned below

load module

use

$ ./load_smile.sh

this loads the module into the running kernel and creates fs node /dev/smile representing the device

try the device

use

$ cat /dev/smile

to see it work. Ctrl+C to stop.

undload module

use

$ ./unload_smile.sh

to unload the module and remove /dev/smile device

important

this example was made by following this awesome Linux Device Drivers, Third Edition book.
you should really check it out !
also here you can find up-to-date examples for this book