CentOS7 编译 OpenWRT
来源:互联网 发布:大淘宝联盟如何注册 编辑:程序博客网 时间:2024/06/05 20:24
1. 安装编译需要的rpm包
yum install subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison wget git-core openssl-devel xz zlib-static
**** 最后的zilb-static 一定要安装,要不然make defconfig检查通不过 ***
会报如下错误:
==========
Build dependency: Please install a static zlib. (Missing libz.a or zlib.h)
Prerequisite check failed. Use FORCE=1 to override.
make: *** [staging_dir/host/.prereq-build] Error 1
==========
2. 新建一个普通用户
官方建议用普通用户编译源码。这里我们就新建一个。我就用onlyellow表示
useradd onlyellow
3. 切换到普通用户,下载OpenWRT源码
git clone git://git.openwrt.org/openwrt.git
4. 下载完成后,配置代理(可选)
因为后续编译源码过程中,还需要联网下载一些源码。 所以最好配置个代理加快下载速度。
直接配置代理方法这里不再赘述。
例如:
export HTTP_PROXY=http://192.168.10.100:8118
export HTTPS_PROXY=http://192.168.10.100:8118
export http_proxy=http://192.168.10.100:8118
export https_proxy=http://192.168.10.100:8118
***PS***
编译过程中会用wget命令从http和https网站上下载很多东西,所以http和https代理都要设置。
我一开始只export http代理,发现有些包下载依然很慢。检查发现原来有些下载源是https。配置https_proxy后下载速度飙升。
5. 用screen
万一ssh断了不会影响编译。建议使用
6. feed增加包
cd openwrt
cp feeds.conf.default feeds.conf
./scripts/feeds update -a
./scripts/feeds install -a
7. 检查环境
make defconfig
8. 选择目标环境
make menuconfig
9. 编译
make //(直接编译)
make V=99 //(带输出debug信息编译)
make -j N V=99 //(带输出debug信息并且并行编译。N为你想使用的cpu核数。如果不带参数默认是1。)
- Centos7下编译openwrt
- CentOS7 编译 OpenWRT
- centos7虚拟机编译openwrt填坑
- [OpenWrt] 如何编译OpenWrt
- [OpenWrt] 编译OpenWrt-Dreambox
- openwrt 编译
- openwrt编译
- 编译OpenWrt
- openwrt 编译
- OPENWRT编译
- OpenWRT 编译
- OPenWRT编译
- [OpenWrt] openwrt编译过程(luci)
- [OpenWrt] 新版OpenWrt编译教程
- [OpenWrt] openwrt编译过程(luci)
- [OpenWrt] openwrt编译过程(luci)
- 搭建OpenWRT编译环境
- openwrt编译教程
- C#登录注册程序
- 1004. 成绩排名 (20)
- Java学习经验总结
- Magento(麦进斗)的块理解和块类型
- 【算法】Java中的常见排序Sort
- CentOS7 编译 OpenWRT
- 集合相关问题
- Android平台App进程优先级
- nginx tomcat ip port
- 选择器
- dwz 按钮样式
- 【转】使用dos2unix批量转换文件
- 算法设计与应用基础系列14
- web.xml中 error-page的正确用法