How I built my dd-wrt mod for ASUS RT-N13U

I'll start with the background. I fell into my hands for the inexpensive this miracle device ASUS RT-N13U and immediately there was a desire to use it to the fullest, but unfortunately the native firmware left much to be desired and I wandered off to look for alternatives on the Internet and came across dd-wrt. Everything about her was fine, but she didn’t support swap and file systems for my router.

For a long time I was waiting for a miracle, but alas, I did not wait and decided to make my firmware based on the original. I read the wiki on the dd-wrt website and got to work.

The dd-wrt developers, as it turned out, provided a completely ready-made development environment , but only for 64-bit systems, which could not but upset, because My plans did not include installing another operating system. Therefore, I downloaded buildroot 2011.2and decided to build the firmware using the configuration files provided by the dd-wrt developers, with certain changes of course. After a couple of hours of struggle, rootfs wasn’t able to compile like that, for some reason the dd-wrt server didn’t get a bunch of source files needed for compilation.

I didn’t want to give up and I decided to disassemble the original firmware, add the necessary modules to it by compiling the kernel, and finally build my own firmware mode. To quickly parse the firmware, I used the Firmware Modification Kit. Everything went well, except that the size of the router’s flash memory was not dimensionless and had to sacrifice such functionality as IPv6, USB printing, USB serial and 3G drivers. Of course, it was possible to remove, that nobody needed at home, support for services of public access points, but there it was necessary to spend a lot of time to cut it all “beautifully”.

As a result, I assembled a kernel with swap support and modules necessary for the operation of external drives and rejoiced in life. The only drawback that remained in my firmware is that it can only be flashed via tftp or using the Asus utility to restore the router, which in essence is also a tftp client, but for narrow use.

At the end of the article I want to give a list of used additional to standard utilities, etc. in chronological order:
1. Buildroot 2011.2 (in the pre-assembly settings, select Target Architecture and Target Architecture Variant for your hardware)
2. Original dd-wrt firmware (version optional)
3. Firmware Modification Kit
4. Linux Kernel source codes (version should match the version inside the original firmware)
5. The configuration file for the kernel taken from the dv-wrt server svn for the desired router is here
6. lzma 4.32
7. mksquashfs-lzma 3.0
8. mkimage

Warning:carefully choose the architecture in buildroot and the kernel configuration! An error can lead the router to a “brick” state after the firmware, which is treated only through the internal uart or, even worse, through the programmer!

In conclusion, I want to say that sometimes you should not wait for something, you can do it yourself. A discussion of my mod on the dd-wrt forum and the firmware itself can be found here .

If you have questions, ask in the comments - I will answer with pleasure. Also, I collected all the necessary steps for assembling the firmware into a script, if someone needs to write, I will definitely share it.

Also popular now: