11全志r58m打emmc v5.1的patch之后wifi不能用的问题
2018/10/25 16:20
版本:V1.0
开发板:SC5806
1、系统编译:
rootroot@cm88:/home/wwt/r58m_orig$ cat android_r58m_wyb_20170314split.tar.gza* > android.tar.gz
rootroot@cm88:/home/wwt/r58m_orig$ tar zxvf lichee_r58m_wyb_20170308.tar.gz
rootroot@cm88:/home/wwt/r58m_orig$ tar zxvf android.tar.gz
rootroot@cm88:/home/wwt/r58m_orig$ cd lichee/
rootroot@cm88:/home/wwt/r58m_orig/lichee$ ./build.sh config
Welcome to mkscript setup progress
All available chips:
5. sun8iw6p1
Choice: 5
All available platforms:
0. android
Choice: 0
All available kernel:
1. linux-3.4
Choice: 1
All available boards:
1. f1
Choice: 1
rootroot@cm88:/home/wwt/r58m_orig/lichee$
rootroot@cm88:/home/wwt/r58m_orig/lichee$ ./build.sh
rootroot@cm88:/home/wwt/r58m_orig/lichee$
rootroot@cm88:/home/wwt/r58m_orig/lichee$ cd ../android/
rootroot@cm88:/home/wwt/r58m_orig/android$ source build/envsetup.sh
rootroot@cm88:/home/wwt/r58m_orig/android$ lunch
24. octopus_f1-eng
Which would you like? [aosp_arm-eng] 24
rootroot@cm88:/home/wwt/r58m_orig/android$
rootroot@cm88:/home/wwt/r58m_orig/android$ extract-bsp
/home/wwt/r58m_orig/android/device/softwinner/octopus-f1/bImage copied!
/home/wwt/r58m_orig/android/device/softwinner/octopus-f1/modules copied!
rootroot@cm88:/home/wwt/r58m_orig/android$ make -j12
rootroot@cm88:/home/wwt/r58m_orig/android$ verity_data_init
rootroot@cm88:/home/wwt/r58m_orig/android$ pack
(可选:)
rootroot@cm88:/home/wwt/r58m_orig/android$ cd ../lichee/brandy/
rootroot@cm88:/home/wwt/r58m_orig/lichee/brandy$
rootroot@cm88:/home/wwt/r58m_orig/lichee/brandy$ ./build.sh -p sun8iw6p1
rootroot@cm88:/home/wwt/r58m_orig/lichee/brandy$ cd -
/home/wwt/r58m_orig/android
rootroot@cm88:/home/wwt/r58m_orig/android$ pack
2、
以前的开发板是可以打开AP6212的,打了EMMC V5.1的patch之后,WIFI使劲打不开。可以看见WIFI驱动模块没有加载:
shell@octopus-f1:/ $
shell@octopus-f1:/ $ lsmod
Module Size Used by
sunxi_gmac 22155 0
smsc95xx 11838 0
smsc75xx 14154 0
cdc_ether 3163 0
rtl8150 9023 0
mcs7830 5644 0
qf9700 5904 0
asix 13590 0
usbnet 14128 6 smsc95xx,smsc75xx,cdc_ether,mcs7830,qf9700,asix
bcm_btlpm 7730 0
vfe_v4l2 1197230 0
ov8858_4lane 12396 0
hi253 13451 0
dw9714_act 4077 0
vfe_subdev 4691 3 vfe_v4l2,ov8858_4lane,hi253
vfe_os 4113 2 vfe_v4l2,vfe_subdev
actuator 944 1 dw9714_act
cci 23760 4 vfe_v4l2,ov8858_4lane,hi253,dw9714_act
videobuf_dma_contig 4197 1 vfe_v4l2
videobuf_core 16528 2 vfe_v4l2,videobuf_dma_contig
gslX680new 579958 0
bma250 7151 0
sw_device 13003 0
pvrsrvkm 281893 33
hdmi 40665 0
disp 1059091 6 hdmi
sunxi_tr 9268 2
nand 302098 0
shell@octopus-f1:/ $
确认wifi固件都在:
shell@octopus-f1:/system/vendor/modules $
shell@octopus-f1:/system/vendor/modules $
shell@octopus-f1:/system/vendor/modules $ ls -l *.bin
-rw-r--r-- root root 326074 2018-10-25 14:13 fw_bcm43438a0.bin
-rw-r--r-- root root 309352 2018-10-25 14:13 fw_bcm43438a0_apsta.bin
-rw-r--r-- root root 326074 2018-10-25 14:13 fw_bcm43438a0_p2p.bin
shell@octopus-f1:/system/vendor/modules $
shell@octopus-f1:/system/vendor/modules $
shell@octopus-f1:/system/vendor/modules $ ls -l *.txt
-rw-r--r-- root root 902 2018-10-25 14:13 nvram.txt
shell@octopus-f1:/system/vendor/modules $
手工强制挂载R58的驱动程序:
shell@octopus-f1:/ $ cd /system/vendor/modules/
shell@octopus-f1:/system/vendor/modules $ su
[ 548.690791] CPU1: Booted secondary processor
root@octopus-f1:/system/vendor/modules # insmod bcmdhd.ko
[ 554.490723] CPU1: Booted secondary processor
[ 554.513886] bcmdhd: disagrees about version of symbol sdio_release_host
[ 554.511232] CPU3: Booted secondary processor
[ 554.526312] bcmdhd: Unknown symbol sdio_release_host (err -22)
[ 554.532997] bcmdhd: disagrees about version of symbol sdio_disable_func
[ 554.540470] bcmdhd: Unknown symbol sdio_disable_func (err -22)
[ 554.547123] bcmdhd: disagrees about version of symbol sdio_set_block_size
[ 554.554850] bcmdhd: Unknown symbol sdio_set_block_size (err -22)
[ 554.561713] bcmdhd: disagrees about version of symbol sdio_claim_host
[ 554.569022] bcmdhd: Unknown symbol sdio_claim_host (err -22)
[ 554.575428] bcmdhd: disagrees about version of symbol sdio_memcpy_fromio
[ 554.583052] bcmdhd: Unknown symbol sdio_memcpy_fromio (err -22)
[ 554.589736] bcmdhd: disagrees about version of symbol sdio_register_driver
[ 554.597554] bcmdhd: Unknown symbol sdio_register_driver (err -22)
[ 554.604445] bcmdhd: disagrees about version of symbol sdio_readw
[ 554.611291] bcmdhd: Unknown symbol sdio_readw (err -22)
[ 554.617266] bcmdhd: disagrees about version of symbol sdio_reset_comm
[ 554.624596] bcmdhd: Unknown symbol sdio_reset_comm (err -22)
[ 554.631122] bcmdhd: disagrees about version of symbol sdio_writew
[ 554.637986] bcmdhd: Unknown symbol sdio_writew (err -22)
[ 554.644069] bcmdhd: disagrees about version of symbol sdio_memcpy_toio
[ 554.651441] bcmdhd: Unknown symbol sdio_memcpy_toio (err -22)
[ 554.658030] bcmdhd: disagrees about version of symbol sdio_f0_readb
[ 554.665110] bcmdhd: Unknown symbol sdio_f0_readb (err -22)
[ 554.671471] bcmdhd: disagrees about version of symbol sdio_set_host_pm_flags
[ 554.679405] bcmdhd: Unknown symbol sdio_set_host_pm_flags (err -22)
[ 554.686544] bcmdhd: disagrees about version of symbol sdio_f0_writeb
[ 554.693720] bcmdhd: Unknown symbol sdio_f0_writeb (err -22)
[ 554.700081] bcmdhd: disagrees about version of symbol sdio_unregister_driver
[ 554.708073] bcmdhd: Unknown symbol sdio_unregister_driver (err -22)
[ 554.715155] bcmdhd: disagrees about version of symbol sdio_readsb
[ 554.722094] bcmdhd: Unknown symbol sdio_readsb (err -22)
[ 554.728127] bcmdhd: disagrees about version of symbol sunxi_mci_check_r1_ready
[ 554.736331] bcmdhd: Unknown symbol sunxi_mci_check_r1_ready (err -22)
[ 554.743697] bcmdhd: disagrees about version of symbol sdio_readl
[ 554.750546] bcmdhd: Unknown symbol sdio_readl (err -22)
[ 554.756445] bcmdhd: disagrees about version of symbol mmc_set_data_timeout
[ 554.764259] bcmdhd: Unknown symbol mmc_set_data_timeout (err -22)
[ 554.771237] bcmdhd: disagrees about version of symbol sdio_writel
[ 554.778155] bcmdhd: Unknown symbol sdio_writel (err -22)
[ 554.784183] bcmdhd: disagrees about version of symbol mmc_wait_for_req
[ 554.791612] bcmdhd: Unknown symbol mmc_wait_for_req (err -22)
[ 554.798182] bcmdhd: disagrees about version of symbol sdio_get_host_pm_caps
[ 554.806037] bcmdhd: Unknown symbol sdio_get_host_pm_caps (err -22)
[ 554.813170] bcmdhd: disagrees about version of symbol sdio_enable_func
[ 554.820544] bcmdhd: Unknown symbol sdio_enable_func (err -22)
[ 554.827152] bcmdhd: disagrees about version of symbol sdio_readb
[ 554.833941] bcmdhd: Unknown symbol sdio_readb (err -22)
[ 554.839891] bcmdhd: disagrees about version of symbol sdio_writeb
[ 554.846777] bcmdhd: Unknown symbol sdio_writeb (err -22)
insmod: failed to load bcmdhd.ko: Invalid argument
1|root@octopus-f1:/system/vendor/modules #
要不是以前是可以打开WIFI的,我都以为是硬件损坏了!不过tina v3.0.2(R58)下的AP6212是好的,初步判定是R58M自带的BCMDHD的驱动版本太老了,直接用tina v3.0.2的代替了。
确认版本为:1.201.59.3 (r506368)
rootroot@cm88:/home/wwt/r58_android_v6.0/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
rootroot@cm88:/home/wwt/r58_android_v6.0/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep VERSION . -R
./include/epivers.h:#define EPI_MAJOR_VERSION 1
./include/epivers.h:#define EPI_MINOR_VERSION 201
./include/epivers.h:#define EPI_VERSION 1, 201, 59, 0
./include/epivers.h:#define EPI_VERSION_NUM 0x01c93b00
./include/epivers.h:#define EPI_VERSION_DEV 1.201.59
./include/epivers.h:#define EPI_VERSION_STR "1.201.59.3 (r506368)"
确认版本为:1.363.59.144.10 (r)
rootroot@cm88:/home/wwt/tina_v3.0.2/lichee/linux-3.4/drivers/net/wireless/bcmdhd$
rootroot@cm88:/home/wwt/tina_v3.0.2/lichee/linux-3.4/drivers/net/wireless/bcmdhd$ grep VERSION . -R
./include/epivers.h:#define EPI_MAJOR_VERSION 1
./include/epivers.h:#define EPI_MINOR_VERSION 363
./include/epivers.h:#define EPI_VERSION 1, 363, 59, 144
./include/epivers.h:#define EPI_VERSION_NUM 0x0116b3b9
./include/epivers.h:#define EPI_VERSION_DEV 1.363.59
./include/epivers.h:#define EPI_VERSION_STR "1.363.59.144.10 (r)"
通过WIN7下的ADB将WIFI驱动push到R58开发板:
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd W:\r58_android_v6.0\lichee\linux-3.4\drivers\net\wireless\bcmdhd
C:\Users\Administrator>w:
W:\r58_android_v6.0\lichee\linux-3.4\drivers\net\wireless\bcmdhd>dir *.ko
驱动器 W 中的卷是 rootroot
卷的序列号是 940F-E71D
W:\r58_android_v6.0\lichee\linux-3.4\drivers\net\wireless\bcmdhd 的目录
2018/10/25 15:56 983,348 bcmdhd.ko
1 个文件 983,348 字节
0 个目录 79,687,163,904 可用字节
W:\r58_android_v6.0\lichee\linux-3.4\drivers\net\wireless\bcmdhd>adb push bcmdhd.ko /system/vendor/modules/
7681 KB/s (983348 bytes in 0.125s)
W:\r58_android_v6.0\lichee\linux-3.4\drivers\net\wireless\bcmdhd>
再次手工挂载AP6212的WIFI驱动模块,成功了:
root@octopus-f1:/system/vendor/modules #
root@octopus-f1:/system/vendor/modules # insmod bcmdhd.ko
[ 131.540086] CPU Budget: Temperature: 59 Limit state:1 item[1608000,4,1608000,4 0]
[ 132.633794] dhd_module_init: in Dongle Host Driver, version 1.363.59.144.10 (r)
[ 132.642331] ======== dhd_wlan_init_plat_data ========
[ 132.648046] dhd_wlan_init_gpio: GPIO(WL_REG_ON) = -1
[ 132.653753] dhd_wlan_init_gpio: GPIO(WL_HOST_WAKE) = 355
[ 132.659832] dhd_wlan_init_gpio: host_oob_irq: 3
[ 132.665101] dhd_wlan_init_gpio: host_oob_irq_flags=0x414
[ 132.671134] dhd_wifi_platform_load: Enter
[ 132.675701] Power-up adapter 'DHD generic adapter'
[ 132.681491] wifi_platform_set_power = 1
[ 132.685842] ======== PULL WL_REG_ON(-1) HIGH! ========
[ 132.691728] [wifi_pm]: wifi power on
[ 133.000074] wifi_platform_bus_enumerate device present 1
[ 133.006079] ======== Card detection to detect SDIO card! ========
[ 133.013111] [mmc]: sdc1 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 133.024617] [mmc]: sdc1 power_supply is null
[ 133.040204] CPU Budget: Temperature: 60 Limit state:2 item[1412000,4,1412000,4 0]
[ 133.050055] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 133.082382] [mmc]: *** sunxi_mci_dump_errinfo(L917): smc 1 err, cmd 52, RTO !!
[ 133.091605] [mmc]: *** sunxi_mci_dump_errinfo(L917): smc 1 err, cmd 52, RTO !!
[ 133.100072] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 133.113022] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 133.125363] [mmc]: *** sunxi_mci_dump_errinfo(L917): smc 1 err, cmd 8, RTO !!
[ 133.133711] *******************Try sdio*******************
[ 133.140406] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[ 133.160487] mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
[ 133.168393] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 133.176265] mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
[ 133.185607] mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
[ 133.283488] [mmc]: sdc1 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 133.293918] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 1 timing SD-HS(SDR25) dt B
[ 133.304695] [mmc]: sdc1 set ios: clk 50000000Hz bm PP pm ON vdd 3.3V width 4 timing SD-HS(SDR25) dt B
[ 133.317685] mmc2: new high speed SDIO card at address 0001
[ 133.325060] platform reg-81x-cs-aldo1: Driver reg-81x-cs-aldo1 requests probe deferral
[ 133.325397] *******************sdio init ok*******************
[ 133.341593] bcmsdh_register: register client driver
[ 133.347263] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 133.352852] bcmsdh_sdmmc: bcmsdh_sdmmc_probe Enter
[ 133.352863] platform reg-81x-cs-aldo1: Driver reg-81x-cs-aldo1 requests probe deferral
[ 133.367452] bus num (host idx)=2, slot num (rca)=1
[ 133.373021] found adapter info 'DHD generic adapter'
[ 133.378738] sdioh_attach: set sd_f2_blocksize 256
[ 133.384552] dhdsdio_probe : no mutex held. set lock
[ 133.390270] F1 signature read @0x18000000=0x1530a9a6
[ 133.398883] F1 signature OK, socitype:0x1 chip:0xa9a6 rev:0x0 pkg:0x3
[ 133.407343] DHD: dongle ram size is set to 524288(orig 524288) at 0x0
[ 133.414957] dhd_conf_set_chiprev: chip=0xa9a6, chiprev=0
[ 133.422552] wl_create_event_handler(): thread:wl_event_handler:905 started
[ 133.422565] tsk Enter, tsk = 0xc9a41440
[ 133.437052] p2p0: P2P Interface Registered
[ 133.442073] dhd_attach(): thread:dhd_watchdog_thread:906 started
[ 133.448987] dhd_attach(): thread:dhd_dpc:907 started
[ 133.454861] dhd_attach(): thread:dhd_rxf:908 started
[ 133.460562] dhd_deferred_work_init: work queue initialized
[ 133.478444] Dongle Host Driver, version 1.363.59.144.10 (r)
[ 133.486480] Register interface [wlan0] MAC: e0:76:d0:cc:42:93
[ 133.486488]
[ 133.495053] wl_event_handler: was terminated
[ 133.500114] wl_destroy_event_handler(): thread:wl_event_handler:905 terminated OK
[ 133.508692] dhd_wl_ioctl: returning as busstate=0
[ 133.514141] bcmsdh_oob_intr_unregister: Enter
[ 133.519111] bcmsdh_oob_intr_unregister: irq is not registered
[ 133.525792] dhd_txglom_enable: enable 0
[ 133.530211] dhd_conf_set_txglom_params: swtxglom=0, txglom_ext=0, txglom_bucket_size=0
[ 133.539218] dhd_conf_set_txglom_params: txglomsize=0, deferred_tx_len=0, bus_txglom=-1
[ 133.540103] CPU Budget: Temperature: 60 Limit state:1 item[1608000,4,1608000,4 0]
[ 133.556697] dhd_conf_set_txglom_params: tx_in_rx=1, txinrx_thres=-1, dhd_txminmax=1
[ 133.570450] dhd_conf_set_txglom_params: tx_max_offset=0, txctl_tmo_fix=1
[ 133.578094] sdioh_set_mode: set txglom_mode to multi-desc
[ 133.584258] dhd_bus_devreset: WLAN OFF DONE
[ 133.589187] wifi_platform_set_power = 0
[ 133.593628] ======== PULL WL_REG_ON(-1) LOW! ========
[ 133.599308] [wifi_pm]: wifi power off
[ 133.603562] dhdsdio_probe : the lock is released.
[ 133.609025] platform reg-81x-cs-aldo1: Driver reg-81x-cs-aldo1 requests probe deferral
root@octopus-f1:/system/vendor/m[ 133.609145] dhd_module_init: Exit err=0
odules # [ 134.040089] CPU Budget: Temperature: 59 Limit state:1 item[1608000,4,1608000,4 0]
[ 134.540073] CPU Budget: Temperature: 60 Limit state:2 item[1412000,4,1412000,4 0]
root@octopus-f1:/system/vendor/modules #
参考资料:
https://blog.csdn.net/jzzjsy/article/details/12440519
insmod 驱动8191su或者rt3070报错
如果你按照这种方法操作,没用的,并且会在你的系统启动的时候,内核崩溃掉。
rootroot@cm88:/home/wwt/r58_android_v6.0/lichee/linux-3.4$ make ARCH=arm menuconfig
[*] Networking support --->
-*- Wireless --->
(默认选中:)
<*> cfg80211 - wireless configuration API
< > Generic IEEE 802.11 Networking Stack (mac80211)
修改为:
<*> Generic IEEE 802.11 Networking Stack (mac80211)
[ ] PID controller based rate control algorithm (NEW)
[*] Minstrel (NEW)
[*] Minstrel 802.11n support (NEW)
Default rate control algorithm (Minstrel) --->
[ ] Enable mac80211 mesh networking (pre-802.11s) support (NEW)
[ ] Export mac80211 internals in DebugFS (NEW)
[ ] Select mac80211 debugging features (NEW) --->