diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-04-18 15:23:17 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-04-18 15:23:17 +0200 |
commit | c83f52365564e70450841b632547f4563920b1fb (patch) | |
tree | eb126f11c1f333860a26f7a60193fdf380225cba /readme.md | |
parent | 040e04244229fa0f7af4c15f3d9c4d11e1253996 (diff) |
add character driver fops struct + implementation
Diffstat (limited to 'readme.md')
-rw-r--r-- | readme.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..f8f735d --- /dev/null +++ b/readme.md @@ -0,0 +1,27 @@ +# sources + +- [Kbuild object variable name rationale][kbuild-obj-var] +- [Kbuild kernel module setup guide][kbuild-module-makefile] +- [`struct file_operations`][c-struct-file-operations] documentation, also + - write(2) + - read(2) +- (Sadly) [the Linux kernel source][kernel] itself, especially + - drivers/char/random.c + - drivers/char/mem.c + +[kbuild-obj-var]: https://docs.kernel.org/kbuild/makefiles.html#loadable-module-goals-obj-m +[kbuild-module-makefile]: https://www.kernel.org/doc/html/latest/kbuild/modules.html#creating-a-kbuild-file-for-an-external-module +[c-struct-file-operations]: https://www.kernel.org/doc/html/latest/filesystems/vfs.html#struct-file-operations +[kernel]: https://github.com/torvalds/linux + +# tips + +- When the kernel documentation references manpages, these actually contain + useful information. Manpages are not only for commands, but also include + detailed documentation for the syscall interface and other C APIs. + + Since most of the manpages referenced by the kernel are from section 2 (on + system calls), you should append the number between brackets to the `man` + command, i.e. to read 'write(2)' use the command `man 2 write`. +- Use `dmesg` with the `-w` or `-W` option (see man dmesg(1)) + |