环境搭建
1.采用的ubuntu16.04服务器版,安装在服务器上,不占用主机CPU和RAM资源,通过SSH登录,通过WinSCP传输文件
- ubuntu-16.04.6-server-amd64.iso
- xshell6
- winscp
2.Ubuntu使用非root用户环境
- 安装openwrt需要的库
sudo apt-get install gawk
- 安装SpaceVim,简直小白神器,https://spacevim.org/cn/,含中文使用文档
3.OpenWrt资源(官网、官方wiki和github的仓库)
- https://openwrt.org/
- https://oldwiki.archive.openwrt.org/zh-cn/start
- https://github.com/openwrt
4.OpenWrt18.06.04最新的稳定版
- OpenWrt社区在此非常自豪地发布 OpenWrt 18.06 稳定版。这是自OpenWrt与LEDE项目合并后的第一个稳定版本,它将是 LEDE 17.01 和 OpenWrt 15.05 的继任者
- OpenWrt 18.06 的目标是使系统更为现代化,为符合条件的目标向后移植流量分载功能,同时为后续定期的版本更新奠定基础
5.源代码
- 从github clone最新master分支
- checkout远程分支remotes/origin/openwrt-18.06
- 在本地的git仓库,就可以方便的用分支管理源代码了
- ./scripts/feeds update -a (obtain all the latest package definitions)
defined in feeds.conf / feeds.conf.default - ./scripts/feeds install -a (install symlinks for all obtained)
packages into package/feeds/ - make download (根据不同网速,第一遍需要较长时间)
- make menuconfig (balabala…在第二篇接着分享)
- make V=s (第一次编译)
- make -j8 V=s (n-1=线程数量)
- make package/xxx (指定编译软件包,生成*.ipk)