update
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# immortalwrt
|
||||
|
||||
## 介绍
|
||||
|
||||
immortalwrt 是一款基于 openwrt 的路由器固件,适用于小型路由器,如树莓派、单板机等。
|
||||
|
||||
## 准备工作
|
||||
|
||||
创建 bin 文件夹
|
||||
|
||||
```
|
||||
mkdir ./bin
|
||||
|
||||
chmod 777 ./bin
|
||||
```
|
||||
|
||||
## 编译固件
|
||||
|
||||
开始编译固件
|
||||
|
||||
```
|
||||
bash docker-build.sh
|
||||
```
|
||||
|
||||
(选择)增加初始化配置
|
||||
`files/etc/uci-defaults/99-custom`是一个初始化 openwrt 配置的脚本
|
||||
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
PACKAGES=""
|
||||
PACKAGES="$PACKAGES curl"
|
||||
PACKAGES="$PACKAGES openssh-sftp-server"
|
||||
PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-opkg-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-vlmcsd-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-argon-config-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-arpbind-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-diskman-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn"
|
||||
PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn"
|
||||
PACKAGES="$PACKAGES xray-core"
|
||||
PACKAGES="$PACKAGES sing-box"
|
||||
PACKAGES="$PACKAGES cfdisk"
|
||||
PACKAGES="$PACKAGES vim-full"
|
||||
PACKAGES="$PACKAGES vim-runtime"
|
||||
PACKAGES="$PACKAGES nano-plus"
|
||||
|
||||
make image \
|
||||
PACKAGES="$PACKAGES" \
|
||||
ROOTFS_PARTSIZE="512" \
|
||||
IMAGE_FORMAT="img" \
|
||||
COMPRESS="gzip" \
|
||||
files="/home/build/immortalwrt/files"
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker run --rm -it \
|
||||
-v ./bin:/home/build/immortalwrt/bin \
|
||||
-v ./files:/home/build/immortalwrt/files \
|
||||
-v ./build.sh:/home/build/immortalwrt/build.sh \
|
||||
immortalwrt/imagebuilder:x86-64-openwrt-23.05.4 /home/build/immortalwrt/build.sh
|
||||
@@ -0,0 +1,10 @@
|
||||
# 修改网络设置
|
||||
uci set network.lan.proto='static' # 静态ip地址模式
|
||||
uci set network.lan.ipaddr='192.168.50.7' # ip
|
||||
uci set network.lan.netmask='255.255.255.0' # 子网掩码
|
||||
uci set network.lan.gateway='192.168.50.1' # 网关
|
||||
uci set network.lan.dns='223.5.5.5' # DNS
|
||||
uci commit network
|
||||
|
||||
uci set dhcp.lan.ignore='1' # 禁用 LAN 接口的 DHCP
|
||||
uci commit dhcp
|
||||
Reference in New Issue
Block a user