上次搭建好了Centos的系统和桌面(安装搭建Centos7的openwrt开发环境①),这次就来继续搭建openwrt的环境。
参考:
①安装开发环境
经过成功编译的测试,总结了Centos7下所需软件:
1 | sudo yum install -y subversion libtool autoconf automake bison screen gcc binutils patch bzip2 flex make gettext unzip git-core git gawk quilt asciidoc gcc-c++ ncurses-devel openssl* zlib* libssl* |
②下载源码
我发现现在openwrt不提供svn了,svn连接遭到拒绝。
所以要用git来获取源码了。速度比较慢,有条件的同学挂个梯子吧。
下载trunk :
1 | git clone git://git.openwrt.org/openwrt.git |
其他分支:
15.05 branch (Chaos Calmer)
git clone git://git.openwrt.org/15.05/openwrt.git
14.07 branch (Barrier Breaker)
git clone git://git.openwrt.org/14.07/openwrt.git
12.09 branch (Attitude Adjustment)
git clone git://git.openwrt.org/12.09/openwrt.git
Packages feed:
git clone git://git.openwrt.org/12.09/packages.git
我自然就下载最新的trunk啦,把他下载到myop文件夹:
1 | git clone git://git.openwrt.org/openwrt.git myop |
git检查代码是否有更新:
1 | git pull |
下载软件包:
1 | ./scripts/feeds update -a |
安装软件包:
1 | ./scripts/feeds install -a |
检查编译环境:
1 | make defconfig |
执行编译菜单:
1 | make menuconfig |
我随便选了个tplink841,带luci,然后进行编译,第一步就是进行预下载,防止编译过程中下载出错卡住:
1 | make download V=s |
如果出现error,请重新执行上面的命令并继续,网络差很容易下载某个压缩包出错,有条件爬个梯子。
完事了后执行第一次编译:
1 | make -j3 V=s |
j后面的是你处理器逻辑核心数-1,多线程加快速度。
然后就可以挂机睡觉了。
第二天开电脑,卧槽简直太顺利了,没有任何错误,生成了bin固件了:
看来搭建的这个环境还是很稳定的嘛_(:3」∠)_
原文链接:https://03k.org/centos-openwrt-2.html
本站博文无特别声明均为原创,转载请注明原文链接。本站软件均搜集自互联网,供学习研究之用,请下载后24小时内删除。
疑问OR交流点我加QQ群喵喵喵!