developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | echo "clone repos" |
| 3 | git clone --branch openwrt-21.02 https://gerrit.mediatek.inc/openwrt/lede openwrt |
| 4 | git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds |
| 5 | git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic |
| 6 | echo "sync openwrt kernel..........." |
| 7 | remove_patches(){ |
| 8 | echo "remove conflict patches" |
| 9 | for aa in `cat remove.patch.list` |
| 10 | do |
| 11 | echo "rm $aa" |
| 12 | rm -rf ./$aa |
| 13 | done |
developer | e76f095 | 2022-07-06 13:30:46 +0800 | [diff] [blame] | 14 | #remove old legacy mt7622 patch |
| 15 | rm -rf ./target/linux/mediatek/patches-5.4/0303-mtd-spinand-disable-on-die-ECC.patch |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 16 | } |
| 17 | cp -fpR mtk_openwrt_feeds/target ./openwrt |
| 18 | cp mtk_openwrt_feeds/remove.patch.list openwrt/ |
| 19 | cd openwrt/ |
| 20 | remove_patches |
| 21 | cd - |
developer | 8d2cff8 | 2022-07-12 11:47:22 +0800 | [diff] [blame] | 22 | |
| 23 | #flowblock |
| 24 | #remove openwrt netfiler patch for new flowblock offload |
| 25 | rm -rf openwrt/target/linux/generic/pending-5.4/64*.patch |
| 26 | rm -rf openwrt/target/linux/generic/hack-5.4/647-netfilter-flow-acct.patch |
| 27 | rm -rf openwrt/target/linux/generic/hack-5.4/650-netfilter-add-xt_OFFLOAD-target.patch |
| 28 | rm -rf openwrt/target/linux/mediatek/patches-5.4/1002-mtkhnat-add-support-for-virtual-interface-acceleration.patch |
| 29 | #cp flowblock patch |
| 30 | cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/target/ ./openwrt |
| 31 | #find flow patch to create ext patch for rdkb kernel build |
| 32 | cd openwrt/target/linux/mediatek/patches-5.4/ |
| 33 | mkdir ../flow_patch |
| 34 | mv 1004-mtketh-*.patch ../flow_patch |
| 35 | mv 1007-mtketh-*.patch ../flow_patch |
| 36 | mv 99*.patch ../flow_patch |
| 37 | cd - |
| 38 | #end flowblock |
| 39 | |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 40 | echo "sync generic kernel..........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 41 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/generic/ |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 42 | cd openwrt/target/linux/generic/ |
| 43 | ./rdkb_inc_helper backport-5.4 |
| 44 | mv backport-5.4.inc backport-5.4 |
| 45 | ./rdkb_inc_helper pending-5.4 |
| 46 | mv pending-5.4.inc pending-5.4 |
| 47 | ./rdkb_inc_helper hack-5.4 |
| 48 | mv hack-5.4.inc hack-5.4 |
| 49 | cd - |
| 50 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4 |
| 51 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4 |
| 52 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4 |
| 53 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files |
| 54 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files-5.4 |
| 55 | cp -rf openwrt/target/linux/generic/backport-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 56 | cp -rf openwrt/target/linux/generic/pending-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 57 | cp -rf openwrt/target/linux/generic/hack-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 58 | cp -rf openwrt/target/linux/generic/files meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 59 | cp -rf openwrt/target/linux/generic/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/ |
| 60 | cp openwrt/target/linux/generic/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig |
| 61 | echo "sync medaitek kernel..........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 62 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/mediatek |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 63 | cd openwrt/target/linux/mediatek |
| 64 | ./rdkb_inc_helper patches-5.4/ |
| 65 | mv patches-5.4.inc patches-5.4 |
| 66 | sed -i 's/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch/&;apply=no/' patches-5.4/patches-5.4.inc |
| 67 | sed -i 's/9010-iwconfig-wireless-rate-fix.patch/&;apply=no/' patches-5.4/patches-5.4.inc |
| 68 | echo "do rework medaitek kernel patch done..........." |
| 69 | #cp 32bit dts |
| 70 | mkdir -p files-5.4/arch/arm/boot/dts/ |
| 71 | cp -rf files-5.4/arch/arm64/boot/dts/mediatek/mt7986* files-5.4/arch/arm/boot/dts/ |
| 72 | cd - |
| 73 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4 |
| 74 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/files-5.4 |
| 75 | cp -rf openwrt/target/linux/mediatek/patches-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek |
| 76 | cp -rf openwrt/target/linux/mediatek/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek |
developer | 938e897 | 2022-10-19 19:08:13 +0800 | [diff] [blame] | 77 | #cp platform kernel config |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 78 | cp openwrt/target/linux/mediatek/mt7986/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/mt7986.cfg |
developer | 938e897 | 2022-10-19 19:08:13 +0800 | [diff] [blame] | 79 | cp openwrt/target/linux/mediatek/mt7988/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/mt7988.cfg |
developer | 8d2cff8 | 2022-07-12 11:47:22 +0800 | [diff] [blame] | 80 | #flowblock patch |
| 81 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/flow_patch |
| 82 | cp -rf openwrt/target/linux/mediatek/flow_patch meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek |
| 83 | #end |
developer | 1bde8b4 | 2022-11-03 11:29:29 +0800 | [diff] [blame] | 84 | |
| 85 | echo "Update switch tool ...... " |
| 86 | cp -rf mtk_openwrt_feeds/feed/switch/src meta-filogic/recipes-devtools/switch/files/ |
| 87 | |
developer | 566f91f | 2022-11-03 15:58:17 +0800 | [diff] [blame] | 88 | echo "Update mii_mgr tool ...... " |
| 89 | cp -rf mtk_openwrt_feeds/feed/mii_mgr/src meta-filogic/recipes-devtools/mii-mgr/files/ |
| 90 | |
developer | 700bcc3 | 2022-11-03 17:45:25 +0800 | [diff] [blame] | 91 | echo "Update regs tool ...... " |
| 92 | cp -rf mtk_openwrt_feeds/feed/regs/src meta-filogic/recipes-devtools/regs/files/ |
| 93 | |
| 94 | echo "Update mtk-factory-rw tool ...... " |
| 95 | cp -rf mtk_openwrt_feeds/feed/mtk_factory_rw/files/ meta-filogic/recipes-devtools/mtk-factory-rw/ |
| 96 | |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 97 | echo "sync done..........." |