widora tiny200(f1c200s) 添加 esp8089 sdio 驱动
1. 克隆esp8089驱动代码
git clone https://github.com/al177/esp8089
或者本站下载该仓库: esp8089.git.7z
2. 编译:
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -C /opt/f1c100s/buildroot/output/build/linux-5.4.66/ M=${PWD} modules
3. 简单粗暴复制ko到文件系统
cp esp8089.ko /opt/f1c100s/buildroot/output/target/lib/
4. 打包烧录到 spi nor/nand flash文件系统
5. 运行:
insmod esp8089 esp_reset_gpio=0
我这个SDIO的8089模块没有复位脚,所以乱写一个数字.
6. wpa_supplicant & udhcpc 连接热点并获取ip地址
参考链接:
buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
http://whycan.com/t_5221.html
ESP8089 AP模式
http://whycan.com/t_2091.html#p19662 (TF卡形状ESP8089模块)
离线
[ 1041.685942] esp_sdio_remove enter
[ 1041.690806] sif_disable_irq release irq failed
[ 1041.695426] ------------[ cut here ]------------
[ 1041.700119] WARNING: CPU: 0 PID: 10 at kernel/workqueue.c:3040 __flush_work+0x200/0x228
[ 1041.708157] Modules linked in: goodix r8723bs(C) esp8089(C) usb_f_fs usb_f_mass_storage usb_f_rndis u_ether libcomposite
[ 1041.719105] CPU: 0 PID: 10 Comm: kworker/0:1 Tainted: G C 5.4.66 #1
[ 1041.726686] Hardware name: Allwinner suniv Family
[ 1041.731411] Workqueue: events_freezable mmc_rescan
[ 1041.736309] [<c010e6a8>] (unwind_backtrace) from [<c010b9c4>] (show_stack+0x10/0x14)
[ 1041.744064] [<c010b9c4>] (show_stack) from [<c01172d0>] (__warn+0xa8/0xd0)
[ 1041.751010] [<c01172d0>] (__warn) from [<c0117350>] (warn_slowpath_fmt+0x58/0xb8)
[ 1041.758571] [<c0117350>] (warn_slowpath_fmt) from [<c012c6fc>] (__flush_work+0x200/0x228)
[ 1041.766798] [<c012c6fc>] (__flush_work) from [<c012c87c>] (__cancel_work_timer+0xfc/0x1dc)
[ 1041.775217] [<c012c87c>] (__cancel_work_timer) from [<bf0304a8>] (sip_detach+0x94/0x1d8 [esp8089])
[ 1041.784446] [<bf0304a8>] (sip_detach [esp8089]) from [<bf02bf38>] (esp_sdio_remove+0x68/0x198 [esp8089])
[ 1041.794161] [<bf02bf38>] (esp_sdio_remove [esp8089]) from [<c057c120>] (sdio_bus_remove+0x30/0x118)
[ 1041.803324] [<c057c120>] (sdio_bus_remove) from [<c0480590>] (device_release_driver_internal+0xec/0x1bc)
[ 1041.812878] [<c0480590>] (device_release_driver_internal) from [<c047f068>] (bus_remove_device+0xc8/0xf8)
[ 1041.822496] [<c047f068>] (bus_remove_device) from [<c047b6f0>] (device_del+0x138/0x37c)
[ 1041.830563] [<c047b6f0>] (device_del) from [<c057c650>] (sdio_remove_func+0x1c/0x28)
[ 1041.838373] [<c057c650>] (sdio_remove_func) from [<c057a3a8>] (mmc_sdio_remove+0x38/0x64)
[ 1041.846609] [<c057a3a8>] (mmc_sdio_remove) from [<c057a5ec>] (mmc_sdio_detect+0x6c/0xfc)
[ 1041.854701] [<c057a5ec>] (mmc_sdio_detect) from [<c0572680>] (mmc_rescan+0xc4/0x35c)
[ 1041.862493] [<c0572680>] (mmc_rescan) from [<c012cb70>] (process_one_work+0x1d4/0x43c)
[ 1041.870475] [<c012cb70>] (process_one_work) from [<c012ce20>] (worker_thread+0x48/0x5bc)
[ 1041.878628] [<c012ce20>] (worker_thread) from [<c0131964>] (kthread+0x11c/0x130)
[ 1041.886080] [<c0131964>] (kthread) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[ 1041.893284] Exception stack(0xc2889fb0 to 0xc2889ff8)
[ 1041.898375] 9fa0: 00000000 00000000 00000000 00000000
[ 1041.906579] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1041.914741] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1041.921377] ---[ end trace 10b02a2d229e5d5e ]---
[ 1041.926092] wlan0: deauthenticating from 46:93:96:70:c3:db by local choice (Reason: 3=DEAUTH_LEAVING)
[ 1042.113094] mmc0: card 0001 removed
[ 1042.185736] mmc0: queuing unknown CIS tuple 0x01 (3 bytes)
[ 1042.219718] mmc0: queuing unknown CIS tuple 0x1a (5 bytes)
[ 1042.248703] mmc0: queuing unknown CIS tuple 0x1b (8 bytes)
[ 1042.264514] mmc0: queuing unknown CIS tuple 0x80 (1 bytes)
[ 1042.292909] mmc0: queuing unknown CIS tuple 0x81 (1 bytes)
[ 1042.318684] mmc0: queuing unknown CIS tuple 0x82 (1 bytes)
[ 1042.333940] mmc0: new high speed SDIO card at address 0001
[ 1042.375575] 8<--- cut here ---
[ 1042.378715] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 1042.386901] pgd = f7f0eb8b
[ 1042.389614] [00000004] *pgd=00000000
[ 1042.393201] Internal error: Oops: 17 [#1] ARM
[ 1042.397545] Modules linked in: goodix r8723bs(C) esp8089(C) usb_f_fs usb_f_mass_storage usb_f_rndis u_ether libcomposite
[ 1042.408435] CPU: 0 PID: 10 Comm: kworker/0:1 Tainted: G WC 5.4.66 #1
[ 1042.415977] Hardware name: Allwinner suniv Family
[ 1042.420698] Workqueue: events_freezable mmc_rescan
[ 1042.425654] PC is at esp_sdio_probe+0x68/0x3d0 [esp8089]
[ 1042.430985] LR is at sdio_bus_probe+0x158/0x17c
[ 1042.435509] pc : [<bf02c0d0>] lr : [<c057c360>] psr: 20000013
[ 1042.441757] sp : c2889d98 ip : 0000001a fp : c234d000
[ 1042.446968] r10: c234d000 r9 : bf0351b8 r8 : bf038080
[ 1042.452182] r7 : bf0380ec r6 : c2285400 r5 : bf064764 r4 : 00000000
[ 1042.458691] r3 : 00000011 r2 : 00000003 r1 : 00000000 r0 : c2285400
[ 1042.465204] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 1042.472321] Control: 0005317f Table: 82214000 DAC: 00000053
[ 1042.478057] Process kworker/0:1 (pid: 10, stack limit = 0x1152997b)
[ 1042.484309] Stack: (0xc2889d98 to 0xc288a000)
[ 1042.488662] 9d80: c2285400 00000000
[ 1042.496832] 9da0: bf0380ec c2285408 c2285400 00000000 bf0380ec bf0351b8 00000000 c057c360
[ 1042.505001] 9dc0: c2285408 c0b7001c 00000000 bf0380ec 00000007 c047fe38 c2285408 bf0380ec
[ 1042.513170] 9de0: c04802d8 c0b03228 00000001 00000000 c234d000 c0480120 bf0380ec c2889e54
[ 1042.521339] 9e00: c2285408 00000000 c2889e54 c04802d8 c0b03228 00000001 00000000 c234d000
[ 1042.529510] 9e20: c234d000 c047e2e8 c228544c c28ce11c c219ae14 453a73c6 00000000 c2285408
[ 1042.537680] 9e40: c228544c c0b03228 c0b03228 c047fbdc c2285408 c2285408 00000001 453a73c6
[ 1042.545850] 9e60: c2285408 c0b2d750 c2285408 c0b03228 00000000 c047ef98 c2285408 00000000
[ 1042.554020] 9e80: c234d008 c047c368 c234d000 c0732660 c0b03228 c2285408 c2a53c00 453a73c6
[ 1042.562190] 9ea0: c2889eb8 c2285400 c2285408 c2a53c00 00000001 c234d37c 00000001 c057c61c
[ 1042.570358] 9ec0: 00000000 00000001 c2a53c00 c057b918 00000000 c2889ee7 00000000 00000000
[ 1042.578528] 9ee0: 00000000 00000000 10ffff00 453a73c6 ffffff92 c2a53e6c c2a53c00 00061a80
[ 1042.586699] 9f00: c085d6b8 c085d6c4 00000000 c2a53e70 c0b08e98 c05728bc c2a53e6c c280c660
[ 1042.594869] 9f20: 00000000 c2f5f500 00000000 c012cb70 c0b08eac c0b0e380 c280c660 c0b08e98
[ 1042.603039] 9f40: c280c674 c0b08eac c0b0e380 00000008 ffffe000 c012ce20 ffffe000 c280c660
[ 1042.611209] 9f60: c012cdd8 c287f0c0 c2880320 00000000 c2888000 c280c660 c012cdd8 c2843eb8
[ 1042.619378] 9f80: c287f0d8 c0131964 60000053 c2880320 c0131848 00000000 00000000 00000000
[ 1042.627545] 9fa0: 00000000 00000000 00000000 c01010e0 00000000 00000000 00000000 00000000
[ 1042.635711] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1042.643878] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 1042.652213] [<bf02c0d0>] (esp_sdio_probe [esp8089]) from [<c057c360>] (sdio_bus_probe+0x158/0x17c)
[ 1042.661191] [<c057c360>] (sdio_bus_probe) from [<c047fe38>] (really_probe+0x1e0/0x344)
[ 1042.669112] [<c047fe38>] (really_probe) from [<c0480120>] (driver_probe_device+0x5c/0x16c)
[ 1042.677375] [<c0480120>] (driver_probe_device) from [<c047e2e8>] (bus_for_each_drv+0x7c/0xc4)
[ 1042.685894] [<c047e2e8>] (bus_for_each_drv) from [<c047fbdc>] (__device_attach+0xd8/0x14c)
[ 1042.694154] [<c047fbdc>] (__device_attach) from [<c047ef98>] (bus_probe_device+0x84/0x8c)
[ 1042.702324] [<c047ef98>] (bus_probe_device) from [<c047c368>] (device_add+0x3a8/0x5f4)
[ 1042.710242] [<c047c368>] (device_add) from [<c057c61c>] (sdio_add_func+0x58/0x70)
[ 1042.717728] [<c057c61c>] (sdio_add_func) from [<c057b918>] (mmc_attach_sdio+0x244/0x364)
[ 1042.725811] [<c057b918>] (mmc_attach_sdio) from [<c05728bc>] (mmc_rescan+0x300/0x35c)
[ 1042.733636] [<c05728bc>] (mmc_rescan) from [<c012cb70>] (process_one_work+0x1d4/0x43c)
[ 1042.741542] [<c012cb70>] (process_one_work) from [<c012ce20>] (worker_thread+0x48/0x5bc)
[ 1042.749632] [<c012ce20>] (worker_thread) from [<c0131964>] (kthread+0x11c/0x130)
[ 1042.757027] [<c0131964>] (kthread) from [<c01010e0>] (ret_from_fork+0x14/0x34)
[ 1042.764228] Exception stack(0xc2889fb0 to 0xc2889ff8)
[ 1042.769275] 9fa0: 00000000 00000000 00000000 00000000
[ 1042.777441] 9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1042.785603] 9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1042.792217] Code: 0a00005f e3a01000 e5954014 e5851014 (e5947004)
[ 1042.798500] ---[ end trace 10b02a2d229e5d5f ]---
运行一段时间,貌似挂了,然后驱动执行复位,因为引脚没有连接,然后就起不来了。
得找到这个荔枝派esp8089 tf卡小模块的复位引脚才行。
离线