准备工作
准备一个 Ubuntu22操作系统。并且,在环境中准备好以下官方教程中要求的工具:
openwrt.org/docs/guide-developer/toolchain/install-buildsystem
sudo apt update
sudo apt install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget
编译系统
下载源码
下载代码:
git clone https://github.com/openwrt/openwrt.git
cd openwrt
git pull
切换分支,一般选择最新的稳定版本:
git branch -a
git tag
git checkout v23.05.0
下载软件包
cd source
./scripts/feeds update -a
./scripts/feeds install -a
编译
- 配置编译环境: make menuconfig 在菜单中选择目标平台和设备型号,并添加需要的包。
- 开始编译: *make -j$(nproc) download V=s # 下载依赖包,提高编译成功率 make V=99 # 开始编译,显示详细信息*
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0协议
转载请注明文章地址及作者
{{toComment.userName}}
{{toComment.commentContent}}
{{toComment.createTime.slice(0, 16)}}
{{toComment.userIpAddr}}
取消回复
邮件通知
评论
暂无评论,点击右上角 发布
{{comment.userName}}
{{comment.commentContent}}
{{comment.createTime.slice(0, 16)}}
{{comment.userIpAddr}}
回复
{{child.userName}}
{{child.toUserName}}
{{child.commentContent}}
{{child.createTime.slice(0, 16)}}
{{child.userIpAddr}}
回复
{{page}}