Clone this repo:

Branches

  1. dd5eed1 [][kernel-6.6][mt7987][bsp][Change the AN8801SB SGMII to the Force mode] by developer · Wed May 21 16:48:42 2025 +0800 master
  2. 7c8df2f [][kernel-6.6][common][eth][Update Airoha AN8801SB 1G PHY driver to v1.1.7] by developer · Wed May 21 16:40:18 2025 +0800
  3. 799d667 [][kernel-6.6][mt7988][eth][Refactor mtk_validate_sram_range() for the MTK_SRAM feature] by developer · Wed May 21 18:26:38 2025 +0800
  4. 50d7185 [][openwrt][mt7988][crypto][Add debugfs to enable IPSec HW offload feature on net device dynamically] by developer · Mon May 19 14:32:04 2025 +0800
  5. 8b3aa37 [][openwrt][mt7988][crypto][Add IPSec statistics with EIP197 inline mode] by developer · Wed May 14 18:08:02 2025 +0800

Brief introduction for using MediaTek released OpenWrt SDK

1. Build system setup

2. Clone vanilla OpenWrt

Currently two release branches are supported:

  1. 21.02 This is the current in-use branch

    git clone -b openwrt-21.02 https://git.openwrt.org/openwrt/openwrt.git
    
  2. 24.10 This is the current in-use branch

    git clone -b openwrt-24.10 https://git.openwrt.org/openwrt/openwrt.git
    

3. Add MediaTek OpenWrt feed

cd openwrt
echo "src-git mtk_openwrt_feed https://git01.mediatek.com/openwrt/feeds/mtk-openwrt-feeds" >> feeds.conf.default
./scripts/feeds update -a
./scripts/feeds install -a

4. Apply MediaTek OpenWrt files and patches

  1. 21.02 branch

    cp -af ./feeds/mtk_openwrt_feed/21.02/files/* .
    cp -af ./feeds/mtk_openwrt_feed/tools .
    for file in $(find ./feeds/mtk_openwrt_feed/21.02/patches-base -name "*.patch" | sort); do patch -f -p1 -i ${file}; done
    for file in $(find ./feeds/mtk_openwrt_feed/21.02/patches-feeds -name "*.patch" | sort); do patch -f -p1 -i ${file}; done
    
  2. 24.10 branch

    cp -af ./feeds/mtk_openwrt_feed/24.10/files/* .
    for file in $(find ./feeds/mtk_openwrt_feed/24.10/patches-base -name "*.patch" | sort); do patch -f -p1 -i ${file}; done
    

5. Configuration

make menuconfig
  1. 21.02 branch

    Target System -> MediaTek Ralink ARM
    Subtarget -> MT7981 / MT7986 / MT7988
    Target Profile -> select as needed
    
  2. 24.10 branch

    Target System -> MediaTek Ralink ARM
    Subtarget -> Filogic 8x0 (MT798x)
    Target Profile -> select as needed
    

6. Build

make V=s -j$(nproc)

Mediatek Official Release with autobuild framework

  1. 21.02 branch https://gerrit.mediatek.inc/plugins/gitiles/openwrt/feeds/mtk_openwrt_feeds/+/refs/heads/master/autobuild/autobuild_5.4_mac80211_release/Readme.md

  2. 24.10 branch https://gerrit.mediatek.inc/plugins/gitiles/openwrt/feeds/mtk_openwrt_feeds/+/refs/heads/master/autobuild/unified/Readme.md