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 - |
| 22 | echo "sync generic kernel..........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 23 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/generic/ |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 24 | cd openwrt/target/linux/generic/ |
| 25 | ./rdkb_inc_helper backport-5.4 |
| 26 | mv backport-5.4.inc backport-5.4 |
| 27 | ./rdkb_inc_helper pending-5.4 |
| 28 | mv pending-5.4.inc pending-5.4 |
| 29 | ./rdkb_inc_helper hack-5.4 |
| 30 | mv hack-5.4.inc hack-5.4 |
| 31 | cd - |
| 32 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4 |
| 33 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4 |
| 34 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4 |
| 35 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files |
| 36 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files-5.4 |
| 37 | cp -rf openwrt/target/linux/generic/backport-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 38 | cp -rf openwrt/target/linux/generic/pending-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 39 | cp -rf openwrt/target/linux/generic/hack-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 40 | cp -rf openwrt/target/linux/generic/files meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic |
| 41 | cp -rf openwrt/target/linux/generic/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/ |
| 42 | cp openwrt/target/linux/generic/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig |
| 43 | echo "sync medaitek kernel..........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 44 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/mediatek |
developer | 3348d65 | 2022-04-18 19:33:39 +0800 | [diff] [blame] | 45 | cd openwrt/target/linux/mediatek |
| 46 | ./rdkb_inc_helper patches-5.4/ |
| 47 | mv patches-5.4.inc patches-5.4 |
| 48 | sed -i 's/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch/&;apply=no/' patches-5.4/patches-5.4.inc |
| 49 | sed -i 's/9010-iwconfig-wireless-rate-fix.patch/&;apply=no/' patches-5.4/patches-5.4.inc |
| 50 | echo "do rework medaitek kernel patch done..........." |
| 51 | #cp 32bit dts |
| 52 | mkdir -p files-5.4/arch/arm/boot/dts/ |
| 53 | cp -rf files-5.4/arch/arm64/boot/dts/mediatek/mt7986* files-5.4/arch/arm/boot/dts/ |
| 54 | cd - |
| 55 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4 |
| 56 | rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/files-5.4 |
| 57 | cp -rf openwrt/target/linux/mediatek/patches-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek |
| 58 | cp -rf openwrt/target/linux/mediatek/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek |
| 59 | cp openwrt/target/linux/mediatek/mt7986/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/mt7986.cfg |
| 60 | echo "sync done..........." |