Brighton's Blog
← All Series

Assembly

7 - MR18 Deep Dive: Hand-Encoded MIPS Assembly

MerakiMR18MIPSAssemblyJTAGOpenWrtdeep-dive

Encoding instructions by hand like it’s 1985

They said “use a tool,” I said “nah I got this”

Post 4 mentioned that I hand-encoded every MIPS instruction as hex constants directly in Python. I figured it’s worth breaking down what that actually looks like in practice. So here’s the deep dive—every trampoline, every encoding decision, and the one-bit typo that almost ruined everything.

Read more →

14 - MR18 Deep Dive: Bare-Metal C

MerakiMR18CMIPSAssemblyAR8035PHYdeep-dive

Writing a PHY driver without libc

I don’t need a feature, I just need a fix / raw register writes and a couple syscall tricks

Post 6 mentioned a standalone C program that pokes two MDIO registers to fix the AR8035 PHY’s broken RGMII RX clock delay. This deep dive rips open the actual source—ar8035_start.S, ar8035.c, and the Makefile—and walks through every layer from the assembly entry point down to the register writes that make Ethernet work. If you’ve ever wondered what bare-metal Linux userspace programming looks like on MIPS with zero library dependencies, this is it.

Read more →