There are more and more began to toss Maker OpenWrt, but as a novice in terms Maker, difficult to find on the Internet or an entry-level system information. Very hard to find information, and OpenWrt threshold is relatively high, hoping to learn from scratch OpenWrt provided to compile this article
Cisco / Linksys WRT54G released in 2003, this wireless router, the same year it was found that the IOS is based on Linux, but Linux is released under the GPL license, should WRT54G's IOS source code public in accordance with the license Cisco. March 2003, Cisco WRT54G forced by public pressure to disclose the source code. Thereafter there will be a number of third-party source based Cisco router firmware, OpenWrt is one of them.
Scalability, online installation features you need, there are currently more than 1,000 optional feature packs;
Is a complete Linux workstations, file system read and write, for developers to learn and practice;
There are more and more began to toss Maker OpenWrt, but as a novice in terms Maker, difficult to find on the Internet or an entry-level system information. Very hard to find information, and OpenWrt threshold is relatively high, hoping to learn from scratch OpenWrt provided in this article Brush + + compiler can reduce the novice using the tutorial entry difficulty, of course, the compilation process non-essential general routes You can find a stable firmware available directly brush.
Part I: set up the build environment
1. Install Ubuntu (Linux environment compiler need), to its official website to download, you can choose the version according to their own needs. You can choose to install a virtual machine or a physical machine, but graphical installation is the Chinese version, and even install all else fails, you can turn off this page the;
2, remember not to modify software source, while holding down Ctrl + Alt + T, bring up the terminal;
3. Enter the following commands one by one (in a timely manner to verify that the installation was successful):
sudo apt-get install g ++
sudo apt-get install libncurses5-dev
sudo apt-get install zlib1g-dev
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install unzip
sudo apt-get install autoconf
sudo apt-get install gawk
sudo apt-get install make
sudo apt-get install gettext
sudo apt-get install gcc
sudo apt-get install binutils
sudo apt-get install patch
sudo apt-get install bzip2
sudo apt-get install libz-dev
sudo apt-get install asciidoc
sudo apt-get install subversion
sudo apt-get install sphinxsearch
sudo apt-get install libtool
sudo apt-get install sphinx-common
At this point the compiler environment to build complete.
Part II: Download the source code and compile OpenWrt
OpenWrt source are two, one is the latest, but not the most stable Trunk development version, one is the most stable version Backfire recommended that you download the official source. Create a folder before downloading locally:
sudo chmod 777 openwrt
Choose the version you want to download and execute commands, download the end will display the version number:
Trunk Download command:
svn co svn: //svn.openwrt.org/openwrt/trunk/
Backfire Download command:
svn co svn: //svn.openwrt.org/openwrt/branches/backfire/
Adding software expansion pack will modify feeds.conf.default feeds.conf:
cp feeds.conf.default feeds.conf
Update extensions, install the extension:
./scripts/feeds update -a
./scripts/feeds install -a
NOTE: If it is not just download the source code, the code is kept up to date, you should regularly run svn update command to update the source code.
Test compiler environment:
Here you can start to compile your own firmware up. Enter the custom interface:
If all goes well, there will be a configuration menu, you can choose to compile firmware platform (chip type), model, firmware can choose to add features and components, configured to save and exit the menu.
If you want to modify the source code, this step should be carried out, such as support for large-capacity Flash revise such that he found on the Internet where to amend the document, went to find the file on ubuntu graphical interface, double-click to open the text editor to modify saved .
Start the compilation:
make V = 99
make -j V = 99
make a compilation command, V = 99 represents the output debug information, V must be capitalized, if you want the CPU at full compiled, together with the -j parameter, first compile the best without the -j parameter.
Compilation process to stay connected (will download some source packages from the Internet), it is broken network may cause compiled interrupted time required to compile a great relationship with the computer's CPU and network environment, the first longer compile time, the fast and a half hours long then two or three hours, compiled after a shorter time. Occur bin files compiled in the source file directory folder (eg trunk / bin / XXXX), if your hand is the original route OpenWrt firmware need to brush the need to use XXX-factory.bin firmware, if the route has been OpenWrt brush, selection XXXX-sysupgrade.bin upgrade the firmware upgrade using the upgrade interface upgrade. Locate the firmware into a folder you need to spread (by mail, network disk, U disk, etc.), I began to brush machine.
Part III: brush into the OpenWrt router
To use OpenWrt on the router, the first router to refresh OpenWrt firmware, which is equivalent to install OpenWrt system, different types of installation methods router may also be different, but there are three commonly used methods:
Web Upload Firmware Update
PFTP Upload Firmware Update
Programmers write firmware
Which specific model router or apply several methods in which, should make their own attempts.
Part IV: Getting Started OpenWrt
To configure OpenWrt, there are two general ways:
SSH login via command line control
Web log on through a Web interface settings
After initial installation of OpenWrt, you need to set a password before you can use SSH login by using telnet or Web login password login settings. Under Windows telnet and SSH login can use Putty, respectively, use the following command in Linux or Mac:
ssh -l root 192.168.1.1 // Linux
ssh email@example.com // Mac
General Instruction and common Linux distributions the same, but OpenWrt uses its own package manager: opkg, use "opkg -help" to view the help information. The following are some commonly used command:
opkg update // update the package list
opkg install // install packages online
opkg remove // remove packages
Login Web management interface, provided that the OpenWrt system you want to install the Web interface, usually Luci, login is no different from ordinary router, open a browser, enter the router IP to enter the login screen, the default IP is 192.168.1.1 OpenWrt .
This, OpenWrt door has been open for you. Next, begin to try to achieve more intelligent applications utilizing OpenWrt it, such as a single number to allocate more bandwidth, squeezing operators, binding domain remote control, mount large-capacity hard drive, built BT download machine, set up the webcam, Samba / DLNA home NAS shared private cloud sync, FTP, personal website / server ...