OpenWRT Build Guide: Start To FinishJanuary 17, 2012 6
The following guide will walk you through the downloading, configuring, and compilation of OpenWRT. The guide makes no assumption about the reader’s previous experience with OpenWRT, or even building from source, so as long as you follow along you should be fine. That said, experience with compiling software and general troubleshooting skills would help make sure the process goes smoothly.
Disclaimer: The final part of this guide will have you install your self-built firmware image onto your router. While the ability to compile and configure your own router firmware is an incredible achievement for the open source community, it’s also somewhat risky. Make sure to familiarize yourself with the firmware recovery options that are specific to your device by visiting the OpenWRT “Table of Hardware”, located at:
What is OpenWRT?It’s easy to assume that OpenWRT is “just another router firmware”, like the well known DD-WRT or Tomato firmwares. In fact, up until just a few months ago, that’s what I thought myself. But whereas DD-WRT aims at being a feature-rich router firmware that will give you an out of the box experience closer to what you would see on a high-end enterprise router, OpenWRT aims to give you a full Linux system that just happens to be running on a router. With OpenWRT installed on your router, you’ll have something that’s much closer to a minimal Linux install on your PC than what you would expect from a router. Out of the box there’s no friendly web UI to set up the router, just the prospect of logging in over SSH and editing text files by hand.
The possibilities for such a system are endless. With a large package repository, an OpenWRT device has access to software you may never have even considered running on a router. You can setup an OpenWRT device to run as a file server, a media extender, a security auditing toolbox, or anything else you could do with a normal Linux system. The only limitation is the processing capability of the specific hardware OpenWRT runs on, which can be anywhere from a cheap router that barely has enough RAM to boot the system to devices which could give some smartphones a run for their money. The individual hardware you chose will depend on many factors (probably not least of which, your budget), but the process described here works the same on any device OpenWRT can or will support.
Why Build from Source?While the OpenWRT project makes firmware images available for all of the various devices they support, these aren’t always ideal depending on what your goals are. The stock images from OpenWRT are setup with the assumption that you want to end up with a more or less standard consumer router when you are done with the installation, which may be far from the case. Due to the limited storage space available on these devices, you can’t afford to have your flash storage taken up by things like firewalls and web configuration pages if you are looking to turn an OpenWRT-capable router into a robot controller or a dedicated file server on your network.
From personal experience, the router I use for OpenWRT development has so little storage space left after installation of the stock OpenWRT firmware image that I couldn’t install even a single additional package. For me, I had to build from source just to get any use out of my device.
Even if you have the storage space to burn, learning the ins and outs of OpenWRT by compiling it from source is an excellent way to learn how the system works. If you plan on doing any kind of modification to OpenWRT, it’s definitely in your best interests to dive right in and see how the whole build process functions.
RequirementsBefore we begin, I should make clear that there are some hardware requirements for building a project of this size. While you’ll only need about 300 MB to download the OpenWRT source, the size of the final compiled code can easily get up to few gigabytes, so keep that in mind if your are on a size constrained setup.
You’ll also need a rather powerful machine to work through this build. For my own development I use a 6 core AMD machine with 4 GB of RAM, and it takes around 20 minutes to build a minimal OpenWRT firmware image. On a dual or even single core machine, the build times will likely be into the hours, especially if you are including a lot of software in the image.
Setting up the Build EnvironmentRead More...
- OpenWRT Build Guide: Start To Finish
- Cheap WiFi bridge for pen testing or otherwise - Hack a Day
- Table of Hardware - OpenWrt Wiki
- Index of /
- Documentation - OpenWrt Wiki
- Accessing your modem - OpenWrt Wiki
- OpenWrt in VirtualBox - OpenWrt Wiki
- The Power Base OpenWRT Build Guide: Start To Finish
- Complete guide to compiling OpenWRT - Hack a Day
- Overview: Generic Basic Howtos for OpenWrt - OpenWrt Wiki
- OpenWrt Configuration - OpenWrt Wiki
- LuCI Essentials - OpenWrt Wiki