Newer
Older
linux_kernel_hacking / 0_Basic_LKMs / 0.1_device_file / README.md
@Harvey Phillips Harvey Phillips on 4 Jun 2020 534 bytes restructure

Linux Kernel Hacking

0.1: Character Devices

Simple character device file.

To use:

  • Build with make and load with make test
  • Create a device file with mknod /dev/example c <MAJOR> 0, replacing <MAJOR> with major number returned in the kernel buffer.
  • Take a look at the device with cat /dev/example
  • Delete the device file with rm /dev/example and unload the module with rmmod example

Followed along from here.