aboutsummaryrefslogtreecommitdiff
path: root/readme.md
blob: 267fc38a90e2ce6ac594192c38238a7012cf4aa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# sources

(ordered chronologically by access time)

- [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
- [Linux kernel labs - character device drivers][kernel-labs-chrdev]
- [Core API][core-api]
- [Driver API][driver-api]

[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
[kernel-labs-chrdev]: https://linux-kernel-labs.github.io/refs/heads/master/labs/device_drivers.html
[core-api]: https://docs.kernel.org/core-api/kernel-api.html
[driver-api]: https://www.kernel.org/doc/html/latest/driver-api/infrastructure.html

# 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))