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 |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 4 | git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 5 | git clone --branch master https://gerrit.mediatek.inc/gateway/autobuild_v5 |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 6 | git clone https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic |
| 7 | |
| 8 | echo "copy.........." |
| 9 | mkdir -p mac80211_package/package/kernel/mt76/patches |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 10 | rm -rf mac80211_package/package/kernel/mac80211 |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 11 | cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/package/ mac80211_package/ |
| 12 | |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 13 | echo "gen wifi mt76 patches.........." |
developer | 1969457 | 2022-04-18 19:58:01 +0800 | [diff] [blame] | 14 | 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] | 15 | cd mac80211_package/package/kernel/mt76 |
| 16 | ./rdkb_inc_helper patches |
| 17 | mv patches.inc patches |
| 18 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 19 | rm -rf meta-filogic/recipes-wifi/linux-mt76/files/patches |
| 20 | 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] | 21 | |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 22 | echo "gen wifi6 mac80211 patches.........." |
| 23 | tar xvf mtk_openwrt_feeds/autobuild_mac80211_release/package/kernel/mac80211/mac80211_v5.15.81_077622a1.tar.gz -C mac80211_package/package/kernel/ |
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 | a52defa | 2022-12-09 13:01:55 +0800 | [diff] [blame] | 45 | sed -i 's/PV =.*/PV = "'${ver2%-*}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211_5.15.%.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 | a52defa | 2022-12-09 13:01:55 +0800 | [diff] [blame] | 47 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211_5.15.%.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 | 61b9b98 | 2022-11-10 12:05:10 +0800 | [diff] [blame] | 76 | #cp openwrt hostapd script |
| 77 | cp -rf mac80211_package/package/network/services/hostapd/files/hostapd.sh meta-filogic/recipes-wifi/hostapd/files/openwrt_script/ |
| 78 | cp -rf mac80211_package/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh meta-filogic/recipes-wifi/hostapd/files/openwrt_script/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 79 | echo "GEN iw patches.........." |
| 80 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/utils/iw |
| 81 | cd mac80211_package/package/network/utils/iw |
developer | 16b198b | 2022-08-02 11:14:02 +0800 | [diff] [blame] | 82 | #remove patches not work for wifi hal |
| 83 | rm -rf patches/200-reduce_size.patch |
| 84 | |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 85 | ./rdkb_inc_helper patches |
| 86 | mv patches.inc patches |
| 87 | |
| 88 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 89 | rm -rf meta-filogic/recipes-wifi/iw/patches |
| 90 | 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] | 91 | ver=`grep "PKG_VERSION:=" mac80211_package/package/network/utils/iw/Makefile | cut -c 14-` |
| 92 | newbb=iw_${ver}.bb |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 93 | cd meta-filogic/recipes-wifi/iw/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 94 | oldbb=`ls *.bb` |
| 95 | echo "Update iw bb file name.........." |
| 96 | mv ${oldbb} ${newbb} |
| 97 | cd - |
| 98 | |
| 99 | echo "Update iw bb hash .........." |
| 100 | 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] | 101 | 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] | 102 | |
| 103 | echo "Gen wireless-regdb patches.........." |
| 104 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/firmware/wireless-regdb/ |
| 105 | cd mac80211_package/package/firmware/wireless-regdb/ |
| 106 | ./rdkb_inc_helper patches |
| 107 | mv patches.inc patches |
| 108 | |
| 109 | cd - |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 110 | rm -rf meta-filogic/recipes-wifi/wireless-regdb/files/patches |
| 111 | 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] | 112 | ver=`grep "PKG_VERSION:=" mac80211_package/package/firmware/wireless-regdb/Makefile | cut -c 14-` |
| 113 | newbb=wireless-regdb_${ver}.bb |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 114 | cd meta-filogic/recipes-wifi/wireless-regdb/ |
developer | 9eeda51 | 2022-06-16 13:36:36 +0800 | [diff] [blame] | 115 | oldbb=`ls *.bb` |
| 116 | echo "Update wireless-regdb bb file name.........." |
| 117 | mv ${oldbb} ${newbb} |
| 118 | cd - |
| 119 | |
| 120 | echo "Update wireless-regdb bb hash.........." |
| 121 | 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] | 122 | 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] | 123 | |
developer | b8a4a34 | 2022-07-04 10:11:28 +0800 | [diff] [blame] | 124 | echo "Update libubox version.........." |
| 125 | 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] | 126 | 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] | 127 | |
| 128 | echo "Update ubus version.........." |
| 129 | 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] | 130 | 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] | 131 | |
| 132 | echo "Update libnl-tiny version.........." |
| 133 | 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] | 134 | 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] | 135 | |
developer | 77d2640 | 2022-11-18 13:53:18 +0800 | [diff] [blame] | 136 | echo "Update iwinfo version.........." |
| 137 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/network/utils/iwinfo/Makefile | cut -c 21-` |
| 138 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-wifi/iwinfo/iwinfo_git.bb |
| 139 | |
developer | 752a122 | 2022-10-11 16:19:00 +0800 | [diff] [blame] | 140 | echo "Update atenl ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 141 | cp -rf mtk_openwrt_feeds/feed/atenl/src meta-filogic/recipes-wifi/atenl/files/ |
| 142 | cp -f mtk_openwrt_feeds/feed/atenl/files/ated.sh meta-filogic/recipes-wifi/atenl/files/ |
| 143 | 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] | 144 | |
developer | e2f847d | 2022-10-12 16:37:58 +0800 | [diff] [blame] | 145 | echo "Update mt76-verdor ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 146 | 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] | 147 | |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 148 | echo "Update Wmm Script ......." |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 149 | 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] | 150 | |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 151 | echo "update wifi7 mac80211" |
| 152 | rm -rf mac80211_package |
| 153 | git clone --branch master https://gerrit.mediatek.inc/openwrt/lede mac80211_package |
| 154 | |
| 155 | rm -rf mtk_openwrt_feeds/autobuild_mac80211_release/package/kernel/mac80211 |
| 156 | cd mtk_openwrt_feeds/autobuild_mac80211_release/package/kernel/ |
| 157 | mv mac80211_dev mac80211 |
| 158 | cd - |
| 159 | |
| 160 | echo "copy.........." |
| 161 | cp -rfa mtk_openwrt_feeds/autobuild_mac80211_release/package/ mac80211_package/ |
| 162 | |
| 163 | echo "gen wifi7 mac80211 patches.........." |
| 164 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/kernel/mac80211/patches |
| 165 | cd mac80211_package/package/kernel/mac80211/patches |
| 166 | ./rdkb_inc_helper subsys/ |
| 167 | ./rdkb_inc_helper build/ |
| 168 | mv subsys.inc subsys |
| 169 | mv build.inc build |
| 170 | mkdir patches |
| 171 | cp -r subsys patches |
| 172 | cp -r build patches |
| 173 | cd - |
| 174 | rm -rf meta-filogic/recipes-wifi/linux-mac80211/files/patches-6.x |
| 175 | cp -rf mac80211_package/package/kernel/mac80211/patches/patches meta-filogic/recipes-wifi/linux-mac80211/files/patches-6.x |
| 176 | |
| 177 | ver2=`grep "PKG_VERSION:=" mac80211_package/package/kernel/mac80211/Makefile | cut -c 14-` |
| 178 | sed -i 's/PV =.*/PV = "'${ver2}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211_6.%.bb |
| 179 | ver3=`grep "PKG_HASH" mac80211_package/package/kernel/mac80211/Makefile | cut -c 11-` |
| 180 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-wifi/linux-mac80211/linux-mac80211_6.%.bb |
| 181 | |
developer | 0e8c91d | 2022-12-26 16:23:55 +0800 | [diff] [blame] | 182 | echo "mt76_3.x patches for backport-6.x support " |
| 183 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mtk_openwrt_feeds/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76 |
| 184 | cd mtk_openwrt_feeds/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76 |
| 185 | ./rdkb_inc_helper patches |
| 186 | mv patches.inc patches |
| 187 | cd - |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 188 | rm -rf meta-filogic/recipes-wifi/linux-mt76/files/patches-3.x |
developer | 0e8c91d | 2022-12-26 16:23:55 +0800 | [diff] [blame] | 189 | cp -rf mtk_openwrt_feeds/autobuild_mac80211_release/mt7988_mt7996_mac80211/package/kernel/mt76/patches meta-filogic/recipes-wifi/linux-mt76/files/patches-3.x |
| 190 | #cp -rf meta-filogic/recipes-wifi/linux-mt76/files/patches meta-filogic/recipes-wifi/linux-mt76/files/patches-3.x |
developer | 392c596 | 2022-12-19 14:01:52 +0800 | [diff] [blame] | 191 | #rm -rf meta-filogic/recipes-wifi/linux-mt76/files/patches-3.x/*revert-for-backports*.patch |
developer | 0e8c91d | 2022-12-26 16:23:55 +0800 | [diff] [blame] | 192 | #sed -i 's/4003-mt76-revert-for-backports-5.15-wireless-stack.patch/&;apply=no/' meta-filogic/recipes-wifi/linux-mt76/files/patches-3.x/patches.inc |
developer | 6440941 | 2022-12-13 17:06:55 +0800 | [diff] [blame] | 193 | |
developer | 0f27dcd | 2022-12-26 20:07:32 +0800 | [diff] [blame^] | 194 | echo "gen new hostapd patches for mt76_3.x" |
| 195 | cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/services/hostapd |
| 196 | cd mac80211_package/package/network/services/hostapd |
| 197 | rm -rf patches/999*mtk*.patch |
| 198 | ./rdkb_inc_helper patches |
| 199 | mv patches.inc patches |
| 200 | echo "some patch do not apply to RDKB" |
| 201 | sed -i 's/450-scan_wait.patch/&;apply=no/' patches/patches.inc |
| 202 | #define new hostapd version |
| 203 | new_hostapd_ver=2.10.3 |
| 204 | cd - |
| 205 | rm -rf meta-filogic/recipes-wifi/hostapd/files/patches-${new_hostapd_ver} |
| 206 | rm -rf meta-filogic/recipes-wifi/wpa-supplicant/files/patches-${new_hostapd_ver} |
| 207 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-wifi/hostapd/files/patches-${new_hostapd_ver} |
| 208 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-wifi/wpa-supplicant/files/patches-${new_hostapd_ver} |
| 209 | |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 210 | echo "Sync from OpenWRT done , ready to commit meta-filogic!!!" |