openwrt编译:
1. 从github下载openwrt
2. ./scripts/feeds update -a 更新feeds源
./scripts/feeds install -a 安装feeds源
3. make menuconfig 选择对应的目标
OpenWRT自动检测编译环境是否存在所需的全部依赖组件。如果缺少组件就进不了menuconfig
界面。需要先手动安装。
3.1 在ubuntu18.04上,需要安装:
sudo apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev subversion git-core gawk asciidoc libz-dev zlib1g-dev libssl-dev curl
3.2 target system选择MediaTek Ralink MIPS, Subtarget选择MT7628 based boards
其他选择默认
4. make V=99 开始编译,V=99可以显示编译信息
5. 这样编出来的可能无法Telnet/ssh,需要修改一些选项,
继续上面的step3,make menuconfig,选择base system->busy box->network,找到里面的telnet、telnetd,ftpget等,选上,再重新执行上面的step4。
更新:
如果feeds无法更新:
修改feeds.conf.default文件,源替换为github源:
src-git packages https://github.com/openwrt/packages.git;openwrt-19.07
src-git luci https://github.com/openwrt/luci.git;openwrt-19.07
src-git routing https://github.com/openwrt-routing/packages.git;openwrt-19.07
src-git telephony https://github.com/openwrt/telephony.git;openwrt-19.07
#src-git management https://github.com/openwrt-management/packages.git
#src-git packages https://git.openwrt.org/feed/packages.git;openwrt-19.07
#src-git luci https://git.openwrt.org/project/luci.git;openwrt-19.07
#src-git routing https://git.openwrt.org/feed/routing.git;openwrt-19.07