Brighton's Blog
← All Series

Assembly

7 - MR18 Deep Dive: Hand-Encoded MIPS Assembly

MerakiMR18MIPSAssemblyJTAGOpenWrtdeep-dive

Encoding instructions by hand like it’s 1985

Post 4 mentioned that I hand-encoded every MIPS instruction as hex constants directly in Python. Here’s what that actually looks like in practice—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

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 →