修改AP6212A0所使用的配置文件nvram_ap6210.txt为nvram_ap6212.txt
大文实验室/大文哥
壹捌陆捌零陆捌捌陆捌贰
wb4916 AT qq.com
完成时间:2017/6/27 16:15
版本:V1.0
1、借用AP6210的配置打开WIFI+BT了,但是为了规范化,还是将配置文件由nvram_ap6210.txt修改为nvram_ap6212.txt,规范化!
shell@astar-y3:/ $
shell@astar-y3:/ $ cd /system/vendor/modules/
shell@astar-y3:/system/vendor/modules $ ll *.txt
-rw-r--r-- root root 956 2017-06-26 17:18 nvram_ap6210.txt
shell@astar-y3:/system/vendor/modules $ ll *.bin
-rw-r--r-- root root 378595 2017-06-26 17:18 fw_bcm43438a0.bin
-rw-r--r-- root root 309352 2017-06-26 17:18 fw_bcm43438a0_apsta.bin
-rw-r--r-- root root 336323 2017-06-26 17:18 fw_bcm43438a0_p2p.bin
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 17:18 bcm43438a0.hcd
-rw-r--r-- root root 748856 2017-06-26 17:18 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $
2、偶然原因使用grep搜索nvram_ap6210.txt:
rootroot@rootroot-E400:~$
rootroot@rootroot-E400:~$ cd wyb/ap6212a0_a33_sc3817r/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r$ cd lichee/linux-3.4/drivers/net/wireless/bcmdhd/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$grep nvram_ap6210.txt . -R
./dhd_common.c: bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);
匹配到二进制文件 ./bcmdhd.o
匹配到二进制文件 ./dhd_common.o
匹配到二进制文件 ./bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_common.c
void
dhd_common_init(osl_t *osh)
{
int select_type = 0;
//aw checkout which wifi had select
select_type = wifi_pm_get_mod_type();
#ifdef CONFIG_BCMDHD_FW_PATH
//select ap6181 or ap6210 or ap6476
if (select_type == 1 || select_type == 2 || select_type == 7) {
bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);
}
#else /* CONFIG_BCMDHD_FW_PATH */
fw_path[0] = '\0';
#endif /* CONFIG_BCMDHD_FW_PATH */
#ifdef CONFIG_BCMDHD_NVRAM_PATH
switch (select_type)
{
//ap6181
case 1:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6181.txt", MOD_PARAM_PATHLEN-1);
break;
//ap6210
case 2:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);
break;
//ap6476
case 7:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6476.txt", MOD_PARAM_PATHLEN-1);
break;
default:
break;
}
#else /* CONFIG_BCMDHD_NVRAM_PATH */
nv_path[0] = '\0';
#endif /* CONFIG_BCMDHD_NVRAM_PATH */
#ifdef CONFIG_BCMDHD_CONFIG_PATH
bcm_strncpy_s(conf_path, sizeof(conf_path), "/system/vendor/modules/config.txt", MOD_PARAM_PATHLEN-1);
#else /* CONFIG_BCMDHD_CONFIG_PATH */
conf_path[0] = '\0';
#endif /* CONFIG_BCMDHD_CONFIG_PATH */
#ifdef SOFTAP
fw_path2[0] = '\0';
#endif
}
发现最大WIFI类型是7:ap6476,那就是配置AP6212的类型为8即可了!
R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex
;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id: the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc: the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]
;--------------------------------------------------------------------------------
;wifi configuration
;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3
;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2
;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)
;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt),
; 3 - rtl8188eu, 4- rtl8723au(wifi+bt),
; 5 - rtl8723bs, 6- esp8089
; 7 - ap6476, 8- ap6212(wifi+bt)
;--------------------------------------------------------------------------------
[wifi_para]
wifi_used = 1
wifi_sdc_id = 1
wifi_usbc_id = 1
wifi_usbc_type = 1
wifi_mod_sel = 8
wifi_power = "axp22_dldo1"
wifi_power_ext1 = "axp22_dldo2"
wifi_power_ext2 = "axp22_aldo1"
wifi_power_switch =
;wifi_power_switch = port:power0<1><0>
; 1 - ap6181 sdio wifi gpio config
;ap6xxx_wl_regon = port:PL06<1>
;ap6xxx_wl_host_wake = port:PL07<4>
;ap6xxx_lpo_use_apclk = 1
; 2 - ap6210 sdio wifi gpio config
ap6xxx_wl_regon = port:PL06<1>
;ap6xxx_wl_regon = port:PD13<1>
ap6xxx_wl_host_wake = port:PL07<4>
ap6xxx_bt_regon = port:PL08<1>
ap6xxx_bt_wake = port:PL10<1>
ap6xxx_bt_host_wake = port:PL09<4>
ap6xxx_lpo_use_apclk = 1
3、发现问题:
[ 0.658155] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_group 0x0
[ 0.658179] [wifi]: select wifi: rtl8189es !!
[ 0.658516] [rtl8189es]: exec rtl8189es_wifi_gpio_init
[ 0.658532] [rtl8189es]: module power name axp22_dldo1
[ 0.658544] [rtl8189es]: module power ext1 name axp22_dldo2
[ 0.658555] [rtl8189es]: module power ext2 name axp22_aldo1
[ 0.658566] [rtl8189es]: get rtl8189es rtl8189es_shdn gpio failed
[ 0.658576] [rtl8189es]: rtl8189es module power set by axp.
[ 0.658775] [rtl8189es]: first time
[ 0.659126] [rtl8189es]: regulator on.
[ 0.761057] gpio rtl8189es_shdn set val 0, act val 0
[ 0.761095] [wifi_pm]: wifi gpio init is OK !!
[ 15.656191] gpio rtl8189es_shdn set val 1, act val 1
[ 15.761750] [rtl8189es]: sdio wifi power state: on
[ 15.767106] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 15.767277] =========== WLAN placed in POWER ON ========
[ 15.784182] [mmc]: sdc1 card_power_on start...
[ 15.789109] [mmc]: sdc1 power_supply is null
[ 15.793857] [mmc]: sdc1 card_power_on ok
[ 15.810037] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 15.820279] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 15.902360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 15.911305] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 15.919450] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 15.929676] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 15.991965] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.002195] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 16.063891] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 16.071934] *******************Try sdio*******************
[ 16.078823] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 16.087668] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 16.096538] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 16.105383] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 16.113418] *******************Try sd *******************
[ 16.120218] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 16.129151] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 16.138093] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 16.147028] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 16.155169] *******************Try mmc*******************
[ 16.161182] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.171406] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 16.232099] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 16.240146] [mmc]: mmc not poweroff notifiy
[ 16.242077] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.254692] [mmc]: sdc1 card_power_off start...
[ 16.259714] [mmc]: sdc1 power_supply is null
[ 16.264462] [mmc]: sdc1 card_power_off ok
[ 16.271504] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.282686] [mmc]: sdc1 card_power_on start...
[ 16.287612] [mmc]: sdc1 power_supply is null
[ 16.292380] [mmc]: sdc1 card_power_on ok
[ 16.310033] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.320267] [mmc]: mclk 0xf1c2008c 0x80030009
[ 16.402614] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 16.411817] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 16.419959] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.430184] [mmc]: mclk 0xf1c2008c 0x80030009
[ 16.492539] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 16.502767] [mmc]: mclk 0xf1c2008c 0x80030009
[ 16.564741] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
4、确认rtl8189es的WIFI类型为8(AP6212配置为8肯定冲突了!):
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\wifi_pm.c
struct wifi_pm_ops wifi_select_pm_ops;
static char* wifi_mod[] = {" ",
"ap6181", /* 1 - AP6181*/
"ap6210", /* 2 - AP6210*/
"rtl8188eu", /* 3 - RTL8188EU*/
"rtl8723au", /* 4 - RTL8723AU*/
"rtl8723bs", /* 5 - RTL8723BS*/
"esp8089", /* 6 - ESP8089*/
"ap6476", /* 7 - AP6476*/
"rtl8189es", /* 8 - rtl8189es*/
"ap6212", /* 9 - AP6212*/
};
R:\wyb\ap6212a0_a33_sc3817r\lichee\tools\pack\chips\sun8iw5p1\configs\y3\sys_config.fex
;--------------------------------------------------------------------------------
; gps gpio configuration
; gps_spi_id: the index of SPI controller. 0: SPI0, 1: SPI1, 2: SPI2, 15: no SPI used
; gps_spi_cs_num: the chip select number of SPI controller. 0: SPI CS0, 1: SPI CS1
; gps_lradc: the lradc number for GPS used. 0 and 1 is valid, set 2 if not use lradc
;--------------------------------------------------------------------------------
[gps_para]
;--------------------------------------------------------------------------------
;wifi configuration
;wifi_sdc_id: 0- SDC0, 1- SDC1, 2- SDC2, 3- SDC3
;wifi_usbc_id: 0- USB0, 1- USB1, 2- USB2
;wifi_usbc_type: 1- EHCI(speed 2.0), 2- OHCI(speed 1.0)
;wifi_mod_sel: 0- none, 1- ap6181, 2- ap6210(wifi+bt),
; 3 - rtl8188eu, 4- rtl8723au(wifi+bt),
; 5 - rtl8723bs, 6- esp8089
; 7 - ap6476, 8- rtl8189es
; 9- ap6212(wifi+bt)
;--------------------------------------------------------------------------------
[wifi_para]
wifi_used = 1
wifi_sdc_id = 1
wifi_usbc_id = 1
wifi_usbc_type = 1
wifi_mod_sel = 9
编译lichee之后,
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch
9. astar_y3-eng
Which would you like? [aosp_arm-eng] 9
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d
5、还是有问题(WIFI没有上电):[wifi_pm]: wrong sdio module select 9 !
[ 0.658361] [wifi]: select wifi: ap6212 !!
[ 0.658709] [wifi_pm]: wrong sdio module select 9 !
[ 0.658743] [wifi_pm]: wifi gpio init is OK !!
[ 8.406311] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!
[ 8.414885] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.415058] =========== WLAN placed in POWER ON ========
[ 8.431966] [mmc]: sdc1 card_power_on start...
[ 8.436893] [mmc]: sdc1 power_supply is null
[ 8.441641] [mmc]: sdc1 card_power_on ok
[ 8.460042] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.470284] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.552363] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.561318] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 8.569468] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.579702] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.641992] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.652219] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.713911] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 8.721957] *******************Try sdio*******************
[ 8.728845] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 8.737691] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 8.746528] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 8.755373] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 8.763409] *******************Try sd *******************
[ 8.770208] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 8.779143] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 8.788086] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 8.797023] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 8.805163] *******************Try mmc*******************
[ 8.811177] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.821407] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 8.882101] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 8.890146] [mmc]: mmc not poweroff notifiy
[ 8.892079] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.904691] [mmc]: sdc1 card_power_off start...
[ 8.909712] [mmc]: sdc1 power_supply is null
[ 8.914457] [mmc]: sdc1 card_power_off ok
[ 8.921501] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.932684] [mmc]: sdc1 card_power_on start...
[ 8.937609] [mmc]: sdc1 power_supply is null
[ 8.942357] [mmc]: sdc1 card_power_on ok
[ 8.960033] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 8.970267] [mmc]: mclk 0xf1c2008c 0x80030009
[ 9.052633] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 9.061843] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 9.069984] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.080218] [mmc]: mclk 0xf1c2008c 0x80030009
[ 9.142626] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.152852] [mmc]: mclk 0xf1c2008c 0x80030009
[ 9.214821] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 9.222866] *******************Try sdio*******************
[ 9.230020] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.239134] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.248237] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.257350] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.265393] *******************Try sd *******************
[ 9.272467] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.281670] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.290877] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.300084] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.308212] *******************Try mmc*******************
[ 9.314216] [mmc]: sdc1 set ios: clk 300000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.324442] [mmc]: mclk 0xf1c2008c 0x80030009
[ 9.385411] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 9.393447] [mmc]: mmc not poweroff notifiy
[ 9.395382] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.407991] [mmc]: sdc1 card_power_off start...
[ 9.413025] [mmc]: sdc1 power_supply is null
[ 9.417766] [mmc]: sdc1 card_power_off ok
[ 9.424812] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.436003] [mmc]: sdc1 card_power_on start...
[ 9.440943] [mmc]: sdc1 power_supply is null
[ 9.445676] [mmc]: sdc1 card_power_on ok
[ 9.470032] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.480253] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 9.563150] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 9.572900] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 9.581034] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.591262] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 9.653918] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.664143] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 9.726680] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 9.734725] *******************Try sdio*******************
[ 9.742425] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.752080] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.761720] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.771365] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 9.779398] *******************Try sd *******************
[ 9.787010] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.796750] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.806495] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.816235] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 9.824366] *******************Try mmc*******************
[ 9.830371] [mmc]: sdc1 set ios: clk 200000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.840602] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 9.902131] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 9.910163] [mmc]: mmc not poweroff notifiy
[ 9.912089] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.924698] [mmc]: sdc1 card_power_off start...
[ 9.929719] [mmc]: sdc1 power_supply is null
[ 9.934474] [mmc]: sdc1 card_power_off ok
[ 9.941508] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.952699] [mmc]: sdc1 card_power_on start...
[ 9.957625] [mmc]: sdc1 power_supply is null
[ 9.962372] [mmc]: sdc1 card_power_on ok
[ 9.980032] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 9.990263] [mmc]: mclk 0xf1c2008c 0x80030009
[ 10.072631] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 10.081860] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 10.089993] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.100227] [mmc]: mclk 0xf1c2008c 0x80030009
[ 10.162626] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.172857] [mmc]: mclk 0xf1c2008c 0x80030009
[ 10.234830] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 10.242867] *******************Try sdio*******************
[ 10.250027] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.259130] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.268244] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.277347] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.285389] *******************Try sd *******************
[ 10.292467] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.301680] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.310880] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.320090] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.328219] *******************Try mmc*******************
[ 10.334233] [mmc]: sdc1 set ios: clk 150000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.344453] [mmc]: mclk 0xf1c2008c 0x80030009
[ 10.405431] [mmc]: *** sunxi_mci_dump_errinfo(L773):
[ 10.410058] failed to power up wifi chip, retry again (4 left) **
[ 10.410064]
[ 10.410157] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!
[ 10.410182] =========== WLAN placed in POWER OFF ========
[ 10.410245] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!
[ 10.410457] =========== WLAN placed in POWER ON ========
[ 10.415402] smc 1 err, cmd 1, RTO !!
[ 10.415402] [mmc]: mmc not poweroff notifiy
[ 10.415402] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.466692] [mmc]: sdc1 card_power_off start...
[ 10.471728] [mmc]: sdc1 power_supply is null
[ 10.476461] [mmc]: sdc1 card_power_off ok
[ 10.483527] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.494713] [mmc]: sdc1 card_power_on start...
[ 10.499647] [mmc]: sdc1 power_supply is null
[ 10.504396] [mmc]: sdc1 card_power_on ok
[ 10.520039] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.530273] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 10.612360] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 10.621312] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 10.629446] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.639676] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 10.701960] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.712178] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 10.773877] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 10.781920] *******************Try sdio*******************
[ 10.788807] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.797650] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.806490] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.815332] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 10.823368] *******************Try sd *******************
[ 10.830157] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.839090] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.848032] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.856967] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 10.865107] *******************Try mmc*******************
[ 10.871119] [mmc]: sdc1 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.881350] [mmc]: mclk 0xf1c2008c 0x8002000e
[ 10.942043] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 10.950085] [mmc]: mmc not poweroff notifiy
[ 10.952021] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.964633] [mmc]: sdc1 card_power_off start...
[ 10.969656] [mmc]: sdc1 power_supply is null
[ 10.974402] [mmc]: sdc1 card_power_off ok
[ 10.981437] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 10.992622] [mmc]: sdc1 card_power_on start...
[ 10.997556] [mmc]: sdc1 power_supply is null
[ 11.002304] [mmc]: sdc1 card_power_on ok
[ 11.020039] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.030277] [mmc]: mclk 0xf1c2008c 0x80030009
[ 11.112626] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 11.121835] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 11.129977] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.140203] [mmc]: mclk 0xf1c2008c 0x80030009
[ 11.202601] [mmc]: sdc1 set ios: clk 300000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.212826] [mmc]: mclk 0xf1c2008c 0x80030009
[ 11.274800] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 11.282843] *******************Try sdio*******************
[ 11.289996] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.299106] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.308213] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.317323] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.325358] *******************Try sd *******************
[ 11.332439] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.341643] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.350853] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.360053] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.368190] *******************Try mmc*******************
[ 11.374194] [mmc]: sdc1 set ios: clk 300000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.384424] [mmc]: mclk 0xf1c2008c 0x80030009
[ 11.445405] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 11.453445] [mmc]: mmc not poweroff notifiy
[ 11.455368] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.467991] [mmc]: sdc1 card_power_off start...
[ 11.473027] [mmc]: sdc1 power_supply is null
[ 11.477759] [mmc]: sdc1 card_power_off ok
[ 11.484810] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.495995] [mmc]: sdc1 card_power_on start...
[ 11.500935] [mmc]: sdc1 power_supply is null
[ 11.505667] [mmc]: sdc1 card_power_on ok
[ 11.530032] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.540254] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 11.623152] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 11.632906] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 11.641043] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.651272] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 11.713930] [mmc]: sdc1 set ios: clk 200000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.724155] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 11.786692] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 11.794728] *******************Try sdio*******************
[ 11.802437] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.812072] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.821717] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.831362] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 11.839394] *******************Try sd *******************
[ 11.847007] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.856747] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.866492] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.876227] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 11.884367] *******************Try mmc*******************
[ 11.890373] [mmc]: sdc1 set ios: clk 200000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.900603] [mmc]: mclk 0xf1c2008c 0x8003000e
[ 11.962133] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 1, RTO !!
[ 11.970168] [mmc]: mmc not poweroff notifiy
[ 11.972090] [mmc]: sdc1 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 11.984710] [mmc]: sdc1 card_power_off start...
[ 11.989732] [mmc]: sdc1 power_supply is null
[ 11.994478] [mmc]: sdc1 card_power_off ok
[ 12.001519] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 12.012699] [mmc]: sdc1 card_power_on start...
[ 12.017624] [mmc]: sdc1 power_supply is null
[ 12.022371] [mmc]: sdc1 card_power_on ok
[ 12.040040] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 12.050271] [mmc]: mclk 0xf1c2008c 0x80030009
[ 12.132619] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 12.141827] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 52, RTO !!
[ 12.149967] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 12.160192] [mmc]: mclk 0xf1c2008c 0x80030009
[ 12.222601] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 12.232826] [mmc]: mclk 0xf1c2008c 0x80030009
[ 12.294798] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 8, RTO !!
[ 12.302837] *******************Try sdio*******************
[ 12.309991] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 12.319102] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 12.328208] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 12.337311] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 5, RTO !!
[ 12.345354] *******************Try sd *******************
[ 12.352431] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 12.361635] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 12.370835] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 12.380041] [mmc]: *** sunxi_mci_dump_errinfo(L773): smc 1 err, cmd 55, RTO !!
[ 12.388170] *******************Try mmc*******************
[ 12.394187] [mmc]: sdc1 set ios: clk 150000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 12.404410] [mmc]: mclk 0xf1c2008c 0x80030009
[ 12.410041]
[ 12.410044] failed to power up wifi chip, retry again (3 left) **
[ 12.410049]
[ 12.420182] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!
[ 12.428589] =========== WLAN placed in POWER OFF ========
[ 12.434641] [wifi_pm]: wifi_used = 0 or no power ctrl, please check your config !!
[ 12.443260] =========== WLAN placed in POWER ON ========
6、查找问题:[wifi_pm]: wrong sdio module select 9 !
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ grep "wrong sdio module select" . -R
./linux-3.4/arch/arm/mach-sunxi/rf/wifi_pm.c:wifi_pm_msg("wrong sdio module select %d !\n", ops->module_sel.val);
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\wifi_pm.c
static int __devinit wifi_pm_probe(struct platform_device *pdev)
{
struct wifi_pm_ops *ops = &wifi_select_pm_ops;
switch (ops->module_sel.val) {
case 1: /* AP6181 */
ap6xxx_gpio_init();
break;
case 2: /* AP6210 */
ap6xxx_gpio_init();
break;
case 3: /* RTL8188EU */
rtl8188eu_gpio_init();
break;
case 4: /* RTL8723AU */
rtl8723au_gpio_init();
break;
case 5: /* RTL8723BS */
rtl8723bs_gpio_init();
break;
case 6: /* ESP8089 */
esp8089_gpio_init();
break;
case 7: /* AP6476 */
ap6xxx_gpio_init();
break;
case 8: /* rtl8189es */
rtl8189es_gpio_init();
break;
case 9: /* AP6212 */
ap6xxx_gpio_init();
break;
default:
wifi_pm_msg("wrong sdio module select %d !\n", ops->module_sel.val);
}
awwifi_procfs_attach();
wifi_pm_msg("wifi gpio init is OK !!\n");
return 0;
}
修改之后,需要清除lichee,然后再make bootimage,然后打包:
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
0. sun8iw5p1
Choice: 0
All available platforms:
0. android
1. dragonboard
2. linux
Choice: 0
All available kernel:
0. linux-3.4
Choice: 0
All available boards:
0. evb
1. maple
2. redwood
3. y2
4. y3
Choice: 4
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd linux-3.4/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ make clean
CLEAN .
CLEAN drivers/tty/vt
CLEAN kernel
CLEAN lib
CLEAN security/apparmor
CLEAN security/selinux
CLEAN usr
CLEAN .tmp_versions
CLEAN vmlinux System.map .tmp_kallsyms1.o .tmp_kallsyms1.S .tmp_kallsyms2.o .tmp_kallsyms2.S .tmp_vmlinux1 .tmp_vmlinux2 .tmp_System.map
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ rm output/ -rf
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee/linux-3.4$ cd ..
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ rm out/ -rf
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ ./build.sh
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch
9. astar_y3-eng
Which would you like? [aosp_arm-eng] 9
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d
7、
[ 66.680039] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 66.690024] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 68.647096] sndpcm_unmute,line:1099
[ 69.406631] init: waitpid returned pid 1133, status = 0000ff00
[ 69.413165] init: process 'preinstall', pid 1133 exited
[ 74.926558] init: computing context for service '/system/bin/wpa_supplicant'
[ 74.934908] init: starting 'p2p_supplicant'
[ 74.944376] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 74.995472] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 75.005264]
[ 75.005267] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 75.005272] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 16:53:23
[ 75.021110] wl_android_wifi_on in 1
[ 75.024978] wl_android_wifi_on in 2: g_wifi_on=0
[ 75.030154] gpio ap6xxx_wl_regon set val 1, act val 1
[ 75.135767] [ap6xxx]: sdio wifi power state: on
[ 75.141015] =========== WLAN going back to live ========
[ 75.147003] sdio_reset_comm():
[ 75.150410] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.160762] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 75.222089] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.232440] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 75.291058] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.301298] [mmc]: mclk 0xf1c2008c 0x80430309
[ 75.361628] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.371774] [mmc]: mclk 0xf1c2008c 0x80030009
[ 75.443773] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 75.451880] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 75.460015] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 75.469737] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 75.590337] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.600482] [mmc]: mclk 0xf1c2008c 0x80030009
[ 75.660400] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.670779] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 75.730701] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 75.741057] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 75.801267]
[ 75.801272]
[ 75.801274] dhd_bus_devreset: == WLAN ON ==
[ 75.809221] dhd_bus_devreset called when dongle is not in reset
[ 75.815805] Will call dhd_bus_start instead
[ 75.820515] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 75.830280] dhd_bus_devreset: dhd_bus_start fail with -100
[ 75.836371] dhd_dev_reset: dhd_bus_devreset: -100
[ 75.841606] dhd_prot_ioctl : bus is down. we have nothing to do
[ 75.848191] dhd_bus_devreset: WLAN OFF DONE
[ 75.853024] gpio ap6xxx_wl_regon set val 0, act val 0
[ 75.958643] [ap6xxx]: sdio wifi power state: off
[ 75.963860] =========== WLAN placed in RESET ========
[ 75.969534] wl_android_wifi_on: Failed
[ 75.973795] dhd_open : wl_android_wifi_on failed (-100)
[ 75.979620] wl_android_wifi_off in 1
[ 75.983682] wl_android_wifi_off in 2: g_wifi_on=0
[ 75.988968] wl_android_wifi_off out
[ 75.998631] init: waitpid returned pid 1251, status = 0000ff00
[ 76.005173] init: process 'p2p_supplicant', pid 1251 exited
[ 76.675241] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au
[ 76.740026] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 76.746692] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 77.357333] CPU Budget:update CPU 0 cpufreq max to 1200000 min to 120000
[ 77.364842] [dsm] store_scene: 0
[ 78.408672] [rfkill]: rfkill set power 1
[ 78.413132] [rfkill]: no bt module matched !!
[ 78.631287] [rfkill]: rfkill set power 0
[ 78.635662] [rfkill]: no bt module matched !!
[ 80.391225] CPU2: shutdown
[ 80.394284] [hotplug]: cpu(1) try to kill cpu(2)
[ 80.399453] [hotplug]: cpu2 is killed! .
[ 80.901824] CPU3: shutdown
[ 80.904895] [hotplug]: cpu(1) try to kill cpu(3)
[ 80.910202] [hotplug]: cpu3 is killed! .
[ 84.374138] [rfkill]: rfkill set power 1
[ 84.378502] [rfkill]: no bt module matched !!
[ 86.760041] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 86.766784] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 86.773616] [BT_LPM] bluesleep_sleep_work: going to sleep...
[ 90.901474] CPU1: shutdown
[ 90.904567] [hotplug]: cpu(0) try to kill cpu(1)
[ 90.909751] [hotplug]: cpu1 is killed! .
[ 95.155325] init: computing context for service '/system/bin/wpa_supplicant'
[ 95.163801] init: starting 'p2p_supplicant'
[ 95.171413] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 95.211519] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 95.221378]
[ 95.221384] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 95.221393] Compiled in drivers/net/wireless/bcmdhd on Jun 26 2017 at 16:53:23
[ 95.237310] wl_android_wifi_on in 1
[ 95.241213] wl_android_wifi_on in 2: g_wifi_on=0
[ 95.246371] gpio ap6xxx_wl_regon set val 1, act val 1
[ 95.363212] [ap6xxx]: sdio wifi power state: on
[ 95.380345] =========== WLAN going back to live ========
[ 95.386356] sdio_reset_comm():
[ 95.389761] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.405357] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 95.467447] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.478022] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 95.538993] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.549286] [mmc]: mclk 0xf1c2008c 0x80430309
[ 95.609704] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.619871] [mmc]: mclk 0xf1c2008c 0x80030009
[ 95.694323] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 95.703244] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 95.712070] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 95.722683] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 95.866175] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.876981] [mmc]: mclk 0xf1c2008c 0x80030009
[ 95.937386] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 95.950287] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 96.010914] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 96.022462] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 96.084035]
[ 96.084073]
[ 96.084097] dhd_bus_devreset: == WLAN ON ==
[ 96.103579] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4
[ 96.114767] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 96.125899] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 96.141142] Final fw_path=(null)
[ 96.144894] Final nv_path=(null)
[ 96.148612] Final conf_path=(null)
[ 90.910854] CPU1: Booted secondary processor
[ 98.170035] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
[ 100.190051] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
[ 102.210048] bcmsdh_sdmmc: enable F2 failed:-62bcmsdh_sdmmc: Failed to Write byte F0:@0x00002=06, Err: -62
[ 102.407286] CPU1: shutdown
[ 102.410899] [hotplug]: cpu(0) try to kill cpu(1)
[ 102.416440] [hotplug]: cpu1 is killed! .
[ 105.260547] dhd_bus_init: enable 0x06, ready 0x02 (waited 3006383us)
[ 105.268508] bcmsdh_set_drvdata: Enter
[ 105.273110] bcmsdh_register_oob_intr: Enter
[ 105.278248] bcmsdh_register_oob_intr: IRQ=7 Type=414
[ 105.285032]
[ 105.285062] bcmdhd wakeup 0
[ 105.290651] dhd_conf_set_band: Set band 0
[ 105.295397] dhd_prot_ioctl : bus is down. we have nothing to do
[ 105.303998] dhd_check_hang: Event HANG send up due to re=0 te=0 e=-1 s=0
[ 105.311680] CONFIG-ERROR) dhd_conf_set_band: WLC_SET_BAND setting failed -1
[ 105.319496] dhd_prot_ioctl : bus is down. we have nothing to do
[ 105.326177] dhd_check_hang: Event HANG send up due to re=0 te=0 e=-1 s=0
[ 105.333819] dhd_preinit_ioctls: can't get MAC address , error=-1
[ 105.340592] dhd_prot_ioctl : bus is down. we have nothing to do
[ 105.347236] dhd_check_hang: Event HANG send up due to re=0 te=0 e=-1 s=0
[ 105.357054] bcmsdh_set_irq: Flag = 0
[ 105.361076] dhd_bus_devreset: WLAN OFF DONE
[ 105.365932] gpio ap6xxx_wl_regon set val 0, act val 0
[ 105.472154] [ap6xxx]: sdio wifi power state: off
[ 105.477284] =========== WLAN placed in RESET ========
[ 105.482947] wl_android_wifi_on: Failed
[ 105.487113] dhd_open : wl_android_wifi_on failed (-14)
[ 105.492841] wl_android_wifi_off in 1
[ 105.496821] wl_android_wifi_off in 2: g_wifi_on=0
[ 105.504325] wl_android_wifi_off out
[ 105.508229] CFG80211-ERROR) wl_cfg80211_hang : In : chip crash eventing
[ 105.522511] init: waitpid returned pid 1410, status = 0000ff00
[ 105.529045] init: process 'p2p_supplicant', pid 1410 exited
[ 105.537868] cfg80211: Calling CRDA to update world regulatory domain
[ 102.414498] CPU1: Booted secondary processor
[ 80.400727] CPU2: Booted secondary processor
[ 109.407299] CPU2: shutdown
[ 109.411008] [hotplug]: cpu(0) try to kill cpu(2)
[ 109.416436] [hotplug]: cpu2 is killed! .
[ 109.917486] CPU1: shutdown
[ 109.921130] [hotplug]: cpu(0) try to kill cpu(1)
[ 109.926638] [hotplug]: cpu1 is killed! .
[ 111.400815] [rfkill]: rfkill set power 1
[ 111.405237] [rfkill]: no bt module matched !!
[ 109.924650] CPU1: Booted secondary processor
[ 109.414588] CPU2: Booted secondary processor
[ 115.907605] CPU2: shutdown
[ 115.911287] [hotplug]: cpu(0) try to kill cpu(2)
[ 115.916979] [hotplug]: cpu2 is killed! .
[ 117.407493] CPU1: shutdown
[ 117.411123] [hotplug]: cpu(0) try to kill cpu(1)
[ 117.416666] [hotplug]: cpu1 is killed! .
[ 117.414612] CPU1: Booted secondary processor
[ 121.901773] CPU1: shutdown
[ 121.904835] [hotplug]: cpu(0) try to kill cpu(1)
[ 121.910165] [hotplug]: cpu1 is killed! .
shell@astar-y3:/ $
8、错误:
dhd_bus_devreset: dhd_bus_start fail with -100
Final fw_path=(null)
也就是nvram_ap6212.txt的加载错误!
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ grep fw_path . -R
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:char fw_path[MOD_PARAM_PATHLEN];
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:char fw_path2[MOD_PARAM_PATHLEN];
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c: fw_path[0] = '\0';
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c: fw_path2[0] = '\0';
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: char *fw_path; /* module_param: path to firmware image */
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: uint32 fw_path_len;
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: fw_path_len = strlen(bus->fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (fw_path_len > len-1) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (fw_path_len) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bcopy(bus->fw_path, arg, fw_path_len);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: ((uchar*)arg)[fw_path_len] = 0;
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = fw_path; /* ordinary one */
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = fw_path2;
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: DHD_INFO(("[softap] new fw path: %s\n", (bus->fw_path[0] ? bus->fw_path : "NULL")));
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: char *pfw_path, char *pnv_path, char *pconf_path)
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: bus->fw_path = pfw_path;
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_path(bus->dhd, bus->fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: printk("Final fw_path=%s\n", bus->fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c:dhdsdio_download_code_file(struct dhd_bus *bus, char *pfw_path)
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: DHD_INFO(("%s: download firmware %s\n", __FUNCTION__, pfw_path));
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: image = dhd_os_open_image(pfw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: printk("%s: Open firmware file failed %s\n", __FUNCTION__, pfw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if ((bus->fw_path == NULL) || (bus->fw_path[0] == '\0')) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if ((bus->fw_path != NULL) && (bus->fw_path[0] != '\0')) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: if (dhdsdio_download_code_file(bus, bus->fw_path)) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path); // terence
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_sdio.c: dhd_conf_set_fw_name_by_chip(dhdp, fw_path, firmware_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_bus.h: char *fw_path, char *nv_path, char *conf_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: bcm_strncpy_s(src, sizeof(fw_path), fw_path, MOD_PARAM_PATHLEN-1);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c:dhd_conf_set_fw_path(dhd_pub_t *dhd, char *fw_path)
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: if (dhd->conf->fw_path[0]) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: strcpy(fw_path, dhd->conf->fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: printf("%s: fw_path is changed to %s\n", __FUNCTION__, fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: len_val = process_config_vars(bufp, len, pick, "fw_path=");
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: memcpy(dhd->conf->fw_path, pick, len_val);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.c: printf("%s: fw_path = %s\n", __FUNCTION__, dhd->conf->fw_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd.h:extern char fw_path[MOD_PARAM_PATHLEN];
./linux-3.4/drivers/net/wireless/bcmdhd/dhd.h:extern char fw_path2[MOD_PARAM_PATHLEN];
./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.c: bcm_strncpy_s(fw_path, sizeof(fw_path),
./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.c: if (strstr(fw_path, "apsta") != NULL) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.h: char fw_path[MOD_PARAM_PATHLEN]; /* Firmware path */
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_config.h:void dhd_conf_set_fw_path(dhd_pub_t *dhd, char *fw_path);
匹配到二进制文件 ./linux-3.4/drivers/net/wireless/bcmdhd/wl_android.o
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: dhd_conf_set_fw_name_by_chip(&dhd->pub, fw_path, firmware_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: dhd_conf_set_fw_name_by_chip(&dhd->pub, fw_path, firmware_path);
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: (fw_path[0] != '\0') && (nv_path[0] != '\0')) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: fw_path, nv_path, conf_path))) {
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: __FUNCTION__, fw_path, nv_path, conf_path));
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: DHD_TRACE(("Firmware = %s\n", fw_path));
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: if ((!op_mode && strstr(fw_path, "_apsta") != NULL) ||
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: if ((!op_mode && strstr(fw_path, "_p2p") != NULL) ||
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_linux.c: (!op_mode && strstr(fw_path, "_ibss") != NULL)) {
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$
很容易定位到这里:
./linux-3.4/drivers/net/wireless/bcmdhd/dhd_common.c:bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd\dhd_common.c
void
dhd_common_init(osl_t *osh)
{
int select_type = 0;
//aw checkout which wifi had select
select_type = wifi_pm_get_mod_type();
#ifdef CONFIG_BCMDHD_FW_PATH
//select ap6181 or ap6210 or ap6476
if (select_type == 1 || select_type == 2 || select_type == 7) {
bcm_strncpy_s(fw_path, sizeof(fw_path), "/system/vendor/modules/fw_bcm40181a2.bin", MOD_PARAM_PATHLEN-1);
}
#else /* CONFIG_BCMDHD_FW_PATH */
fw_path[0] = '\0';
#endif /* CONFIG_BCMDHD_FW_PATH */
#ifdef CONFIG_BCMDHD_NVRAM_PATH
switch (select_type)
{
//ap6181
case 1:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6181.txt", MOD_PARAM_PATHLEN-1);
break;
//ap6210
case 2:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6210.txt", MOD_PARAM_PATHLEN-1);
break;
//ap6476
case 7:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6476.txt", MOD_PARAM_PATHLEN-1);
break;
//ap6212
case 9:
bcm_strncpy_s(nv_path, sizeof(nv_path), "/system/vendor/modules/nvram_ap6212.txt", MOD_PARAM_PATHLEN-1);
break;
default:
break;
}
#else /* CONFIG_BCMDHD_NVRAM_PATH */
nv_path[0] = '\0';
#endif /* CONFIG_BCMDHD_NVRAM_PATH */
#ifdef CONFIG_BCMDHD_CONFIG_PATH
bcm_strncpy_s(conf_path, sizeof(conf_path), "/system/vendor/modules/config.txt", MOD_PARAM_PATHLEN-1);
#else /* CONFIG_BCMDHD_CONFIG_PATH */
conf_path[0] = '\0';
#endif /* CONFIG_BCMDHD_CONFIG_PATH */
#ifdef SOFTAP
fw_path2[0] = '\0';
#endif
}
9、
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>
C:\Users\Administrator>cd R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd
C:\Users\Administrator>r:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/
failed to copy 'bcmdhd.ko' to '/system/vendor/modules//bcmdhd.ko': Read-only file system
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount
remount succeeded
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/
2479 KB/s (749040 bytes in 0.295s)
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
shell@astar-y3:/ $ cd /system/vendor/modules/
shell@astar-y3:/system/vendor/modules $ ll bcm*
-rw-r--r-- root root 26020 2017-06-26 17:18 bcm43438a0.hcd
-rw-rw-rw- root root 749040 2017-06-27 15:23 bcmdhd.ko
shell@astar-y3:/system/vendor/modules $ su
shell@astar-y3:/system/vendor/modules # chmod 644 bcmdhd.ko
shell@astar-y3:/system/vendor/modules # ll bcm*
-rw-r--r-- root root 26020 2017-06-26 17:18 bcm43438a0.hcd
-rw-r--r-- root root 749040 2017-06-27 15:23 bcmdhd.ko
shell@astar-y3:/system/vendor/modules # sync
shell@astar-y3:/system/vendor/modules # reboot
10、找不到:/system/vendor/modules/nvram_ap6212.txt
dhdsdio_download_nvram: Open nvram file failed
shell@astar-y3:/ $ [ 42.979794] CPU3: shutdown
[ 42.983481] [hotplug]: cpu(0) try to kill cpu(3)
[ 42.989021] [hotplug]: cpu3 is killed! .
[ 43.145481] init: computing context for service '/system/bin/wpa_supplicant'
[ 43.155451] init: starting 'p2p_supplicant'
[ 43.171263] init: Created socket '/dev/socket/wpa_wlan0' with mode '660', user '1010', group '1010'
[ 43.294995] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 43.304815] net_ratelimit: 1 callbacks suppressed
[ 43.310091]
[ 43.310097] Dongle Host Driver, version 1.88.45.3 (r420671)
[ 43.310105] Compiled in drivers/net/wireless/bcmdhd on Jun 27 2017 at 15:23:29
[ 43.325963] wl_android_wifi_on in 1
[ 43.329838] wl_android_wifi_on in 2: g_wifi_on=0
[ 43.335001] gpio ap6xxx_wl_regon set val 1, act val 1
[ 43.440645] [ap6xxx]: sdio wifi power state: on
[ 43.445880] =========== WLAN going back to live ========
[ 43.451895] sdio_reset_comm():
[ 43.455299] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.465732] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 43.472301] CPU2: shutdown
[ 43.475353] [hotplug]: cpu(1) try to kill cpu(2)
[ 43.480613] [hotplug]: cpu2 is killed! .
[ 43.527728] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.538189] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 43.599097] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.609455] [mmc]: mclk 0xf1c2008c 0x80430309
[ 43.669865] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.680175] [mmc]: mclk 0xf1c2008c 0x80030009
[ 43.752520] mmc1: queuing unknown CIS tuple 0x80 (2 bytes)
[ 43.760698] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 43.768875] mmc1: queuing unknown CIS tuple 0x80 (3 bytes)
[ 43.778715] mmc1: queuing unknown CIS tuple 0x80 (7 bytes)
[ 43.902224] [mmc]: sdc1 set ios: clk 150000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.912536] [mmc]: mclk 0xf1c2008c 0x80030009
[ 43.968936] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 43.979479] [mmc]: mclk 0xf1c2008c 0x8100000b
[ 43.991980] CPU1: shutdown
[ 43.995071] [hotplug]: cpu(0) try to kill cpu(1)
[ 44.000490] [hotplug]: cpu1 is killed! .
[ 44.039571] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 44.050247] [mmc]: mclk 0xf1c2008c 0x8140030b
[ 44.110664]
[ 44.110672]
[ 44.110677] dhd_bus_devreset: == WLAN ON ==
[ 44.123333] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x4
[ 44.131953] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 44.140615] dhd_conf_set_fw_name_by_chip: firmware_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 44.153199] dhd_conf_download_config: Ignore config file /system/vendor/modules/config.txt
[ 44.162566] Final fw_path=/system/vendor/modules/fw_bcm43438a0.bin
[ 44.169514] Final nv_path=/system/vendor/modules/nvram_ap6212.txt
[ 44.176370] Final conf_path=/system/vendor/modules/config.txt
[ 44.260174] dhdsdio_download_nvram: Open nvram file failed /system/vendor/modules/nvram_ap6212.txt
[ 44.270227] _dhdsdio_download_firmware: dongle nvram file download failed
[ 44.277815] dhd_dev_reset: dhd_bus_devreset: -35
[ 44.283049] dhd_prot_ioctl : bus is down. we have nothing to do
[ 44.289642] dhd_dev_reset: dhd_bus_devreset: -35
[ 44.294901] gpio ap6xxx_wl_regon set val 0, act val 0
[ 44.401205] [ap6xxx]: sdio wifi power state: off
[ 44.406335] =========== WLAN placed in RESET ========
[ 44.411984] wl_android_wifi_on: Failed
[ 44.416150] dhd_open : wl_android_wifi_on failed (-35)
[ 44.421889] wl_android_wifi_off in 1
[ 44.425861] wl_android_wifi_off in 2: g_wifi_on=0
[ 44.433284] wl_android_wifi_off out
[ 44.443722] init: waitpid returned pid 1023, status = 0000ff00
[ 44.450458] init: process 'p2p_supplicant', pid 1023 exited
shell@astar-y3:/ $
11、补一个nvram_ap6212.txt
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb remount
remount succeeded
shell@astar-y3:/ $
shell@astar-y3:/ $ cd /system/vendor/modules/
shell@astar-y3:/system/vendor/modules $ ll *.txt
-rw-r--r-- root root 956 2017-06-26 17:18 nvram_ap6210.txt
shell@astar-y3:/system/vendor/modules $ su
shell@astar-y3:/system/vendor/modules # cp nvram_ap6210.txt nvram_ap6212.txt
shell@astar-y3:/system/vendor/modules # ll *.txt
-rw-r--r-- root root 956 2017-06-26 17:18 nvram_ap6210.txt
-rw------- root root 956 2017-06-27 15:49 nvram_ap6212.txt
shell@astar-y3:/system/vendor/modules # chmod 644 nvram_ap6212.txt
shell@astar-y3:/system/vendor/modules # ll bcm*
-rw-r--r-- root root 26020 2017-06-26 17:18 bcm43438a0.hcd
-rw-r--r-- root root 749040 2017-06-27 15:23 bcmdhd.ko
shell@astar-y3:/system/vendor/modules # sync
shell@astar-y3:/system/vendor/modules # reboot
可以上网了!但是蓝牙/BT不通:
shell@astar-y3:/system/vendor/modules $ [ 306.892503] CPU2: shutdown
[ 306.895563] [hotplug]: cpu(0) try to kill cpu(2)
[ 306.900810] [hotplug]: cpu2 is killed! .
[ 307.888949] sndpcm_unmute,line:1099
[ 306.902007] CPU2: Booted secondary processor
[ 309.902889] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au
[ 310.132975] [rfkill]: rfkill set power 1
[ 310.137333] [rfkill]: no bt module matched !!
[ 310.360913] [rfkill]: rfkill set power 0
[ 310.365374] [rfkill]: no bt module matched !!
[ 310.901818] CPU2: shutdown
[ 310.904863] [hotplug]: cpu(0) try to kill cpu(2)
[ 310.910348] [hotplug]: cpu2 is killed! .
[ 310.920063] [BT_LPM] bluesleep_tx_timer_expire: Tx timer expired
[ 310.926735] [BT_LPM] bluesleep_tx_timer_expire: Tx has been idle
[ 310.933623] [BT_LPM] bluesleep_sleep_work: going to sleep...
[ 312.901369] CPU1: shutdown
[ 312.904549] [hotplug]: cpu(0) try to kill cpu(1)
[ 312.909746] [hotplug]: cpu1 is killed! .
[ 312.910865] CPU1: Booted secondary processor
shell@astar-y3:/system/vendor/modules $
shell@astar-y3:/system/vendor/modules $ [ 319.557922] [rfkill]: rfkill set power 1
[ 319.567108] [rfkill]: no bt module matched !!
[ 343.122717] [rfkill]: rfkill set power 1
[ 343.127266] [rfkill]: no bt module matched !!
[ 369.909912] healthd: battery l=100 v=0 t=30.0 h=2 st=5 c=0 chg=au
shell@astar-y3:/system/vendor/modules $
12、
同样的目录:R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf
找到BT的PM控制引脚:
R:\wyb\ap6212a0_a33_sc3817r\lichee\linux-3.4\arch\arm\mach-sunxi\rf\bt_pm.c
static int rfkill_set_power(void *data, bool blocked)
{
unsigned int mod_sel = wifi_pm_get_mod_type();
RF_MSG("rfkill set power %d\n", blocked);
switch (mod_sel)
{
case 2: /* ap6210 */
if (!blocked) {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);
} else {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);
}
break;
case 4: /* realtek rtl8723au */
if (!blocked) {
wifi_pm_gpio_ctrl("rtl8723au_bt", 1);
} else {
wifi_pm_gpio_ctrl("rtl8723au_bt", 0);
}
break;
case 5: /* realtek rtl8723bs */
if (!blocked) {
wifi_pm_gpio_ctrl("rtl8723bs_bt_regon", 1);
} else {
wifi_pm_gpio_ctrl("rtl8723bs_bt_regon", 0);
}
break;
case 7: /* ap6476 */
if (!blocked) {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);
} else {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);
}
break;
case 9: /* ap6212 */
if (!blocked) {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 1);
} else {
wifi_pm_gpio_ctrl("ap6xxx_bt_regon", 0);
}
break;
default:
RF_MSG("no bt module matched !!\n");
}
msleep(10);
return 0;
}
make bootimage之后,重新打包刷机之后BT通了。
WIFI又不通了。^_需要加:
shell@astar-y3:/system/vendor/modules/nvram_ap6212.txt
替换:
shell@astar-y3:/system/vendor/modules/bcmdhd.ko
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/lichee$ cd ../android/
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ source build/envsetup.sh
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ lunch
9. astar_y3-eng
Which would you like? [aosp_arm-eng] 9
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ extract-bsp
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/bImage copied!
/home/rootroot/wyb/ap6212a0_a33_sc3817r/android/device/*/astar-y3/modules copied!
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ make bootimage
rootroot@rootroot-E400:~/wyb/ap6212a0_a33_sc3817r/android$ pack -d