blob: 483762d6c5796ae4e1d42b851c0c8f5eec904f31 [file] [log] [blame]
developer3348d652022-04-18 19:33:39 +08001#!/bin/sh
2echo "clone repos"
3git clone --branch openwrt-21.02 https://gerrit.mediatek.inc/openwrt/lede openwrt
4git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds
5git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic
6echo "sync openwrt kernel..........."
7remove_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}
15cp -fpR mtk_openwrt_feeds/target ./openwrt
16cp mtk_openwrt_feeds/remove.patch.list openwrt/
17cd openwrt/
18remove_patches
19cd -
20echo "sync generic kernel..........."
developer19694572022-04-18 19:58:01 +080021cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/generic/
developer3348d652022-04-18 19:33:39 +080022cd openwrt/target/linux/generic/
23./rdkb_inc_helper backport-5.4
24mv backport-5.4.inc backport-5.4
25./rdkb_inc_helper pending-5.4
26mv pending-5.4.inc pending-5.4
27./rdkb_inc_helper hack-5.4
28mv hack-5.4.inc hack-5.4
29cd -
30rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/backport-5.4
31rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/pending-5.4
32rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/hack-5.4
33rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files
34rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/files-5.4
35cp -rf openwrt/target/linux/generic/backport-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic
36cp -rf openwrt/target/linux/generic/pending-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic
37cp -rf openwrt/target/linux/generic/hack-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic
38cp -rf openwrt/target/linux/generic/files meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic
39cp -rf openwrt/target/linux/generic/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/
40cp openwrt/target/linux/generic/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/generic/defconfig
41echo "sync medaitek kernel..........."
developer19694572022-04-18 19:58:01 +080042cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper openwrt/target/linux/mediatek
developer3348d652022-04-18 19:33:39 +080043cd openwrt/target/linux/mediatek
44./rdkb_inc_helper patches-5.4/
45mv patches-5.4.inc patches-5.4
46sed -i 's/0600-net-phylink-propagate-resolved-link-config-via-mac_l.patch/&;apply=no/' patches-5.4/patches-5.4.inc
47sed -i 's/9010-iwconfig-wireless-rate-fix.patch/&;apply=no/' patches-5.4/patches-5.4.inc
48echo "do rework medaitek kernel patch done..........."
49#cp 32bit dts
50mkdir -p files-5.4/arch/arm/boot/dts/
51cp -rf files-5.4/arch/arm64/boot/dts/mediatek/mt7986* files-5.4/arch/arm/boot/dts/
52cd -
53rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/patches-5.4
54rm -rf meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/files-5.4
55cp -rf openwrt/target/linux/mediatek/patches-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek
56cp -rf openwrt/target/linux/mediatek/files-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek
57cp openwrt/target/linux/mediatek/mt7986/config-5.4 meta-filogic/recipes-kernel/linux/linux-mediatek-5.4/mediatek/mt7986.cfg
58echo "sync done..........."