Difference between revisions of "Tutorial of compiling OpenWRT"
(→=Install Ubuntu on virtual machine) |
(→Install Ubuntu on virtual machine) |
||
Line 23: | Line 23: | ||
====Install Ubuntu on virtual machine==== | ====Install Ubuntu on virtual machine==== | ||
We can download Ubuntu from [http://www.ubuntu.org.cn/download/desktop Ubuntu download]. | We can download Ubuntu from [http://www.ubuntu.org.cn/download/desktop Ubuntu download]. | ||
+ | |||
+ | Configure virtual machine environment: | ||
+ | *Launch VMware, click menu "file", and select "New"->"Virtual Machine". | ||
+ | *Pop up the create new virtual machine wizard, and click "Next step". | ||
+ | *In the "Virtual machine configuration", click option 2 "self define", and clock "next step". | ||
+ | *In "Virtual machine format", select "Workstation 8", and click "Next step". | ||
+ | *Select "Linux" in the operation system, and select "Ubuntu" in the version, then click "Next Step". | ||
+ | *Select the virtual machine storage directory and provide virtual machine name, and click "Next step". | ||
+ | *For virtual machine processors number, select "1" and "Dual core" and click "Next Step". | ||
+ | *For virtual memory, it is suggested to set between 512MB and 1024MB, and click "Next Step". | ||
+ | *For the network connection type, it is recommended to use "NAT". This option will allow the virtual machine to use host's IP to access network. Click "Next Step". | ||
+ | *I/O adapter. Please select "SCSI Logic" and click "Next Step". | ||
+ | *Hard Drive. Please select "Create a new virtual hard drive" and click "Next Step". | ||
+ | *Virtual hard drive type. Please select "SCSI" and click "Next Step". | ||
+ | *Hard drive capacity. Please set according to your need. | ||
+ | *Path for the disk image. Please set according to your real situation, and click "Next Step". | ||
===Compile Openwrt firmware=== | ===Compile Openwrt firmware=== |
Revision as of 08:57, 2 January 2013
Contents
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)
Install Ubuntu on virtual machine
We can download Ubuntu from Ubuntu download.
Configure virtual machine environment:
- Launch VMware, click menu "file", and select "New"->"Virtual Machine".
- Pop up the create new virtual machine wizard, and click "Next step".
- In the "Virtual machine configuration", click option 2 "self define", and clock "next step".
- In "Virtual machine format", select "Workstation 8", and click "Next step".
- Select "Linux" in the operation system, and select "Ubuntu" in the version, then click "Next Step".
- Select the virtual machine storage directory and provide virtual machine name, and click "Next step".
- For virtual machine processors number, select "1" and "Dual core" and click "Next Step".
- For virtual memory, it is suggested to set between 512MB and 1024MB, and click "Next Step".
- For the network connection type, it is recommended to use "NAT". This option will allow the virtual machine to use host's IP to access network. Click "Next Step".
- I/O adapter. Please select "SCSI Logic" and click "Next Step".
- Hard Drive. Please select "Create a new virtual hard drive" and click "Next Step".
- Virtual hard drive type. Please select "SCSI" and click "Next Step".
- Hard drive capacity. Please set according to your need.
- Path for the disk image. Please set according to your real situation, and click "Next Step".