zoukankan      html  css  js  c++  java
  • [Android-Bluetooth] MODULE.TARGET.ETC.wpa_supplicant.conf already defined by xxxx error.

    Hmmm, there is an error possibly like this:

    build/core/base_rules.mk:130: *** external/wpa_supplicant_8/wpa_supplicant: MODULE.TARGET.ETC.wpa_supplicant.conf already defined by external/wpa_supplicant_8/wpa_supplicant.  Stop.

    Usually, it's caused by specifying  LOCAL_MODULE_CLASS := ETC  twice.

    In  android/hardware/broadcom/wlan/bcmdhd/config/Android.mk

    include $(CLEAR_VARS)
    LOCAL_MODULE := dhcpcd.conf
    LOCAL_MODULE_CLASS := ETC
    LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/dhcpcd
    LOCAL_SRC_FILES := android_dhcpcd.conf
    include $(BUILD_PREBUILT)

    In external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk

    LOCAL_MODULE := wpa_supplicant.conf
    LOCAL_MODULE_CLASS := ETC
    LOCAL_MODULE_TAGS := optional
    LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/wifi

    In external/wpa_supplicant_8/wpa_supplicant/Android.mk

    include $(CLEAR_VARS)
    LOCAL_MODULE := wpa_supplicant.conf
    LOCAL_MODULE_CLASS := ETC
    LOCAL_MODULE_PATH := $(local_target_dir)
    LOCAL_SRC_FILES := $(LOCAL_MODULE)
    include $(BUILD_PREBUILT)

    Ok, you may notice the external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk

    Why it?

    It's defined by the hardware/broadcom/wlan/bcmdhd/config/Android.mk

    ifeq ($(strip $(WPA_SUPPLICANT_VERSION)),VER_0_8_X)
      include external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk
    else
    ifeq ($(strip $(WPA_SUPPLICANT_VERSION)),VER_0_6_X)
      include external/wpa_supplicant_6/wpa_supplicant/wpa_supplicant_conf.mk
    else
      include external/wpa_supplicant/wpa_supplicant_conf.mk
    endif
    endif

    For WPA_SUPPLICANT_VERSION, herer comes the device/vendor/yourboard/BoardConfig.mk

    BOARD_WLAN_DEVICE            := bcmdhd

    #for bcm4330
    ifeq ($(BOARD_WLAN_DEVICE),bcmdhd)
    BOARD_WLAN_DEVICE_REV := bcm4330
    WPA_SUPPLICANT_VERSION := VER_0_8_X
    endif

    Ok, Solution::::::::::::::::::::::::::::

    1st change:

    LOCAL_MODULE_CLASS := ETC

    to

    LOCAL_MODULE_CLASS := ETC_DHCPCD

    in android/hardware/broadcom/wlan/bcmdhd/config/Android.mk

    2nd change:

    LOCAL_MODULE_CLASS := ETC

    to

    LOCAL_MODULE_CLASS := ETC_WPA

    in external/wpa_supplicant_8/wpa_supplicant/wpa_supplicant_conf.mk

    Ok, you get it, don't you?

  • 相关阅读:
    Android开发切换host应用
    HTTP缓存相关头
    我理解的Android加载器
    Mysql的NULL的一个注意点
    Android的Activity生命周期
    说说jsonp
    PHP的pcntl多进程
    谈谈不换行空格
    关于Java代码优化的44条建议!
    java8 遍历数组的几种方式
  • 原文地址:https://www.cnblogs.com/lake-of-embedded-system/p/3954403.html
Copyright © 2011-2022 走看看