Patching OpenWRT

25 August 2013 by Lincoln Ramsay

As previously noted, I have a Buffalo WZR-HP-G300NH. However, problems with the router led me to ditch DD-WRT in favour of OpenWRT. The last time I looked at OpenWRT it was all command-line only and hard to get setup but it’s improved a lot in the intervening years such that it’s now as easy to drive as DD-WRT is, at least for the simple stuff. It doesn’t come with the kitchen sink as standard but there’s a million packages that can be added easily. For example, the QoS stuff in DD-WRT can be found in OpenWRT but only after you install a package.

So naturally, I’ve installed a bunch of packages to do different things. Then I found a problem. One package had a bug that made it less useful. I looked and there was a 3 line patch but OpenWRT is a very forward-looking project so they don’t often back port fixes to existing releases. I didn’t much feel like running trunk so I thought I’d just patch the code myself. Easy right?

It actually wasn’t that hard (I’ve heard horror stories about building DD-WRT) but it certainly was … comprehensive. Instead of starting with a binary SDK, you start by building the SDK from source. Needless to say it takes a while to get an environment setup to even build a package. I left it overnight. Then I did my little patch, rebuilt the package and installed it on the router. Yay.

I even came up with some extra stuff for the config/startup file. Will have to see how easy it is to contribute changes back to OpenWRT…