[][MAC80211][misc][sync MT7996 mp2.0 FW]
[Description]
Refactor build script to sync with internal.
Update MT7996 mp2.0 FW to 20230516
[Release-log]
N/A
Change-Id: Ia7f87f9de0984c5dd300a070066432ec7b51fb84
Reviewed-on: https://gerrit.mediatek.inc/c/openwrt/feeds/mtk_openwrt_feeds/+/7589044
diff --git a/autobuild_mac80211_release/lede-build-sanity.sh b/autobuild_mac80211_release/lede-build-sanity.sh
index fd0ef62..1b060e5 100755
--- a/autobuild_mac80211_release/lede-build-sanity.sh
+++ b/autobuild_mac80211_release/lede-build-sanity.sh
@@ -114,6 +114,9 @@
add_proprietary_kernel_files
+ #add common patch
+ cp -rfa ${BUILD_DIR}/autobuild/package ${BUILD_DIR}
+
#do mtk_wifi openwrt patch
do_patch ${BUILD_DIR}/autobuild/openwrt_patches${OPENWRT_VER}/mtk_wifi || exit 1
}
@@ -130,18 +133,21 @@
cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/bpf-headers ${BUILD_DIR}/package/kernel
- rm -rf ${BUILD_DIR}/package/network/utils/bpftools
- cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/bpftools ${BUILD_DIR}/package/network/utils
+ rm -rf ${BUILD_DIR}/package/network/utils/bpftool*
+ cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/bpftool ${BUILD_DIR}/package/network/utils
+
+ rm -rf ${BUILD_DIR}/package/libs/libbpf
+ cp -fpR ${BUILD_DIR}/./../mac80211_package/package/libs/libbpf ${BUILD_DIR}/package/libs
rm -rf ${BUILD_DIR}/package/network/utils/iproute2
cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/iproute2 ${BUILD_DIR}/package/network/utils
cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/services/bridger ${BUILD_DIR}/package/network/services
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0010-add-llvm_bpf-toolchain.patch
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0010-add-llvm_bpf-toolchain.patch || exit 1
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0004-2102-netfilter-remove-nf_flow_table_hw.patch
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0005-add-netfilter-netlink-ftnl-package.patch
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0004-2102-netfilter-remove-nf_flow_table_hw.patch || exit 1
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0005-add-netfilter-netlink-ftnl-package.patch || exit 1
#rm patches for flowblock
rm -rf ./target/linux/generic/pending-5.4/64*.patch
@@ -153,27 +159,33 @@
echo "CONFIG_BRIDGE_NETFILTER=y" >> ./target/linux/mediatek/mt7988/config-5.4
echo "CONFIG_NETFILTER_FAMILY_BRIDGE=y" >> ./target/linux/mediatek/mt7988/config-5.4
echo "CONFIG_SKB_EXTENSIONS=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7988/config-5.4
#hack mt7986 config5.4
echo "CONFIG_BRIDGE_NETFILTER=y" >> ./target/linux/mediatek/mt7986/config-5.4
echo "CONFIG_NETFILTER_FAMILY_BRIDGE=y" >> ./target/linux/mediatek/mt7986/config-5.4
echo "CONFIG_SKB_EXTENSIONS=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7986/config-5.4
#hack mt7622 config5.4
echo "CONFIG_BRIDGE_NETFILTER=y" >> ./target/linux/mediatek/mt7622/config-5.4
echo "CONFIG_NETFILTER_FAMILY_BRIDGE=y" >> ./target/linux/mediatek/mt7622/config-5.4
echo "CONFIG_SKB_EXTENSIONS=y" >> ./target/linux/mediatek/mt7622/config-5.4
+ echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7622/config-5.4
+ echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7622/config-5.4
}
prepare_mac80211() {
rm -rf ${BUILD_DIR}/package/network/services/hostapd
if [ $2 = "1" ]; then
- echo "========================Hostapd_v2.10_20230329===================="
+ echo "========================Hostapd NEW==================="
cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/services/hostapd ${BUILD_DIR}/package/network/services
rm -rf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/network/services/hostapd
mv ${MTK_FEED_DIR}/autobuild_mac80211_release/package/network/services/hostapd_new ${MTK_FEED_DIR}/autobuild_mac80211_release/package/network/services/hostapd
else
- echo "========================Hostapd_v2.10_20220729==================="
+ echo "========================Hostapd OLD==================="
tar xvf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/network/services/hostapd/hostapd_v2.10_07730ff3.tar.gz -C ${BUILD_DIR}/package/network/services/
rm -rf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/network/services/hostapd/hostapd_v2.10_07730ff3.tar.gz
fi
@@ -199,7 +211,7 @@
else
echo "=========================MAC80211 v5.15=================="
tar xvf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/kernel/mac80211/mac80211_v5.15.81_077622a1.tar.gz -C ${BUILD_DIR}/package/kernel/
- rm -rf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/kernel/mac80211/mac80211_v5.15.81_077622a1.tar.gz
+ rm -rf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/kernel/mac80211/mac80211_v5.15.81_077622a1.tar.gz
fi
rm -rf ${BUILD_DIR}/package/firmware/wireless-regdb
@@ -211,8 +223,12 @@
rm -rf ${BUILD_DIR}/package/kernel/mt76/src
cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mt76 ${BUILD_DIR}/package/kernel
- #hack hostapd config
+ # hack hostapd config
echo "CONFIG_MBO=y" >> ./package/network/services/hostapd/files/hostapd-full.config
+ echo "CONFIG_SAE_PK=y" >> ./package/network/services/hostapd/files/hostapd-full.config
+ echo "CONFIG_TESTING_OPTIONS=y" >> ./package/network/services/hostapd/files/hostapd-full.config
+ echo "CONFIG_HS20=y" >> ./package/network/services/hostapd/files/hostapd-full.config
+ echo "CONFIG_P2P_MANAGER=y" >> ./package/network/services/hostapd/files/hostapd-full.config
echo "CONFIG_WPS_UPNP=y" >> ./package/network/services/hostapd/files/hostapd-full.config
echo "CONFIG_DPP=y" >> ./package/network/services/hostapd/files/hostapd-full.config
echo "CONFIG_DPP2=y" >> ./package/network/services/hostapd/files/hostapd-full.config
@@ -220,13 +236,38 @@
echo "CONFIG_DPP=y" >> ./package/network/services/hostapd/files/wpa_supplicant-full.config
echo "CONFIG_DPP2=y" >> ./package/network/services/hostapd/files/wpa_supplicant-full.config
echo "CONFIG_DPP3=y" >> ./package/network/services/hostapd/files/wpa_supplicant-full.config
- ### add configuration for STA wireless mode setting
+ # add configuration for STA wireless mode setting
echo "CONFIG_HE_OVERRIDES=y" >> ./package/network/services/hostapd/files/wpa_supplicant-full.config
echo "CONFIG_EHT_OVERRIDES=y" >> ./package/network/services/hostapd/files/wpa_supplicant-full.config
+ # hack mt7988 config5.4
+ echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_BLK_MQ_VIRTIO=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_DEV_COREDUMP=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_REMOTEPROC=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_VIRTIO=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_WANT_DEV_COREDUMP=y" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_VIRTIO_CONSOLE=n" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_VIRTIO_NET=n" >> ./target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_VIRTIO_BLK=n" >> ./target/linux/mediatek/mt7988/config-5.4
+
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0001-master-mac80211-generate-hostapd-setting-from-ap-cap.patch
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0002-master-hostapd-makefile-for-utils.patch
- patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0003-master-mt76-makefile-for-new-chip.patch
+ # hack mt7986 config5.4
+ echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_BLK_MQ_VIRTIO=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_DEV_COREDUMP=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_REMOTEPROC=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_VIRTIO=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_WANT_DEV_COREDUMP=y" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_VIRTIO_CONSOLE=n" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_VIRTIO_NET=n" >> ./target/linux/mediatek/mt7986/config-5.4
+ echo "CONFIG_VIRTIO_BLK=n" >> ./target/linux/mediatek/mt7986/config-5.4
+
+ # hack mt7622 config5.4
+ echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7622/config-5.4
+
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0001-master-mac80211-generate-hostapd-setting-from-ap-cap.patch || exit 1
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0002-master-hostapd-makefile-for-utils.patch || exit 1
+ patch -f -p1 -i ${MTK_FEED_DIR}/autobuild_mac80211_release/0003-master-mt76-makefile-for-new-chip.patch || exit 1
cp -rfa ${MTK_FEED_DIR}/autobuild_mac80211_release/package/ ${BUILD_DIR}
cp -rfa ${MTK_FEED_DIR}/autobuild_mac80211_release/target/ ${BUILD_DIR}
}
@@ -304,7 +345,9 @@
install_release() {
temp=${1#*mt}
- chip_name=${temp:0:4}
+ if [ -z ${chip_name} ]; then
+ chip_name=${temp:0:4}
+ fi
temp1=`grep "CONFIG_TARGET_ramips=y" autobuild/$1/.config`
if [ "${temp1}" == "CONFIG_TARGET_ramips=y" ]; then
diff --git a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
index df47bd4..05c3631 100755
--- a/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7986_mac80211/lede-branch-build-sanity.sh
@@ -18,8 +18,8 @@
kasan=1
;;
"dev")
- backport_new=1
- ;;
+ backport_new=1
+ ;;
*)
args="$args $arg"
;;
@@ -29,7 +29,7 @@
change_dot_config() {
[ "$swpath" = "1" ] && {
- sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
+ sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
sed -i 's/CONFIG_NETFILTER_FAMILY_BRIDGE=y/# CONFIG_NETFILTER_FAMILY_BRIDGE is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7986/config-5.4
sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7622/config-5.4
@@ -70,11 +70,6 @@
#do prepare stuff
prepare
-#hack mt7986 config5.4
-echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7986/config-5.4
-echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7986/config-5.4
-echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7986/config-5.4
-
prepare_flowoffload
prepare_mac80211 ${backport_new}
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config b/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
index 176446e..c111071 100644
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/.config
@@ -4508,7 +4508,7 @@
# CONFIG_PACKAGE_miniupnpd-1.6 is not set
# CONFIG_PACKAGE_mtk-efuse-nl-tool is not set
CONFIG_PACKAGE_regs=y
-# CONFIG_PACKAGE_sigma_daemon is not set
+CONFIG_PACKAGE_sigma_daemon=y
# CONFIG_PACKAGE_sigma_dut is not set
# CONFIG_PACKAGE_sigma_one is not set
CONFIG_PACKAGE_switch=y
diff --git a/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh b/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
index 9e8397f..7d40a33 100755
--- a/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
+++ b/autobuild_mac80211_release/mt7988_mt7996_mac80211/lede-branch-build-sanity.sh
@@ -4,15 +4,18 @@
#get the brach_name
temp=${0%/*}
branch_name=${temp##*/}
-hwpath=0
+swpath=0
backport_new=1
hostapd_new=1
args=
for arg in $*; do
case "$arg" in
- "hwpath")
- hwpath=1
+ "swpath")
+ swpath=1
+ ;;
+ "kasan")
+ kasan=1
;;
*)
args="$args $arg"
@@ -22,15 +25,35 @@
set -- $args
change_dot_config() {
- [ "$hwpath" = "0" ] && {
+ [ "$swpath" = "1" ] && {
echo "==========SW PATH========="
sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
sed -i 's/CONFIG_NETFILTER_FAMILY_BRIDGE=y/# CONFIG_NETFILTER_FAMILY_BRIDGE is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ sed -i '/AUTOLOAD:=$(call AutoProbe,mt7996e)/a\ MODPARAMS.mt7996e:=wed_enable=0' ${BUILD_DIR}/package/kernel/mt76/Makefile
}
[ "$backport_new" = "1" ] && {
rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*revert-for-backports*.patch
- }
+ }
+ [ "$kasan" = "1" ] && {
+ sed -i 's/# CONFIG_KERNEL_KASAN is not set/CONFIG_KERNEL_KASAN=y/g' ${BUILD_DIR}/.config
+ sed -i 's/# CONFIG_KERNEL_KALLSYMS is not set/CONFIG_KERNEL_KALLSYMS=y/g' ${BUILD_DIR}/.config
+ echo "CONFIG_KERNEL_KASAN_OUTLINE=y" >> ${BUILD_DIR}/.config
+ echo "CONFIG_DEBUG_KMEMLEAK=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_DEBUG_KMEMLEAK_AUTO_SCAN=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "# CONFIG_DEBUG_KMEMLEAK_DEFAULT_OFF is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE=16000" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_DEBUG_KMEMLEAK_TEST=m" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_KALLSYMS=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_KASAN=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_KASAN_GENERIC=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "# CONFIG_KASAN_INLINE is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_KASAN_OUTLINE=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_KASAN_SHADOW_OFFSET=0xdfffffd000000000" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "# CONFIG_TEST_KASAN is not set" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_SLUB_DEBUG=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ echo "CONFIG_FRAME_WARN=4096" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
+ }
}
#step1 clean
@@ -38,11 +61,6 @@
#do prepare stuff
prepare
-#hack mt7988 config5.4
-echo "CONFIG_NETFILTER=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
-echo "CONFIG_NETFILTER_ADVANCED=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
-echo "CONFIG_RELAY=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
-
prepare_flowoffload
#prepare mac80211 mt76 wifi stuff
@@ -53,7 +71,7 @@
# ========== specific modification on mt7996 autobuild for EHT support ==========
# patch hostapd to use latest version and add 11BE config
-patch -p1 < ${BUILD_DIR}/autobuild/${branch_name}/0002-add-EHT-config-for-hostapd.patch
+patch -p1 < ${BUILD_DIR}/autobuild/${branch_name}/0002-add-EHT-config-for-hostapd.patch || exit 1
# remove some iw patches to let EHT work normally
rm -rf ${BUILD_DIR}/package/network/utils/iw/patches/001-nl80211_h_sync.patch
diff --git a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_dsp.bin b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_dsp.bin
index d5d541f..a95a6bc 100755
--- a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_dsp.bin
+++ b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_dsp.bin
Binary files differ
diff --git a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_rom_patch.bin b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_rom_patch.bin
index 8a02116..5b5e33b 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_rom_patch.bin
+++ b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_rom_patch.bin
Binary files differ
diff --git a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wa.bin b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wa.bin
index 924509d..854c01c 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wa.bin
+++ b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wa.bin
Binary files differ
diff --git a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm.bin b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm.bin
index 5bbf475..4a60cc8 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm.bin
+++ b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm.bin
Binary files differ
diff --git a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm_tm.bin b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm_tm.bin
index 8f91f29..11bbd95 100644
--- a/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm_tm.bin
+++ b/autobuild_mac80211_release/package/kernel/mt76/src/firmware/mt7996/mt7996_wm_tm.bin
Binary files differ