前言:为小白提供一些简单构建心仪固件的方法,如果哪里讲的不对也请路过大佬及时指正,果果在此先谢过了。 注意:包名之间要用空格隔开,需要构建的项直接替换掉中文指引,需要设置拨号的朋友,设置好以后去掉前面的#号让配置生效。 openwrt构建地址 构建插件包名:luci-i18n-base-zh-cn luci-i18n-firewall-zh-cn luci-i18n-opkg-zh-cn immortalwrt构建地址 构建插件包名:
luci-app-argon-config luci-theme-argon luci-i18n-argon-config-zh-cn luci-i18n-base-zh-cn luci-i18n-firewall-zh-cn luci-i18n-opkg-zh-cn luci-proto-wireguard luci-app-attendedsysupgrade attendedsysupgrade-common luci-i18n-attendedsysupgrade-zh-cn dockerd luci-app-dockerman luci-i18n-dockerman-zh-cn 构建脚本:
# Beware! This script will be in /rom/etc/uci-defaults/ as part of the image.
# Uncomment lines to apply:
# 设置后台登录ip与密码
root_password="设置登录密码"
lan_ip_address="设置后台登录ip"
# 设置时区与固件名
uci set system.@system[0].hostname='设置固件名'
uci set system.@system[0].zonename='Asia/Shanghai'
uci set system.@system[0].timezone='CST-8'
# Configure WLAN
# More options: https://openwrt.org/docs/guide-u ... ic#wi-fi_interfaces
if [ -n "$wlan_name" -a -n "$wlan_password" -a ${#wlan_password} -ge 8 ]; then
uci set wireless.@wifi-device[0].disabled='0'
uci set wireless.@wifi-iface[0].disabled='0'
uci set wireless.@wifi-iface[0].encryption='psk2'
uci set wireless.@wifi-iface[0].ssid="$wlan_name"
uci set wireless.@wifi-iface[0].key="$wlan_password"
uci commit wireless
fi
# Configure PPPoE
# More options: https://openwrt.org/docs/guide-u ... e_ppp_over_ethernet
if [ -n "$pppoe_username" -a "$pppoe_password" ]; then
uci set network.wan.proto=pppoe
uci set network.wan.username="$pppoe_username"
uci set network.wan.password="$pppoe_password"
uci commit network
fi