scudo's junkie site

Building the firmware for the ASUS DSL-N12E-C1 modem-router

Jan 19th, 2026 - scudo

A few months ago, I recovered an ASUS DSL-N12E-C1 modem-router combo someone was throwing away. At the time I didn't have a router at home, so I picked it up; it worked flawlessly first time. I then recefound out ASUS had published the full source code for the router firmware, so I started figuring out how to build it.

First of all, I had to settle on an OS. In the readme, ASUS says to use either Ubuntu 10.04 or CentOS 6.2; I decided to go with Ubuntu since I was familiar with it.

Here I made a critical mistake as I couldn't be bothered to fix the repositories to just fullfill the dependencies, and I instead tried to compile them on my own.

Here's what I needed to install:
The dependencies
Install these packages: build-essential, bison, flex, gawk, dos2unix, libstdc++


I checked for GCC and Make, and they were there, so I moved on.

Next thing, bison. After fullfilling its dependency m4, I was set. flex was not a problem as well.

I hit the first real roadblock with dos2unix: not only is it only available from SourceForge, but it also has a lot of dependencies. It depends on po4a, which depends on SGMLSpm (yes, Perl of all things), gettext and libxslt; libxslt itself has libtool and libxml2 as dependencies, and needed automake (which has autoconf as dependency) to be compiled. So I got to work.

po4a was a giant pain in the ass because it has support for perlpod and SGML, and being that this software was written in the early 2010s, it's written in Perl; so, off to building I went. I soon then found out that one of the listed dependencies was called just "SGMLS" and that it had no hits on CPAN.

After much more work than it should ever be necessary to install a Perl package, I solved this problem as well.

At this point I had been doing all of this work for two days, so I just did what I should have been doing from the beginning: I set up the repositories, installed the dependencies and started the compilation process.

A process that promptly failed two hours later because the inbuilt HTTP server did not build because the code was completely broken.

(no, I don't have many more details as I've been meaning to do this post since mid-November and I forgot exactly what was the problem since)