developer | 1d1e456 | 2022-03-17 00:06:34 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | source ./autobuild/lede-build-sanity.sh |
| 3 | #get the brach_name |
| 4 | temp=${0%/*} |
| 5 | branch_name=${temp##*/} |
| 6 | |
| 7 | rm -rf ${BUILD_DIR}/package/network/services/hostapd |
| 8 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/services/hostapd ${BUILD_DIR}/package/network/services |
| 9 | |
| 10 | rm -rf ${BUILD_DIR}/package/libs/libnl-tiny |
| 11 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/libs/libnl-tiny ${BUILD_DIR}/package/libs |
| 12 | |
| 13 | rm -rf ${BUILD_DIR}/package/network/utils/iw |
| 14 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/iw ${BUILD_DIR}/package/network/utils |
| 15 | |
| 16 | rm -rf ${BUILD_DIR}/package/network/utils/iwinfo |
| 17 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/iwinfo ${BUILD_DIR}/package/network/utils |
| 18 | |
| 19 | rm -rf ${BUILD_DIR}/package/kernel/mac80211 |
| 20 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mac80211 ${BUILD_DIR}/package/kernel |
| 21 | |
| 22 | cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mt76 ${BUILD_DIR}/package/kernel |
| 23 | |
| 24 | #use hostapd master package revision, remove hostapd master patches |
| 25 | find ../mtk-openwrt-feeds/openwrt_patches-21.02 -name "*-2102-hostapd-*.patch" -delete |
| 26 | |
| 27 | #step1 clean |
| 28 | #clean |
| 29 | |
| 30 | #do prepare stuff |
| 31 | prepare |
| 32 | |
| 33 | #hack mt7622 config-5.4 |
| 34 | echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7622/config-5.4 |
| 35 | echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7622/config-5.4 |
| 36 | |
| 37 | #hack hostapd config |
| 38 | echo "CONFIG_MBO=y" >> ./package/network/services/hostapd/files/hostapd-full.config |
| 39 | echo "CONFIG_WPS_UPNP=y" >> ./package/network/services/hostapd/files/hostapd-full.config |
| 40 | echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7622/config-5.4 |
| 41 | |
| 42 | prepare_final ${branch_name} |
| 43 | |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 44 | #copy mt7915/mt7916/mt7986 default eeprom |
| 45 | FW_SOURCE_DIR=${BUILD_DIR}/package/kernel/mt76/src/firmware |
| 46 | mkdir -p ${FW_SOURCE_DIR} |
| 47 | cp -rf ../mtk-openwrt-feeds/autobuild_mac80211_release/default_bins/* ${FW_SOURCE_DIR} |
| 48 | |
| 49 | #hack hostapd/mac80211/mt76 package in master branch |
developer | 1d1e456 | 2022-03-17 00:06:34 +0800 | [diff] [blame] | 50 | patch -f -p1 -i ${BUILD_DIR}/autobuild/0001-master-mac80211-generate-hostapd-setting-from-ap-cap.patch |
| 51 | patch -f -p1 -i ${BUILD_DIR}/autobuild/0002-master-hostapd-makefile-for-utils.patch |
developer | 2cf5f9a | 2022-03-25 02:46:17 +0800 | [diff] [blame] | 52 | patch -f -p1 -i ${BUILD_DIR}/autobuild/0003-master-mt76-makefile-for-new-chip.patch |
| 53 | |
developer | 1d1e456 | 2022-03-17 00:06:34 +0800 | [diff] [blame] | 54 | #step2 build |
| 55 | build ${branch_name} -j1 || [ "$LOCAL" != "1" ] |