blob: cf973058320b8e05aad22001531ada121ee0fcc7 [file] [log] [blame]
developerb11a5392022-03-31 00:34:47 +08001#!/bin/bash
2source ./autobuild/lede-build-sanity.sh
3
4#get the brach_name
5temp=${0%/*}
6branch_name=${temp##*/}
7
8rm -rf ${BUILD_DIR}/package/network/services/hostapd
9cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/services/hostapd ${BUILD_DIR}/package/network/services
10
11rm -rf ${BUILD_DIR}/package/libs/libnl-tiny
12cp -fpR ${BUILD_DIR}/./../mac80211_package/package/libs/libnl-tiny ${BUILD_DIR}/package/libs
13
14rm -rf ${BUILD_DIR}/package/network/utils/iw
15cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/iw ${BUILD_DIR}/package/network/utils
16
17rm -rf ${BUILD_DIR}/package/network/utils/iwinfo
18cp -fpR ${BUILD_DIR}/./../mac80211_package/package/network/utils/iwinfo ${BUILD_DIR}/package/network/utils
19
20rm -rf ${BUILD_DIR}/package/kernel/mac80211
21cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mac80211 ${BUILD_DIR}/package/kernel
22
23cp -fpR ${BUILD_DIR}/./../mac80211_package/package/kernel/mt76/Makefile ${BUILD_DIR}/package/kernel/mt76
24
25#step1 clean
26#clean
27
28#do prepare stuff
29prepare
30
31#hack mt7986 config5.4
32echo "CONFIG_NETFILTER=y" >> ./target/linux/mediatek/mt7986/config-5.4
33echo "CONFIG_NETFILTER_ADVANCED=y" >> ./target/linux/mediatek/mt7986/config-5.4
34echo "CONFIG_RELAY=y" >> ./target/linux/mediatek/mt7986/config-5.4
35
36#hack mt7986 hostapd config
37echo "CONFIG_MBO=y" >> ./package/network/services/hostapd/files/hostapd-full.config
38echo "CONFIG_WPS_UPNP=y" >> ./package/network/services/hostapd/files/hostapd-full.config
39
40prepare_mac80211
41
42find ${BUILD_DIR}/package/kernel/mt76/patches -name "*-mt76-*.patch" -delete
43
44prepare_final ${branch_name}
45
46cp -fpR ${BUILD_DIR}/autobuild/mt7986-mac80211/target/linux/mediatek/patches-5.4 ${BUILD_DIR}/target/linux/mediatek
47
48
49#step2 build
50if [ -z ${1} ]; then
51 build ${branch_name} -j1 || [ "$LOCAL" != "1" ]
52fi