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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 20 | rm -rf meta-filogic/recipes-connectivity/linux-mt76/files/patches |
| 21 | cp -rf mac80211_package/package/kernel/mt76/patches meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 34 | rm -rf meta-filogic/recipes-connectivity/linux-mac80211/files/patches |
| 35 | cp -rf mac80211_package/package/kernel/mac80211/patches/patches meta-filogic/recipes-connectivity/linux-mac80211/files |
developer | 843fd2b | 2022-04-15 18:30:12 +0800 | [diff] [blame] | 36 | |
| 37 | echo "copy mt76 firmware.........." |
developer | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 38 | rm -rf meta-filogic/recipes-connectivity/linux-mt76/files/src |
| 39 | cp -rf mac80211_package/package/kernel/mt76/src meta-filogic/recipes-connectivity/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 | 303006d | 2022-10-31 14:38:22 +0800 | [diff] [blame] | 43 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 45 | sed -i 's/PV =.*/PV = "'${ver2%-*}'"/g' meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 47 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${ver3}'"/g' meta-filogic/recipes-connectivity/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 - |
| 58 | rm -rf meta-filogic/recipes-connectivity/hostapd/files/patches |
developer | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 59 | rm -rf meta-filogic/recipes-connectivity/wpa-supplicant/files/patches |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 60 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-connectivity/hostapd/files/ |
developer | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 61 | cp -rf mac80211_package/package/network/services/hostapd/patches meta-filogic/recipes-connectivity/wpa-supplicant/files/ |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 62 | rm -rf meta-filogic/recipes-connectivity/hostapd/files/src |
developer | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 63 | rm -rf meta-filogic/recipes-connectivity/wpa-supplicant/files/src |
developer | 64ad4e6 | 2022-04-29 18:17:53 +0800 | [diff] [blame] | 64 | cp -rf mac80211_package/package/network/services/hostapd/src meta-filogic/recipes-connectivity/hostapd/files/ |
developer | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 65 | cp -rf mac80211_package/package/network/services/hostapd/src meta-filogic/recipes-connectivity/wpa-supplicant/files/ |
developer | 8bbedcf | 2022-05-03 12:58:56 +0800 | [diff] [blame] | 66 | echo "cp defconfig and remove ubus" |
| 67 | cp mac80211_package/package/network/services/hostapd/files/hostapd-full.config meta-filogic/recipes-connectivity/hostapd/files/ |
developer | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 68 | cp mac80211_package/package/network/services/hostapd/files/wpa_supplicant-full.config meta-filogic/recipes-connectivity/wpa-supplicant/files/ |
developer | d1ddf8e | 2022-06-27 19:50:04 +0800 | [diff] [blame] | 69 | #sed -i 's/CONFIG_UBUS=y.*//g' meta-filogic/recipes-connectivity/hostapd/files/hostapd-full.config |
| 70 | #sed -i 's/CONFIG_UBUS=y.*//g' meta-filogic/recipes-connectivity/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 | 0f40025 | 2022-05-09 13:14:07 +0800 | [diff] [blame] | 74 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-connectivity/hostapd/hostapd_2.10.bb |
| 75 | sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic/recipes-connectivity/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 - |
| 87 | rm -rf meta-filogic/recipes-connectivity/iw/patches |
| 88 | cp -rf mac80211_package/package/network/utils/iw/patches meta-filogic/recipes-connectivity/iw |
| 89 | ver=`grep "PKG_VERSION:=" mac80211_package/package/network/utils/iw/Makefile | cut -c 14-` |
| 90 | newbb=iw_${ver}.bb |
| 91 | cd meta-filogic/recipes-connectivity/iw/ |
| 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-` |
| 99 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${hash1}'"/g' meta-filogic/recipes-connectivity/iw/${newbb} |
| 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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 108 | rm -rf meta-filogic/recipes-connectivity/wireless-regdb/files/patches |
| 109 | cp -rf mac80211_package/package/firmware/wireless-regdb/patches meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 112 | cd meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 120 | sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${hash1}'"/g' meta-filogic/recipes-connectivity/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-` |
| 124 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-connectivity/libubox/libubox_git.bbappend |
| 125 | |
| 126 | echo "Update ubus version.........." |
| 127 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/system/ubus/Makefile | cut -c 21-` |
| 128 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-connectivity/ubus/ubus_git.bb |
| 129 | |
| 130 | echo "Update libnl-tiny version.........." |
| 131 | ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/libs/libnl-tiny/Makefile | cut -c 21-` |
| 132 | sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic/recipes-connectivity/libnl-tiny/libnl-tiny_git.bb |
| 133 | |
developer | 752a122 | 2022-10-11 16:19:00 +0800 | [diff] [blame] | 134 | echo "Update atenl ...... " |
developer | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 135 | cp -rf mtk_openwrt_feeds/feed/atenl/src meta-filogic/recipes-connectivity/atenl/files/ |
| 136 | cp -f mtk_openwrt_feeds/feed/atenl/files/ated.sh meta-filogic/recipes-connectivity/atenl/files/ |
| 137 | cp -f mtk_openwrt_feeds/feed/atenl/files/iwpriv.sh meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 140 | cp -rf mtk_openwrt_feeds/feed/mt76-vendor/src meta-filogic/recipes-connectivity/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 | 2122dd0 | 2022-10-31 13:17:48 +0800 | [diff] [blame] | 143 | cp -rf autobuild_v5/mt7986-mac80211/target/linux/mediatek/base-files/sbin/wmm-*.sh meta-filogic/recipes-connectivity/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!!!" |