update
This commit is contained in:
parent
7b12a50f30
commit
3be4891959
@ -1,3 +1,3 @@
|
|||||||
# openWrt-builder-docker
|
# OpenWrt-Builder
|
||||||
|
用docker镜像编译openwrt固件
|
||||||
|
|
||||||
使用docker镜像构建ioenwrt固件
|
|
||||||
26
immortalwrt/README.md
Normal file
26
immortalwrt/README.md
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
# immortalwrt
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
|
||||||
|
immortalwrt 是一款基于 openwrt 的路由器固件,适用于小型路由器,如树莓派、单板机等。
|
||||||
|
|
||||||
|
## 准备工作
|
||||||
|
|
||||||
|
创建 bin 文件夹
|
||||||
|
|
||||||
|
```
|
||||||
|
mkdir ./bin
|
||||||
|
|
||||||
|
chmod 777 ./bin
|
||||||
|
```
|
||||||
|
|
||||||
|
## 编译固件
|
||||||
|
|
||||||
|
开始编译固件
|
||||||
|
|
||||||
|
```
|
||||||
|
bash docker-build.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
(选择)增加初始化配置
|
||||||
|
`files/etc/uci-defaults/99-custom`是一个初始化 openwrt 配置的脚本
|
||||||
26
immortalwrt/build.sh
Normal file
26
immortalwrt/build.sh
Normal file
@ -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"
|
||||||
7
immortalwrt/docker-build.sh
Normal file
7
immortalwrt/docker-build.sh
Normal file
@ -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
|
||||||
10
immortalwrt/files/etc/uci-defaults/99-custom
Normal file
10
immortalwrt/files/etc/uci-defaults/99-custom
Normal file
@ -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
|
||||||
23
openwrt-stable/README.md
Normal file
23
openwrt-stable/README.md
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
# openwrt-stable
|
||||||
|
|
||||||
|
## 介绍
|
||||||
|
|
||||||
|
openwrt-stable 是基于 openwrt 官方源码构建的固件,适用于 x86、arm、mipsel、mips、ppc、ppc64、aarch64、sparc、sparc64 等架构。
|
||||||
|
|
||||||
|
## 准备工作
|
||||||
|
|
||||||
|
创建 bin 文件夹
|
||||||
|
|
||||||
|
```bash
|
||||||
|
mkdir ./bin
|
||||||
|
|
||||||
|
chmod 777 ./bin
|
||||||
|
```
|
||||||
|
|
||||||
|
## 编译固件
|
||||||
|
|
||||||
|
开始编译固件
|
||||||
|
|
||||||
|
```bash
|
||||||
|
bash docker-build.sh
|
||||||
|
```
|
||||||
12
openwrt-stable/build.sh
Normal file
12
openwrt-stable/build.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PACKAGES=""
|
||||||
|
PACKAGES="$PACKAGES -dnsmasq"
|
||||||
|
PACKAGES="$PACKAGES dnsmasq-full"
|
||||||
|
PACKAGES="$PACKAGES curl"
|
||||||
|
PACKAGES="$PACKAGES luci"
|
||||||
|
PACKAGES="$PACKAGES luci-i18n-base-zh-cn"
|
||||||
|
PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"
|
||||||
|
PACKAGES="$PACKAGES luci-i18n-opkg-zh-cn"
|
||||||
|
|
||||||
|
make image PACKAGES="$PACKAGES" ROOTFS_PARTSIZE="512"
|
||||||
7
openwrt-stable/docker-build.sh
Normal file
7
openwrt-stable/docker-build.sh
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
docker run --rm -it \
|
||||||
|
-v ./bin:/builder/bin \
|
||||||
|
-v ./files:/builder/files \
|
||||||
|
-v ./build.sh:/builder/build.sh \
|
||||||
|
openwrt/imagebuilder:x86-64-23.05.5 /builder/build.sh
|
||||||
Loading…
Reference in New Issue
Block a user