OpenWRT是一个高度模块化、高度自动化的嵌入式Linux系统,拥有强大的网络组件和扩展性,常常被用于工控设备、电话、小型机器人、智能家居、路由器以及VOIP设备中。
本文编译平台是Ubuntu,测试平台为x86_64架构计算机,有部分内容参考: https://minipc.netlify.app/posts/35104/
1, 搭建编译环境
$ sudo apt-get install build-essential asciidoc binutils bzip2 gawk gettext git libssl-dev libncurses5-dev patch unzip zlib1g-dev
2, 下载openwrt
$ git clone https://github.com/openwrt/openwrt.git
3, 配置config
$ cd openwrt
$ ./scripts/feeds update -a
$ ./scripts/feeds install -a
$ make defconfig
$ make menuconfig
做如下配置:
Target System ---> 选择x86;
LuCI ---> Collections ---> 选择第一个luci;
LuCI ---> Applications ---> 选择luci-app-uhttpd.
其它配置,这里暂时采用默认,你可以根据实际情况修改配置,比如增加gcc功能,增加对网卡