blob: d93036768fbd010835e80e074d9ff8954e33cd81 [file] [log] [blame]
developer839fc602023-01-11 19:16:07 +08001#!/bin/sh
2echo "clone.........."
3git clone --branch master https://gerrit.mediatek.inc/openwrt/lede mac80211_package
4git clone --branch master https://gerrit.mediatek.inc/openwrt/feeds/mtk_openwrt_feeds
5git clone --branch master https://gerrit.mediatek.inc/gateway/autobuild_v5
developereab1cd72023-04-13 20:12:08 +08006git clone --branch master https://gerrit.mediatek.inc/gateway/big_sw
developere15e9832023-06-01 17:34:07 +08007git clone --branch master https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic-logan
8git clone --branch master https://gerrit.mediatek.inc/gateway/rdk-b/meta-filogic
developer839fc602023-01-11 19:16:07 +08009
developereab1cd72023-04-13 20:12:08 +080010echo "sync hostapd patch from openWrt"
developere15e9832023-06-01 17:34:07 +080011cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd
12cd autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd
13./rdkb_inc_helper patches
14mv patches.inc patches
developereab1cd72023-04-13 20:12:08 +080015
developere15e9832023-06-01 17:34:07 +080016cd -
17rm -rf meta-filogic-logan/recipes-wifi/hostapd/files/patches
18rm -rf meta-filogic-logan/recipes-wifi/wpa-supplicant/files/patches
19cp -rf autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/patches meta-filogic-logan/recipes-wifi/hostapd/files/
20cp -rf autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/patches meta-filogic-logan/recipes-wifi/wpa-supplicant/files/
21rm -rf meta-filogic-logan/recipes-wifi/hostapd/files/src
22rm -rf meta-filogic-logan/recipes-wifi/wpa-supplicant/files/src
23cp -rf autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/src meta-filogic-logan/recipes-wifi/hostapd/files/
24cp -rf autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/src meta-filogic-logan/recipes-wifi/wpa-supplicant/files/
25echo "cp defconfig and remove ubus"
26cp autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/files/hostapd-full.config meta-filogic-logan/recipes-wifi/hostapd/files/
27cp autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/files/wpa_supplicant-full.config meta-filogic-logan/recipes-wifi/wpa-supplicant/files/
developereab1cd72023-04-13 20:12:08 +080028
developere15e9832023-06-01 17:34:07 +080029echo "Update hostapd bb file version.........."
30ver=`grep "PKG_SOURCE_VERSION" autobuild_v5/mt7988-mt7990-BE19000/package/network/services/hostapd/Makefile | cut -c 21-`
31sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic-logan/recipes-wifi/hostapd/hostapd_2.10.bb
32sed -i 's/SRCREV ?=.*/SRCREV ?= "'$ver'"/g' meta-filogic-logan/recipes-wifi/wpa-supplicant/wpa-supplicant_2.10.bb
developereab1cd72023-04-13 20:12:08 +080033
34echo "sync wifi profile from openWrt"
35#remove old profile
36rm -rf meta-filogic-logan/recipes-wifi/mt-wifi7/files/wireless/mediatek
37
38#copy new profile from openwrt
39mkdir -p meta-filogic-logan/recipes-wifi/mt-wifi7/files/wireless/mediatek
40cp -f big_sw/mtk/drivers/wifi-profile/files/mt7990/* meta-filogic-logan/recipes-wifi/mt-wifi7/files/wireless/mediatek
41
42
developer825ab6a2023-01-18 13:58:01 +080043echo "sync wifi config from openWrt"
44#remove old config
developer4914e572023-01-30 10:22:29 +080045rm -rf meta-filogic-logan/recipes-wifi/mt-wifi7/files/config
46
developer825ab6a2023-01-18 13:58:01 +080047#copy new config from openwrt
developer4914e572023-01-30 10:22:29 +080048mkdir -p meta-filogic-logan/recipes-wifi/mt-wifi7/files/config
49#copy origin openwrt config
50cp -f autobuild_v5/mt7988-mt7990-BE19000/.config meta-filogic-logan/recipes-wifi/mt-wifi7/files/config/openwrt_mt7990-be19000_config
51cp -f autobuild_v5/mt7988-mt7992-BE7200/.config meta-filogic-logan/recipes-wifi/mt-wifi7/files/config/openwrt_mt7992-be7200_config
52cp meta-cmf-filogic/mtk_scripts/rdkb_logan_config_helper meta-filogic-logan/recipes-wifi/mt-wifi7/files/config
53cp meta-filogic-logan/recipes-wifi/mt-wifi7/files/make-l1profile.py meta-filogic-logan/recipes-wifi/mt-wifi7/files/config
54#gen wifi config and l1 profile by different openwrt config
55cd meta-filogic-logan/recipes-wifi/mt-wifi7/files/config
56./rdkb_logan_config_helper openwrt_mt7990-be19000_config mt7990-be19000
57./rdkb_logan_config_helper openwrt_mt7992-be7200_config mt7992-be7200
58python make-l1profile.py openwrt_mt7990-be19000_config mt7990-be19000.dat
59python make-l1profile.py openwrt_mt7992-be7200_config mt7992-be7200.dat
60#remove script
developer825ab6a2023-01-18 13:58:01 +080061rm -f rdkb_logan_config_helper
developer4914e572023-01-30 10:22:29 +080062rm -f make-l1profile.py
developer825ab6a2023-01-18 13:58:01 +080063
64cd -
65
developer839fc602023-01-11 19:16:07 +080066echo "GEN iw patches.........."
67cp meta-cmf-filogic/mtk_scripts/rdkb_inc_helper mac80211_package/package/network/utils/iw
68cd mac80211_package/package/network/utils/iw
69#remove patches not work for wifi hal
70rm -rf patches/200-reduce_size.patch
71
72./rdkb_inc_helper patches
73mv patches.inc patches
74
75cd -
76rm -rf meta-filogic-logan/recipes-wifi/iw/patches
77cp -rf mac80211_package/package/network/utils/iw/patches meta-filogic-logan/recipes-wifi/iw
78ver=`grep "PKG_VERSION:=" mac80211_package/package/network/utils/iw/Makefile | cut -c 14-`
79newbb=iw_${ver}.bb
80cd meta-filogic-logan/recipes-wifi/iw/
81oldbb=`ls *.bb`
82echo "Update iw bb file name.........."
83mv ${oldbb} ${newbb}
84cd -
85
86echo "Update iw bb hash .........."
87hash1=`grep "PKG_HASH" mac80211_package/package/network/utils/iw/Makefile | cut -c 11-`
88sed -i 's/SRC_URI\[sha256sum\].*/SRC_URI[sha256sum] = "'${hash1}'"/g' meta-filogic-logan/recipes-wifi/iw/${newbb}
89
developer839fc602023-01-11 19:16:07 +080090
developer839fc602023-01-11 19:16:07 +080091
92echo "Update libubox version.........."
93ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/libs/libubox/Makefile | cut -c 21-`
94sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic-logan/recipes-wifi/libubox/libubox_git.bbappend
95
96echo "Update ubus version.........."
97ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/system/ubus/Makefile | cut -c 21-`
98sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic-logan/recipes-wifi/ubus/ubus_git.bb
99
100echo "Update libnl-tiny version.........."
101ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/libs/libnl-tiny/Makefile | cut -c 21-`
102sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic-logan/recipes-wifi/libnl-tiny/libnl-tiny_git.bb
103
104echo "Update iwinfo version.........."
105ver=`grep "PKG_SOURCE_VERSION" mac80211_package/package/network/utils/iwinfo/Makefile | cut -c 21-`
106sed -i 's/SRCREV =.*/SRCREV = "'$ver'"/g' meta-filogic-logan/recipes-wifi/iwinfo/iwinfo_git.bb
107
developer66a4fa92023-01-17 12:42:26 +0800108echo "sync ccsp hal wifi-test-tool from meta-filogic"
109rm -rf meta-filogic-logan/recipes-wifi/ccsp
110cp -rf meta-filogic/recipes-wifi/ccsp meta-filogic-logan/recipes-wifi/ccsp
111rm -rf meta-filogic-logan/recipes-wifi/hal/files meta-filogic-logan/recipes-wifi/hal/halinterface.bbappend
112cp -rf meta-filogic/recipes-wifi/hal/files meta-filogic-logan/recipes-wifi/hal/files
113cp -f meta-filogic/recipes-wifi/hal/halinterface.bbappend meta-filogic-logan/recipes-wifi/hal/halinterface.bbappend
114rm -rf meta-filogic-logan/recipes-wifi/wifi-test-tool
115cp -rf meta-filogic/recipes-wifi/wifi-test-tool meta-filogic-logan/recipes-wifi/wifi-test-tool
developer839fc602023-01-11 19:16:07 +0800116echo "Sync from OpenWRT done , ready to commit meta-filogic-logan!!!"