blob: 3dc1e12c2bbc963c74377de228483ce0917ef523 [file] [log] [blame]
jb.qif6c7dab2024-02-21 02:07:42 -08001#!/bin/bash
2MMCO_CONFIG="KERNEL_EXT_CFLAGS += -D_USE_VEHICLE_DC_REF_MMC0"
3WIFI_CONFIG_1="CONFIG_AIC8800=y"
4WIFI_CONFIG_2="CONFIG_AIC8800_SDIO_TX_AGGR=y"
5WIFI_CONFIG_3="CONFIG_AIC8800_SDIO_RX_AGGR=y"
6
7NO_MMCO_CONFIG="#KERNEL_EXT_CFLAGS += -D_USE_VEHICLE_DC_REF_MMC0"
8NO_WIFI_CONFIG_1="#CONFIG_AIC8800=y"
9NO_WIFI_CONFIG_2="#CONFIG_AIC8800_SDIO_TX_AGGR=y"
10NO_WIFI_CONFIG_3="#CONFIG_AIC8800_SDIO_RX_AGGR=y"
11
wz.wangde92aeb2024-04-25 17:44:39 +080012WIFI_CONFIG_AIC8800D80L="CONFIG_AIC8800D80L=y"
13NO_WIFI_CONFIG_AIC8800D80L="# CONFIG_AIC8800D80L is not set"
14
15if [[ $1 == 1 ]]; then
jb.qif6c7dab2024-02-21 02:07:42 -080016 eval sed -i 's/^.*D_USE_VEHICLE_DC_REF_MMC0.*$/"${MMCO_CONFIG}"/' $(pwd)/build/libps_libs.mk
wz.wangde92aeb2024-04-25 17:44:39 +080017 eval sed -i 's/"${WIFI_CONFIG_AIC8800D80L}"/"${NO_WIFI_CONFIG_AIC8800D80L}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
jb.qif6c7dab2024-02-21 02:07:42 -080018 eval sed -i 's/^.*CONFIG_AIC8800=.*$/"${WIFI_CONFIG_1}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
19 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_TX_AGGR=.*$/"${WIFI_CONFIG_2}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
20 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_RX_AGGR=.*$/"${WIFI_CONFIG_3}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
wz.wangde92aeb2024-04-25 17:44:39 +080021elif [[ $1 == 2 ]]; then
22 eval sed -i 's/^.*D_USE_VEHICLE_DC_REF_MMC0.*$/"${MMCO_CONFIG}"/' $(pwd)/build/libps_libs.mk
23 eval sed -i 's/^.*CONFIG_AIC8800=.*$/"${NO_WIFI_CONFIG_1}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
24 eval sed -i 's/"${NO_WIFI_CONFIG_AIC8800D80L}"/"${WIFI_CONFIG_AIC8800D80L}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
25 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_TX_AGGR=.*$/"${WIFI_CONFIG_2}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
26 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_RX_AGGR=.*$/"${WIFI_CONFIG_3}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
27else
28 eval sed -i 's/^.*D_USE_VEHICLE_DC_REF_MMC0.*$/"${NO_MMCO_CONFIG}"/' $(pwd)/build/libps_libs.mk
29 eval sed -i 's/^.*CONFIG_AIC8800=.*$/"${NO_WIFI_CONFIG_1}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
30 eval sed -i 's/^.*CONFIG_AIC8800D80L.*$/"${NO_WIFI_CONFIG_AIC8800D80L}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
31 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_TX_AGGR=.*$/"${NO_WIFI_CONFIG_2}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
32 eval sed -i 's/^.*CONFIG_AIC8800_SDIO_RX_AGGR=.*$/"${NO_WIFI_CONFIG_3}"/' $(pwd)/project/zx297520v3/prj_vehicle_dc_ref/config/normal/config.linux
jb.qif6c7dab2024-02-21 02:07:42 -080033fi
34
jb.qif6c7dab2024-02-21 02:07:42 -080035