1、openwrt 官网
openwrt 官方网址 https://openwrt.org
目前LEDE 合入openwrt主线维护
2、下载openwrt主线最新代码,使用如下命令:
git clone https://www.github.com/openwrt/openwrt
示例:
如果您想签出某个发布版源码,使用如下命令:(请于Github上验证发布版名称)
git clone https://www.github.com/openwrt/openwrt -b chaos_calmer
3、编译源码
进入下载的openwrt 目录内更新并安装软件包
更新命令:
./scripts/feeds update -a
安装命令:
./scripts/feeds install -a
centos系统编译前确认安装必要的依赖
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
进入系统配置界面,Menuconfig拥有一个文本界面,它包括选择要处理的目标平台,要编译的软件包,要被包含进固件文件的软件包和一些内核设置等。
make menuconfig
选择相关target和无线驱动后,保存退出。
开始编译,如果编译服务器支持多核可以跟 -j x 参数, x代表几个核编译
make V=99 或 make V=99 -j x
编译成功后的固件bin文件在 /openwrt/trunk/bin 目录下.
cd ~/openwrt/trunk/bin
ls */
编译参考https://openwrt.org/zh-cn/doc/howto/build
后续陆续更新openwrt 或 qsdk 系统相关文章,请关注