您尚未登录。

楼主 #1 2020-05-09 11:04:31

我思故我在
会员
注册时间: 2019-09-03
已发帖子: 244
积分: 243.5

SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

1. 克隆:
git clone https://github.com/al177/esp8089

2. 编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C ~/A33/mainline/linux  M=$(PWD)  modules



$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C ~/A33/mainline/linux  M=${PWD}  modules
make: Entering directory '/home/ubuntu/A33/mainline/linux'
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_debug.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/sdio_sif_esp.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/spi_sif_esp.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_io.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_file.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_main.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_sip.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_ext.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_ctrl.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_mac80211.o
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘beacon_tim_init’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:372:2: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
  memset(beacon_tim_saved, BEACON_TIM_SAVE_MAX, 0);
  ^~~~~~
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘hw_scan_done’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:924:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         struct cfg80211_scan_info info = {
         ^~~~~~
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘hw_scan_timeout_report’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:958:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         struct cfg80211_scan_info info = {
         ^~~~~~
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_utils.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_pm.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/testmode.o
  LD [M]  /home/ubuntu/A33/mainline/esp8089/esp8089.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "ieee80211_rx_napi" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_queue_work" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_hdrlen" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_beacon_get_tim" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_unregister_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_scan_completed" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "wiphy_rfkill_start_polling" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_queues" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_ready_on_channel" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_tx_status" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_alloc_hw_nm" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_wake_queues" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_remain_on_channel_expired" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_tx_ba_cb_irqsafe" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "wiphy_rfkill_set_hw_state" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_get_buffered_bc" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_register_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_start_tx_ba_session" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_free_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_start_tx_ba_cb_irqsafe" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_tx_ba_session" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
  CC      /home/ubuntu/A33/mainline/esp8089/esp8089.mod.o
  LD [M]  /home/ubuntu/A33/mainline/esp8089/esp8089.ko
make: Leaving directory '/home/ubuntu/A33/mainline/linux'

离线

#2 2020-05-09 12:17:57

JQH
会员
注册时间: 2020-05-09
已发帖子: 1
积分: 1

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

感谢,十分有用。可以作为参考

离线

#3 2020-05-24 18:38:33

秦皇岛岛主
会员
注册时间: 2020-05-22
已发帖子: 59
积分: 38

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

标记一下,不过编译没过,还要再尝试

离线

#4 2020-06-17 22:37:19

嵌入式冲
会员
注册时间: 2020-05-24
已发帖子: 138
积分: 110

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

我思故我在 说:

1. 克隆:
git clone https://github.com/al177/esp8089

2. 编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C ~/A33/mainline/linux  M=$(PWD)  modules



$ ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C ~/A33/mainline/linux  M=${PWD}  modules
make: Entering directory '/home/ubuntu/A33/mainline/linux'
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_debug.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/sdio_sif_esp.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/spi_sif_esp.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_io.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_file.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_main.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_sip.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_ext.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_ctrl.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_mac80211.o
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘beacon_tim_init’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:372:2: warning: ‘memset’ used with constant zero length parameter; this could be due to transposed parameters [-Wmemset-transposed-args]
  memset(beacon_tim_saved, BEACON_TIM_SAVE_MAX, 0);
  ^~~~~~
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘hw_scan_done’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:924:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         struct cfg80211_scan_info info = {
         ^~~~~~
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c: In function ‘hw_scan_timeout_report’:
/home/ubuntu/A33/mainline/esp8089/esp_mac80211.c:958:9: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
         struct cfg80211_scan_info info = {
         ^~~~~~
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_utils.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/esp_pm.o
  CC [M]  /home/ubuntu/A33/mainline/esp8089/testmode.o
  LD [M]  /home/ubuntu/A33/mainline/esp8089/esp8089.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "ieee80211_rx_napi" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_queue_work" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_hdrlen" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_beacon_get_tim" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_unregister_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_scan_completed" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "wiphy_rfkill_start_polling" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_queues" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_ready_on_channel" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_tx_status" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_alloc_hw_nm" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_wake_queues" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_remain_on_channel_expired" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_tx_ba_cb_irqsafe" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "wiphy_rfkill_set_hw_state" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_get_buffered_bc" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_register_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_start_tx_ba_session" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_free_hw" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_start_tx_ba_cb_irqsafe" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
WARNING: "ieee80211_stop_tx_ba_session" [/home/ubuntu/A33/mainline/esp8089/esp8089.ko] undefined!
  CC      /home/ubuntu/A33/mainline/esp8089/esp8089.mod.o
  LD [M]  /home/ubuntu/A33/mainline/esp8089/esp8089.ko
make: Leaving directory '/home/ubuntu/A33/mainline/linux'

可以用了吗

离线

#5 2021-10-31 18:38:51

memory
会员
注册时间: 2021-08-11
已发帖子: 457
积分: 433

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

https://hackaday.io/project/9300/instructions

git clone https://github.com/al177/esp8089

PATH=../output/host/bin/:$PATH ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C ../output/build/linux-5.4.70/ M=${PWD} modules

cp esp8089.ko lib/





etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

network={
        ssid="test"
        psk="13800138000"
}

搞定, 跑了一个小时, 运行正常:

# ping www.163.com
PING www.163.com (183.232.112.86): 56 data bytes
64 bytes from 183.232.112.86: seq=0 ttl=55 time=16.049 ms
64 bytes from 183.232.112.86: seq=1 ttl=55 time=19.129 ms
64 bytes from 183.232.112.86: seq=2 ttl=55 time=23.049 ms
64 bytes from 183.232.112.86: seq=3 ttl=55 time=31.148 ms
64 bytes from 183.232.112.86: seq=4 ttl=55 time=20.033 ms
64 bytes from 183.232.112.86: seq=5 ttl=55 time=21.376 ms
64 bytes from 183.232.112.86: seq=6 ttl=55 time=46.573 ms
64 bytes from 183.232.112.86: seq=7 ttl=55 time=19.451 ms

离线

#6 2021-10-31 19:03:04

memory
会员
注册时间: 2021-08-11
已发帖子: 457
积分: 433

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

64 bytes from 183.232.112.93: seq=48 ttl=55 time=22.813 ms
64 bytes from 183.232.112.93: seq=49 ttl=55 time=18.054 ms
64 bytes from 183.232.112.93: seq=50 ttl=55 time=17.417 ms
64 bytes from 183.232.112.93: seq=51 ttl=55 time=18.999 ms
64 bytes from 183.232.112.93: seq=52 ttl=55 time=22.459 ms
64 bytes from 183.232.112.93: seq=53 ttl=55 time=18.750 ms
64 bytes from 183.232.112.93: seq=54 ttl=55 time=19.293 ms
64 bytes from 183.232.112.93: seq=55 ttl=55 time=18.798 ms
64 bytes from 183.232.112.93: seq=56 ttl=55 time=18.941 ms
64 bytes from 183.232.112.93: seq=57 ttl=55 time=17.049 ms
[  200.805969] esp_sdio_remove enter
[  200.810629] sif_disable_irq release irq failed
[  200.815112] ------------[ cut here ]------------
[  200.819903] WARNING: CPU: 0 PID: 15 at kernel/workqueue.c:3042 __flush_work+0x1f0/0x200
[  200.827943] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[  200.833714] CPU: 0 PID: 15 Comm: kworker/0:1 Tainted: G           O      5.4.70-smallwitpi #3
[  200.842226] Hardware name: Allwinner sun8i Family
[  200.846954] Workqueue: events_freezable mmc_rescan
[  200.851789] [<c010ec5c>] (unwind_backtrace) from [<c010b57c>] (show_stack+0x10/0x14)
[  200.859544] [<c010b57c>] (show_stack) from [<c0713f3c>] (dump_stack+0x94/0xa8)
[  200.866776] [<c0713f3c>] (dump_stack) from [<c011dba0>] (__warn+0xbc/0xd4)
[  200.873649] [<c011dba0>] (__warn) from [<c011dc68>] (warn_slowpath_fmt+0xb0/0xb8)
[  200.881132] [<c011dc68>] (warn_slowpath_fmt) from [<c0137e04>] (__flush_work+0x1f0/0x200)
[  200.889310] [<c0137e04>] (__flush_work) from [<c0138060>] (__cancel_work_timer+0x110/0x1f4)
[  200.897714] [<c0138060>] (__cancel_work_timer) from [<bf0126a4>] (sip_detach+0x88/0x1b4 [esp8089])
[  200.906715] [<bf0126a4>] (sip_detach [esp8089]) from [<bf00e058>] (esp_sdio_remove+0x64/0x1a4 [esp8089])
[  200.916218] [<bf00e058>] (esp_sdio_remove [esp8089]) from [<c0583880>] (sdio_bus_remove+0x30/0x11c)
[  200.925275] [<c0583880>] (sdio_bus_remove) from [<c047c644>] (device_release_driver_internal+0xe8/0x1b8)
[  200.934757] [<c047c644>] (device_release_driver_internal) from [<c047b0f4>] (bus_remove_device+0xcc/0xf8)
[  200.944322] [<c047b0f4>] (bus_remove_device) from [<c047766c>] (device_del+0x140/0x36c)
[  200.952324] [<c047766c>] (device_del) from [<c0583a94>] (sdio_remove_func+0x1c/0x28)
[  200.960066] [<c0583a94>] (sdio_remove_func) from [<c058180c>] (mmc_sdio_remove+0x38/0x64)
[  200.968243] [<c058180c>] (mmc_sdio_remove) from [<c0582aa8>] (mmc_sdio_detect+0x6c/0xf8)
[  200.976337] [<c0582aa8>] (mmc_sdio_detect) from [<c0579c58>] (mmc_rescan+0xc0/0x3f4)
[  200.984082] [<c0579c58>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[  200.991997] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[  201.000088] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[  201.007487] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  201.014703] Exception stack(0xc68b3fb0 to 0xc68b3ff8)
[  201.019755] 3fa0:                                     00000000 00000000 00000000 00000000
[  201.027926] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  201.036094] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  201.042875] ---[ end trace 2c6f1f66aac3c8f2 ]---
[  201.047609] wlan0: deauthenticating from e4:26:8b:89:a9:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
[  201.157697] mmc0: card 0001 removed
[  201.222021] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[  201.244789] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[  201.259357] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[  201.276554] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[  201.296138] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[  201.301764] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[  201.311093] mmc0: new high speed SDIO card at address 0001
[  201.336191] 8<--- cut here ---
[  201.339303] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[  201.347551] pgd = b489f126
[  201.350264] [00000004] *pgd=00000000
[  201.353857] Internal error: Oops: 17 [#1] SMP ARM
[  201.358558] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[  201.364324] CPU: 0 PID: 15 Comm: kworker/0:1 Tainted: G        W  O      5.4.70-smallwitpi #3
[  201.372836] Hardware name: Allwinner sun8i Family
[  201.377572] Workqueue: events_freezable mmc_rescan
[  201.382424] PC is at esp_sdio_probe+0x48/0x3e0 [esp8089]
[  201.387746] LR is at sdio_bus_probe+0xbc/0x17c
[  201.392185] pc : [<bf00e1e0>]    lr : [<c0583790>]    psr: 20010113
[  201.398444] sp : c68b3d90  ip : dffa5000  fp : 00000396
[  201.403663] r10: 00000000  r9 : bf017190  r8 : bf017190
[  201.408881] r7 : c621b000  r6 : bf01a080  r5 : bf0467c4  r4 : 00000000
[  201.415400] r3 : c621b008  r2 : 00000003  r1 : 00000000  r0 : c621b000
[  201.421923] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  201.429049] Control: 10c5387d  Table: 4615c06a  DAC: 00000051
[  201.434789] Process kworker/0:1 (pid: 15, stack limit = 0xeb80b29c)
[  201.441051] Stack: (0xc68b3d90 to 0xc68b4000)
[  201.445410] 3d80:                                     0000000d 00000000 00000396 c621b008
[  201.453583] 3da0: c621b000 00000000 bf01a0ec bf017190 0000000d c0583790 c0ba2188 c621b008
[  201.461756] 3dc0: c0ba218c 00000000 bf01a0ec c047bf44 c621b008 bf01a0ec c047c3a0 c0b04e48
[  201.469926] 3de0: 00000001 00000000 c0b04e48 c047c1ec bf01a0ec c68b3e4c c621b008 00000000
[  201.478098] 3e00: c68b3e4c c047c3a0 c0b04e48 00000001 00000000 c0b04e48 00000396 c047a344
[  201.486269] 3e20: 00000000 c693a26c c622c538 8daf25ec c0b04e48 c0b04e48 c621b008 c621b04c
[  201.494441] 3e40: c0b04e48 c047bcb8 c0b60f5c c621b008 00000001 8daf25ec c621b008 c621b008
[  201.502612] 3e60: c0b58e98 c0b04e48 00000000 c047b020 c621b008 c62e0808 00000000 c0477f74
[  201.510783] 3e80: c6002000 c0578fc0 c0b04e48 c621b008 c6002000 8daf25ec c68b3eb0 c621b000
[  201.518955] 3ea0: c621b008 c6002000 c62e0800 c62e0800 00000001 c0583a64 00000000 00000001
[  201.527127] 3ec0: c6002000 c0582db4 00000000 c68b3edf 00000000 00000000 00000000 00000000
[  201.535298] 3ee0: 10ffff00 8daf25ec ffffff92 c6002294 00061a80 c6002000 c088c868 c088c874
[  201.543470] 3f00: 00000000 00000000 c7fdd900 c0579ed8 c6002294 c689e080 c7fdd900 c7fe0d00
[  201.551641] 3f20: 00000000 c013674c c0b03d00 c7fdd918 c689e080 c7fdd900 c689e094 c0b03d00
[  201.559812] 3f40: c7fdd918 ffffe000 00000008 c01369ec ffffe000 c0b61c29 c0916048 c689e080
[  201.567983] 3f60: c01369a8 c68ab380 c68ab340 00000000 c68b2000 c689e080 c01369a8 c684bea4
[  201.576154] 3f80: c68ab39c c013cc54 00000001 c68ab340 c013cb08 00000000 00000000 00000000
[  201.584325] 3fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[  201.592496] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  201.600666] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[  201.608886] [<bf00e1e0>] (esp_sdio_probe [esp8089]) from [<c0583790>] (sdio_bus_probe+0xbc/0x17c)
[  201.617777] [<c0583790>] (sdio_bus_probe) from [<c047bf44>] (really_probe+0x218/0x348)
[  201.625700] [<c047bf44>] (really_probe) from [<c047c1ec>] (driver_probe_device+0x60/0x164)
[  201.633964] [<c047c1ec>] (driver_probe_device) from [<c047a344>] (bus_for_each_drv+0x58/0xb8)
[  201.642490] [<c047a344>] (bus_for_each_drv) from [<c047bcb8>] (__device_attach+0xe0/0x14c)
[  201.650751] [<c047bcb8>] (__device_attach) from [<c047b020>] (bus_probe_device+0x84/0x8c)
[  201.658926] [<c047b020>] (bus_probe_device) from [<c0477f74>] (device_add+0x3b8/0x604)
[  201.666840] [<c0477f74>] (device_add) from [<c0583a64>] (sdio_add_func+0x5c/0x70)
[  201.674322] [<c0583a64>] (sdio_add_func) from [<c0582db4>] (mmc_attach_sdio+0x280/0x358)
[  201.682414] [<c0582db4>] (mmc_attach_sdio) from [<c0579ed8>] (mmc_rescan+0x340/0x3f4)
[  201.690251] [<c0579ed8>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[  201.698170] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[  201.706262] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[  201.713662] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  201.720875] Exception stack(0xc68b3fb0 to 0xc68b3ff8)
[  201.725923] 3fa0:                                     00000000 00000000 00000000 00000000
[  201.734093] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  201.742261] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  201.748880] Code: e5954018 e3a01000 e5851018 e2873008 (e5948004)
[  201.755113] ---[ end trace 2c6f1f66aac3c8f3 ]---
ping: sendto: Network is unreachable
#

