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 |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 6 | git clone --branch master https://gerrit.mediatek.inc/gateway/autobuild_v5 |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 7 | git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic |
| 8 | |
| 9 | echo "copy.........." |
| 10 | mkdir -p mac80211_package/package/kernel/mt76/patches |
| 11 | 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 |
| 12 | cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/package/ mac80211_package/ |
| 13 | |
| 14 | echo "gen mt76 patches.........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 15 | 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] | 16 | cd mac80211_package/package/kernel/mt76 |
| 17 | ./rdkb_inc_helper patches |
| 18 | mv patches.inc patches |
| 19 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 20 | rm -rf meta-filogic/recipes-wifi/linux-mt76/files/patches |
| 21 | cp -rf mac80211_package/package/kernel/mt76/patches meta-filogic/recipes-wifi/linux-mt76/files/ |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 22 | |
| 23 | echo "gen mac80211 patches.........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 24 | 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] | 25 | cd mac80211_package/package/kernel/mac80211/patches |
| 26 | ./rdkb_inc_helper subsys/ |
| 27 | ./rdkb_inc_helper build/ |
| 28 | mv subsys.inc subsys |
| 29 | mv build.inc build |
| 30 | mkdir patches |
| 31 | cp -r subsys patches |
| 32 | cp -r build patches |
| 33 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 34 | rm -rf meta-filogic/recipes-wifi/linux-mac80211/files/patches |
| 35 | cp -rf mac80211_package/package/kernel/mac80211/patches/patches meta-filogic/recipes-wifi/linux-mac80211/files |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 36 | |
| 37 | echo "copy mt76 firmware.........." |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 38 | rm -rf meta-filogic/recipes-wifi/linux-mt76/files/src |
| 39 | cp -rf mac80211_package/package/kernel/mt76/src meta-filogic/recipes-wifi/linux-mt76/files/ |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 40 | |
| 41 | echo "Update bb file version.........." |
| 42 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/kernel/mt76/Makefile | cut -c 21-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 43 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-wifi/linux-mt76/mt76.inc |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 44 | ver2=`grep "PKG_VERSION:=" mac80211_package/package/kernel/mac80211/Makefile | cut -c 14-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 45 | sed -i 's/PV =.*/PV = "'${ver2%-*}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211.bb |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 46 | ver3=`grep "PKG_HASH" mac80211_package/package/kernel/mac80211/Makefile | cut -c 11-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 47 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211.bb |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 48 | |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 49 | echo "gen hostapd patches.........." |
| 50 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/services/hostapd |
| 51 | cd mac80211_package/package/network/services/hostapd |
| 52 | ./rdkb_inc_helper patches |
| 53 | mv patches.inc patches |
| 54 | echo "some patch do not apply to RDKB" |
| 55 | sed -i 's/450-scan_wait.patch/&;apply=no/' patches/patches.inc |
| 56 | |
| 57 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 58 | rm -rf meta-filogic/recipes-wifi/hostapd/files/patches |
| 59 | rm -rf meta-filogic/recipes-wifi/wpa-supplicant/files/patches |
| 60 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-wifi/hostapd/files/ |
| 61 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-wifi/wpa-supplicant/files/ |
| 62 | rm -rf meta-filogic/recipes-wifi/hostapd/files/src |
| 63 | rm -rf meta-filogic/recipes-wifi/wpa-supplicant/files/src |
| 64 | cp -rf mac80211_package/package/network/services/hostapd/src meta-filogic/recipes-wifi/hostapd/files/ |
| 65 | cp -rf mac80211_package/package/network/services/hostapd/src meta-filogic/recipes-wifi/wpa-supplicant/files/ |
developer | 8bbedcf | 2022-05-03 12:58:56 +0800 | [diff] [blame] | 66 | echo "cp defconfig and remove ubus" |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 67 | cp mac80211_package/package/network/services/hostapd/files/hostapd-full.config meta-filogic/recipes-wifi/hostapd/files/ |
| 68 | cp mac80211_package/package/network/services/hostapd/files/wpa_supplicant-full.config meta-filogic/recipes-wifi/wpa-supplicant/files/ |
| 69 | #sed -i 's/CONFIG_UBUS=y.*//g' meta-filogic/recipes-wifi/hostapd/files/hostapd-full.config |
| 70 | #sed -i 's/CONFIG_UBUS=y.*//g' meta-filogic/recipes-wifi/wpa-supplicant/files/wpa_supplicant-full.config |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 71 | |
| 72 | echo "Update hostapd bb file version.........." |
| 73 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/network/services/hostapd/Makefile | cut -c 21-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 74 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-wifi/hostapd/hostapd_2.10.bb |
| 75 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-wifi/wpa-supplicant/wpa-supplicant_2.10.bb |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 76 | |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 77 | echo "GEN iw patches.........." |
| 78 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/utils/iw |
| 79 | cd mac80211_package/package/network/utils/iw |
developer | 16b198b | 2022-08-02 11:14:02 +0800 | [diff] [blame] | 80 | #remove patches not work for wifi hal |
| 81 | rm -rf patches/200-reduce_size.patch |
| 82 | |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 83 | ./rdkb_inc_helper patches |
| 84 | mv patches.inc patches |
| 85 | |
| 86 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 87 | rm -rf meta-filogic/recipes-wifi/iw/patches |
| 88 | cp -rf mac80211_package/package/network/utils/iw/patches meta-filogic/recipes-wifi/iw |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 89 | ver=`grep "PKG_VERSION:=" mac80211_package/package/network/utils/iw/Makefile | cut -c 14-` |
| 90 | newbb=iw_${ver}.bb |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 91 | cd meta-filogic/recipes-wifi/iw/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 92 | oldbb=`ls *.bb` |
| 93 | echo "Update iw bb file name.........." |
| 94 | mv ${oldbb} ${newbb} |
| 95 | cd - |
| 96 | |
| 97 | echo "Update iw bb hash .........." |
| 98 | hash1=`grep "PKG_HASH" mac80211_package/package/network/utils/iw/Makefile | cut -c 11-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 99 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${hash1}'"/g' meta-filogic/recipes-wifi/iw/${newbb} |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 100 | |
| 101 | echo "Gen wireless-regdb patches.........." |
| 102 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/firmware/wireless-regdb/ |
| 103 | cd mac80211_package/package/firmware/wireless-regdb/ |
| 104 | ./rdkb_inc_helper patches |
| 105 | mv patches.inc patches |
| 106 | |
| 107 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 108 | rm -rf meta-filogic/recipes-wifi/wireless-regdb/files/patches |
| 109 | cp -rf mac80211_package/package/firmware/wireless-regdb/patches meta-filogic/recipes-wifi/wireless-regdb/files/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 110 | ver=`grep "PKG_VERSION:=" mac80211_package/package/firmware/wireless-regdb/Makefile | cut -c 14-` |
| 111 | newbb=wireless-regdb_${ver}.bb |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 112 | cd meta-filogic/recipes-wifi/wireless-regdb/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 113 | oldbb=`ls *.bb` |
| 114 | echo "Update wireless-regdb bb file name.........." |
| 115 | mv ${oldbb} ${newbb} |
| 116 | cd - |
| 117 | |
| 118 | echo "Update wireless-regdb bb hash.........." |
| 119 | hash1=`grep "PKG_HASH" mac80211_package/package/firmware/wireless-regdb/Makefile | cut -c 11-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 120 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${hash1}'"/g' meta-filogic/recipes-wifi/wireless-regdb/${newbb} |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 121 | |
developer | b8a4a34 | 2022-07-04 10:11:28 +0800 | [diff] [blame] | 122 | echo "Update libubox version.........." |
| 123 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/libs/libubox/Makefile | cut -c 21-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 124 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-wifi/libubox/libubox_git.bbappend |
developer | b8a4a34 | 2022-07-04 10:11:28 +0800 | [diff] [blame] | 125 | |
| 126 | echo "Update ubus version.........." |
| 127 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/system/ubus/Makefile | cut -c 21-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 128 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-wifi/ubus/ubus_git.bb |
developer | b8a4a34 | 2022-07-04 10:11:28 +0800 | [diff] [blame] | 129 | |
| 130 | echo "Update libnl-tiny version.........." |
| 131 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/libs/libnl-tiny/Makefile | cut -c 21-` |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 132 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-wifi/libnl-tiny/libnl-tiny_git.bb |
developer | b8a4a34 | 2022-07-04 10:11:28 +0800 | [diff] [blame] | 133 | |
developer | 752a122 | 2022-10-11 16:19:00 +0800 | [diff] [blame] | 134 | echo "Update atenl ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 135 | cp -rf mtk_openwrt_feeds/feed/atenl/src meta-filogic/recipes-wifi/atenl/files/ |
| 136 | cp -f mtk_openwrt_feeds/feed/atenl/files/ated.sh meta-filogic/recipes-wifi/atenl/files/ |
| 137 | cp -f mtk_openwrt_feeds/feed/atenl/files/iwpriv.sh meta-filogic/recipes-wifi/atenl/files/ |
developer | 752a122 | 2022-10-11 16:19:00 +0800 | [diff] [blame] | 138 | |
developer | e2f847d | 2022-10-12 16:37:58 +0800 | [diff] [blame] | 139 | echo "Update mt76-verdor ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 140 | cp -rf mtk_openwrt_feeds/feed/mt76-vendor/src meta-filogic/recipes-wifi/mt76-vendor/files/ |
developer | e2f847d | 2022-10-12 16:37:58 +0800 | [diff] [blame] | 141 | |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 142 | echo "Update Wmm Script ......." |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame^] | 143 | cp -rf autobuild_v5/mt7986-mac80211/target/linux/mediatek/base-files/sbin/wmm-*.sh meta-filogic/recipes-wifi/wifi-test-tool/files/wmm_script |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 144 | |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 145 | echo "Sync from OpenWRT done , ready to commit meta-filogic!!!" |