developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | echo "clone.........." |
| 3 | git clone --branch master https://gerrit.mediatek.inc/openwrt/lede mac80211_package |
| 4 | git clone --branch openwrt-21.02 https://gerrit.mediatek.inc/openwrt/lede openwrt |
| 5 | git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds |
| 6 | git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic |
| 7 | |
| 8 | echo "copy.........." |
| 9 | mkdir -p mac80211_package/package/kernel/mt76/patches |
| 10 | cp openwrt/package/kernel/mt76/patches/100-Revert-of-net-pass-the-dst-buffer-to-of_get_mac_addr.patch mac80211_package/package/kernel/mt76/patches |
| 11 | cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/package/ mac80211_package/ |
| 12 | |
| 13 | echo "gen mt76 patches.........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 14 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/kernel/mt76 |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 15 | cd mac80211_package/package/kernel/mt76 |
| 16 | ./rdkb_inc_helper patches |
| 17 | mv patches.inc patches |
| 18 | cd - |
| 19 | rm -rf meta-filogic/recipes-kernel/linux-mt76/files/patches |
| 20 | cp -rf mac80211_package/package/kernel/mt76/patches meta-filogic/recipes-kernel/linux-mt76/files/ |
| 21 | |
| 22 | echo "gen mac80211 patches.........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 23 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/kernel/mac80211/patches |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 24 | cd mac80211_package/package/kernel/mac80211/patches |
| 25 | ./rdkb_inc_helper subsys/ |
| 26 | ./rdkb_inc_helper build/ |
| 27 | mv subsys.inc subsys |
| 28 | mv build.inc build |
| 29 | mkdir patches |
| 30 | cp -r subsys patches |
| 31 | cp -r build patches |
| 32 | cd - |
| 33 | rm -rf meta-filogic/recipes-kernel/linux-mac80211/files/patches |
| 34 | cp -rf mac80211_package/package/kernel/mac80211/patches/patches meta-filogic/recipes-kernel/linux-mac80211/files |
| 35 | |
| 36 | echo "copy mt76 firmware.........." |
| 37 | rm -rf meta-filogic/recipes-kernel/linux-mt76/files/src |
| 38 | cp -rf mac80211_package/package/kernel/mt76/src meta-filogic/recipes-kernel/linux-mt76/files/ |
| 39 | |
| 40 | echo "Update bb file version.........." |
| 41 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/kernel/mt76/Makefile | cut -c 21-` |
| 42 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-kernel/linux-mt76/linux-mt76.bb |
| 43 | ver2=`grep "PKG_VERSION:=" mac80211_package/package/kernel/mac80211/Makefile | cut -c 14-` |
| 44 | sed -i 's/PV =.*/PV = "'${ver2%-*}'"/g' meta-filogic/recipes-kernel/linux-mac80211/linux-mac80211.bb |
| 45 | ver3=`grep "PKG_HASH" mac80211_package/package/kernel/mac80211/Makefile | cut -c 11-` |
| 46 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-kernel/linux-mac80211/linux-mac80211.bb |
| 47 | |
| 48 | echo "Sync from OpenWRT done , ready to commit meta-filogic!!!" |