悲剧,挂了。

离线

#7 2021-10-31 19:08:52

memory
会员
注册时间: 2021-08-11
已发帖子: 457
积分: 433

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

https://hackaday.io/project/9300/instructions

奇怪, 树莓派怎么没这个问题呢?

离线

#8 2021-10-31 19:14:43

memory
会员
注册时间: 2021-08-11
已发帖子: 457
积分: 433

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

#
# mount -t debugfs none /sys/kernel/debug
#
# echo 10000000 > /sys/kernel/debug/mmc0/clock
#
# cat /sys/kernel/debug/mmc0/clock
10000000
#
#
# ping www.163.com
PING www.163.com (183.232.112.93): 56 data bytes
64 bytes from 183.232.112.93: seq=0 ttl=55 time=15.028 ms
64 bytes from 183.232.112.93: seq=1 ttl=55 time=18.588 ms
64 bytes from 183.232.112.93: seq=2 ttl=55 time=21.811 ms
64 bytes from 183.232.112.93: seq=3 ttl=55 time=18.515 ms
^C
--- www.163.com ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 15.028/18.485/21.811 ms
# cat /sys/kernel/debug/mmc0/clock
10000000
#
# echo 1000000 > /sys/kernel/debug/mmc0/clock
#
# cat /sys/kernel/debug/mmc0/clock
1000000
#
# echo 2000000 > /sys/kernel/debug/mmc0/clock
#
#
# ping www.163.com
PING www.163.com (183.232.112.93): 56 data bytes
64 bytes from 183.232.112.93: seq=0 ttl=55 time=37.191 ms
64 bytes from 183.232.112.93: seq=1 ttl=55 time=19.386 ms
64 bytes from 183.232.112.93: seq=2 ttl=55 time=22.658 ms
64 bytes from 183.232.112.93: seq=3 ttl=55 time=30.682 ms
64 bytes from 183.232.112.93: seq=4 ttl=55 time=22.866 ms
64 bytes from 183.232.112.93: seq=5 ttl=55 time=25.487 ms
64 bytes from 183.232.112.93: seq=6 ttl=55 time=20.196 ms
64 bytes from 183.232.112.93: seq=7 ttl=55 time=18.082 ms
64 bytes from 183.232.112.93: seq=8 ttl=55 time=21.455 ms
64 bytes from 183.232.112.93: seq=9 ttl=55 time=22.958 ms
64 bytes from 183.232.112.93: seq=10 ttl=55 time=16.269 ms
64 bytes from 183.232.112.93: seq=11 ttl=55 time=19.450 ms
64 bytes from 183.232.112.93: seq=12 ttl=55 time=19.404 ms
64 bytes from 183.232.112.93: seq=13 ttl=55 time=23.384 ms
64 bytes from 183.232.112.93: seq=14 ttl=55 time=20.856 ms
64 bytes from 183.232.112.93: seq=15 ttl=55 time=19.750 ms
64 bytes from 183.232.112.93: seq=16 ttl=55 time=21.966 ms
64 bytes from 183.232.112.93: seq=17 ttl=55 time=19.940 ms
64 bytes from 183.232.112.93: seq=18 ttl=55 time=19.456 ms
64 bytes from 183.232.112.93: seq=19 ttl=55 time=19.239 ms
64 bytes from 183.232.112.93: seq=20 ttl=55 time=21.759 ms
64 bytes from 183.232.112.93: seq=21 ttl=55 time=25.094 ms
64 bytes from 183.232.112.93: seq=22 ttl=55 time=19.291 ms
64 bytes from 183.232.112.93: seq=23 ttl=55 time=23.608 ms
64 bytes from 183.232.112.93: seq=24 ttl=55 time=25.555 ms
64 bytes from 183.232.112.93: seq=25 ttl=55 time=23.701 ms
64 bytes from 183.232.112.93: seq=26 ttl=55 time=23.155 ms
64 bytes from 183.232.112.93: seq=27 ttl=55 time=28.858 ms
64 bytes from 183.232.112.93: seq=28 ttl=55 time=31.090 ms
64 bytes from 183.232.112.93: seq=29 ttl=55 time=30.813 ms
64 bytes from 183.232.112.93: seq=30 ttl=55 time=20.936 ms
64 bytes from 183.232.112.93: seq=31 ttl=55 time=44.999 ms
64 bytes from 183.232.112.93: seq=32 ttl=55 time=22.873 ms
64 bytes from 183.232.112.93: seq=33 ttl=55 time=21.512 ms
64 bytes from 183.232.112.93: seq=34 ttl=55 time=27.389 ms
64 bytes from 183.232.112.93: seq=35 ttl=55 time=24.471 ms
64 bytes from 183.232.112.93: seq=36 ttl=55 time=19.958 ms
64 bytes from 183.232.112.93: seq=37 ttl=55 time=20.370 ms
64 bytes from 183.232.112.93: seq=38 ttl=55 time=19.380 ms
64 bytes from 183.232.112.93: seq=39 ttl=55 time=22.356 ms
64 bytes from 183.232.112.93: seq=40 ttl=55 time=19.860 ms
64 bytes from 183.232.112.93: seq=41 ttl=55 time=21.513 ms
64 bytes from 183.232.112.93: seq=42 ttl=55 time=23.562 ms
64 bytes from 183.232.112.93: seq=43 ttl=55 time=20.622 ms
[  484.726383] esp_sdio_remove enter
[  484.731038] sif_disable_irq release irq failed
[  484.735650] ------------[ cut here ]------------
[  484.740311] WARNING: CPU: 0 PID: 179 at kernel/workqueue.c:3042 __flush_work+0x1f0/0x200
[  484.748441] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[  484.754212] CPU: 0 PID: 179 Comm: kworker/0:0 Tainted: G           O      5.4.70-smallwitpi #3
[  484.762810] Hardware name: Allwinner sun8i Family
[  484.767539] Workqueue: events_freezable mmc_rescan
[  484.772374] [<c010ec5c>] (unwind_backtrace) from [<c010b57c>] (show_stack+0x10/0x14)
[  484.780128] [<c010b57c>] (show_stack) from [<c0713f3c>] (dump_stack+0x94/0xa8)
[  484.787360] [<c0713f3c>] (dump_stack) from [<c011dba0>] (__warn+0xbc/0xd4)
[  484.794238] [<c011dba0>] (__warn) from [<c011dc68>] (warn_slowpath_fmt+0xb0/0xb8)
[  484.801722] [<c011dc68>] (warn_slowpath_fmt) from [<c0137e04>] (__flush_work+0x1f0/0x200)
[  484.809898] [<c0137e04>] (__flush_work) from [<c0138060>] (__cancel_work_timer+0x110/0x1f4)
[  484.818307] [<c0138060>] (__cancel_work_timer) from [<bf0126a4>] (sip_detach+0x88/0x1b4 [esp8089])
[  484.827305] [<bf0126a4>] (sip_detach [esp8089]) from [<bf00e058>] (esp_sdio_remove+0x64/0x1a4 [esp8089])
[  484.836809] [<bf00e058>] (esp_sdio_remove [esp8089]) from [<c0583880>] (sdio_bus_remove+0x30/0x11c)
[  484.845865] [<c0583880>] (sdio_bus_remove) from [<c047c644>] (device_release_driver_internal+0xe8/0x1b8)
[  484.855347] [<c047c644>] (device_release_driver_internal) from [<c047b0f4>] (bus_remove_device+0xcc/0xf8)
[  484.864905] [<c047b0f4>] (bus_remove_device) from [<c047766c>] (device_del+0x140/0x36c)
[  484.872909] [<c047766c>] (device_del) from [<c0583a94>] (sdio_remove_func+0x1c/0x28)
[  484.880651] [<c0583a94>] (sdio_remove_func) from [<c058180c>] (mmc_sdio_remove+0x38/0x64)
[  484.888827] [<c058180c>] (mmc_sdio_remove) from [<c0582aa8>] (mmc_sdio_detect+0x6c/0xf8)
[  484.896918] [<c0582aa8>] (mmc_sdio_detect) from [<c0579c58>] (mmc_rescan+0xc0/0x3f4)
[  484.904664] [<c0579c58>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[  484.912579] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[  484.920671] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[  484.928071] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  484.935286] Exception stack(0xc6021fb0 to 0xc6021ff8)
[  484.940339] 1fa0:                                     00000000 00000000 00000000 00000000
[  484.948509] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  484.956678] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  484.963447] ---[ end trace 25392e2e26096a11 ]---
[  484.968190] wlan0: deauthenticating from e4:26:8b:89:a9:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
[  485.077636] mmc0: card 0001 removed
[  485.141727] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[  485.165033] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[  485.179172] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[  485.195981] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[  485.215969] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[  485.221655] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[  485.230442] mmc0: new high speed SDIO card at address 0001
[  485.255923] 8<--- cut here ---
[  485.259034] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[  485.267281] pgd = a6e9fede
[  485.269992] [00000004] *pgd=00000000
[  485.273584] Internal error: Oops: 17 [#1] SMP ARM
[  485.278283] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[  485.284049] CPU: 0 PID: 179 Comm: kworker/0:0 Tainted: G        W  O      5.4.70-smallwitpi #3
[  485.292648] Hardware name: Allwinner sun8i Family
[  485.297383] Workqueue: events_freezable mmc_rescan
[  485.302228] PC is at esp_sdio_probe+0x48/0x3e0 [esp8089]
[  485.307551] LR is at sdio_bus_probe+0xbc/0x17c
[  485.311990] pc : [<bf00e1e0>]    lr : [<c0583790>]    psr: 200d0013
[  485.318250] sp : c6021d90  ip : 675c8400  fp : 00000396
[  485.323467] r10: 00000000  r9 : bf017190  r8 : bf017190
[  485.328686] r7 : c6256400  r6 : bf01a080  r5 : bf0467c4  r4 : 00000000
[  485.335204] r3 : c6256408  r2 : 00000003  r1 : 00000000  r0 : c6256400
[  485.341727] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[  485.348854] Control: 10c5387d  Table: 461d406a  DAC: 00000051
[  485.354593] Process kworker/0:0 (pid: 179, stack limit = 0x19a39033)
[  485.360942] Stack: (0xc6021d90 to 0xc6022000)
[  485.365300] 1d80:                                     0000000d 00000000 00000396 c6256408
[  485.373464] 1da0: c6256400 00000000 bf01a0ec bf017190 0000000d c0583790 c0ba2188 c6256408
[  485.381635] 1dc0: c0ba218c 00000000 bf01a0ec c047bf44 c6256408 bf01a0ec c047c3a0 c0b04e48
[  485.389806] 1de0: 00000001 00000000 c0b04e48 c047c1ec bf01a0ec c6021e4c c6256408 00000000
[  485.397978] 1e00: c6021e4c c047c3a0 c0b04e48 00000001 00000000 c0b04e48 00000396 c047a344
[  485.406149] 1e20: 00000000 c693a26c c62676b8 8daf25ec c0b04e48 c0b04e48 c6256408 c625644c
[  485.414320] 1e40: c0b04e48 c047bcb8 c0b60f5c c6256408 00000001 8daf25ec c6256408 c6256408
[  485.422491] 1e60: c0b58e98 c0b04e48 00000000 c047b020 c6256408 c62cc808 00000000 c0477f74
[  485.430664] 1e80: c6002000 c0578fc0 c0b04e48 c6256408 c6002000 8daf25ec c6021eb0 c6256400
[  485.438836] 1ea0: c6256408 c6002000 c62cc800 c62cc800 00000001 c0583a64 00000000 00000001
[  485.447007] 1ec0: c6002000 c0582db4 00000000 c6021edf 00000000 00000000 00000000 00000000
[  485.455177] 1ee0: 10ffff00 8daf25ec ffffff92 c6002294 00061a80 c6002000 c088c868 c088c874
[  485.463349] 1f00: 00000000 00000000 c7fdd900 c0579ed8 c6002294 c6267c80 c7fdd900 c7fe0d00
[  485.471521] 1f20: 00000000 c013674c c0b03d00 c7fdd918 c6267c80 c7fdd900 c6267c94 c0b03d00
[  485.479693] 1f40: c7fdd918 ffffe000 00000008 c01369ec ffffe000 c0b61c29 c0916048 c6267c80
[  485.487863] 1f60: c01369a8 c60fc140 c60fc100 00000000 c6020000 c6267c80 c01369a8 c600fea4
[  485.496036] 1f80: c60fc15c c013cc54 000000c2 c60fc100 c013cb08 00000000 00000000 00000000
[  485.504205] 1fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[  485.512376] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  485.520547] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[  485.528761] [<bf00e1e0>] (esp_sdio_probe [esp8089]) from [<c0583790>] (sdio_bus_probe+0xbc/0x17c)
[  485.537652] [<c0583790>] (sdio_bus_probe) from [<c047bf44>] (really_probe+0x218/0x348)
[  485.545574] [<c047bf44>] (really_probe) from [<c047c1ec>] (driver_probe_device+0x60/0x164)
[  485.553838] [<c047c1ec>] (driver_probe_device) from [<c047a344>] (bus_for_each_drv+0x58/0xb8)
[  485.562360] [<c047a344>] (bus_for_each_drv) from [<c047bcb8>] (__device_attach+0xe0/0x14c)
[  485.570621] [<c047bcb8>] (__device_attach) from [<c047b020>] (bus_probe_device+0x84/0x8c)
[  485.578795] [<c047b020>] (bus_probe_device) from [<c0477f74>] (device_add+0x3b8/0x604)
[  485.586709] [<c0477f74>] (device_add) from [<c0583a64>] (sdio_add_func+0x5c/0x70)
[  485.594191] [<c0583a64>] (sdio_add_func) from [<c0582db4>] (mmc_attach_sdio+0x280/0x358)
[  485.602281] [<c0582db4>] (mmc_attach_sdio) from [<c0579ed8>] (mmc_rescan+0x340/0x3f4)
[  485.610120] [<c0579ed8>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[  485.618038] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[  485.626129] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[  485.633528] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[  485.640741] Exception stack(0xc6021fb0 to 0xc6021ff8)
[  485.645790] 1fa0:                                     00000000 00000000 00000000 00000000
[  485.653960] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[  485.662128] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[  485.668749] Code: e5954018 e3a01000 e5851018 e2873008 (e5948004)
[  485.674989] ---[ end trace 25392e2e26096a12 ]---
ping: sendto: Network is unreachable

又挂了?

离线

#9 2021-10-31 19:46:22

memory
会员
注册时间: 2021-08-11
已发帖子: 457
积分: 433

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

https://github.com/al177/esp8089/issues/45

有人遇到一模一样问题,无人解答。

离线

#10 2021-10-31 19:51:59

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

https://github.com/al177/esp8089/issues/24
可能是电源问题,遇事不决,先查电源

离线

#11 2021-10-31 20:42:11

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

F5697FD84776308D61C435725804F79E.jpgCF3933A681643C7B4D1BAA9F727DC935.jpg

ping 一个晚上试一试。

离线

#12 2021-11-01 08:12:48

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

4104 bytes from 183.232.112.93: seq=35917 ttl=55 time=20.928 ms
4104 bytes from 183.232.112.93: seq=35918 ttl=55 time=21.404 ms
4104 bytes from 183.232.112.93: seq=35919 ttl=55 time=26.296 ms
4104 bytes from 183.232.112.93: seq=35920 ttl=55 time=22.180 ms
4104 bytes from 183.232.112.93: seq=35921 ttl=55 time=23.201 ms
4104 bytes from 183.232.112.93: seq=35922 ttl=55 time=23.273 ms
4104 bytes from 183.232.112.93: seq=35923 ttl=55 time=24.312 ms
4104 bytes from 183.232.112.93: seq=35924 ttl=55 time=21.870 ms
4104 bytes from 183.232.112.93: seq=35925 ttl=55 time=22.400 ms
4104 bytes from 183.232.112.93: seq=35926 ttl=55 time=28.128 ms
[36024.858388] wlan0: authenticate with e4:26:8b:89:a9:f8
[36024.863840] wlan0: send auth to e4:26:8b:89:a9:f8 (try 1/3)
[36025.075400] wlan0: send auth to e4:26:8b:89:a9:f8 (try 2/3)
[36025.285360] wlan0: send auth to e4:26:8b:89:a9:f8 (try 3/3)
[36025.495337] wlan0: authentication with e4:26:8b:89:a9:f8 timed out
[36973.133610] esp_sdio_remove enter
[36973.139131] sif_disable_irq release irq failed
[36973.143668] ------------[ cut here ]------------
[36973.148535] WARNING: CPU: 0 PID: 302 at kernel/workqueue.c:3042 __flush_work+0x1f0/0x200
[36973.156667] Modules linked in: esp8089(O) tsc2007 rtc_hym8563
[36973.162441] CPU: 0 PID: 302 Comm: kworker/0:1 Tainted: G           O      5.4.70-smallwitpi #3
[36973.171040] Hardware name: Allwinner sun8i Family
[36973.175768] Workqueue: events_freezable mmc_rescan
[36973.180602] [<c010ec5c>] (unwind_backtrace) from [<c010b57c>] (show_stack+0x10/0x14)
[36973.188355] [<c010b57c>] (show_stack) from [<c0713f3c>] (dump_stack+0x94/0xa8)
[36973.195587] [<c0713f3c>] (dump_stack) from [<c011dba0>] (__warn+0xbc/0xd4)
[36973.202462] [<c011dba0>] (__warn) from [<c011dc68>] (warn_slowpath_fmt+0xb0/0xb8)
[36973.209945] [<c011dc68>] (warn_slowpath_fmt) from [<c0137e04>] (__flush_work+0x1f0/0x200)
[36973.218122] [<c0137e04>] (__flush_work) from [<c0138060>] (__cancel_work_timer+0x110/0x1f4)
[36973.226527] [<c0138060>] (__cancel_work_timer) from [<bf0126a4>] (sip_detach+0x88/0x1b4 [esp8089])
[36973.235527] [<bf0126a4>] (sip_detach [esp8089]) from [<bf00e058>] (esp_sdio_remove+0x64/0x1a4 [esp8089])
[36973.245028] [<bf00e058>] (esp_sdio_remove [esp8089]) from [<c0583880>] (sdio_bus_remove+0x30/0x11c)
[36973.254085] [<c0583880>] (sdio_bus_remove) from [<c047c644>] (device_release_driver_internal+0xe8/0x1b8)
[36973.263567] [<c047c644>] (device_release_driver_internal) from [<c047b0f4>] (bus_remove_device+0xcc/0xf8)
[36973.273133] [<c047b0f4>] (bus_remove_device) from [<c047766c>] (device_del+0x140/0x36c)
[36973.281135] [<c047766c>] (device_del) from [<c0583a94>] (sdio_remove_func+0x1c/0x28)
[36973.288877] [<c0583a94>] (sdio_remove_func) from [<c058180c>] (mmc_sdio_remove+0x38/0x64)
[36973.297052] [<c058180c>] (mmc_sdio_remove) from [<c0582aa8>] (mmc_sdio_detect+0x6c/0xf8)
[36973.305142] [<c0582aa8>] (mmc_sdio_detect) from [<c0579c58>] (mmc_rescan+0xc0/0x3f4)
[36973.312887] [<c0579c58>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[36973.320803] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[36973.328896] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[36973.336295] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[36973.343510] Exception stack(0xc616bfb0 to 0xc616bff8)
[36973.348560] bfa0:                                     00000000 00000000 00000000 00000000
[36973.356731] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[36973.364900] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[36973.371676] ---[ end trace 47c0350e194c98ef ]---
[36973.389204] func sip_write_pkts err!!!!!!!!!: -123
[36973.417439] mmc0: card 0001 removed
[36973.490332] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[36973.503468] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[36973.512152] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[36973.519781] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[36973.525385] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[36973.530925] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[36973.536512] mmc0: new high speed SDIO card at address 0001
[36973.550474] 8<--- cut here ---
[36973.553575] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[36973.561864] pgd = 13fb3490
[36973.564577] [00000004] *pgd=00000000
[36973.568222] Internal error: Oops: 17 [#1] SMP ARM
[36973.572927] Modules linked in: esp8089(O) tsc2007 rtc_hym8563
[36973.578694] CPU: 0 PID: 302 Comm: kworker/0:1 Tainted: G        W  O      5.4.70-smallwitpi #3
[36973.587292] Hardware name: Allwinner sun8i Family
[36973.592029] Workqueue: events_freezable mmc_rescan
[36973.596886] PC is at esp_sdio_probe+0x48/0x3e0 [esp8089]
[36973.602208] LR is at sdio_bus_probe+0xbc/0x17c
[36973.606646] pc : [<bf00e1e0>]    lr : [<c0583790>]    psr: 20000013
[36973.612905] sp : c616bd90  ip : de557a80  fp : 00000396
[36973.618123] r10: 00000000  r9 : bf017190  r8 : bf017190
[36973.623342] r7 : c6be5a00  r6 : bf01a080  r5 : bf0467c4  r4 : 00000000
[36973.629860] r3 : c6be5a08  r2 : 00000003  r1 : 00000000  r0 : c6be5a00
[36973.636384] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[36973.643510] Control: 10c5387d  Table: 462d006a  DAC: 00000051
[36973.649252] Process kworker/0:1 (pid: 302, stack limit = 0xe2391612)
[36973.655601] Stack: (0xc616bd90 to 0xc616c000)
[36973.659957] bd80:                                     0000000d 00000000 00000396 c6be5a08
[36973.668129] bda0: c6be5a00 00000000 bf01a0ec bf017190 0000000d c0583790 c0ba2188 c6be5a08
[36973.676301] bdc0: c0ba218c 00000000 bf01a0ec c047bf44 c6be5a08 bf01a0ec c047c3a0 c0b04e48
[36973.684472] bde0: 00000001 00000000 c0b04e48 c047c1ec bf01a0ec c616be4c c6be5a08 00000000
[36973.692644] be00: c616be4c c047c3a0 c0b04e48 00000001 00000000 c0b04e48 00000396 c047a344
[36973.700816] be20: 00000000 c693a26c c6268738 8daf25ec c0b04e48 c0b04e48 c6be5a08 c6be5a4c
[36973.708988] be40: c0b04e48 c047bcb8 c0b60f5c c6be5a08 00000001 8daf25ec c6be5a08 c6be5a08
[36973.717160] be60: c0b58e98 c0b04e48 00000000 c047b020 c6be5a08 c62d8808 00000000 c0477f74
[36973.725331] be80: c6002000 c0578fc0 c0b04e48 c6be5a08 c6002000 8daf25ec c616beb0 c6be5a00
[36973.733503] bea0: c6be5a08 c6002000 c62d8800 c62d8800 00000001 c0583a64 00000000 00000001
[36973.741675] bec0: c6002000 c0582db4 00000000 c616bedf 00000000 00000000 00000000 00000000
[36973.749846] bee0: 10ffff00 8daf25ec ffffff92 c6002294 00061a80 c6002000 c088c868 c088c874
[36973.758018] bf00: 00000000 00000000 c7fdd900 c0579ed8 c6002294 c6268b80 c7fdd900 c7fe0d00
[36973.766191] bf20: 00000000 c013674c c0b03d00 c7fdd918 c6268b80 c7fdd900 c6268b94 c0b03d00
[36973.774362] bf40: c7fdd918 ffffe000 00000008 c01369ec ffffe000 c0b61c29 c0916048 c6268b80
[36973.782534] bf60: c01369a8 c615a100 c615a140 00000000 c616a000 c6268b80 c01369a8 c600fea4
[36973.790705] bf80: c615a11c c013cc54 00000007 c615a140 c013cb08 00000000 00000000 00000000
[36973.798876] bfa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[36973.807047] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[36973.815218] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[36973.823431] [<bf00e1e0>] (esp_sdio_probe [esp8089]) from [<c0583790>] (sdio_bus_probe+0xbc/0x17c)
[36973.832318] [<c0583790>] (sdio_bus_probe) from [<c047bf44>] (really_probe+0x218/0x348)
[36973.840240] [<c047bf44>] (really_probe) from [<c047c1ec>] (driver_probe_device+0x60/0x164)
[36973.848503] [<c047c1ec>] (driver_probe_device) from [<c047a344>] (bus_for_each_drv+0x58/0xb8)
[36973.857025] [<c047a344>] (bus_for_each_drv) from [<c047bcb8>] (__device_attach+0xe0/0x14c)
[36973.865287] [<c047bcb8>] (__device_attach) from [<c047b020>] (bus_probe_device+0x84/0x8c)
[36973.873462] [<c047b020>] (bus_probe_device) from [<c0477f74>] (device_add+0x3b8/0x604)
[36973.881376] [<c0477f74>] (device_add) from [<c0583a64>] (sdio_add_func+0x5c/0x70)
[36973.888857] [<c0583a64>] (sdio_add_func) from [<c0582db4>] (mmc_attach_sdio+0x280/0x358)
[36973.896949] [<c0582db4>] (mmc_attach_sdio) from [<c0579ed8>] (mmc_rescan+0x340/0x3f4)
[36973.904788] [<c0579ed8>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[36973.912706] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[36973.920798] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[36973.928200] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[36973.935416] Exception stack(0xc616bfb0 to 0xc616bff8)
[36973.940464] bfa0:                                     00000000 00000000 00000000 00000000
[36973.948634] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[36973.956803] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[36973.963422] Code: e5954018 e3a01000 e5851018 e2873008 (e5948004)
[36973.969669] ---[ end trace 47c0350e194c98f0 ]---
ping: sendto: Network is unreachable
#
#
#
#

奇怪,加了一个 3300uF 的大电容也会挂,只是现在没那么容易挂了。

发了 35926 个 4096 字节包之后挂。

离线

#13 2021-11-01 08:42:14

kekemuyu
会员
注册时间: 2018-12-13
已发帖子: 849
积分: 715

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

这是个老问题了,最早好像是晕哥发现的

离线

#14 2021-11-01 09:28:59

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

如果你想找出這個問題的話, 可以嘗試如下方式:

從Oops看來大約有兩個問題:
1. wlan0長時間Ping導致esp sdio重新掛載驅動(這個現象比較像是記憶體被吃光)
  建議除錯手法:
    a. 啟動ping程序(長時間執行)
    a. 寫一個shell script的迴圈, 將剩餘的記憶體, 打印出來觀察

2. esp sdio在probe()和remove()過程中, 沒有適當管理資源
  建議除錯手法:
    a. 移除多餘驅動(rtc_hym8563, tsc2007), 讓除錯更單純一點
    b. 寫一個shell script的迴圈做插入驅動和移除驅動的壓力測試

另外, 建議你把kallsyms也附上來, 這樣比較好對齊Oops的位置

离线

#15 2021-11-01 09:36:14

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒

感谢司徒大佬回复,

#
#
# lsmod
Module                  Size  Used by    Tainted: G
esp8089               249856  0
tsc2007                16384  0
rtc_hym8563            16384  0
# rmmod esp8089
[ 1301.744604] esp_sdio_exit
[ 1301.747950] esp_sdio_remove enter
[ 1301.754145] ------------[ cut here ]------------
[ 1301.758986] WARNING: CPU: 0 PID: 184 at kernel/workqueue.c:3042 __flush_work+0x1f0/0x200
[ 1301.767119] Modules linked in: esp8089(O-) tsc2007 rtc_hym8563
[ 1301.772981] CPU: 0 PID: 184 Comm: rmmod Tainted: G           O      5.4.70-smallwitpi #3
[ 1301.781059] Hardware name: Allwinner sun8i Family
[ 1301.785810] [<c010ec5c>] (unwind_backtrace) from [<c010b57c>] (show_stack+0x10/0x14)
[ 1301.793564] [<c010b57c>] (show_stack) from [<c0713f3c>] (dump_stack+0x94/0xa8)
[ 1301.800797] [<c0713f3c>] (dump_stack) from [<c011dba0>] (__warn+0xbc/0xd4)
[ 1301.807671] [<c011dba0>] (__warn) from [<c011dc68>] (warn_slowpath_fmt+0xb0/0xb8)
[ 1301.815153] [<c011dc68>] (warn_slowpath_fmt) from [<c0137e04>] (__flush_work+0x1f0/0x200)
[ 1301.823330] [<c0137e04>] (__flush_work) from [<c0138060>] (__cancel_work_timer+0x110/0x1f4)
[ 1301.831739] [<c0138060>] (__cancel_work_timer) from [<bf0126a4>] (sip_detach+0x88/0x1b4 [esp8089])
[ 1301.840735] [<bf0126a4>] (sip_detach [esp8089]) from [<bf00e058>] (esp_sdio_remove+0x64/0x1a4 [esp8089])
[ 1301.850238] [<bf00e058>] (esp_sdio_remove [esp8089]) from [<c0583880>] (sdio_bus_remove+0x30/0x11c)
[ 1301.859295] [<c0583880>] (sdio_bus_remove) from [<c047c644>] (device_release_driver_internal+0xe8/0x1b8)
[ 1301.868780] [<c047c644>] (device_release_driver_internal) from [<c047c780>] (driver_detach+0x54/0xa0)
[ 1301.877998] [<c047c780>] (driver_detach) from [<c047b350>] (bus_remove_driver+0x4c/0xa4)
[ 1301.886104] [<c047b350>] (bus_remove_driver) from [<bf00e850>] (esp_sdio_exit+0x28/0x50 [esp8089])
[ 1301.895081] [<bf00e850>] (esp_sdio_exit [esp8089]) from [<c0197340>] (sys_delete_module+0x128/0x1f0)
[ 1301.904214] [<c0197340>] (sys_delete_module) from [<c0101000>] (ret_fast_syscall+0x0/0x54)
[ 1301.912471] Exception stack(0xc61c5fa8 to 0xc61c5ff0)
[ 1301.917526] 5fa0:                   b6e8e364 38707365 beee4bc8 00000880 00000000 beee4e28
[ 1301.925698] 5fc0: b6e8e364 38707365 00393830 00000081 00000000 00000000 b6f65000 00000000
[ 1301.933865] 5fe0: beee4bc0 beee4bb0 b6e8e22c b6e0b0e2
[ 1301.939038] ---[ end trace 76a1858765e054ce ]---
[ 1301.943743] wlan0: deauthenticating from e4:26:8b:89:a9:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1302.047595] ESP8089 reset via GPIO 0
#
# insmod /lib/esp8089.ko
[ 1345.884022]
[ 1345.884022] ***** EAGLE DRIVER VER:bdf5087c3deb*****
[ 1345.884022]
[ 1345.892366] ESP8089 reset via GPIO 0
[ 1346.116240] esp_sdio_dummy_probe enter
[ 1346.335511] esp_sdio_init power up OK
[ 1346.375818] Set sdio block size 512 failed: -110)
[ 1346.380871] first error exit
[ 1346.383816] eagle_sdio: probe of mmc0:0001:1 failed with error -110
#
#

这个 insmod/rmmod 问题是因为 TF卡模块没有接RST 引起吗?

离线

#16 2021-11-01 12:25:22

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

兩點摘要:
1. 源頭問題並不清楚, 這個源頭指的是esp sdio驅動為何無故被移除
2. 這個crash是由esp8089驅動造成

問題:这个 insmod/rmmod 问题是因为 TF卡模块没有接RST 引起吗?
回答:不是, 原因解析如下

reset的動作可以區分成內部、外部兩個做說明, 從log看到"ESP8089 reset via GPIO 0"訊息,  這種現象屬於後發, 幾乎都是由驅動幹的, 流程如下:esp_sdio_exit() => sif_platform_target_poweroff() => sif_platform_reset_target()

void sif_platform_reset_target(void)                                                   
{                                                                                      
  printk("ESP8089 reset via GPIO %d\n", esp_reset_gpio);                               
  gpio_request(esp_reset_gpio,"esp_reset");                                            
  gpio_direction_output(esp_reset_gpio,0);                                             
  msleep(200);                                                                         
  gpio_direction_input(esp_reset_gpio);                                                
  gpio_free(esp_reset_gpio);                                                           
} 

接著從Oops回推問題:esp_sdio_remove() => sip_detach() => __cancel_work_timer()

問題定位到第一個cancel_work_sync()

void sip_detach(struct esp_sip *sip)                                                   
{                                                                                      
#ifndef ESP_PREALLOC                                                                   
        int po;                                                                        
#endif                                                                                 
  if (sip == NULL)                                                                     
    return ;                                                                           
                                                                                       
        sip_free_init_ctrl_buf(sip);                                                   
                                                                                       
        if (atomic_read(&sip->state) == SIP_RUN) {                                     

                sif_disable_target_interrupt(sip->epub);

                atomic_set(&sip->state, SIP_STOP);

                /* disable irq here */
                sif_disable_irq(sip->epub);
                cancel_work_sync(&sip->rx_process_work); 

                skb_queue_purge(&sip->rxq);
                mutex_destroy(&sip->rx_mtx);

典型同步問題, cancel沒有同步等待完成就釋放, 該資源可能正在被使用中


接著司徒說明一下reset的問題, 試著從外部原因猜測:
Q1. reset腳位懸空沒接?
A1. 不是, 因為驅動可以控制該GPIO, 所以不會是懸空狀態

Q2. reset被突波打到?
A2: 不是, 因為你的測試屬於長時間, 如果周遭有干擾, 那時間應該是很快可以出現, 除非是半夜打大雷?


驅動的資源管理問題解決後, 應該就可以解決這個Oops問題, 不過, 這樣的系統屬於不穩定狀態, 因為根源問題沒有找出來~

最近编辑记录 司徒 (2021-11-01 12:28:30)

离线

#17 2021-11-01 17:10:09

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

我用的是SPI方式,长时间下载东西问题好像不大,但是一旦作为服务器(如web ftp server) 传输一点数据后就直接挂了

root@SnailCard:~# 
root@SnailCard:~# 
root@SnailCard:~# dmesg |grep wlan0
[  241.525691] wlan0: authenticate with 78:44:fd:7e:02:88
[  241.531292] wlan0: send auth to 78:44:fd:7e:02:88 (try 1/3)
[  241.742250] wlan0: send auth to 78:44:fd:7e:02:88 (try 2/3)
[  241.755538] wlan0: authenticated
[  241.772270] wlan0: associate with 78:44:fd:7e:02:88 (try 1/3)
[  241.982257] wlan0: associate with 78:44:fd:7e:02:88 (try 2/3)
[  241.998657] wlan0: RX AssocResp from 78:44:fd:7e:02:88 (capab=0x1411 status=0 aid=1)
[  242.009522] wlan0: associated
[  242.014791] wlan0: Limiting TX power to 20 (20 - 0) dBm as advertised by 78:44:fd:7e:02:88
[  572.506851] wlan0: authenticate with 78:44:fd:7e:02:88
[  572.514157] wlan0: send auth to 78:44:fd:7e:02:88 (try 1/3)
[  572.725587] wlan0: send auth to 78:44:fd:7e:02:88 (try 2/3)
[  572.935684] wlan0: send auth to 78:44:fd:7e:02:88 (try 3/3)
[  573.145784] wlan0: authentication with 78:44:fd:7e:02:88 timed out

找点可用的调试信息都没有,怀疑是不是固件里面有问题了

离线

#18 2021-11-01 23:49:36

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

#
#
#
# [ 7372.646195] esp_sdio_remove enter
[ 7372.651835] sif_disable_irq release irq failed
[ 7372.656546] ------------[ cut here ]------------
[ 7372.661218] WARNING: CPU: 0 PID: 231 at kernel/workqueue.c:3042 __flush_work+0x1f0/0x200
[ 7372.669388] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[ 7372.675162] CPU: 0 PID: 231 Comm: kworker/0:1 Tainted: G           O      5.4.70-smallwitpi #3
[ 7372.683759] Hardware name: Allwinner sun8i Family
[ 7372.688489] Workqueue: events_freezable mmc_rescan
[ 7372.693319] [<c010ec5c>] (unwind_backtrace) from [<c010b57c>] (show_stack+0x10/0x14)
[ 7372.701071] [<c010b57c>] (show_stack) from [<c0713f3c>] (dump_stack+0x94/0xa8)
[ 7372.708304] [<c0713f3c>] (dump_stack) from [<c011dba0>] (__warn+0xbc/0xd4)
[ 7372.715181] [<c011dba0>] (__warn) from [<c011dc68>] (warn_slowpath_fmt+0xb0/0xb8)
[ 7372.722665] [<c011dc68>] (warn_slowpath_fmt) from [<c0137e04>] (__flush_work+0x1f0/0x200)
[ 7372.730841] [<c0137e04>] (__flush_work) from [<c0138060>] (__cancel_work_timer+0x110/0x1f4)
[ 7372.739243] [<c0138060>] (__cancel_work_timer) from [<bf0126a4>] (sip_detach+0x88/0x1b4 [esp8089])
[ 7372.748239] [<bf0126a4>] (sip_detach [esp8089]) from [<bf00e058>] (esp_sdio_remove+0x64/0x1a4 [esp8089])
[ 7372.757743] [<bf00e058>] (esp_sdio_remove [esp8089]) from [<c0583880>] (sdio_bus_remove+0x30/0x11c)
[ 7372.766800] [<c0583880>] (sdio_bus_remove) from [<c047c644>] (device_release_driver_internal+0xe8/0x1b8)
[ 7372.776281] [<c047c644>] (device_release_driver_internal) from [<c047b0f4>] (bus_remove_device+0xcc/0xf8)
[ 7372.785847] [<c047b0f4>] (bus_remove_device) from [<c047766c>] (device_del+0x140/0x36c)
[ 7372.793851] [<c047766c>] (device_del) from [<c0583a94>] (sdio_remove_func+0x1c/0x28)
[ 7372.801594] [<c0583a94>] (sdio_remove_func) from [<c058180c>] (mmc_sdio_remove+0x38/0x64)
[ 7372.809769] [<c058180c>] (mmc_sdio_remove) from [<c0582aa8>] (mmc_sdio_detect+0x6c/0xf8)
[ 7372.817862] [<c0582aa8>] (mmc_sdio_detect) from [<c0579c58>] (mmc_rescan+0xc0/0x3f4)
[ 7372.825606] [<c0579c58>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[ 7372.833521] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[ 7372.841614] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[ 7372.849012] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 7372.856226] Exception stack(0xc68b3fb0 to 0xc68b3ff8)
[ 7372.861280] 3fa0:                                     00000000 00000000 00000000 00000000
[ 7372.869450] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7372.877619] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 7372.884377] ---[ end trace 463d889c65379c21 ]---
[ 7372.889119] wlan0: deauthenticating from e4:26:8b:89:a9:f8 by local choice (Reason: 3=DEAUTH_LEAVING)
[ 7372.996701] mmc0: card 0001 removed
[ 7373.065437] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[ 7373.084469] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[ 7373.099565] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[ 7373.118088] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[ 7373.130367] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[ 7373.146175] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[ 7373.156157] mmc0: new high speed SDIO card at address 0001
[ 7373.176074] 8<--- cut here ---
[ 7373.179186] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 7373.187445] pgd = e14de9ca
[ 7373.190147] [00000004] *pgd=00000000
[ 7373.193740] Internal error: Oops: 17 [#1] SMP ARM
[ 7373.198440] Modules linked in: esp8089(O) rtc_hym8563 tsc2007
[ 7373.204205] CPU: 0 PID: 231 Comm: kworker/0:1 Tainted: G        W  O      5.4.70-smallwitpi #3
[ 7373.212803] Hardware name: Allwinner sun8i Family
[ 7373.217543] Workqueue: events_freezable mmc_rescan
[ 7373.222388] PC is at esp_sdio_probe+0x48/0x3e0 [esp8089]
[ 7373.227711] LR is at sdio_bus_probe+0xbc/0x17c
[ 7373.232151] pc : [<bf00e1e0>]    lr : [<c0583790>]    psr: 200e0013
[ 7373.238409] sp : c68b3d90  ip : 3bc71000  fp : 00000396
[ 7373.243628] r10: 00000000  r9 : bf017190  r8 : bf017190
[ 7373.248846] r7 : c621ca00  r6 : bf01a080  r5 : bf0467c4  r4 : 00000000
[ 7373.255366] r3 : c621ca08  r2 : 00000003  r1 : 00000000  r0 : c621ca00
[ 7373.261889] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[ 7373.269016] Control: 10c5387d  Table: 4624406a  DAC: 00000051
[ 7373.274755] Process kworker/0:1 (pid: 231, stack limit = 0x71c92228)
[ 7373.281105] Stack: (0xc68b3d90 to 0xc68b4000)
[ 7373.285463] 3d80:                                     0000000d 00000000 00000396 c621ca08
[ 7373.293636] 3da0: c621ca00 00000000 bf01a0ec bf017190 0000000d c0583790 c0ba2188 c621ca08
[ 7373.301808] 3dc0: c0ba218c 00000000 bf01a0ec c047bf44 c621ca08 bf01a0ec c047c3a0 c0b04e48
[ 7373.309980] 3de0: 00000001 00000000 c0b04e48 c047c1ec bf01a0ec c68b3e4c c621ca08 00000000
[ 7373.318151] 3e00: c68b3e4c c047c3a0 c0b04e48 00000001 00000000 c0b04e48 00000396 c047a344
[ 7373.326321] 3e20: 00000000 c693a26c c6225538 8daf25ec c0b04e48 c0b04e48 c621ca08 c621ca4c
[ 7373.334494] 3e40: c0b04e48 c047bcb8 c0b60f5c c621ca08 00000001 8daf25ec c621ca08 c621ca08
[ 7373.342665] 3e60: c0b58e98 c0b04e48 00000000 c047b020 c621ca08 c62cc808 00000000 c0477f74
[ 7373.350838] 3e80: c6002000 c0578fc0 c0b04e48 c621ca08 c6002000 8daf25ec c68b3eb0 c621ca00
[ 7373.359008] 3ea0: c621ca08 c6002000 c62cc800 c62cc800 00000001 c0583a64 00000000 00000001
[ 7373.367179] 3ec0: c6002000 c0582db4 00000000 c68b3edf 00000000 00000000 00000000 00000000
[ 7373.375350] 3ee0: 10ffff00 8daf25ec ffffff92 c6002294 00061a80 c6002000 c088c868 c088c874
[ 7373.383522] 3f00: 00000000 00000000 c7fdd900 c0579ed8 c6002294 c6225480 c7fdd900 c7fe0d00
[ 7373.391693] 3f20: 00000000 c013674c c0b03d00 c7fdd918 c6225480 c7fdd900 c6225494 c0b03d00
[ 7373.399865] 3f40: c7fdd918 ffffe000 00000008 c01369ec ffffe000 c0b61c29 c0916048 c6225480
[ 7373.408037] 3f60: c01369a8 c61a14c0 c61a1340 00000000 c68b2000 c6225480 c01369a8 c600fea4
[ 7373.416209] 3f80: c61a14dc c013cc54 000000b2 c61a1340 c013cb08 00000000 00000000 00000000
[ 7373.424380] 3fa0: 00000000 00000000 00000000 c01010e8 00000000 00000000 00000000 00000000
[ 7373.432552] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7373.440723] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 7373.448942] [<bf00e1e0>] (esp_sdio_probe [esp8089]) from [<c0583790>] (sdio_bus_probe+0xbc/0x17c)
[ 7373.457831] [<c0583790>] (sdio_bus_probe) from [<c047bf44>] (really_probe+0x218/0x348)
[ 7373.465752] [<c047bf44>] (really_probe) from [<c047c1ec>] (driver_probe_device+0x60/0x164)
[ 7373.474017] [<c047c1ec>] (driver_probe_device) from [<c047a344>] (bus_for_each_drv+0x58/0xb8)
[ 7373.482540] [<c047a344>] (bus_for_each_drv) from [<c047bcb8>] (__device_attach+0xe0/0x14c)
[ 7373.490801] [<c047bcb8>] (__device_attach) from [<c047b020>] (bus_probe_device+0x84/0x8c)
[ 7373.498976] [<c047b020>] (bus_probe_device) from [<c0477f74>] (device_add+0x3b8/0x604)
[ 7373.506890] [<c0477f74>] (device_add) from [<c0583a64>] (sdio_add_func+0x5c/0x70)
[ 7373.514372] [<c0583a64>] (sdio_add_func) from [<c0582db4>] (mmc_attach_sdio+0x280/0x358)
[ 7373.522464] [<c0582db4>] (mmc_attach_sdio) from [<c0579ed8>] (mmc_rescan+0x340/0x3f4)
[ 7373.530302] [<c0579ed8>] (mmc_rescan) from [<c013674c>] (process_one_work+0x218/0x474)
[ 7373.538222] [<c013674c>] (process_one_work) from [<c01369ec>] (worker_thread+0x44/0x5d8)
[ 7373.546315] [<c01369ec>] (worker_thread) from [<c013cc54>] (kthread+0x14c/0x150)
[ 7373.553715] [<c013cc54>] (kthread) from [<c01010e8>] (ret_from_fork+0x14/0x2c)
[ 7373.560929] Exception stack(0xc68b3fb0 to 0xc68b3ff8)
[ 7373.565978] 3fa0:                                     00000000 00000000 00000000 00000000
[ 7373.574149] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 7373.582317] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 7373.588936] Code: e5954018 e3a01000 e5851018 e2873008 (e5948004)
[ 7373.595199] ---[ end trace 463d889c65379c22 ]---
#
#

