blob: 94bb714045a5f7cf181cf8e93fc1a1bbb75d4f7a [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
developer782053a2022-10-24 17:40:58 +080055
developer4be8f972022-12-13 16:02:25 +080056#prepare mac80211 mt76 wifi stuff
57prepare_mac80211 ${backport_new}
developer782053a2022-10-24 17:40:58 +080058
59prepare_final ${branch_name}
60
developer4be8f972022-12-13 16:02:25 +080061change_dot_config
62
developer782053a2022-10-24 17:40:58 +080063#step2 build
64if [ -z ${1} ]; then
65 build_log ${branch_name} -j1 || [ "$LOCAL" != "1" ]
66fi