Turn: Small white compile openwrt firmware tutorial

Source: Internet
Author: User

Original address

Compiling the OPENWRT firmware is not as complex as it might seem, and I am also a little white, and the following is a little bit of a consolidation of the compilation tutorials on the web. Because I found many of the compilation tutorials did not explain how to change the flash-related configuration.

installs Ubuntu, does not repeat. Note After the installation is complete,root cannot log in directly, need to set password, set method, own Baidu a bit. if the virtual machine is installed, the network card of the virtual machine is configured as bridge mode; ************** The following operations need to be operated under root user ************************ Edit the interfacesunder the /etc/networt/option folder to configure iface eth0 inet DHCP to DHCP mode.then execute /etc/init.d/networking Restar to get the IP address automatically (this method is suitable for home or organization use DHCP to obtain IP address of the occasion , if it is a fixed address, please study it yourself). The Internet Unicom performs the following later:sudo apt-get updateto install the required components for compilation:sudo apt-get install gccsudo apt-get install g++sudo apt-get install binutilssudo apt-get install patchsudo apt-get install bzip2sudo apt-get install flexsudo apt-get install bisonsudo apt-get install makesudo apt-get install autoconfsudo apt-get install gettextsudo apt-get install Texinfosudo apt-get install unzipsudo apt-get install sharutilssudo apt-get install subversionsudo apt-get install Libncurses5-devsudo apt-get install ncurses-termsudo apt-get install Zlib1g-devsudo apt-get install gawksudo apt-get install AsciiDocsudo apt-get install Libz-devIf a component is missing during compilation, use the samesudo apt-get installInstallation canBuild environment is complete ************** Note: The following actions need to be operated by the user you built ************************ mkdir openwrt Create a openwrt folder CD OpenWrt into the openwrt folderSVN co svn://svn.openwrt.org/openwrt/branches/backfireor svn co svn://svn.openwrt.org/openwrt/trunk Download the source code of the official websiteNote:BackfireAndTrunkFor two different branches of aOpenWrtSourceBackfireis said to be more stable, but the supported routers are notTrunkManyTrunkIt's more of a beta version, but it's OK to use it after compiling it. Just execute one of these commands when compiling. When execution is complete, theOpenWrtUnder Build directory, usingBackfireSource code GenerationBackfireDirectoryTrunkSimilarly.then cd trunk or CD backfire SVN up./scripts/feeds update-a./scripts/feeds install-aMake menuconfigEnter the custom interface (you can choose the model of the chip, integrated components and so on, according to the actual situation of choice, many times to become familiar with the compilation)use make defconfigto check the compilation environment, if you want to error refer to the following:Note: The more common problem is that compile time cannot be usedRootUser compilation, if usingRootLogin, you need to usesuUser nameSwitch to non-RootUser, if you switch the user, report permission error, and then switch toRootUsers, using sudo chown-r [ own user name ] Trunk (if the backfire is compiledsource, trunk hereto replace with backfire ),then go back to your user name and recompile. Make v=99(start compiling)the rest is waiting, the first compilation takes a relatively long time, this is related to your computer configuration and speed. The above is the process for the router not to change the flash size, if you want to compile non-standard size flash firmware, you need to change some files in the compilation environment, to 703N, using trunk Source code compilation as an example (trunk is not the same file as backfire needs to change)new version of trunk,703N compiling 8M firmware requires the following two files to be changed: 1, /turnk/tools/firmware-utils/src/mktplinkfw.c find the relevant properties of 703N in mktplinkfw.c ,. id = "TL-WR703NV1",. hw_id = Hwid_tl_wr703n_v1,. Hw_rev = 1, . layout_id = "8Mlzma", ( change to 8) 2, /trunk/target/linux/ar71xx/image/makefile The following is found in Makefiel $ (eval $ (call singleprofile,tplink-lzma,$ (Fs_64kraw), Tlwr703,tl-wr703n-v1,tl-wr703n,ttyath0, 115200,0x07030101,1,8Mlzma)) Change 4 to the above 8;once the above two files have been modified, make v=99 can be compiled. Backfire The source code needs to change the file, the first as trunk , the second file is located in openwrt/backfire/target/linux/ar71xx/files/arch/mips/ar71xx directory, find the corresponding device model to make changes. after compiling, there will be firmware generated in the bin/ar71xx directory, the firmware name must include the compiled router model, if not the two files, the compilation failed, it is possible to compile time to select too many packages, need to be re-selected to compile. the above compilation does not make the relevant configuration file modification, such as want to modify the configuration file, such as the default open wireless, etc., please own Baidu /google. Note: Most of the above is from the Internet, I have only been integrated.
Ratings

Turn: Small white compile openwrt firmware tutorial

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.