# yuvan1492/embedded-linux-lab architecture

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

- Interactive diagram: https://gitdiagram.com/yuvan1492/embedded-linux-lab
- Repository: https://github.com/yuvan1492/embedded-linux-lab

## Overview

Embedded Linux Lab is a hands-on curriculum built around motor control and power telemetry, rather than one deployed application. Its learning path progresses from compiling C and booting Linux through kernel modules, a Device-Tree-bound motor driver, userspace control, and optional M4/RPMsg supervision; separate networking demos cover sockets, error detection, addressing, and HTTP. The graph includes the documented subsystem relationships and sampled runtime calls. Several stages are described only in the README, so their links are documented flows, not evidence of a validated hardware integration.

Main entry points: [`04-platform-driver/motor_ctl.c`](https://github.com/yuvan1492/embedded-linux-lab/blob/main/04-platform-driver/motor_ctl.c) (Motor Platform Driver), [`07-rpmsg-m4/m4-firmware/main.c`](https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/m4-firmware/main.c) (M4 Control Loop), [`08-capstone-daemon/supervisor.c`](https://github.com/yuvan1492/embedded-linux-lab/blob/main/08-capstone-daemon/supervisor.c) (Telemetry Supervisor), [`07-rpmsg-m4/protocol.h`](https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/protocol.h) (RPMsg Protocol)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_boot["Toolchain And Boot"]
  node_toolchain["Cross Compilation<br/>[hello.c]"]
  node_boot_script["U-Boot Script<br/>[boot.cmd]"]
end

subgraph group_kernel["Kernel And Hardware"]
  node_linux_kernel["Linux Kernel"]
  node_hello_module["Hello Module<br/>[hello.c]"]
  node_proc_module["Proc Interface<br/>[hello_proc.c]"]
  node_timer_module["Timer GPIO<br/>[timer_gpio.c]"]
  node_motor_driver["Motor Platform Driver<br/>[motor_ctl.c]"]
  node_device_tree["Device Tree Overlays"]
end

subgraph group_userspace["Userspace Motor Control"]
  node_buildroot_app["Motor Monitor<br/>[main.c]"]
  node_motor_api["Motor ioctl API<br/>[motor_ctl.h]"]
end

subgraph group_multicore["M4 And Supervision"]
  node_m4_firmware["M4 Control Loop<br/>[main.c]"]
  node_rpmsg_protocol["RPMsg Protocol<br/>[protocol.h]"]
  node_rpmsg_client["Linux RPMsg Client<br/>[rpmsg_client.c]"]
  node_supervisor["Telemetry Supervisor<br/>[supervisor.c]"]
end

subgraph group_networking["Networking Demos"]
  node_tcp_user["TCP Client<br/>[tcp_echo_client.c]"]
  node_tcp_server["TCP Echo Server<br/>[tcp_echo_server.c]"]
  node_udp_user["UDP Client<br/>[udp_echo_client.c]"]
  node_udp_server["UDP Echo Server<br/>[udp_echo_server.c]"]
  node_error_demos["Checksum And CRC"]
  node_cidr_demo["CIDR Calculator<br/>[subnet_calc.c]"]
  node_http_demo["DNS And HTTP<br/>[http_get.c]"]
end

node_engineer(("Engineer"))
node_hardware["Target Hardware"]
node_tcp_consumer(("TCP Consumer"))

node_engineer -->|"builds"| node_toolchain
node_toolchain -.->|"prepares target"| node_boot_script
node_boot_script -->|"loads kernel and DTB"| node_linux_kernel
node_linux_kernel -->|"loads module"| node_hello_module
node_linux_kernel -->|"loads module"| node_proc_module
node_linux_kernel -->|"loads module"| node_timer_module
node_device_tree -->|"matches and probes"| node_motor_driver
node_linux_kernel -->|"provides kernel services"| node_motor_driver
node_buildroot_app -->|"controls through device"| node_motor_driver
node_buildroot_app -->|"uses ioctl definitions"| node_motor_api
node_m4_firmware -->|"encodes messages"| node_rpmsg_protocol
node_rpmsg_client -->|"encodes messages"| node_rpmsg_protocol
node_supervisor -->|"decodes telemetry"| node_rpmsg_protocol
node_m4_firmware -->|"exchanges RPMsg"| node_rpmsg_client
node_m4_firmware -->|"sends telemetry"| node_supervisor
node_supervisor -->|"serves status"| node_tcp_consumer
node_tcp_user -->|"exchanges TCP data"| node_tcp_server
node_udp_user -->|"exchanges UDP data"| node_udp_server
node_engineer -->|"runs demonstrations"| node_error_demos
node_engineer -->|"runs calculator"| node_cidr_demo
node_engineer -->|"runs HTTP demo"| node_http_demo
node_motor_driver -->|"drives GPIO and PWM"| node_hardware

click node_toolchain "https://github.com/yuvan1492/embedded-linux-lab/blob/main/01-toolchain/hello.c"
click node_boot_script "https://github.com/yuvan1492/embedded-linux-lab/blob/main/02-uboot/boot.cmd"
click node_hello_module "https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/01-hello/hello.c"
click node_proc_module "https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/02-proc-interface/hello_proc.c"
click node_timer_module "https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/03-timer-gpio/timer_gpio.c"
click node_motor_driver "https://github.com/yuvan1492/embedded-linux-lab/blob/main/04-platform-driver/motor_ctl.c"
click node_device_tree "https://github.com/yuvan1492/embedded-linux-lab/tree/main/05-device-tree/overlays"
click node_buildroot_app "https://github.com/yuvan1492/embedded-linux-lab/blob/main/06-buildroot-external/package/motor-monitor/src/main.c"
click node_motor_api "https://github.com/yuvan1492/embedded-linux-lab/blob/main/06-buildroot-external/package/motor-monitor/src/motor_ctl.h"
click node_m4_firmware "https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/m4-firmware/main.c"
click node_rpmsg_protocol "https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/protocol.h"
click node_rpmsg_client "https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/linux-client/rpmsg_client.c"
click node_supervisor "https://github.com/yuvan1492/embedded-linux-lab/blob/main/08-capstone-daemon/supervisor.c"
click node_tcp_user "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/tcp_echo_client.c"
click node_tcp_server "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/tcp_echo_server.c"
click node_udp_user "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/udp_echo_client.c"
click node_udp_server "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/udp_echo_server.c"
click node_error_demos "https://github.com/yuvan1492/embedded-linux-lab/tree/main/09-networking/02-error-detection"
click node_cidr_demo "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/03-ip-addressing/subnet_calc.c"
click node_http_demo "https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/04-dns-http/http_get.c"

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_toolchain,node_boot_script toneBlue
class node_linux_kernel,node_hello_module,node_proc_module,node_timer_module,node_motor_driver,node_device_tree toneAmber
class node_buildroot_app,node_motor_api toneMint
class node_m4_firmware,node_rpmsg_protocol,node_rpmsg_client,node_supervisor toneRose
class node_tcp_user,node_tcp_server,node_udp_user,node_udp_server,node_error_demos,node_cidr_demo,node_http_demo,node_engineer,node_hardware,node_tcp_consumer toneIndigo
```

## Components

### Toolchain And Boot

- [Cross Compilation](https://github.com/yuvan1492/embedded-linux-lab/blob/main/01-toolchain/hello.c): `01-toolchain/hello.c`
- [U-Boot Script](https://github.com/yuvan1492/embedded-linux-lab/blob/main/02-uboot/boot.cmd): `02-uboot/boot.cmd`

### Kernel And Hardware

- **Linux Kernel**
- [Hello Module](https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/01-hello/hello.c): `03-kernel-modules/01-hello/hello.c`
- [Proc Interface](https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/02-proc-interface/hello_proc.c): `03-kernel-modules/02-proc-interface/hello_proc.c`
- [Timer GPIO](https://github.com/yuvan1492/embedded-linux-lab/blob/main/03-kernel-modules/03-timer-gpio/timer_gpio.c): `03-kernel-modules/03-timer-gpio/timer_gpio.c`
- [Motor Platform Driver](https://github.com/yuvan1492/embedded-linux-lab/blob/main/04-platform-driver/motor_ctl.c): `04-platform-driver/motor_ctl.c`
- [Device Tree Overlays](https://github.com/yuvan1492/embedded-linux-lab/tree/main/05-device-tree/overlays): `05-device-tree/overlays`

### Userspace Motor Control

- [Motor Monitor](https://github.com/yuvan1492/embedded-linux-lab/blob/main/06-buildroot-external/package/motor-monitor/src/main.c): `06-buildroot-external/package/motor-monitor/src/main.c`
- [Motor ioctl API](https://github.com/yuvan1492/embedded-linux-lab/blob/main/06-buildroot-external/package/motor-monitor/src/motor_ctl.h): `06-buildroot-external/package/motor-monitor/src/motor_ctl.h`

### M4 And Supervision

- [M4 Control Loop](https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/m4-firmware/main.c): `07-rpmsg-m4/m4-firmware/main.c`
- [RPMsg Protocol](https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/protocol.h): `07-rpmsg-m4/protocol.h`
- [Linux RPMsg Client](https://github.com/yuvan1492/embedded-linux-lab/blob/main/07-rpmsg-m4/linux-client/rpmsg_client.c): `07-rpmsg-m4/linux-client/rpmsg_client.c`
- [Telemetry Supervisor](https://github.com/yuvan1492/embedded-linux-lab/blob/main/08-capstone-daemon/supervisor.c): `08-capstone-daemon/supervisor.c`

### Networking Demos

- [TCP Client](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/tcp_echo_client.c): `09-networking/01-sockets/tcp_echo_client.c`
- [TCP Echo Server](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/tcp_echo_server.c): `09-networking/01-sockets/tcp_echo_server.c`
- [UDP Client](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/udp_echo_client.c): `09-networking/01-sockets/udp_echo_client.c`
- [UDP Echo Server](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/01-sockets/udp_echo_server.c): `09-networking/01-sockets/udp_echo_server.c`
- [Checksum And CRC](https://github.com/yuvan1492/embedded-linux-lab/tree/main/09-networking/02-error-detection): `09-networking/02-error-detection`
- [CIDR Calculator](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/03-ip-addressing/subnet_calc.c): `09-networking/03-ip-addressing/subnet_calc.c`
- [DNS And HTTP](https://github.com/yuvan1492/embedded-linux-lab/blob/main/09-networking/04-dns-http/http_get.c): `09-networking/04-dns-http/http_get.c`

### Other components

- **Engineer**
- **Target Hardware**
- **TCP Consumer**

## Connections

- Engineer → Cross Compilation: builds (evidence: `README.md`)
- Cross Compilation → U-Boot Script: prepares target
- U-Boot Script → Linux Kernel: loads kernel and DTB (evidence: `README.md`)
- Linux Kernel → Hello Module: loads module (evidence: `README.md`)
- Linux Kernel → Proc Interface: loads module (evidence: `README.md`)
- Linux Kernel → Timer GPIO: loads module (evidence: `README.md`)
- Device Tree Overlays → Motor Platform Driver: matches and probes (evidence: `README.md`)
- Linux Kernel → Motor Platform Driver: provides kernel services (evidence: `README.md`)
- Motor Monitor → Motor Platform Driver: controls through device (evidence: `README.md`)
- Motor Monitor → Motor ioctl API: uses ioctl definitions (evidence: `06-buildroot-external/package/motor-monitor/src/main.c`)
- M4 Control Loop → RPMsg Protocol: encodes messages (evidence: `07-rpmsg-m4/m4-firmware/main.c`)
- Linux RPMsg Client → RPMsg Protocol: encodes messages (evidence: `07-rpmsg-m4/linux-client/rpmsg_client.c`)
- Telemetry Supervisor → RPMsg Protocol: decodes telemetry (evidence: `08-capstone-daemon/supervisor.c`)
- M4 Control Loop → Linux RPMsg Client: exchanges RPMsg (evidence: `README.md`)
- M4 Control Loop → Telemetry Supervisor: sends telemetry (evidence: `README.md`)
- Telemetry Supervisor → TCP Consumer: serves status (evidence: `08-capstone-daemon/supervisor.c`)
- TCP Client → TCP Echo Server: exchanges TCP data (evidence: `README.md`)
- UDP Client → UDP Echo Server: exchanges UDP data (evidence: `README.md`)
- Engineer → Checksum And CRC: runs demonstrations (evidence: `README.md`)
- Engineer → CIDR Calculator: runs calculator (evidence: `README.md`)
- Engineer → DNS And HTTP: runs HTTP demo (evidence: `README.md`)
- Motor Platform Driver → Target Hardware: drives GPIO and PWM (evidence: `README.md`)
