This examples are extracted from The Linux kernel module programming guide. You can see how to install them on embedded Linux distribution through Yocto Project visiting Yocto Project example layer.
- Example 01: Helloworld. The simplest kernel module.
- Example 02: Demonstrates command line argument passing to a module.
- Example 03: Creates a read-only char device that says how many times you have read from the dev file.
- Example 04: Create a "file" in /proc.
- Example 05: sysfs example.
- Example 06: Using ioctl's to control the kernel module.
- Example 07: Sleep.
- Example 08: Atomic, mutex and spinlock.
- Example 09: Dealing with hardware.
- Example 10: Schedule tasks and interrupts.
- Example 11: Cryptography.
- Example 12: Emulate input events.
- Example 13: Linux device model example.