Skip to content

Linux driver

  • modinfo <module_name|module.ko> provides information about a module (author, description, license, kernel version it was compiled for, list of accepted parameters, etc.).
  • insmod <module.ko> loads a module.
  • modprobe <module_name> loads a module and any required dependencies.
  • lsmod lists the modules currently loaded.
  • rmmod <module_name> unloads a module. This operation is only possible if the module is not currently in use.
  • modprobe -r <module_name> also unloads a module and all of its dependencies that are not being used.
  • pr_* functions (ring buffer of dmesg)
  • dev_* functions (with a pointer to device)
  • Debugfs (CONFIG_DEBUG_FS and mounting /sys/kernel/debug
  • kgdb with serial
  • JTAG/SWD on the processor
  • QEMU (and gdb)