developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | source ./autobuild/lede-build-sanity.sh |
| 3 | |
| 4 | #get the brach_name |
| 5 | temp=${0%/*} |
| 6 | branch_name=${temp##*/} |
developer | 4be8f97 | 2022-12-13 16:02:25 +0800 | [diff] [blame] | 7 | rro=0 |
| 8 | hwpath=0 |
| 9 | backport_new=1 |
| 10 | args= |
| 11 | |
| 12 | for 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 |
| 24 | done |
| 25 | set -- $args |
| 26 | |
| 27 | change_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 | } |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 43 | |
| 44 | #step1 clean |
| 45 | #clean |
| 46 | #do prepare stuff |
| 47 | prepare |
| 48 | |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 49 | #hack mt7988 config5.4 |
| 50 | echo "CONFIG_NETFILTER=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4 |
| 51 | echo "CONFIG_NETFILTER_ADVANCED=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4 |
| 52 | echo "CONFIG_RELAY=y" >> ${BUILD_DIR}/target/linux/mediatek/mt7988/config-5.4 |
| 53 | |
developer | 4be8f97 | 2022-12-13 16:02:25 +0800 | [diff] [blame] | 54 | prepare_flowoffload |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 55 | |
developer | 4be8f97 | 2022-12-13 16:02:25 +0800 | [diff] [blame] | 56 | #prepare mac80211 mt76 wifi stuff |
| 57 | prepare_mac80211 ${backport_new} |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 58 | |
| 59 | prepare_final ${branch_name} |
| 60 | |
developer | 4be8f97 | 2022-12-13 16:02:25 +0800 | [diff] [blame] | 61 | change_dot_config |
| 62 | |
developer | 782053a | 2022-10-24 17:40:58 +0800 | [diff] [blame] | 63 | #step2 build |
| 64 | if [ -z ${1} ]; then |
| 65 | build_log ${branch_name} -j1 || [ "$LOCAL" != "1" ] |
| 66 | fi |