诡异,放这里什么都没干,也挂了。

离线

#19 2021-11-01 23:53:32

thank you very much!
封禁
注册时间: 2021-10-10
已发帖子: 9
积分: 11

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

久了是不是发热阿?这种玩意天线阻抗匹配不好恐怕发热,干扰严重哦。

最近编辑记录 thank you very much! (2021-11-02 00:08:23)

离线

#20 2021-11-02 00:07:10

thank you very much!
封禁
注册时间: 2021-10-10
已发帖子: 9
积分: 11

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
arm cpu把自己reset拉低?wifi模块sdio有reset脚接cpu的reset?还是arm cpu的reset控制sdio wifi模块的电源供电?

离线

#21 2021-11-02 21:26:55

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
假如驅動沒有crash, 你需要開啟esp_msg_level, 才會印出比較詳細的log, 不過如果你要追問題, 你應該把問題切成上、中、下三層去追, 上層從server log查看問題, 中層利用ltrace, strace查看跟驅動的交握問題, 下層埋printk log查看

@cube
源頭目前不明, 所以發生crash很合理, 你只要把esp驅動修好, 狀況就可以跟twzy一樣, 不過他是使用SPI方式~

@thank you very much!
從驅動看到的源代碼是CPU接reset控制腳位到esp


從crash log看到一個比較奇怪的問題, 那就是mmc_rescan()負責sdio卸載以及掛載的源頭, 可是這個esp sdio不是只有訊號以及reset腳位嗎?應該是沒有CD腳位, 但是, 如果是沒有CD腳位, 那mmc是如何知道sdio被拔除或者移除呢?

