OpenWrt 可以被描述为一个嵌入式的 Linux 发行版,是路由器的固件,拥有强大的网络组件和扩展性,常常被用于工控设备、电话、小型机器人、智能家居、路由器以及VOIP设备中。 同时,它还提供了100多个已编译好的软件,而且数量还在不断增加,而OpenWrt SDK 更简化了开发软件的工序。官网
我这里使用的docker搭建开发环境,在普通ubuntu18里操作是一样的。docker的操作在这里
1、首先下载ubuntu18.04的镜像,换源,装基本编译环境
注意,docker下载的ubuntu镜像没有vi编辑器,需要用echo换源,这里以阿里云为例:
输入以下代码到命令行中换源
echo -e "deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse \n\
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse \n\
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse \n\
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse \n\
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse \n\
deb-src http:/