Tutorial of compiling OpenWRT

From LinkSprite Playgound
Revision as of 08:46, 2 January 2013 by Jingfeng (talk | contribs) (Install virtual machine (use VMWare 7.1 as example))
Jump to: navigation, search

Introduction

Since the IOS source code of the Linux-based wireless router was released to public by Cisco/ Linksys on March 2003, enthusiasts have been working on the modification of the source code. There are many different versions with enhanced features appearing on the Internet.

Among these versions, 99% uses original LinkSys source codes, and only 1% of the source files are newly developed code. Every different version addresses different markets. By doing this, there are two drawbacks: The first is that it's difficult to merge the advantages of different versions. The second is that it departs more and more away from the official Linux release.

OpenWrt chooses another path. It starts from scratch, adds functions into it one by one, and makes it closer and closer to the original firmware of LinkSys. One prominent feature of Openwrt is that its file system is rewritable. Developer doesn't need to recompile the whole system after every modification. This feature makes it more like a small linux system, and speed up the development.

Advantage:

When you buy a Openwrt compatible router, you get an embedded system with CPU, FLASH and RAM. After the completion of the development, this router can be used in real life. Because it is based on Linux, linux provides many open source applications, user can install and port these open source applications.

1. Install Linux Cross Compile Environment

Install Linux system

In this tutorial, we are going to use Ubuntu 10.X as an example. The linux system can be installed on the virtual machine and can also be installed on the real PC. We recommend to install on the virtual machine.

Install virtual machine (use VMWare 7.1 as example)

WMware.jpg WMware2.jpg

Compile Openwrt firmware