Complete Guide To Compiling OpenWRT

Regular reader [MS3FGX] recently wrote a guide to compiling OpenWRT from source. You may be wondering why directions for compiling an open source program warrant this kind of attention. The size and scope of the package make it difficult to traverse the options available to you at each point in the process, but [MS3FGX] adds clarity by discussion as much as possible along the way.

OpenWRT is an open source alternative firmware package that runs on may routers. It started as a way to unlock the potential of the Linksys WRT54G. But the versatility of the user interface, and the accessibility of the Linux kernel made it a must-have for any router. This is part of what has complicated the build process. There are many different architectures supported and you’ve got to configure the package to build for your specific hardware (or risk a bad firmware flash!).

You’ll need some hefty hardware to ease the processing time. The source package is about 300 MB but after compilation the disk usage will reach into the Gigabyte range. [MS3FGX] used a 6-core processor for compilation and it still took over 20 minutes for a bare-bones distribution. No wonder pre-built binaries are the only thing we’ve ever tried. But this is a good way to introduce yourself to the inner workings of the package and might make for a frustrating fun weekend project.

9 thoughts on “Complete Guide To Compiling OpenWRT

  1. it’s funny…it’s fairly easy to setup a build environment, grab sources, and compile OpenWRT.

    the one that people tend to have difficulties with (partially due to the lack of coherent and up-to-date instructions) is DD-WRT; man that thing is a nightmare to compile right.

    it does however still take a few gigabytes of space and 20+ minutes to compile (the build tools might not be SMP optimized though).

  2. It is frustrating I can attest to that. Especially when your config is dead for no reason and you have to start from scratch.

    I was just now thinking about buying a decent PC so I can maybe compile faster. But with the given specs still taking 20 minutes to cross-compile I don’t think I have the budget to make my life much better.

    OpenWRT Is an amazing platform. I just wish they had more documentation on developing packages and a were a little more helpful in the forums. But they’re looking big picture now.

    1. The documentation for adding packages to OpenWRT really is terrible.

      I will be writing a guide that explains how to cross compile and package your own applications for OpenWRT soon, I just wanted to start with a guide on building the core of OpenWRT as that’s a prerequisite anyway.

    1. Come on, i’ve just started my first openwrt compile, because i always thought is was hard, but it turned out to be simple after reading this.

      I made a 2 cpu, 4gb ram box on my hypervisor box at home, lets see how long it takes.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.