最新版OpenWrt编译教程,解决依赖问题

  1. Install git,to conveniently download the OpenWrt source code,and build toolsto do the cross-compilation process:
    <span class="kw2" style="color:#000000;font-weight:bold">sudo</span> <span class="kw2" style="color:#000000;font-weight:bold">apt-get update</span>
    <span class="kw2" style="color:#000000;font-weight:bold">sudo</span> <span class="kw2" style="color:#000000;font-weight:bold">apt-get install</span> git-core build-essential libssl-dev libncurses5-dev <span class="kw2" style="color:#000000;font-weight:bold">unzip</span>
    Some Feeds might not available over git but only via subversion(short: svn) or mercurial. If you want to obtain their source-code,you need to install svn and mercurial as well:
    <span class="kw2" style="color:#000000;font-weight:bold">sudo</span> <span class="kw2" style="color:#000000;font-weight:bold">apt-get install</span> subversion mercurial
  2. Download the OpenWrt bleeding edge(trunk Version) with git( seeDownloading Sourcesfor more options!):
    <span class="kw2" style="color:#000000;font-weight:bold">git clone</span> git:<span class="sy0" style="color:#66cc66;">//</span>git.openwrt.org<span class="sy0" style="color:#66cc66;">/</span>openwrt.git

    this creates a directory 'openwrt',which is the OpenWrt buildroot build-directory
    the OpenWrt toolchain "OpenWrt buildroot" is included

  • ( optional) Download and install all available "Feeds" ( seeOpenWrt Feedsfor more options!):
    <span class="kw3" style="color:#0066;">cd</span> openwrt
    .<span class="sy0" style="color:#66cc66;">/</span>scripts<span class="sy0" style="color:#66cc66;">/</span>Feeds update <span class="re5" style="color:#66033;">-a</span>
    .<span class="sy0" style="color:#66cc66;">/</span>scripts<span class="sy0" style="color:#66cc66;">/</span>Feeds <span class="kw2" style="color:#000000;font-weight:bold">install</span> <span class="re5" style="color:#66033;">-a</span>
  • Make OpenWrt buildroot check for missing packages on your build-system using one of the following commands:
    <span class="kw2" style="color:#000000;font-weight:bold">make</span> defconfig
    <span class="kw2" style="color:#000000;font-weight:bold">make</span> prereq
    <span class="kw2" style="color:#000000;font-weight:bold">make</span> menuconfig

    There you will need to select what you want to compile.

  • Proceed with build(i.e. cross-compile the downloaded sources to binaries)

    After the cross-compilation process the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!


  • 其他版本地址:http://git.openwrt.org/

    dl目录下载:http://downloads.openwrt.org.cn/sources/

    相关文章

    迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
    高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
    策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
    访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
    命令模式(Command)命令模式(Command)[Action/Transactio...
    生成器模式(Builder)生成器模式(Builder)意图:将一个对...