Skip to content

Commit f46be88

Browse files
committed
refactor: remove broken MTK feed integration
1 parent 1d601d2 commit f46be88

5 files changed

Lines changed: 7 additions & 66 deletions

File tree

.github/workflows/BPI-R4-Minimal-MTK-Bootloader-Test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: BPI-R4-Minimal-MTK-Bootloader-Test
1+
name: BPI-R4-Minimal-Bootloader-Test
22
run-name: Minimal BPI-R4 test · ${{ inputs.media }} · ${{ github.ref_name }}
33

44
on:
@@ -35,7 +35,6 @@ jobs:
3535
openwrt/dl
3636
openwrt/staging_dir
3737
openwrt/build_dir
38-
mtk-feed
3938
bl-mt798x-dhcpd
4039
key: ${{ runner.os }}-openwrt-minimal-${{ hashFiles('SCRIPTS/01_get_ready_minimal.sh') }}-${{ hashFiles('SEED/BPI-R4-MINIMAL/config.seed') }}
4140
restore-keys: |

SCRIPTS/01_get_ready.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ clone_repo $dockerman_repo master dockerman &
6060
clone_repo $docker_lib_repo master docker_lib &
6161
clone_repo $luci_theme_design_repo master luci_theme_design_repo &
6262
# 等待所有后台任务完成
63-
# MTK Official Feed
64-
# MediaTek feed currently exposes 24.10 content under the master branch.
65-
clone_repo "https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds.git" "master" "mtk-feed" &
66-
6763
# Custom Bootloader with DHCPD/WebUI (Yuzhii0718)
6864
clone_repo "https://github.com/Yuzhii0718/bl-mt798x-dhcpd.git" "master" "bl-mt798x-dhcpd" &
6965

SCRIPTS/01_get_ready_minimal.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ clone_repo() {
1414

1515
latest_release="$(curl -s https://github.com/openwrt/openwrt/tags | grep -Eo 'v[0-9\.]+\-*r*c*[0-9]*.tar.gz' | grep 'v24.10' | sed -n 1p | sed 's/.tar.gz//g')"
1616
openwrt_repo="https://github.com/openwrt/openwrt.git"
17-
mtk_feed_repo="https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds.git"
1817
custom_bootloader_repo="https://github.com/Yuzhii0718/bl-mt798x-dhcpd.git"
1918

2019
# Check if openwrt source exists and is a git repo
@@ -43,7 +42,6 @@ if [ ! -d "openwrt/.git" ]; then
4342

4443
# 4. Clone other repos (if missing)
4544
clone_repo "$openwrt_repo" openwrt-24.10 openwrt_snap &
46-
clone_repo "$mtk_feed_repo" master mtk-feed &
4745
clone_repo "$custom_bootloader_repo" master bl-mt798x-dhcpd &
4846

4947
wait
@@ -61,8 +59,7 @@ else
6159
echo "[MINIMAL] openwrt source detected."
6260
# Ensure sub-repos exist
6361
clone_repo "$openwrt_repo" openwrt-24.10 openwrt_snap
64-
clone_repo "$mtk_feed_repo" master mtk-feed
6562
clone_repo "$custom_bootloader_repo" master bl-mt798x-dhcpd
6663
fi
6764

68-
echo "[MINIMAL] OpenWrt base, MTK feed, and custom bootloader sources are ready."
65+
echo "[MINIMAL] OpenWrt base and custom bootloader sources are ready."

SCRIPTS/02_prepare_package.sh

Lines changed: 5 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,6 @@ if ! ./scripts/feeds install -a; then
3737
fi
3838

3939
### 基础部分 ###
40-
# 可选:接入 MediaTek 的 OpenWrt feeds 或本地 SDK
41-
# 通过环境变量控制,不默认启用,以免影响现有构建:
42-
# - USE_MTK_FEED=1 启用在线 mtk feeds
43-
# MTK_FEED_URL=... feeds 仓库地址(可选,留空用默认)
44-
# MTK_FEED_BRANCH=... 分支(可选,默认尝试与底座版本匹配)
45-
# - MTK_SDK_TARBALL=/path/to.tgz 使用离线 SDK 包(可选)
46-
if [ "1" = "1" ]; then # [MODIFIED] Force enable MTK Feed
47-
echo "[MTK] 启用 MediaTek feeds 集成"
48-
MTK_FEED_URL=${MTK_FEED_URL:-https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds.git}
49-
# MediaTek feed 当前仅提供 master 分支,24.10 内容位于仓库内的 24.10/ 子目录。
50-
MTK_FEED_BRANCH=${MTK_FEED_BRANCH:-master}
51-
if ! grep -qE "^src-git mtk " feeds.conf.default; then
52-
echo "src-git mtk ${MTK_FEED_URL};${MTK_FEED_BRANCH}" >> feeds.conf.default
53-
fi
54-
fi
55-
56-
if [ -n "${MTK_SDK_TARBALL:-}" ]; then
57-
echo "[MTK] 使用本地 SDK 包:${MTK_SDK_TARBALL}"
58-
mkdir -p ../mtk-sdk
59-
tar -xf "${MTK_SDK_TARBALL}" -C ../mtk-sdk || {
60-
echo "[MTK] 解压 SDK 失败" >&2; exit 2;
61-
}
62-
# 如果离线 SDK 中提供了 feeds 目录,作为本地 feed 接入
63-
if [ -d ../mtk-sdk/feeds ]; then
64-
if ! grep -qE "^src-link mtk-sdk " feeds.conf.default; then
65-
echo "src-link mtk-sdk ../mtk-sdk/feeds" >> feeds.conf.default
66-
fi
67-
fi
68-
fi
69-
7040
### Custom Bootloader (Yuzhii0718) & GPT for A/B Partition ###
7141
if [ -d "../bl-mt798x-dhcpd" ]; then
7242
echo "[BOOT] Found custom bootloader repo: bl-mt798x-dhcpd"
@@ -101,25 +71,11 @@ if [ -d "../bl-mt798x-dhcpd" ]; then
10171
fi
10272

10373

104-
### MTK WiFi Optimization (TX Power & Region Unlock) ###
105-
# Unlock WiFi region restrictions and maximize TX power
106-
if [ -d "../mtk-feed" ]; then
107-
echo "[WIFI] Applying TX power and region unlock for MTK WiFi..."
108-
109-
# 1. Replace wireless-regdb patches in OpenWrt source
110-
rm -rf ./package/firmware/wireless-regdb/patches/*
111-
cp ../PATCH/kernel/mtk_wifi/500-tx_power.patch ./package/firmware/wireless-regdb/patches/ 2>/dev/null || true
112-
if [ -f "../PATCH/kernel/mtk_wifi/regdb.Makefile" ]; then
113-
cp ../PATCH/kernel/mtk_wifi/regdb.Makefile ./package/firmware/wireless-regdb/Makefile
114-
fi
115-
116-
# 2. Also apply to MTK feed structure (it has its own copy)
117-
# MTK feed puts wireless-regdb patches in a specific location
118-
MTK_REGDB_PATH="../mtk-feed/autobuild/unified/filogic/mac80211/24.10/files/package/firmware/wireless-regdb/patches"
119-
if [ -d "$MTK_REGDB_PATH" ]; then
120-
rm -rf $MTK_REGDB_PATH/*
121-
cp ../PATCH/kernel/mtk_wifi/500-tx_power.patch $MTK_REGDB_PATH/ 2>/dev/null || true
122-
fi
74+
### WiFi regdb Optimization (OpenWrt tree only) ###
75+
rm -rf ./package/firmware/wireless-regdb/patches/*
76+
cp ../PATCH/kernel/mtk_wifi/500-tx_power.patch ./package/firmware/wireless-regdb/patches/ 2>/dev/null || true
77+
if [ -f "../PATCH/kernel/mtk_wifi/regdb.Makefile" ]; then
78+
cp ../PATCH/kernel/mtk_wifi/regdb.Makefile ./package/firmware/wireless-regdb/Makefile
12379
fi
12480

12581
# 使用 O2 级别的优化

SCRIPTS/02_prepare_package_minimal.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ rewrite_feeds "https://github.com/openwrt/packages.git;openwrt-24.10" \
2121
"https://github.com/openwrt/routing.git;openwrt-24.10" \
2222
"https://github.com/openwrt/telephony.git;openwrt-24.10"
2323

24-
MTK_FEED_URL=${MTK_FEED_URL:-https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds.git}
25-
MTK_FEED_BRANCH=${MTK_FEED_BRANCH:-master}
26-
if ! grep -qE "^src-git mtk " feeds.conf.default; then
27-
echo "src-git mtk ${MTK_FEED_URL};${MTK_FEED_BRANCH}" >> feeds.conf.default
28-
fi
29-
3024
if ! ./scripts/feeds update -a; then
3125
echo "GitHub 镜像更新失败,尝试切换回官方源..."
3226
rewrite_feeds "https://git.openwrt.org/feed/packages.git;openwrt-24.10" \
@@ -37,7 +31,6 @@ if ! ./scripts/feeds update -a; then
3731
fi
3832

3933
./scripts/feeds install -a
40-
./scripts/feeds install -a -p mtk -f || true
4134

4235
if [ -d "../bl-mt798x-dhcpd" ]; then
4336
echo "[BOOT] Found custom bootloader repo: bl-mt798x-dhcpd"

0 commit comments

Comments
 (0)