@@ -118,7 +118,7 @@ mtk_feed_version_dir="${MTK_FEED_VERSION_DIR:-24.10}"
118118mtk_feed_official_url=" ${MTK_FEED_OFFICIAL_URL:- https:// git01.mediatek.com/ openwrt/ feeds/ mtk-openwrt-feeds.git} "
119119mtk_feed_mirror_url=" ${MTK_FEED_MIRROR_URL:- https:// tea.saymi-labs.top/ Learning/ mtk-openwrt-feeds} "
120120mtk_feed_mapping_url=" ${MTK_FEED_MAPPING_URL:- https:// raw.githubusercontent.com/ GainStrongService/ mtk-openwrt-feeds/ master/ mtk-openwrt-feeds-commit-sha-mapping-table.md} "
121- mtk_feed_skip_patches =" ${MTK_FEED_SKIP_PATCHES :- 1000-arch-arm64-dts-add-fitblk-support-for-MediaTek-RFB.patch } "
121+ mtk_feed_apply_patches =" ${MTK_FEED_APPLY_PATCHES :- 0 } "
122122
123123configure_mtk_feed_link () {
124124 local abs_source_dir
@@ -233,7 +233,7 @@ prepare_mtk_feed_source() {
233233
234234apply_mtk_feed_overlay () {
235235 local overlay_dir=" ./feeds/mtk/$mtk_feed_version_dir "
236- local patch_dir patch_file patch_name
236+ local patch_dir patch_file
237237
238238 if [ ! -d " $overlay_dir " ]; then
239239 echo " [MTK] Overlay directory $overlay_dir not found" >&2
@@ -245,18 +245,18 @@ apply_mtk_feed_overlay() {
245245 cp -af " $overlay_dir /files/." .
246246 fi
247247
248+ if [ " $mtk_feed_apply_patches " != " 1" ]; then
249+ echo " [MTK] Skipping overlay patches from $overlay_dir (set MTK_FEED_APPLY_PATCHES=1 to enable)"
250+ return 0
251+ fi
252+
248253 for patch_dir in patches-base patches-feeds; do
249254 if [ ! -d " $overlay_dir /$patch_dir " ]; then
250255 continue
251256 fi
252257
253258 while IFS= read -r patch_file; do
254259 [ -n " $patch_file " ] || continue
255- patch_name=" ${patch_file##*/ } "
256- if printf ' %s\n' " $mtk_feed_skip_patches " | tr ' , ' ' \n\n' | grep -Fxq " $patch_name " ; then
257- echo " [MTK] Skipping patch $patch_file "
258- continue
259- fi
260260 echo " [MTK] Applying patch $patch_file "
261261 patch -f -p1 -i " $patch_file "
262262 done << EOF
0 commit comments