blob: 53fc9175679e98362ec876b0e7d1f14f8044b3f9 [file] [log] [blame]
developer782053a2022-10-24 17:40:58 +08001#!/bin/bash
2source ./autobuild/lede-build-sanity.sh
3
4#get the brach_name
5temp=${0%/*}
6branch_name=${temp##*/}
developer4be8f972022-12-13 16:02:25 +08007rro=0
8hwpath=0
9backport_new=1
10args=
11
12for arg in $*; do
13 case "$arg" in
14 "rro")
15 rro=1
16 ;;
17 "hwpath")
18 hwpath=1
19 ;;
20 *)
21 args="$args $arg"
22 ;;
23 esac
24done
25set -- $args
26
27change_dot_config() {
28 [ "$rro" = "0" ] && {
29 rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*pao*.patch
30 rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*rro*.patch
31 rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*bellwether*.patch
32 }
33 [ "$hwpath" = "0" ] && {
34 echo "==========SW PATH========="
35 sed -i 's/CONFIG_BRIDGE_NETFILTER=y/# CONFIG_BRIDGE_NETFILTER is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
36 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
37 sed -i 's/CONFIG_SKB_EXTENSIONS=y/# CONFIG_SKB_EXTENSIONS is not set/g' ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
38 }
39 [ "$backport_new" = "1" ] && {
40 rm -rf ${BUILD_DIR}/package/kernel/mt76/patches/*revert-for-backports*.patch
41 }
42}
developer782053a2022-10-24 17:40:58 +080043
44#step1 clean
45#clean
46#do prepare stuff
47prepare
48
developer782053a2022-10-24 17:40:58 +080049#hack mt7988 config5.4
50echo "CONFIG_NETFILTER=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
51echo "CONFIG_NETFILTER_ADVANCED=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
52echo "CONFIG_RELAY=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4
53
developer4be8f972022-12-13 16:02:25 +080054prepare_flowoffload
developere5c01a42022-12-23 18:17:33 +080055##############################################################################
56rm -rf ${MTK_FEED_DIR}/autobuild_mac80211_release/package/kernel/mt76/patches
57##############################################################################
developer782053a2022-10-24 17:40:58 +080058
developer4be8f972022-12-13 16:02:25 +080059#prepare mac80211 mt76 wifi stuff
60prepare_mac80211 ${backport_new}
developer782053a2022-10-24 17:40:58 +080061
developere5c01a42022-12-23 18:17:33 +080062###############################################################################
63# remove hostapd internal patches
64rm -rf ${BUILD_DIR}/package/network/services/hostapd/patches/999*mtk*.patch
65###############################################################################
66
developer782053a2022-10-24 17:40:58 +080067prepare_final ${branch_name}
68
developer4be8f972022-12-13 16:02:25 +080069change_dot_config
70
developer782053a2022-10-24 17:40:58 +080071#step2 build
72if [ -z ${1} ]; then
73 build_log ${branch_name} -j1 || [ "$LOCAL" != "1" ]
74fi