r/embeddedlinux Jul 08 '26

project Built an eBPF debugger that answers “who changed what and when” on Linux

Upvotes

I kept running into the same Linux debugging pain: something broke on a box, but I had no history of what actually happened. journald helps a little. auditd is heavy. strace is too narrow. So I built ltm — a small machine-history debugger that records process/file/network metadata via eBPF and lets you query it like a timeline.

What it does:

• Attaches to syscall tracepoints (exec, open/write/rename/unlink, connect/bind, etc.)

• Stores metadata only (no file contents)

• Lets you do things like:

sudo ltm start --mode ebpf

ltm status

ltm timeline --since 1h

ltm diff --from "10m" --to now

ltm query "who modified /tmp/ltm-demo.txt?"

On a real VM run it recorded ~7k events with 0 drops, and the query returned the exact bash write events that touched the demo file.

There's also a demo mode so you can exercise the CLI/storage/diff/query path without root or BPF.

Stack is Go + embedded BPF ELF + cilium/ebpf. Local store is append-only JSONL. Ignore rules skip /proc, /sys, /dev, and common caches.

Repo: https://github.com/Agent-Hellboy/ltm

Still early. Useful next steps I'm considering:

  1. better diff/query formatting
  2. containerized eBPF integration test
  3. more query templates ("what opened this port?", "what restarted before X?")

Please do star the repo, it will help in discoverability

r/embeddedlinux Aug 07 '26

project Built a free set of calculators for stuff I keep having to look up (GPIO numbering, CAN timing, devicetree memory math, etc)

Upvotes

I'm an embedded Linux / Yocto engineer and got tired of re-deriving the same small calculations every few months - GPIO sysfs numbers, devicetree reg end-addresses, CRC values, timer prescaler/ARR values, that kind of thing. So I built a small site with them:

embedcalc.dev

26 calculators, split into a few groups:

\- Embedded Linux / Yocto (GPIO sysfs numbering, devicetree memory regions, U-Boot load address checks, eMMC/SD sector offsets, NAND bad-block reserve, Yocto build disk space estimator)

\- MCU/firmware timing (timer prescaler/ARR, SPI clock divider, PWM duty cycle, watchdog timeout, CAN bus bit timing)

\- Serial/protocol stuff (UART baud error, UART frame time, I2C address conversion, CRC-8/16/32)

\- The usual electronics basics (voltage divider, resistor color codes) plus some general dev tools (two's complement, endianness swap, IP subnet calc, struct padding estimator)

Everything runs client-side, no signup, no tracking beyond basic analytics. It's static HTML/JS so it'll probably outlive most SaaS tools that try to do the same thing.

Open to feedback - especially if any of the formulas look off for your specific hardware, since some of these (CAN timing, I2C clock divider, Yocto disk space) vary a decent amount by vendor/ peripheral and I tried to caveat where that's true. Also happy to add more calculators if there's an obvious gap.

r/embeddedlinux Jun 12 '26

project Spent a few weekends building a bootable OS from scratch — kernel, initramfs, container runtime

Upvotes

Was curious how Linux actually boots, so I skipped the usual distros and built my own. Custom kernel compiled from source, BusyBox for userspace, containerd for running containers, and Dropbear for SSH. Everything fits in a single disk image that boots in ~15 seconds.

Learned a ton about:

- How initramfs works and why it exists

- What GRUB actually does under the hood

- Why containerd needs cgroup v2 and how to wire it up

- The difference between static and dynamic linking the hard way (dropbear needs libutil, who knew)

- How to install GRUB without root (Python + raw disk writes)

Still needs polish — networking is basic QEMU user-mode, no real package manager, and the build script only recently stopped being Fedora-only. But it boots, runs containers, and I can SSH into it.

Repo if anyone wants to poke at it (fair warning: the kernel config is held together by duct tape): https://github.com/Shreyas0047/veilbox

r/embeddedlinux Jul 13 '26

project Solution for binary communication protocols for embedded systems

Upvotes

Hi guys,

I'd like to share with you my personal solution to implementing and debugging binary communication protocols for embedded systems using C++(11) programming language. It's been in constant development as my side project for the last 12 years and is called CommsChampion Ecosystem. It started as a single C++ library to resolve some code boilerplating but grew into its own DSL (Domain Specific Language), multiple code generators for various purposes, and higher level libraries for some industry protocols like MQTT.

The primary features are:

  • Suitable for third party protocols, i.e. doesn't impose any particular protocol structure and/or framing.
  • Allows full control over I/O data for extra encryption and/or processing.
  • Focus on robust handling of malformed data rather than optimizing for quickest data serialization.
  • Easy integration with business logic requiring significantly reduced amount of boilerplate code.
  • Allows customization of various storage types as well as avoiding dynamic memory allocation to make it suitable for bare-metal system without heap and limited RAM size.
  • Allows injection of custom code if the generated one is incorrect or incomplete.
  • Generation of "C" interface for C++ classes for easier integration with "C" codebase.
  • Although C++ and embedded systems are first class citizens, there is support for other programming languages via bindings / glue code generated by SWIG or Emscripten.
  • Visual "in-house" protocol analysis tool allowing custom I/O stack handling as well as generation of Wireshark dissector.
  • Generation of LaTeX files for the defined protocol specification.
  • Support for easy buildroot and yocto integration.
  • The higher level protocol libraries follow specific pattern and philosophy dedicated to easy integration with any event loop infrastructure chosen for any particular embedded system.

Although already providing extensive set of features covering the needs for majority of the developers there is still room for extra new functionality. Any new feature requests are welcome.

r/embeddedlinux Apr 22 '26

project Android Verified Boot for embedded Linux

Upvotes

I built a toolkit that brings AVB (Android Verified Boot) to Embedded Linux.

Current practice: the root hash sits inside an initramfs that's only verified at an earlier stage. Once in RAM there's a multi-second TOCTOU window before the verity/dmsetup stage fires. JTAG, voltage glitch, DMA outside the IOMMU: overwrite the hash and the kernel is happy with it. No crypto broken but device pwned!

avb-utils brings AVB dm-verity-style to embedded Linux shipped on billions of Android devices, with host signing, target verification tools and PQC ML-DSA support.

https://github.com/embetrix/avb-utils

r/embeddedlinux Mar 02 '26

project Post-quantum cryptography on Embedded Linux

Upvotes

I’ve been working on meta-oqs, a dedicated OpenEmbedded layer for integrating quantum-safe cryptographic algorithms into embedded Linux systems. It’s built around the Open Quantum Safe project and currently provides:

-OpenSSL 3.x seamless integration via oqs-provider -Multi-language bindings: C, C++, Python, Rust, Go -Demo setups for Curl, NGINX, MQTT, OpenVPN, OpenSSH -Benchmarking tools for on-target performance evaluation

The layer is experimental, but fully functional for evaluating NIST-approved PQC algorithms on ARM, ARM64 and x86_64 systems.

GitHub:https://github.com/embetrix/meta-oqs

Feedback and contributions are welcome.

r/embeddedlinux Apr 06 '26

project mainline linux running on hy310 projector / h713 projector

Upvotes

wanted to share this because the project has reached a point where it doesn’t really feel like a broken bring-up anymore, it actually feels like a proper port now

i’ve been messing around with a HY310 projector based on the allwinner h713, one of those cheap little devices where at first you think “it would already be a win if i can just get a kernel to boot on this thing”

and then, as usual, it turned into a complete rabbit hole

it’s now running mainline linux 6.16.7, and not in a “well technically it boots if you’re patient” kind of way, but in a surprisingly usable state: gpu accelerated wayland desktop, hardware video decode, speaker audio, wifi, bluetooth, ir remote, and now hs400 emmc with pretty decent throughput too. still many things need general overhauls and more RE.

most of the work was reverse engineering because there’s basically no useful documentation for the h713. so a lot of tearing apart the stock firmware, looking through dtbs, throwing ida at kernel modules and random blobs, poking registers live on the hardware, reading dmesg, reflashing, reading dmesg again, and repeating that loop way more often than i’d like to admit

what i kind of like about the project is that it started as a “let’s just see if anything works at all” type of thing, and then a few hundred boots later you suddenly find yourself buried in pinctrl layouts, msgbox quirks and undocumented usb phy behavior

right now, quite a lot is working already:
mainline boot
wayland/labwc desktop with panfrost
cedrus hardware decode + gpu (mostly untested)
speaker audio
wifi + bluetooth
ir
thermal/fan
reboot/poweroff
and emmc in hs400 mode

it’s obviously still work in progress, but it’s far enough along now that i think it’s fair to say: this thing actually runs on mainline linux now, and it’s not just a boot logo plus optimism anymore

if anyone here is also into allwinner stuff, embedded linux, or generally cursed consumer hardware, i’d be happy to chat. and if by any chance someone has docs or sdk material for h713 / sun50iw12p1, please let me know because that would make life a lot easier :D

repo: https://github.com/well0nez/allwinner-h713-linux

r/embeddedlinux Mar 27 '24

project Hey, I want your views on this library.

Thumbnail
github.com
Upvotes

I recently worked my ass off to build this library. I want to know what it lacks.

Let's say if someone who is professional and opted to choose an existing library to manage debugging logs for their server or products. Why would they reject this library?