加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-13 21:59:42 所属栏目:百科 来源:网络整理
导读:Install git ,to conveniently download the OpenWrt source code,and build tools to 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-
  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
    • for information about the build tools see makeand build-essential
    • for information about git see git(7)
    • for information about the subversion tool see svnand subversion documentation (multiple languages)
  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

  3. ( 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>
  4. 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.

  5. 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/

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读