How to get started writing a kernel module

The kernel module I linked to was just as an example. It has a very simple Makefile, only one source file so I figured since you already wrote kernel modules for Ubuntu it shouldn't be to hard to modify to you actual needs.

As others have stated: building the .ko file and transferring to your device during development is faster (easier) than patching your source into the kernel and having to recompile the whole kernel. If you want you should be able to actually compile directly on the RPi3 but I'm not sure if the time to set that up plus likely longer waiting times to compile would actually benefit you. (see: building openwrt on openwrt )

1 Like