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 | 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 | 752a122 | 2022-10-11 16:19:00 +0800 | [diff] [blame] | 136 | echo "Update atenl ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 137 | cp -rf mtk_openwrt_feeds/feed/atenl/src meta-filogic/recipes-wifi/atenl/files/ |
| 138 | cp -f mtk_openwrt_feeds/feed/atenl/files/ated.sh meta-filogic/recipes-wifi/atenl/files/ |
| 139 | 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] | 140 | |
developer | e2f847d | 2022-10-12 16:37:58 +0800 | [diff] [blame] | 141 | echo "Update mt76-verdor ...... " |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 142 | 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] | 143 | |
developer | d728d7c | 2022-10-25 13:45:17 +0800 | [diff] [blame] | 144 | echo "Update Wmm Script ......." |
developer | c480fbb | 2022-11-07 18:39:36 +0800 | [diff] [blame] | 145 | 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] | 146 | |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 147 | echo "Sync from OpenWRT done , ready to commit meta-filogic!!!" |