欢迎光临
我们一直在努力

如何编译openwrt

说明:

  1. 编译和git时不要使用root用户操作
  2. 在国内编译前需要连接好梯子
  3. 编译系统路径不能存在空格
  4. 本文是在Ubuntu 64位系统下编译

首先安装编译工具及依赖环境

sudo apt-get install update
sudo apt-get install gcc g++ build-essential asciidoc  binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch flex bison make autoconf texinfo unzip sharutils subversion ncurses-term zlib1g-dev ccache upx lib32gcc1 libc6-dev-i386 uglifyjs git-core gcc-multilib p7zip p7zip-full msmtp libssl-dev libglib2.0-dev xmlto qemu-utils automake libtool

从官方获取源代码

git clone https://www.github.com/openwrt/openwrt
cd openwrt
./scripts/feeds update -a  #获取最新的包
./scripts/feeds install -a #安装所有包
make  defconfig            #测试编译环境
make menuconfig            #配置编译
make -j1 V=s               #开始编译固件。-j1后面是线程数,第一次编译最好是用单线程
窗外天空
关注公众号『窗外天空』

获取更多建站运营运维新知!
互联网创业、前沿技术......

赞(0) 打赏
文章名称:《如何编译openwrt》
文章链接:https://www.nixonli.com/22876.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫打赏

微信扫一扫打赏