# ansanjay/kerneldev101 architecture

> Architecture diagram of the GitHub repository ansanjay/kerneldev101, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ansanjay/kerneldev101
- Repository: https://github.com/ansanjay/kerneldev101

## Overview

This repository is a set of introductory Linux kernel-module lessons, not a single driver application. The workflow is learning the module lifecycle, then examining small module examples and using kernel tools to inspect modules and logs. The sampled code shows initialization and cleanup hooks, and a multi-file example calling its helper. Other lesson contents are not sampled, so their internal behavior and connections are left unspecified.

Main entry points: [`Readme.md`](https://github.com/ansanjay/kerneldev101/blob/main/Readme.md) (Kernel basics), [`004.Multiple_files/hello.c`](https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/hello.c) (Multi-file module), [`004.Multiple_files/func.c`](https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/func.c) (Print helper), [`001.hello/hello.c`](https://github.com/ansanjay/kerneldev101/blob/main/001.hello/hello.c) (Hello module)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_guide["Learning guide"]
  node_guide["Kernel basics<br/>[Readme.md]"]
end

subgraph group_examples["Module examples"]
  node_hello["Hello module<br/>[hello.c]"]
  node_renamed["Renamed module<br/>[hello.c]"]
  node_multifile["Multi-file module<br/>[hello.c]"]
  node_helper["Print helper<br/>[func.c]"]
end

subgraph group_lessons["Further lessons"]
  node_insmod["Loading lesson<br/>[Readme.md]"]
  node_multi_modules["Multiple modules lesson<br/>[Readme.md]"]
  node_dmesg["Log inspection lesson<br/>[Readme.md]"]
end

node_learner(("Learner"))
node_kernel["Linux kernel"]
node_module_tools["Module tools"]

node_learner -->|"reads"| node_guide
node_guide -->|"explains loading"| node_kernel
node_guide -->|"documents commands"| node_module_tools
node_multifile -->|"calls"| node_helper
node_hello -->|"logs messages"| node_kernel
node_renamed -->|"logs messages"| node_kernel
node_multifile -->|"logs messages"| node_kernel
node_helper -->|"logs message"| node_kernel

click node_guide "https://github.com/ansanjay/kerneldev101/blob/main/Readme.md"
click node_hello "https://github.com/ansanjay/kerneldev101/blob/main/001.hello/hello.c"
click node_renamed "https://github.com/ansanjay/kerneldev101/blob/main/003.Change_module_name/hello.c"
click node_multifile "https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/hello.c"
click node_helper "https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/func.c"
click node_insmod "https://github.com/ansanjay/kerneldev101/blob/main/002.insmod_working/Readme.md"
click node_multi_modules "https://github.com/ansanjay/kerneldev101/blob/main/005.Multiple_kernel_module/Readme.md"
click node_dmesg "https://github.com/ansanjay/kerneldev101/blob/main/006.dmesg/Readme.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_guide toneBlue
class node_hello,node_renamed,node_multifile,node_helper toneAmber
class node_insmod,node_multi_modules,node_dmesg toneMint
class node_learner,node_kernel,node_module_tools toneIndigo
```

## Components

### Learning guide

- [Kernel basics](https://github.com/ansanjay/kerneldev101/blob/main/Readme.md): `Readme.md`

### Module examples

- [Hello module](https://github.com/ansanjay/kerneldev101/blob/main/001.hello/hello.c): `001.hello/hello.c`
- [Renamed module](https://github.com/ansanjay/kerneldev101/blob/main/003.Change_module_name/hello.c): `003.Change_module_name/hello.c`
- [Multi-file module](https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/hello.c): `004.Multiple_files/hello.c`
- [Print helper](https://github.com/ansanjay/kerneldev101/blob/main/004.Multiple_files/func.c): `004.Multiple_files/func.c`

### Further lessons

- [Loading lesson](https://github.com/ansanjay/kerneldev101/blob/main/002.insmod_working/Readme.md): `002.insmod_working/Readme.md`
- [Multiple modules lesson](https://github.com/ansanjay/kerneldev101/blob/main/005.Multiple_kernel_module/Readme.md): `005.Multiple_kernel_module/Readme.md`
- [Log inspection lesson](https://github.com/ansanjay/kerneldev101/blob/main/006.dmesg/Readme.md): `006.dmesg/Readme.md`

### Other components

- **Learner**
- **Linux kernel**
- **Module tools**

## Connections

- Learner → Kernel basics: reads (evidence: `Readme.md`)
- Kernel basics → Linux kernel: explains loading (evidence: `Readme.md`)
- Kernel basics → Module tools: documents commands (evidence: `Readme.md`)
- Multi-file module → Print helper: calls (evidence: `004.Multiple_files/hello.c`)
- Hello module → Linux kernel: logs messages (evidence: `001.hello/hello.c`)
- Renamed module → Linux kernel: logs messages (evidence: `003.Change_module_name/hello.c`)
- Multi-file module → Linux kernel: logs messages (evidence: `004.Multiple_files/hello.c`)
- Print helper → Linux kernel: logs message (evidence: `004.Multiple_files/func.c`)