离线

#22 2021-11-02 21:58:09

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
今天发现一个更神奇的问题, ESP8089 SDIO 驱动装上了,可以ping, 然后我就CTRL + C 了,然后早上一看,网络什么都没干,系统也死了,dump信息和上面一模一样。

离线

#23 2021-11-03 07:37:21

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
多谢大佬提醒

离线

#24 2021-11-05 17:08:53

隆哥
会员
注册时间: 2021-11-02
已发帖子: 7
积分: 2

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

# insmod esp8089.ko 
[  220.872886] 
[  220.872886] ***** EAGLE DRIVER VER:bdf5087c3deb*****
[  220.872886] 
[  220.881080] ESP8089 reset via GPIO 0
[  232.163371] esp_sdio_init ------ RETRY ------ 
[  232.167969] ESP8089 reset via GPIO 0
[  232.383458] ESP8089 reset via GPIO 0
[  243.683344] esp_sdio_init ------ RETRY ------ 
[  243.687946] ESP8089 reset via GPIO 0
[  243.903453] ESP8089 reset via GPIO 0
[  255.203357] esp_sdio_init ------ RETRY ------ 
[  255.207958] ESP8089 reset via GPIO 0
[  255.423588] ESP8089 reset via GPIO 0
[  266.723368] esp_sdio_init ------ RETRY ------ 
[  266.727963] ESP8089 reset via GPIO 0
[  266.943464] eagle sdio can not power up!

