mirror of
https://github.com/Dichgrem/Dwrt-build.git
synced 2025-12-17 14:11:59 -05:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f69b2749db | ||
|
|
fc3fe57112 | ||
|
|
b150951529 | ||
|
|
d842d24605 | ||
|
|
816642fba6 | ||
|
|
e2bc8f73ea | ||
|
|
31c5070c58 | ||
|
|
9f4f053257 |
99
.github/workflows/build.yml
vendored
99
.github/workflows/build.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Build Custom WRT
|
||||
name: Build WRT
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -9,11 +9,16 @@ on:
|
||||
default: "immortalwrt"
|
||||
type: choice
|
||||
options:
|
||||
- lede
|
||||
- openwrt
|
||||
- immortalwrt
|
||||
- x-wrt
|
||||
- lienol
|
||||
- lede
|
||||
- immortalwrt-mt798x
|
||||
- immortalwrt-mt798x-6.6
|
||||
tag:
|
||||
description: "版本号"
|
||||
required: false
|
||||
default: "v24.10.3"
|
||||
type: string
|
||||
version_type:
|
||||
description: "版本类型"
|
||||
required: true
|
||||
@@ -22,23 +27,28 @@ on:
|
||||
options:
|
||||
- "snapshot"
|
||||
- "stable"
|
||||
branch:
|
||||
description: "snapshot-branch"
|
||||
required: false
|
||||
default: "master"
|
||||
type: string
|
||||
tag:
|
||||
description: "stable-tag"
|
||||
required: false
|
||||
default: "v24.10.2"
|
||||
type: string
|
||||
config_path:
|
||||
description: "config 路径"
|
||||
description: "配置文件路径"
|
||||
required: true
|
||||
default: "config/myconfig"
|
||||
type: string
|
||||
proxy_nikki:
|
||||
description: "启用Nikki"
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
proxy_passwall2:
|
||||
description: "启用Passwall2"
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
proxy_luci_app_momo:
|
||||
description: "启用luci-app-momo"
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
threads:
|
||||
description: "编译线程数(留空或填写 0 则自动使用 nproc)"
|
||||
description: "编译线程数(填写 0 则使用 nproc)"
|
||||
required: false
|
||||
default: "0"
|
||||
type: string
|
||||
@@ -54,29 +64,27 @@ jobs:
|
||||
- name: Free up disk space
|
||||
run: |
|
||||
echo "🧹 开始清理无用文件,释放磁盘空间"
|
||||
# 删除预装但编译中不需要的 SDK/工具
|
||||
sudo rm -rf /usr/share/dotnet \
|
||||
/usr/local/lib/android \
|
||||
/opt/ghc \
|
||||
/opt/hostedtoolcache \
|
||||
/opt/az \
|
||||
/opt/microsoft
|
||||
# 删除 GitHub Actions self-hosted runner 缓存目录(如果存在)
|
||||
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
|
||||
# 删除系统缓存和日志
|
||||
sudo rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/* /var/log/*.log
|
||||
# 显示当前磁盘使用情况
|
||||
/usr/local/lib/android \
|
||||
/opt/ghc \
|
||||
/opt/az \
|
||||
/opt/microsoft
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /var/lib/apt/lists/*
|
||||
echo "📊 磁盘使用情况:"
|
||||
df -h || true
|
||||
|
||||
- name: Determine Git ref
|
||||
- name: Choose Wrt Version
|
||||
id: refinfo
|
||||
run: |
|
||||
if [ "${{ inputs.version_type }}" = "snapshot" ]; then
|
||||
echo "ref=${{ inputs.branch }}" >> $GITHUB_OUTPUT
|
||||
if [ "$VERSION_TYPE" = "snapshot" ]; then
|
||||
echo "ref=master" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "ref=${{ inputs.tag }}" >> $GITHUB_OUTPUT
|
||||
echo "ref=$TAG" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
env:
|
||||
VERSION_TYPE: ${{ inputs.version_type }}
|
||||
TAG: ${{ inputs.tag }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
@@ -100,15 +108,15 @@ jobs:
|
||||
immortalwrt)
|
||||
echo "url=https://github.com/immortalwrt/immortalwrt.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
x-wrt)
|
||||
echo "url=https://github.com/x-wrt/x-wrt.git" >> $GITHUB_OUTPUT
|
||||
immortalwrt-mt798x)
|
||||
echo "url=https://github.com/hanwckf/immortalwrt-mt798x.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
immortalwrt-mt798x-6.6)
|
||||
echo "url=https://github.com/padavanonly/immortalwrt-mt798x-6.6.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
openwrt)
|
||||
echo "url=https://git.openwrt.org/openwrt/openwrt.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
lienol)
|
||||
echo "url=https://github.com/Lienol/openwrt.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
lede)
|
||||
echo "url=https://github.com/coolsnowwolf/lede.git" >> $GITHUB_OUTPUT
|
||||
;;
|
||||
@@ -118,7 +126,7 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
|
||||
- name: Clone repository
|
||||
- name: Clone Wrt source
|
||||
run: |
|
||||
echo "📥 克隆 ${{ inputs.project }} 仓库"
|
||||
git clone "${{ steps.projectinfo.outputs.url }}" wrt
|
||||
@@ -137,6 +145,21 @@ jobs:
|
||||
- name: Update and install feeds
|
||||
working-directory: wrt
|
||||
run: |
|
||||
if [ "${{ github.event.inputs.proxy_nikki }}" == "true" ]; then
|
||||
echo "📦 添加 nikki feed"
|
||||
echo "src-git nikki https://github.com/nikkinikki-org/OpenWrt-nikki.git;main" >> "feeds.conf.default"
|
||||
fi
|
||||
|
||||
if [ "${{ github.event.inputs.proxy_passwall2 }}" == "true" ]; then
|
||||
echo "📦 添加 passwall2 feed"
|
||||
echo "src-git passwall https://github.com/xiaorouji/openwrt-passwall2.git" >> "feeds.conf.default"
|
||||
fi
|
||||
|
||||
if [ "${{ github.event.inputs.proxy_luci_app_momo }}" == "true" ]; then
|
||||
echo "📦 添加 luci-app-momo feed"
|
||||
echo "src-git momo https://github.com/nikkinikki-org/OpenWrt-momo.git;main" >> "feeds.conf.default"
|
||||
fi
|
||||
|
||||
echo "📦 更新 feeds"
|
||||
./scripts/feeds update -a
|
||||
echo "📦 安装 feeds"
|
||||
@@ -168,7 +191,7 @@ jobs:
|
||||
diff -u .config.before_oldconfig .config || true
|
||||
fi
|
||||
|
||||
- name: Download source packages
|
||||
- name: Download packages
|
||||
working-directory: wrt
|
||||
run: |
|
||||
echo "⬇️ 下载所有源码包(使用单线程 -j1 避免卡住)"
|
||||
|
||||
@@ -6,8 +6,9 @@ This is a Openwrt build workflows.
|
||||
|
||||
| 名称 | URL | SHORT |
|
||||
|--------------|------------------------------------------------------------|--------------------------|
|
||||
| x-wrt | https://github.com/x-wrt/x-wrt.git | x-wrt/x-wrt |
|
||||
| openwrt | https://git.openwrt.org/openwrt/openwrt.git | openwrt/openwrt |
|
||||
| lienol | https://github.com/Lienol/openwrt.git | Lienol/openwrt |
|
||||
| lede | https://github.com/coolsnowwolf/lede.git | coolsnowwolf/lede |
|
||||
| openwrt | https://git.openwrt.org/openwrt/openwrt.git | openwrt/openwrt |
|
||||
| immortalwrt | https://github.com/immortalwrt/immortalwrt.git | immortalwrt/immortalwrt |
|
||||
| immortalwrt-mt798x | https://github.com/hanwckf/immortalwrt-mt798x.git | hanwckf/immortalwrt-mt798x |
|
||||
| immortalwrt-mt798x-6.6 | https://github.com/padavanonly/immortalwrt-mt798x-6.6.git | padavanonly/immortalwrt-mt798x-6.6 |
|
||||
|
||||
|
||||
8290
config/nokia_ea0326gmp_config
Normal file
8290
config/nokia_ea0326gmp_config
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
16
diy.sh
16
diy.sh
@@ -15,10 +15,10 @@ echo "🚀 添加自定义 feed 源..."
|
||||
echo "✅ feeds 添加完成"
|
||||
|
||||
# 1. 默认 hostname
|
||||
sed -i 's/=ImmortalWrt/=Dwrt/' package/base-files/files/bin/config_generate
|
||||
sed -i "s/ImmortalWrt/Dwrt/g" package/base-files/files/bin/config_generate
|
||||
|
||||
# 2. 默认 IP 地址
|
||||
sed -i 's/192.168.1.1/192.168.1.1/' package/base-files/files/bin/config_generate
|
||||
sed -i 's/192.168.2.1/192.168.1.1/' package/base-files/files/bin/config_generate
|
||||
|
||||
# 3. 默认 root 密码
|
||||
HASH=$(openssl passwd -1 'password')
|
||||
@@ -60,12 +60,12 @@ EOF
|
||||
fi
|
||||
|
||||
# 8. 自定义 LuCI 概览设备型号
|
||||
cat >package/base-files/files/etc/uci-defaults/99-model-fix <<'EOF'
|
||||
#cat >package/base-files/files/etc/uci-defaults/99-model-fix <<'EOF'
|
||||
#!/bin/sh
|
||||
mkdir -p /tmp/sysinfo
|
||||
echo "Myrouter" > /tmp/sysinfo/model
|
||||
exit 0
|
||||
EOF
|
||||
chmod +x package/base-files/files/etc/uci-defaults/99-model-fix
|
||||
#mkdir -p /tmp/sysinfo
|
||||
#echo "Myrouter" > /tmp/sysinfo/model
|
||||
#exit 0
|
||||
#EOF
|
||||
#chmod +x package/base-files/files/etc/uci-defaults/99-model-fix
|
||||
|
||||
echo "✅ diy.sh 执行完毕"
|
||||
|
||||
Reference in New Issue
Block a user