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