你好,我这边驱动编译好了,但是加载的时候一直卡在这里,是什么情况

离线

#25 2021-11-06 09:08:49

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@cube
了解~

@隆哥
xxx_probe()沒有被成功加載, 所以esp_spi_init()處於等待狀態, 也就是說驅動沒有加載成功, 你可以參考twzy的網站修改
https://www.cnblogs.com/twzy/p/15160808.html

离线

#26 2021-11-06 15:57:50

拉轰的脚踏车
会员
注册时间: 2020-03-20
已发帖子: 288
积分: 222

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

离线

#27 2021-11-07 00:34:27

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

发现一个有意思的问题,当我把日志都打开,也就是司徒大佬提到的把esp_msg_level屏蔽了,界面疯狂的刷日志,作为web服务被访问,竟然不掉线……
然后屏蔽日志后降频到10Mhz
QQ截图20211107004558.png
还是不行

最近编辑记录 twzy (2021-11-07 00:58:10)

离线

#28 2021-11-07 08:29:58

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

ping了一晚上,没掉线 spi方式

离线

#29 2021-11-07 08:53:13

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@拉轰的脚踏车
感謝你的資訊~

@twzy
感謝你的小白自制Linux开发板(F1C200s)整理系列,持续更新中相關教程, 我也是參考你的網站架設ESP8089驅動~

有2個問題想請教你:
Q1:小白自制Linux开发板 三. Linux内核与文件系统移植, 裡面用到的Kernel是官方分支, 但是, 我看ESP8089驅動的介紹, 卻是使用荔枝派官網的Kernel, 請問最後為何改成荔枝派官網的linux-nano-5.2-tf呢?
Q2: 我看你ESP8089驅動, 針對逾時(ETIMEOUT)做修正, 請問當初為何這樣修改?


關於如下的esp8089 crash問題

# rmmod esp8089-spi.ko 
[   80.007618] esp8089_spi: esp_spi_exit 
[   80.011553] esp8089_spi: esp_spi_remove 
[   80.016011] esp8089_spi: normal byte write data no-busy wait byte 0xff no recv at the first time
[   80.027305] sip_detach, cancel rx_process_work in SIP_RUN
[   80.032885] sip_detach, cancel sendup_work in SIP_RUN
[   80.037979] ------------[ cut here ]------------
[   80.042737] WARNING: CPU: 0 PID: 101 at kernel/workqueue.c:3031 __flush_work+0x224/0x258
[   80.050866] Modules linked in: esp8089_spi(O-)
[   80.055428] CPU: 0 PID: 101 Comm: rmmod Tainted: G           O      5.2.0 #5
[   80.062544] Hardware name: Allwinner suniv Family
[   80.067360] [<c010dfa0>] (unwind_backtrace) from [<c010b210>] (show_stack+0x10/0x14)
[   80.075249] [<c010b210>] (show_stack) from [<c0116c10>] (__warn+0xc4/0xf0)
[   80.082238] [<c0116c10>] (__warn) from [<c0116c78>] (warn_slowpath_null+0x3c/0x48)
[   80.089893] [<c0116c78>] (warn_slowpath_null) from [<c012dbe0>] (__flush_work+0x224/0x258)
[   80.098295] [<c012dbe0>] (__flush_work) from [<c012dd78>] (__cancel_work_timer+0x108/0x1e4)
[   80.106941] [<c012dd78>] (__cancel_work_timer) from [<bf001d94>] (sip_detach+0x100/0x200 [esp8089_spi])
[   80.116717] [<bf001d94>] (sip_detach [esp8089_spi]) from [<bf006e0c>] (esp_spi_remove+0x5c/0x208 [esp8089_spi])
[   80.127093] [<bf006e0c>] (esp_spi_remove [esp8089_spi]) from [<c03cd7a8>] (spi_drv_remove+0x1c/0x38)
[   80.136394] [<c03cd7a8>] (spi_drv_remove) from [<c0382894>] (__device_release_driver+0x140/0x1f0)
[   80.145416] [<c0382894>] (__device_release_driver) from [<c03835a8>] (driver_detach+0xac/0xd4)
[   80.154162] [<c03835a8>] (driver_detach) from [<c0381efc>] (bus_remove_driver+0x4c/0xa0)
[   80.162537] [<c0381efc>] (bus_remove_driver) from [<bf00b2a8>] (esp_spi_exit+0x30/0xd88 [esp8089_spi])
[   80.172147] [<bf00b2a8>] (esp_spi_exit [esp8089_spi]) from [<c016f50c>] (sys_delete_module+0x170/0x1e4)
[   80.181624] [<c016f50c>] (sys_delete_module) from [<c0101000>] (ret_fast_syscall+0x0/0x50)
[   80.189995] Exception stack(0xc3241fa8 to 0xc3241ff0)
[   80.195147] 1fa0:                   0002fc38 00000000 bea1dcf4 00000880 00000000 bea1de58
[   80.203425] 1fc0: 0002fc38 00000000 00000002 00000081 000e79d0 00000000 00000000 00000000
[   80.211644] 1fe0: bea1dcdc bea1dcc0 0002fad0 b6f4e6d8
[   80.216769] ---[ end trace 2fa11815b209e97a ]---
[   80.223550] sip_detach, cancel tx_work in SIP_RUN
[   80.228354] esp8089_spi: esp_spi_remove sip detached 
[   80.233839] esp8089_spi: esp_spi_remove dealloc mac80211 
[   80.239305] esp8089_spi: esp_spi_remove free dma_buffer 
[   80.244754] esp8089_spi: eagle spi remove complete

我定位了一下問題, 發現問題是在sendup_work並沒有初始化, 原因是在Makefile裡面定義了RX_SENDUP_SYNC, 所以解法如下

void sip_detach(struct esp_sip *sip)                                                      
{                                                                                         
  int po;                                                                                 
                                                                                          
  if(sip == NULL) {                                                                       
    return ;                                                                              
  }                                                                                       
                                                                                          
  sip_free_init_ctrl_buf(sip);                                                            
  if(atomic_read(&sip->state) == SIP_RUN) {                                               
    sif_disable_target_interrupt(sip->epub);                                              
    atomic_set(&sip->state, SIP_STOP);                                                    
    sif_disable_irq(sip->epub);                                                           
                                                                                          
    dbg("%s, cancel rx_process_work in SIP_RUN\n", __func__);                             
    cancel_work_sync(&sip->rx_process_work);                                              
    skb_queue_purge(&sip->rxq);                                                           
    mutex_destroy(&sip->rx_mtx);                                                          
                                                                                          
#ifndef RX_SENDUP_SYNC                                                                    
    dbg("%s, cancel sendup_work in SIP_RUN\n", __func__);                                 
    cancel_work_sync(&sip->epub->sendup_work);                                            
#endif  

P. S. 通過RX_SENDUP_SYNC判斷是否需要cancel sendup_work


重新編譯後, 就可以正常rmmod esp8089-spi.ko

# rmmod esp8089-spi.ko 
[   59.506484] esp8089_spi: esp_spi_exit 
[   59.510416] esp8089_spi: esp_spi_remove 
[   59.514883] esp8089_spi: normal byte write data no-busy wait byte 0xff no recv at the first time
[   59.526156] sip_detach, cancel rx_process_work in SIP_RUN
[   59.533771] sip_detach, cancel tx_work in SIP_RUN
[   59.538574] esp8089_spi: esp_spi_remove sip detached 
[   59.544062] esp8089_spi: esp_spi_remove dealloc mac80211 
[   59.549525] esp8089_spi: esp_spi_remove free dma_buffer 
[   59.554975] esp8089_spi: eagle spi remove complete

但是, 重新上esp8089-spi.ko, 就會發現之前的資源並沒有被成功釋放, 相較於原本crash, 這又是另一個問題

# insmod esp8089-spi.ko 
[   79.450589] esp8089_spi: esp_spi_init 
[   79.454554] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   79.459743] request_init_conf: attr_name[crystal_26M_en]
[   79.459762] request_init_conf: attr_name[test_xtal]
[   79.465173] request_init_conf: attr_name[sdio_configure]
[   79.470085] request_init_conf: attr_name[bt_configure]
[   79.475478] request_init_conf: attr_name[bt_protocol]
[   79.480649] request_init_conf: attr_name[dual_ant_configure]
[   79.485780] request_init_conf: attr_name[test_uart_configure]
[   79.491471] request_init_conf: attr_name[share_xtal]
[   79.497288] request_init_conf: attr_name[gpio_wake]
[   79.502327] request_init_conf: attr_name[no_auto_sleep]
[   79.507237] request_init_conf: attr_name[ext_rst]
[   79.512535] request_init_conf: attr_name[wakeup_gpio]
[   79.517277] request_init_conf: attr_name[ate_test]
[   79.522403] request_init_conf: attr_name[speed_suspend]
[   79.527399] esp8089_spi: esp_spi_dummy_probe enter
[   79.537874] sun6i-spi 1c06000.spi: chipselect 0 already in use
[   79.543869] esp8089_spi: FAILED to create slave
[   79.548475] Unable to handle kernel NULL pointer dereference at virtual address 000001a8
[   79.556682] pgd = b46ba3ec
[   79.559431] [000001a8] *pgd=832e2831, *pte=00000000, *ppte=00000000
[   79.565808] Internal error: Oops: 17 [#1] ARM
[   79.570194] Modules linked in: esp8089_spi(O+) [last unloaded: esp8089_spi]
[   79.577206] CPU: 0 PID: 102 Comm: insmod Tainted: G           O      5.2.0 #5
[   79.584353] Hardware name: Allwinner suniv Family
[   79.589102] PC is at spi_setup+0x4/0x15c
[   79.593330] LR is at sif_platform_new_device+0x38/0x88 [esp8089_spi]
[   79.599729] pc : [<c03cdbe8>]    lr : [<bf004340>]    psr: 60000013
[   79.606017] sp : c32dfe4c  ip : 00000000  fp : bf03b58c
[   79.611255] r10: bf03b574  r9 : 00000003  r8 : bf03bbf8
[   79.616497] r7 : c0a397c0  r6 : bf03b0e4  r5 : bf03b534  r4 : bf03bbf4
[   79.623035] r3 : 00000000  r2 : 00000000  r1 : 60000093  r0 : 00000000
[   79.629578] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   79.636730] Control: 0005317f  Table: 832d0000  DAC: 00000051
[   79.642503] Process insmod (pid: 102, stack limit = 0xf70a1f18)
[   79.648445] Stack: (0xc32dfe4c to 0xc32e0000)
[   79.652832] fe40:                            bf03bbf4 bf03b534 bf004340 bf03bbf4 00000000
[   79.661047] fe60: bf03b0e4 bf0410a8 bf03bb78 bf00e774 bf03c000 bf041000 ffffe000 00000000
[   79.669260] fe80: c0a397c0 7fffffff 00000000 00000000 00000000 c0102c24 00000000 00044920
[   79.677474] fea0: 00000000 00000000 00000000 00000000 6e72656b 00006c65 00000000 00000000
[   79.685687] fec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   79.693904] fee0: 00000000 dc8cb5ab bf03b9e0 bf03b9e0 c322b200 b6fdfca0 0000017b c016f5d8
[   79.702120] ff00: 0000017b 7fffffff 00000000 00000003 b6fdfca0 c0171d6c 7fffffff 00000000
[   79.710335] ff20: 00000003 00000000 00000000 c4876000 00044920 00000000 c4883eba c48b0940
[   79.718549] ff40: c4876000 00044920 c48ba2e0 c48ba138 c48b4714 0003c000 0003dde0 000062ec
[   79.726764] ff60: 0003efeb 00000000 00000000 00000000 000062dc 00000025 00000026 0000001d
[   79.734977] ff80: 00000000 00000011 00000000 dc8cb5ab d9dcb4f6 00000001 b6fdfca0 c0101208
[   79.743193] ffa0: c32de000 c0101000 d9dcb4f6 00000001 00000003 b6fdfca0 00000000 bee6bf4d
[   79.751408] ffc0: d9dcb4f6 00000001 b6fdfca0 0000017b 000e79d0 00000000 00000000 00000000
[   79.759625] ffe0: bee6bdcc bee6bdb0 0002fa5c b6f586d8 20000010 00000003 00000000 00000000
[   79.768122] [<c03cdbe8>] (spi_setup) from [<bf03b0e4>] (esp_msg_level+0x0/0xfffd0f1c [esp8089_spi])
[   79.777241] Code: 00002af8 00002710 c07d5984 e92d4030 (e59031a8) 
[   79.783497] ---[ end trace 35e8692b41672902 ]---
Segmentation fault

esp8089-spi驅動經過太多人修改, 源代碼相當混亂, 所以, 可能需要花一些時間好好修改一下...

最近编辑记录 司徒 (2021-11-07 09:03:29)

离线

#30 2021-11-07 14:35:06

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
感谢司徒大佬的关注,因为关于esp8266这篇文章是基于迪卡大佬的帖子整理而来,在加上调试代码的时候没做相关记录,所以其中部分日志引用了原贴中的代码,因此日志提示产生了与实际情况不一致的问题,产生了歧义,还请见谅。
对于第二点,是因为驱动在完成固件下载后,通过代码跟踪重启模块的时候直接造成加载驱动失败,这个我是根据https://whycan.com/t_4149.html帖子的144楼的方式解决了,所以加载驱动的时候会加载两次。

离线

#31 2021-11-07 21:49:34

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
了解,感謝~


第2次做insmod esp8089-spi.ko發生的crash如下

# insmod esp8089-spi.ko 
[   79.450589] esp8089_spi: esp_spi_init 
[   79.454554] esp8089_spi: EAGLE DRIVER VER bdf5087c3deb
[   79.459743] request_init_conf: attr_name[crystal_26M_en]
[   79.459762] request_init_conf: attr_name[test_xtal]
[   79.465173] request_init_conf: attr_name[sdio_configure]
[   79.470085] request_init_conf: attr_name[bt_configure]
[   79.475478] request_init_conf: attr_name[bt_protocol]
[   79.480649] request_init_conf: attr_name[dual_ant_configure]
[   79.485780] request_init_conf: attr_name[test_uart_configure]
[   79.491471] request_init_conf: attr_name[share_xtal]
[   79.497288] request_init_conf: attr_name[gpio_wake]
[   79.502327] request_init_conf: attr_name[no_auto_sleep]
[   79.507237] request_init_conf: attr_name[ext_rst]
[   79.512535] request_init_conf: attr_name[wakeup_gpio]
[   79.517277] request_init_conf: attr_name[ate_test]
[   79.522403] request_init_conf: attr_name[speed_suspend]
[   79.527399] esp8089_spi: esp_spi_dummy_probe enter
[   79.537874] sun6i-spi 1c06000.spi: chipselect 0 already in use
[   79.543869] esp8089_spi: FAILED to create slave
[   79.548475] Unable to handle kernel NULL pointer dereference at virtual address 000001a8
[   79.556682] pgd = b46ba3ec
[   79.559431] [000001a8] *pgd=832e2831, *pte=00000000, *ppte=00000000
[   79.565808] Internal error: Oops: 17 [#1] ARM
[   79.570194] Modules linked in: esp8089_spi(O+) [last unloaded: esp8089_spi]
[   79.577206] CPU: 0 PID: 102 Comm: insmod Tainted: G           O      5.2.0 #5
[   79.584353] Hardware name: Allwinner suniv Family
[   79.589102] PC is at spi_setup+0x4/0x15c
[   79.593330] LR is at sif_platform_new_device+0x38/0x88 [esp8089_spi]
[   79.599729] pc : [<c03cdbe8>]    lr : [<bf004340>]    psr: 60000013
[   79.606017] sp : c32dfe4c  ip : 00000000  fp : bf03b58c
[   79.611255] r10: bf03b574  r9 : 00000003  r8 : bf03bbf8
[   79.616497] r7 : c0a397c0  r6 : bf03b0e4  r5 : bf03b534  r4 : bf03bbf4
[   79.623035] r3 : 00000000  r2 : 00000000  r1 : 60000093  r0 : 00000000
[   79.629578] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
[   79.636730] Control: 0005317f  Table: 832d0000  DAC: 00000051
[   79.642503] Process insmod (pid: 102, stack limit = 0xf70a1f18)
[   79.648445] Stack: (0xc32dfe4c to 0xc32e0000)
[   79.652832] fe40:                            bf03bbf4 bf03b534 bf004340 bf03bbf4 00000000
[   79.661047] fe60: bf03b0e4 bf0410a8 bf03bb78 bf00e774 bf03c000 bf041000 ffffe000 00000000
[   79.669260] fe80: c0a397c0 7fffffff 00000000 00000000 00000000 c0102c24 00000000 00044920
[   79.677474] fea0: 00000000 00000000 00000000 00000000 6e72656b 00006c65 00000000 00000000
[   79.685687] fec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[   79.693904] fee0: 00000000 dc8cb5ab bf03b9e0 bf03b9e0 c322b200 b6fdfca0 0000017b c016f5d8
[   79.702120] ff00: 0000017b 7fffffff 00000000 00000003 b6fdfca0 c0171d6c 7fffffff 00000000
[   79.710335] ff20: 00000003 00000000 00000000 c4876000 00044920 00000000 c4883eba c48b0940
[   79.718549] ff40: c4876000 00044920 c48ba2e0 c48ba138 c48b4714 0003c000 0003dde0 000062ec
[   79.726764] ff60: 0003efeb 00000000 00000000 00000000 000062dc 00000025 00000026 0000001d
[   79.734977] ff80: 00000000 00000011 00000000 dc8cb5ab d9dcb4f6 00000001 b6fdfca0 c0101208
[   79.743193] ffa0: c32de000 c0101000 d9dcb4f6 00000001 00000003 b6fdfca0 00000000 bee6bf4d
[   79.751408] ffc0: d9dcb4f6 00000001 b6fdfca0 0000017b 000e79d0 00000000 00000000 00000000
[   79.759625] ffe0: bee6bdcc bee6bdb0 0002fa5c b6f586d8 20000010 00000003 00000000 00000000
[   79.768122] [<c03cdbe8>] (spi_setup) from [<bf03b0e4>] (esp_msg_level+0x0/0xfffd0f1c [esp8089_spi])
[   79.777241] Code: 00002af8 00002710 c07d5984 e92d4030 (e59031a8) 
[   79.783497] ---[ end trace 35e8692b41672902 ]---
Segmentation fault

定位了一下問題, 是在esp_spi_exit()沒有做資源釋放的動作, 改成如下就可以解決

static void __exit esp_spi_exit(void)                                                     
{                                                                                         
  dbg("(%s) ++\n", __func__);                                                             
  esp_debugfs_exit();                                                                     
  esp_unregister_early_suspend();                                                         
  spi_unregister_device(spi);                                                             
  spi_unregister_driver(&esp_spi_driver);                                                 
  esp_wakelock_destroy();                                                                 
  dbg("(%s) --\n", __func__);                                                             
}

P. S. spi_unregister_device(spi)


不過, 司徒的esp8089是早期的版本, 沒有reset腳位, 目前也沒有特地拉出來
1_20211107-2145.jpg
2_20211107-2146.jpg


修改後, 執行第2次insmod esp8089-spi.ko已經不會crash了, 不過似乎缺少reset的動作

# insmod esp8089-spi.ko 
[   56.044941] (esp_spi_init)++
[   56.047925] (request_init_conf) crystal_26M_en=1
[   56.047947] (request_init_conf) test_xtal=0
[   56.052729] (request_init_conf) sdio_configure=1
[   56.056957] (request_init_conf) bt_configure=0
[   56.061600] (request_init_conf) bt_protocol=0
[   56.066138] (request_init_conf) dual_ant_configure=0
[   56.070534] (request_init_conf) test_uart_configure=2
[   56.075581] (request_init_conf) share_xtal=0
[   56.080666] (request_init_conf) gpio_wake=0
[   56.085012] (request_init_conf) no_auto_sleep=0
[   56.089230] (request_init_conf) ext_rst=0
[   56.093831] (request_init_conf) wakeup_gpio=12
[   56.097874] (request_init_conf) ate_test=0
[   56.102388] (request_init_conf) speed_suspend=0
[   56.107036] (sif_platform_new_device) added spi device 0xc3228c00
[   56.331811] (esp_spi_init) power up complete
[   56.336285] (esp_spi_probe)++
[   56.339300] (esp_setup_spi)++
[   56.342409] (esp_setup_spi)--
[   56.345418] (sif_spi_protocol_init)++
[   56.349105] (sif_spi_protocol_init) failed count 0
[   56.555559] (sif_spi_protocol_init) failed count 1
[   56.762018] (sif_spi_protocol_init) failed count 2
[   56.968402] (sif_spi_protocol_init) failed count 3
[   57.174802] (sif_spi_protocol_init) failed count 4
[   57.381160] (sif_spi_protocol_init) failed count 5
[   57.587539] (sif_spi_protocol_init) failed count 6
[   57.794031] (sif_spi_protocol_init) failed count 7
[   58.000408] (sif_spi_protocol_init) failed count 8
[   58.206804] (sif_spi_protocol_init) failed count 9
[   58.413143] (sif_spi_protocol_init) failed count 10
[   58.619588] (esp_spi_probe) first error exit
[   58.624038] eagle: probe of spi1.0 failed with error -110
[   58.629640] (esp_spi_init) sem_timeout = 0
[   58.633867] (esp_spi_init)-- (errno 0)

修改ESP8089驅動後, 目前已經不會crash了, 所以司徒接下來會往斷線的方向查看, 希望可以找出問題根源~

最近编辑记录 司徒 (2021-11-07 22:02:15)

离线

#32 2021-11-08 14:43:17

隆哥
会员
注册时间: 2021-11-02
已发帖子: 7
积分: 2

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

司徒 说:

@cube
了解~

@隆哥
xxx_probe()沒有被成功加載, 所以esp_spi_init()處於等待狀態, 也就是說驅動沒有加載成功, 你可以參考twzy的網站修改
https://www.cnblogs.com/twzy/p/15160808.html

我看链接是spi的,我想用在lichee nano的sdio接口上,有相关的资料么,谢谢

离线

#33 2021-11-08 21:06:14

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

大佬现场直播调驱动

离线

#34 2021-11-10 10:18:13

CHSHIQING
会员
注册时间: 2020-11-27
已发帖子: 47
积分: 2

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

围观ing,顺便mark一下,大佬nb!

离线

#35 2021-11-12 21:11:34

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

第2次insmod失敗的原因是沒有做RESET的動作, 雖然可能可以透過命令做RESET, 不過, ESP8089的使用手冊似乎抓不到, 因此, 司徒最後飛線解決第2次insmod失敗的問題


CHIP_EN腳位如下:
1_20211112-2101.jpg


CHIP_EN連接到PE6
2_20211112-2101.jpg


接著多次測試後, 驅動都可以正確執行, wlan0也可以正常運作

# rmmod esp8089-spi.ko 
[  235.627234] (esp_spi_exit) ++
[  235.630644] (esp_spi_remove)++
[  235.635838] sip_detach, cancel rx_process_work in SIP_RUN
[  235.641465] esp_op_remove_interface enter, vif addr ac:d0:74:b8:2d:49, beacon enable 0
[  235.649660] sip_txq_process skb_len 22 pkt_len 260 blknum 1
[  235.655465] esp_op_stop
[  235.660157] sip_detach, cancel tx_work in SIP_RUN
[  235.665112] (esp_spi_remove) sip detached
[  235.669563] (esp_spi_remove) dealloc mac80211
[  235.674095] (esp_spi_remove) free dma_buffer
[  235.678420] (esp_spi_remove)--
[  235.681866] (esp_spi_exit) --

# insmod esp8089-spi.ko 
[  238.117040] (esp_spi_init)++
[  238.120026] (request_init_conf) crystal_26M_en=1
[  238.120049] (request_init_conf) test_xtal=0
[  238.124831] (request_init_conf) sdio_configure=1
[  238.129059] (request_init_conf) bt_configure=0
[  238.133765] (request_init_conf) bt_protocol=0
[  238.138249] (request_init_conf) dual_ant_configure=0
[  238.142681] (request_init_conf) test_uart_configure=2
[  238.147680] (request_init_conf) share_xtal=0
[  238.152802] (request_init_conf) gpio_wake=0
[  238.157107] (request_init_conf) no_auto_sleep=0
[  238.161318] (request_init_conf) ext_rst=0
[  238.165917] (request_init_conf) wakeup_gpio=12
[  238.169962] (request_init_conf) ate_test=0
[  238.174479] (request_init_conf) speed_suspend=0
[  238.442136] (sif_platform_new_device) added spi device 0xc3228c00
[  238.671606] (esp_spi_init) power up complete
[  238.676079] (esp_spi_probe)++
[  238.679094] (esp_setup_spi)++
[  238.682200] (esp_setup_spi)--
[  238.685211] (sif_spi_protocol_init)++
[  238.688901] (sif_spi_protocol_init) failed count 0
[  238.895437] (sif_spi_protocol_init) failed count 1
[  239.101828] (sif_spi_protocol_init) failed count 2
[  239.308199] (sif_spi_protocol_init) rx: 0xff, 0xff, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  239.816383] (sif_spi_protocol_init) rx: 0xff, 0xff, 0x01, 0x10, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff
[  240.324926] (sif_spi_protocol_init) rx: 0xff, 0xff, 0x00, 0x90, 0xff, 0xff, 0x00, 0xff, 0xff, 0xff
[  240.833308] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  241.341498] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  241.850059] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  242.358415] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x03, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  242.866623] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  243.375170] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x25, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  243.883519] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x10, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  244.391780] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x12, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  244.900285] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  245.408637] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x06, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  245.916879] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  246.425426] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  246.934229] (sif_spi_protocol_init) rx: 0xff, 0x00, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
[  247.442171] (sif_spi_protocol_init)--
[  247.448635] (check_target_id) SLC data 0x12102500, ID 0x00000600

由於esp8089-spi驅動真的太亂了, 因此, 司徒對esp8089-spi進行大量修改, 等把斷線問題解決後, 司徒會將此份驅動公開給大家使用

static int __init esp_spi_init(void)
{
  int err=0;
  int edf_ret=0;
  bool powerup=false;
  long long sem_timeout=0;

  dbg("(%s)++\n", __func__);
  edf_ret = esp_debugfs_init();
  request_init_conf();
  esp_wakelock_init();
  esp_wake_lock();

  if((err = gpio_request(ESP_RST_PIN, "esp_rst")) != 0) {
    dbg("(%s) failed to request reset gpio\n", __func__);
    return err;
  }
  gpio_direction_output(ESP_RST_PIN, 1);
  gpio_set_value(ESP_RST_PIN, 0);
  msleep(250);
  gpio_set_value(ESP_RST_PIN, 1);

  spi = sif_platform_new_device();
  powerup = true;
  if(!powerup) {
    dbg("(%s) failed to power up\n", __func__);
    err = -ENODEV;
    goto _fail;
  }

  dbg("(%s) power up complete\n", __func__);
  sif_sdio_state = ESP_SDIO_STATE_FIRST_INIT;
  sema_init(&esp_powerup_sem, 0);
  spi_register_driver(&esp_spi_driver);

  sem_timeout = down_timeout(&esp_powerup_sem, msecs_to_jiffies(ESP_WAIT_UP_TIME_MS));
  dbg("(%s) sem_timeout = %lld\n", __func__, sem_timeout);
  if(sem_timeout == 0 && sif_get_ate_config() == 0) {
    if(sif_sdio_state == ESP_SDIO_STATE_FIRST_NORMAL_EXIT) {
      spi_unregister_driver(&esp_spi_driver);
      msleep(100);
      sif_sdio_state = ESP_SDIO_STATE_SECOND_INIT;
      spi_register_driver(&esp_spi_driver);
    }
  }
  esp_register_early_suspend();
  esp_wake_unlock();
  printk("(%s)-- (errno %d)\n", __func__, err);
  return err;

_fail:
  esp_wake_unlock();
  esp_wakelock_destroy();
  printk("(%s)-- (errno %d)\n", __func__, err);
  return err;
}

static void __exit esp_spi_exit(void)
{
  dbg("(%s) ++\n", __func__);
  esp_debugfs_exit();
  esp_unregister_early_suspend();
  spi_unregister_device(spi);
  spi_unregister_driver(&esp_spi_driver);
  esp_wakelock_destroy();
  gpio_free(ESP_RST_PIN);
  dbg("(%s) --\n", __func__);
}

最近编辑记录 司徒 (2021-11-12 21:14:24)

离线

#36 2021-11-13 18:51:35

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
請教一下你在https://www.cnblogs.com/twzy/p/15160808.html說的开发板接受数据正常,通过ssh进行访问操作都正常 ,但是只要大量发送数据,比如作为Web服务器被访问,wifi就挂了,你可以跟我說一下如何架設環境以及如何重現問題嗎?


不知為何ESP8089無法搜尋到家裡的AP,司徒陸續找個幾個裝置後,終於從倉庫找到可以連線的裝置
1_20211113-1850.jpg


目前司徒測試了一下ping以及wget下載比較大量的檔案,沒有出線斷線問題

# wget ftp.gnu.org/gnu/gcc/gcc-3.0.3.tar.gz
Connecting to ftp.gnu.org (209.51.188.20:80)
saving to 'gcc-3.0.3.tar.gz'
gcc-3.0.3.tar.gz     100% |********************************| 17.5M  0:00:00 ETA
'gcc-3.0.3.tar.gz' saved

# wget ftp.gnu.org/gnu/gcc/gcc-3.0.4.tar.gz
Connecting to ftp.gnu.org (209.51.188.20:80)
saving to 'gcc-3.0.4.tar.gz'
gcc-3.0.4.tar.gz     100% |********************************| 17.5M  0:00:00 ETA
'gcc-3.0.4.tar.gz' saved

# ping 8.8.8.8
ping: socket: Address family not supported by protocol
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=1034 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=1009 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=1009 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=115 time=1008 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=115 time=1000 ms
64 bytes from 8.8.8.8: icmp_seq=6 ttl=115 time=1040 ms
64 bytes from 8.8.8.8: icmp_seq=7 ttl=115 time=1009 ms
64 bytes from 8.8.8.8: icmp_seq=8 ttl=115 time=1008 ms
64 bytes from 8.8.8.8: icmp_seq=9 ttl=115 time=1008 ms
64 bytes from 8.8.8.8: icmp_seq=10 ttl=115 time=1005 ms
^C
--- 8.8.8.8 ping statistics ---
11 packets transmitted, 10 received, 9.09091% packet loss, time 0ms
rtt min/avg/max/mdev = 1000.429/1013.056/1040.108/12.232 ms, pipe 2

离线

#37 2021-11-13 19:12:49

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
感谢大佬周末还在调程序!
有两种方法可以重现这个问题:
1 我在开发板上面部署了nignx,并配置了网页服务,当我通过pc访问这个网页的时候,就崩溃了。
2 我是通过sftp方式下载开发板中一个大文件做测试的时候也会崩溃。

离线

#38 2021-11-13 22:52:27

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
哈~沒辦法~真的沒有多餘時間~


司徒目前部屬Nginx後,還是無法重現斷線問題
1_20211113-2247.jpg

Welcome to VeganOS
vegan login: root
# cd /boot/
# insmod esp8089-spi.ko 
[   13.652674] esp8089_spi: loading out-of-tree module taints kernel.
[   22.848024] random: crng init done

# ifconfig wlan0 up
# wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
Successfully initialized wpa_supplicant
rfkill: Cannot open RFKILL control device
# [   60.611010] wlan0: authenticate with a4:e4:b8:70:01:7b
[   60.616609] wlan0: send auth to a4:e4:b8:70:01:7b (try 1/3)
[   60.831775] wlan0: send auth to a4:e4:b8:70:01:7b (try 2/3)
[   60.841999] wlan0: authenticated
[   60.851734] wlan0: associate with a4:e4:b8:70:01:7b (try 1/3)
[   61.061740] wlan0: associate with a4:e4:b8:70:01:7b (try 2/3)
[   61.072413] wlan0: RX AssocResp from a4:e4:b8:70:01:7b (capab=0x431 status=0 aid=1)
[   61.080298] wlan0: AP has invalid WMM params (AIFSN=1 for ACI 2), will use 2
[   61.087501] wlan0: AP has invalid WMM params (AIFSN=1 for ACI 3), will use 2
[   61.094765] wlan0: associated

# udhcpc -i wlan0
udhcpc: started, v1.33.1
udhcpc: sending discover
udhcpc: sending select for 192.168.0.2
udhcpc: lease of 192.168.0.2 obtained, lease time 7200
deleting routers
adding dns 192.168.176.251
adding dns 192.168.176.252
adding dns 192.168.176.253
adding dns 192.168.176.254

# mkdir /tmp/logs
# /usr/nginx/sbin/nginx -c /usr/nginx/conf/nginx.conf -p /tmp
#

司徒目前也沒有多餘時間可以繼續花費在這個問題上,因此,司徒將最後的KernelESP8089-SPI驅動公開給大家參考~

原本Kernel: https://github.com/Lichee-Pi/linux/tree/nano-5.2-tf
原本ESP8089-SPI驅動: https://github.com/notabucketofspam/ESP8089-SPI
司徒的源代碼位置: https://github.com/steward-fu/tiny200/releases/tag/v1.0


連接腳位:

PE6: ESP8089 CHIP_EN
PE7: ESP8089 CS
PE8: ESP8089 DI
PE9: ESP8089 CLK
PE10: ESP8089 DO
PE11: ESP8089 INT

編譯Kernel

$ cd ~/Downloads
$ wget https://github.com/steward-fu/tiny200/releases/download/v1.0/kernel.tar.gz
$ tar xvf kernel.tar.gz
$ cd kernel
$ ARCH=arm CROSS_COMPILE=arm-linux- make esp8089_defconfig
$ ARCH=arm CROSS_COMPILE=arm-linux- make zImage modules dtbs -j4

編譯ESP8089-SPI

$ cd ~/Downloads
$ https://github.com/steward-fu/tiny200/releases/download/v1.0/esp8089-spi.tar.gz
$ tar xvf esp8089-spi.tar.gz
$ cd esp8089-spi
$ make

最近编辑记录 司徒 (2021-11-13 23:00:11)

离线

#39 2021-11-13 23:17:17

cube
会员
注册时间: 2021-03-11
已发帖子: 288
积分: 202.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

感谢司徒大佬的工作,请问可以再测试一下SDIO的版本吗?

离线

#40 2021-11-14 08:13:43

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
首先感谢司徒大佬的工作与付出。

我推测大佬测试web服务正常可能有两点:
1. 这个问题在做驱动修改的时候,事实上已经已经得到了解决。
2. 我看图片中司徒大佬只用了nginx的默认页面,这个页面比较小,可能需要一大一点的文件,比如下载一个5~10MB的文件就会重现。

我正在下载大佬的代码,目前因为网络比较慢可能需要一些时间,验证完成后我会第一时间进行说明,谢谢
---

离线

#41 2021-11-14 09:02:48

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@cube
目前FC3000掌機進度落後,我先去趕一下進度,之後有時間的話,我在看一下SDIO的部份~

@twzy
OK~

离线

#42 2021-11-15 00:03:52

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

司徒 说:

@cube
目前FC3000掌機進度落後,我先去趕一下進度,之後有時間的話,我在看一下SDIO的部份~

@twzy
OK~

首先不好意思啊,今天带了一天娃,晚上还被领导抓了壮丁……

我刚才试着用司徒大佬的驱动,使用sftp方式下载一个8MB的文件,很稳定,不掉线了,但是当我下载一个38M的数据的时候,又掉线了,当然不排除我这边网络的问题,我明天再多测试几次看看

总之比原来稳定多了。

-------------------------------
今天早上重新开始验证,发现传输超过10MB后就有很大的概率会掉线

err.png
QQ截图20211115083233.png

最近编辑记录 twzy (2021-11-15 08:34:42)

离线

#43 2021-11-16 00:28:32

wupaul2001
会员
注册时间: 2019-09-30
已发帖子: 291
积分: 264

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

改用XR819吧,一直在用,比ESP8089稳定,又便宜

离线

#44 2021-11-16 08:59:23

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
目前我這邊測試下載136MB的檔案還是可以正常,不過我測試時,ESP8089跟AP是很接近的,所以,我感覺可能是信號問題造成,你或許可以把ESP8089跟AP距離拉近測試一下,另外,你製作的這個開發板,我可以跟你購買一套嗎?這樣我們測試環境會比較一致,比較方便釐清問題,你有淘寶或閒魚店舖嗎?


測試Log

# wget ftp.gnu.org/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz
Connecting to ftp.gnu.org (209.51.188.20:80)
saving to 'gcc-11.2.0.tar.gz'
gcc-11.2.0.tar.gz    100% |********************************|  136M  0:00:00 ETA
'gcc-11.2.0.tar.gz' saved

# ls -al gcc-11.2.0.tar.gz 
-rwxr-xr-x    1 root     root     143152863 Jan  1 01:53 gcc-11.2.0.tar.gz

最近编辑记录 司徒 (2021-11-16 08:59:30)

离线

#45 2021-11-16 09:34:11

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
我看司徒大佬的日志是从ftp.gnu.org 下载文件到开发板,这部分是没问题的,可能是我前期描述有问题,我说的场景如下图所示,文件传输方式是有开发板传输到pc或其他终端。
scene.png


另外因为我是直接拆的ESP-12f 的模块,而且我做的那个底板也有很多地方并不符合设计规则的,我最近也在尝试改一下pcb。

最后因为我这个是个人做的一个小玩具,所以并没有在网上开卖,如果有必要我可以给大佬寄一个。

离线

#46 2021-11-20 15:24:23

司徒
Moderator
注册时间: 2020-02-13
已发帖子: 547
积分: 157
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@twzy
目前我這一邊測試,確實發現,ESP8089的TX很慢(也就是你說的傳輸方向),相較於RX的速度,TX部份應該是有問題,我會找時間追一下問題,另外,關於你的開發板,因為我不想欠人情,所以,我就繼續用我的環境除錯好了,感謝你~

离线

#47 2021-11-20 20:17:50

twzy
会员
注册时间: 2021-04-16
已发帖子: 204
积分: 351.5
个人网站

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

@司徒
司徒大佬客气了,感谢大佬的辛苦付出

离线

#49 2022-06-19 05:40:10

LinuxGo
会员
注册时间: 2021-01-07
已发帖子: 88
积分: 120

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

twzy 说:

@司徒
司徒大佬客气了,感谢大佬的辛苦付出

大佬们,有没有下文

离线

#50 2022-08-07 18:00:22

tevada2010
会员
注册时间: 2022-07-23
已发帖子: 54
积分: 69

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

rtl8723bs 模块有这个问题吗?

离线

#51 2022-10-18 09:53:00

Chin
会员
注册时间: 2020-10-19
已发帖子: 61
积分: 39

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

8089的天线不好搞,ping延时都1000ms了

离线

#52 2022-10-25 16:49:39

iclxh
会员
注册时间: 2022-08-31
已发帖子: 3
积分: 3

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

买了个ESP8089的sd接口  跳线成spi模式   没成功  不知道各位大侠的模块是什么样的

离线

#53 2022-10-25 18:07:54

hameyou
会员
注册时间: 2018-04-15
已发帖子: 197
积分: 4.5

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

感觉ESP8089 很不稳定,试了好几种驱动,老是掉线,想放弃了,换RTL8189算了

离线

#54 2022-11-01 15:11:59

Chin
会员
注册时间: 2020-10-19
已发帖子: 61
积分: 39

Re: SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试

Chin 说:

8089的天线不好搞,ping延时都1000ms了

一样一样,为什么啊

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn