Unverified Commit 4822d362 authored by wukongdaily's avatar wukongdaily Committed by GitHub
Browse files

24.10 新增机型Cudy TR3000

parent 10afc1af
name: build-gl-inet-24.10.2 name: build-mediatek-24.10.2
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
...@@ -11,7 +11,10 @@ on: ...@@ -11,7 +11,10 @@ on:
- glinet_gl-mt2500 - glinet_gl-mt2500
- glinet_gl-mt6000 - glinet_gl-mt6000
- glinet_gl-b2200 - glinet_gl-b2200
default: glinet_gl-mt6000 - cudy_tr3000-v1
- cudy_tr3000-v1-ubootmod
- cudy_tr3000-256mb-v1
default: cudy_tr3000-256mb-v1
include_docker: include_docker:
description: | description: |
是否编译 Docker 插件 是否编译 Docker 插件
...@@ -58,7 +61,7 @@ jobs: ...@@ -58,7 +61,7 @@ jobs:
fi fi
fi fi
- name: Build Gl-iNet ImmortalWrt 24.10.2 - name: Build mediatek ImmortalWrt 24.10.2
run: | run: |
profiles="${{ github.event.inputs.profile }}" profiles="${{ github.event.inputs.profile }}"
include_docker="${{ github.event.inputs.include_docker }}" include_docker="${{ github.event.inputs.include_docker }}"
...@@ -66,6 +69,9 @@ jobs: ...@@ -66,6 +69,9 @@ jobs:
if [ "$profiles" = "glinet_gl-b2200" ]; then if [ "$profiles" = "glinet_gl-b2200" ]; then
tag=ipq40xx-generic-openwrt-24.10.2 tag=ipq40xx-generic-openwrt-24.10.2
echo "platform=ipq40xx/generic" >> $GITHUB_ENV echo "platform=ipq40xx/generic" >> $GITHUB_ENV
elif [ "$profiles" = "cudy_tr3000-256mb-v1" ]; then
tag=mediatek-filogic-24.10-SNAPSHOT
echo "platform=mediatek/filogic" >> $GITHUB_ENV
else else
tag=mediatek-filogic-openwrt-24.10.2 tag=mediatek-filogic-openwrt-24.10.2
echo "platform=mediatek/filogic" >> $GITHUB_ENV echo "platform=mediatek/filogic" >> $GITHUB_ENV
...@@ -91,14 +97,6 @@ jobs: ...@@ -91,14 +97,6 @@ jobs:
immortalwrt/imagebuilder:$tag /bin/bash /home/build/immortalwrt/build.sh immortalwrt/imagebuilder:$tag /bin/bash /home/build/immortalwrt/build.sh
done done
- name: Generate Firmware SHA-256
run: |
cp ${{ github.workspace }}/bin/targets/${{ env.platform }}/*.bin ${{ github.workspace }}
for file in *.bin; do
sha256sum "$file" > "$file.sha256"
sha256sum -c "$file.sha256"
done
- name: Create info - name: Create info
run: | run: |
if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then if [ "${{ github.event.inputs.include_docker }}" == "yes" ]; then
...@@ -111,12 +109,13 @@ jobs: ...@@ -111,12 +109,13 @@ jobs:
- name: Upload ImmortalWrt as release assets - name: Upload ImmortalWrt as release assets
uses: softprops/action-gh-release@v2.2.1 uses: softprops/action-gh-release@v2.2.1
with: with:
tag_name: Autobuild-GL-iNet tag_name: mediatek-filogic
name: ImmortalWrt-GL-iNet name: mediatek-filogic router
body_path: ${{ github.workspace }}/mediatek-filogic/info.md body_path: ${{ github.workspace }}/mediatek-filogic/info.md
files: | files: |
${{ github.workspace }}/*.bin ${{ github.workspace }}/bin/targets/${{ env.platform }}/*.bin
${{ github.workspace }}/*.sha256 ${{ github.workspace }}/bin/targets/${{ env.platform }}/*.itb
${{ github.workspace }}/bin/targets/${{ env.platform }}/*.fip
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
\ No newline at end of file
...@@ -34,6 +34,55 @@ else ...@@ -34,6 +34,55 @@ else
echo "PPPoE is not enabled. Skipping configuration." >> $LOGFILE echo "PPPoE is not enabled. Skipping configuration." >> $LOGFILE
fi fi
# 若安装了dockerd 则设置docker的防火墙规则
# 扩大docker涵盖的子网范围 '172.16.0.0/12'
# 方便各类docker容器的端口顺利通过防火墙
if command -v dockerd >/dev/null 2>&1; then
echo "检测到 Docker,正在配置防火墙规则..."
FW_FILE="/etc/config/firewall"
# 删除所有名为 docker 的 zone
uci delete firewall.docker
# 先获取所有 forwarding 索引,倒序排列删除
for idx in $(uci show firewall | grep "=forwarding" | cut -d[ -f2 | cut -d] -f1 | sort -rn); do
src=$(uci get firewall.@forwarding[$idx].src 2>/dev/null)
dest=$(uci get firewall.@forwarding[$idx].dest 2>/dev/null)
echo "Checking forwarding index $idx: src=$src dest=$dest"
if [ "$src" = "docker" ] || [ "$dest" = "docker" ]; then
echo "Deleting forwarding @forwarding[$idx]"
uci delete firewall.@forwarding[$idx]
fi
done
# 提交删除
uci commit firewall
# 追加新的 zone + forwarding 配置
cat <<EOF >>"$FW_FILE"
config zone 'docker'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
option name 'docker'
list subnet '172.16.0.0/12'
config forwarding
option src 'docker'
option dest 'lan'
config forwarding
option src 'docker'
option dest 'wan'
config forwarding
option src 'lan'
option dest 'docker'
EOF
else
echo "未检测到 Docker,跳过防火墙配置。"
fi
# 设置所有网口可访问网页终端 # 设置所有网口可访问网页终端
uci delete ttyd.@ttyd[0].interface uci delete ttyd.@ttyd[0].interface
......
...@@ -2,34 +2,24 @@ ...@@ -2,34 +2,24 @@
source shell/custom-packages.sh source shell/custom-packages.sh
# 该文件实际为imagebuilder容器内的build.sh # 该文件实际为imagebuilder容器内的build.sh
if [ -n "$CUSTOM_PACKAGES" ]; then #echo "✅ 你选择了第三方软件包:$CUSTOM_PACKAGES"
echo "✅ 你选择了第三方软件包:$CUSTOM_PACKAGES" # 下载 run 文件仓库
if [ "$PROFILE" = "glinet_gl-mt3000" ]; then echo "🔄 正在同步第三方软件仓库 Cloning run file repo..."
echo "❌ 检查到您集成了第三方软件包 由于mt3000闪存空间较小 不支持此操作" git clone --depth=1 https://github.com/wukongdaily/store.git /tmp/store-run-repo
echo "✅ 系统将自动帮你注释掉shell/custom-packages.sh中的插件 目前支持第三方插件集成的机型是mt2500/mt6000等大闪存机型"
CUSTOM_PACKAGES="" # 拷贝 run/arm64 下所有 run 文件和ipk文件 到 extra-packages 目录
else mkdir -p /home/build/immortalwrt/extra-packages
# 下载 run 文件仓库 cp -r /tmp/store-run-repo/run/arm64/* /home/build/immortalwrt/extra-packages/
echo "🔄 正在同步第三方软件仓库 Cloning run file repo..."
git clone --depth=1 https://github.com/wukongdaily/store.git /tmp/store-run-repo echo "✅ Run files copied to extra-packages:"
ls -lh /home/build/immortalwrt/extra-packages/*.run
# 拷贝 run/arm64 下所有 run 文件和ipk文件 到 extra-packages 目录 # 解压并拷贝ipk到packages目录
mkdir -p /home/build/immortalwrt/extra-packages sh shell/prepare-packages.sh
cp -r /tmp/store-run-repo/run/arm64/* /home/build/immortalwrt/extra-packages/ ls -lah /home/build/immortalwrt/packages/
# 添加架构优先级信息
echo "✅ Run files copied to extra-packages:" sed -i '1i\
ls -lh /home/build/immortalwrt/extra-packages/*.run arch aarch64_generic 10\n\
# 解压并拷贝ipk到packages目录 arch aarch64_cortex-a53 15' repositories.conf
sh shell/prepare-packages.sh
ls -lah /home/build/immortalwrt/packages/
# 添加架构优先级信息
sed -i '1i\
arch aarch64_generic 10\n\
arch aarch64_cortex-a53 15' repositories.conf
fi
else
echo "⚪️ 未选择任何第三方软件包"
fi
...@@ -57,8 +47,6 @@ echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting build process..." ...@@ -57,8 +47,6 @@ echo "$(date '+%Y-%m-%d %H:%M:%S') - Starting build process..."
PACKAGES="" PACKAGES=""
PACKAGES="$PACKAGES curl" PACKAGES="$PACKAGES curl"
PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn" PACKAGES="$PACKAGES luci-i18n-firewall-zh-cn"
# 服务——FileBrowser 用户名admin 密码admin
PACKAGES="$PACKAGES luci-i18n-filebrowser-go-zh-cn"
PACKAGES="$PACKAGES luci-theme-argon" PACKAGES="$PACKAGES luci-theme-argon"
PACKAGES="$PACKAGES luci-app-argon-config" PACKAGES="$PACKAGES luci-app-argon-config"
PACKAGES="$PACKAGES luci-i18n-argon-config-zh-cn" PACKAGES="$PACKAGES luci-i18n-argon-config-zh-cn"
...@@ -66,14 +54,14 @@ PACKAGES="$PACKAGES luci-i18n-diskman-zh-cn" ...@@ -66,14 +54,14 @@ PACKAGES="$PACKAGES luci-i18n-diskman-zh-cn"
#24.10.0 #24.10.0
PACKAGES="$PACKAGES luci-i18n-package-manager-zh-cn" PACKAGES="$PACKAGES luci-i18n-package-manager-zh-cn"
PACKAGES="$PACKAGES luci-i18n-ttyd-zh-cn" PACKAGES="$PACKAGES luci-i18n-ttyd-zh-cn"
PACKAGES="$PACKAGES luci-i18n-passwall-zh-cn"
PACKAGES="$PACKAGES luci-app-openclash"
PACKAGES="$PACKAGES luci-i18n-homeproxy-zh-cn"
PACKAGES="$PACKAGES openssh-sftp-server" PACKAGES="$PACKAGES openssh-sftp-server"
# 增加几个必备组件 方便用户安装iStore # 文件管理器
PACKAGES="$PACKAGES fdisk" PACKAGES="$PACKAGES luci-i18n-filemanager-zh-cn"
PACKAGES="$PACKAGES script-utils" # 静态文件服务器dufs(推荐)
PACKAGES="$PACKAGES luci-i18n-samba4-zh-cn" PACKAGES="$PACKAGES luci-i18n-dufs-zh-cn"
# 分区扩容 by sirpdboy
PACKAGES="$PACKAGES luci-app-partexp"
PACKAGES="$PACKAGES luci-i18n-partexp-zh-cn"
# 第三方软件包 合并 # 第三方软件包 合并
# ======== shell/custom-packages.sh ======= # ======== shell/custom-packages.sh =======
...@@ -113,4 +101,4 @@ if [ $? -ne 0 ]; then ...@@ -113,4 +101,4 @@ if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
echo "$(date '+%Y-%m-%d %H:%M:%S') - Build completed successfully." echo "$(date '+%Y-%m-%d %H:%M:%S') - Build completed successfully."
\ No newline at end of file
...@@ -8,6 +8,9 @@ CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-store" ...@@ -8,6 +8,9 @@ CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-store"
# 去广告adghome # 去广告adghome
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-adguardhome" #CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-adguardhome"
# 代理相关 # 代理相关
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-i18n-passwall-zh-cn"
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-openclash"
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-i18n-homeproxy-zh-cn"
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-ssr-plus" #CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-ssr-plus"
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-passwall2" #CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-app-passwall2"
#CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-i18n-nikki-zh-cn" #CUSTOM_PACKAGES="$CUSTOM_PACKAGES luci-i18n-nikki-zh-cn"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment