This walks you through building loadable kernel modules from scratch: setting up the Kbuild Makefile structure, adding module parameters that show up in sysfs, exposing data through /proc or sysfs interfaces, implementing character devices with proper copy_to_user/copy_from_user handling, and signing modules for Secure Boot systems. The debugging section covers both KGDB for live kernel debugging and ftrace for function tracing, which is honestly more useful day to day than firing up a serial connection. Code examples are complete and compilable. If you're writing device drivers or need to extend kernel functionality without recompiling the whole thing, this covers the boilerplate and gotchas you'll hit in the first few hours.

skills.sh installs
689
GitHub stars
279
last updated
Aug 21, 2026

Install

$ npx -y skills add mohitmishra786/low-level-dev-skills --skill linux-kernel-modules --agent claude-code

Installs into .claude/skills of the current project.

Files

Linux Kernel Modules

Purpose

Guide agents through writing loadable Linux kernel modules (LKMs): the Kbuild build system, module parameters, /proc and sysfs interfaces, character device implementation, kernel debugging with KGDB and ftrace, and module signing for Secure Boot.

Triggers

  • "How do I write a Linux kernel module?"
  • "How do I add parameters to my kernel module?"
  • "How do I create a /proc or sysfs entry?"
  • "How do I implement a character device driver?"
  • "How do I debug a kernel module with KGDB?"
  • "How do I sign a kernel module for Secure Boot?"

Workflow

1. Minimal kernel module

// hello.c — minimal loadable kernel module
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Your Name");
MODULE_DESCRIPTION("Minimal hello world module");
MODULE_VERSION("1.0");

static int __init hello_init(void)
{
    printk(KERN_INFO "hello: module loaded\n");
    return 0;   // non-zero = load failure
}

static void __exit hello_exit(void)
{
    printk(KERN_INFO "hello: module unloaded\n");
}

module_init(hello_init);
module_exit(hello_exit);

Sponsors

Details

Repository
github.com/mohitmishra786/low-level-dev-skills
Categories
Documentation, Debugging
First seen
Jun 3, 2026

More from mohitmishra786/low-level-dev-skills

All 54
1syncfusion avatarsyncfusion-react-popupssyncfusion/react-ui-components-skillsComprehensive guide for implementing Syncfusion React popup components including Dialog, ToolTip. Use this when building modal/modeless dialogs, confirmation po688skills.sh installs
2wispbit-ai avatarpython-expert-best-practices-code-reviewwispbit-ai/skillsPython best practices for writing production-grade code. This skill should be used when writing, reviewing, or refactoring Python code. Triggers on tasks involv685skills.sh installs
3ruvnet avatarcost-trendruvnet/rufloRead every docs/benchmarks/runs/*.json and surface drift in win rate, latency, escalation rate, and LLM-baseline cost over time683skills.sh installs
4databricks avatardatabricks-serverless-migrationdatabricks/databricks-agent-skillsMigrate Databricks workloads from classic compute to serverless compute. Use when migrating notebooks, jobs, pipelines, or Scala JARs (`spark_jar_task`) from cl681skills.sh installs
5yaojingang avataryao-meta-skillyaojingang/yao-meta-skillCreate, refactor, evaluate, and package agent skills from workflows, prompts, transcripts, docs, or notes. Use when asked to create a skill, turn a repeated pro677skills.sh installs
6joellewis avatarreg-bijoellewis/finance_skillsAnalyze the broker-dealer standard of conduct under SEC Regulation Best Interest's four obligations: Disclosure, Care, Conflict of Interest, and Compliance. Own675skills.sh installs