OpenWRT编译及使用教程
引言
最初是因为家里的nas不是经常使用,长时间开着觉得浪费电,于是想着能不能搞个远程开关机,然后就了解到了网络唤醒这个功能,确实不错。不过这是一个在路由器上的功能,我登录我家老路由器的后台一看,果然没有。然后在找路由器的过程中,我发现了openwrt这个系统,开源、功能丰富、社区庞大……一下子就被吸引了,虽然需要折腾一下,但这个过程也是一个十分好的学习的机会,于是经过多方考量,直接购买了一个x86平台的小主机用来当家庭网络的主路由,等弄好之后就把剩下的路由器当AP来用,说干就干。
配置介绍
我的设备是畅网微控的X86-P2小主机
1 | CPU:J4125 |
环境配置
首先,我们需要一个Linux环境来进行编译,在Windows上用VMware Workstation Pro(个人使用是免费的)为我们创建一个Linux的虚拟环境就很方便,推荐使用Ubuntu作为我们的编译环境。
我们得先去Ubuntu的官网去下载一个它的系统镜像
将其导入到VMware中
Ubuntu操作
menuconfig
- target system -> x86
- subtarget -> x86_64
- target profile -> generic x86/64
- target images
- -> kernel partition size(128)MB
- -> root filesystem partition size(1024)MB
base system
- block-mount
- dnsmasq(取消勾选,选下面这个)
- dnsmasq-full
- ca-bundle
Administration
- btop
- sudo
Firmware
- i915-firmware
- intel-microcode
Kernel Modules
Block Devices
- kmod-nvme
Filesystems
- kmod-fs-exfat
- kmod-fs-ext4
- kmod-fs-ntfs3
Network Devices
- kmod-igc
Network Support
- kmod-tun
- kmod-tcp-bbr
USB Support
- kmod-usb-storage
- kmod-usb-storage-uas
- kmod-usb2
- kmod-usb3
Video Support
- kmod-drm-i915
luci
1. Collections
- luci-nginx
- luci-ssl-openssl
2. Modules
- luci-mod-dashboard
- Translations -> Simplified Chinese
3. Applications
- luci-app-acme
- luci-app-argon-config
- luci-app-banip
- luci-app-ddns
- luci-app-diskman(除去选中时默认勾选的,再勾上下面这个)
- Include lsblk
- luci-app-dockerman
- luci-app-https-dns-proxy
- luci-app-package-manager
- luci-app-pbr
- luci-app-ksmbd
- luci-app-smartdns
- luci-app-sqm
- luci-app-statistics
- luci-app-transmission
- luci-app-ttyd
- luci-app-upnp
- luci-app-wol
4. Themes
- luci-theme-argon
5. Protocols
- luci-proto-wireguard
Network
BitTorrent
- transmission-cli
- transmission-remote
- transmission-web-control
SSH
- openssh-client
- openssh-server
- openssh-sftp-server
IP Addresses and Names
- ddns-scripts-cloudflare
- ddns-scripts-dnspod-v3
- ddns-scripts-utils
Utilities
- dockerd
- Installs check-config.sh with dependencies
- Enable available kernel support for CGroupsV1
- Enable optional kernel support for Docker
- Network
- Includes the Overlay network feature
- Includes macvlan kernel modules
- Storage
- Enables support for ext3 or ext4 as the backing filesystem
- Enables support for btrfs as the backing filesystem
Disc
- fdisk
- lsblk
- irqbalance
Editors
- vim-full
Shells
- zsh
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Scmplie's little place!
评论



