页次: 1
https://whycan.com/files/members/7106/2021-12-12_123528.png
是因为 全志SDK默认Framebuffer格式是 RGBA,有Alpha通道,这个通道要赋值才行。
修改 output/build/fb-test-app-rosetta-1.1.0/fb-test.c
}else if (fb_info->var.bits_per_pixel== 32){
unsigned char *p;
p = (unsigned char *)fbmem + fb_info->fix.line_length *y + 4*x;
*p++ = color;
*p++ = color >> 8;
*p++ = color >> 16;
*p = 0xFF;
output/build/fbv-1.0b/fb_display.c
void* convertRGB2FB(int fh, unsigned char *rgbbuff, unsigned long count, int bpp, int *cpp)
{
加上: 0xFF000000
case 32:
*cpp = 4;
i_fbbuff = (unsigned int *) malloc(count * sizeof(unsigned int));
for(i = 0; i < count ; i++)
i_fbbuff[i] = ((rgbbuff[i*3] << 16) & 0xFF0000) |
((rgbbuff[i*3+1] << 8) & 0xFF00) |
(rgbbuff[i*3+2] & 0xFF) |
0xFF000000;
fbbuff = (void *) i_fbbuff;
break;
cube 说:用CTS
我看资料是RTS控制的啊
CTS是输入信号啊,拿它控制?
您试过?
抱歉,记错了,确实是RTS:
(V3s/V3x/S3/S3L/R11通吃)小智V3x开发板smallwitpi lite u-boot/linux/buildroot测试
https://whycan.com/t_7248.html
不建议折腾uboot,他只是一个引导程序,浪费的时间不值得。
显屏带触摸么
有的,看 3# 的视频:
【小智出品】安卓4寸86面板开发板SW106开卖啦,2.54排针引出IO。
https://whycan.com/t_8276.html#p78898
很可能gcc有问题,参考这个
buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
https://whycan.com/t_5221.html
如何在本站发图片, 顺便吐槽功能弱智的phpbb半自动步木仑
https://whycan.com/t_588.html#p16351
XIVN1987 说:楼主,,你的线都好细啊,,比芯片焊盘细好多,,这样会不会影响电路性能啊??
JLC做4mil还是可以的,这个板子也是4mil。
https://whycan.com/files/members/7124/20210411_205541.jpg
大佬,这个H3板子方便分享一下吗?
这叫API兼容,或者是用户使用习惯兼容,参考亚马逊与甲骨文官司:
https://cn.bing.com/search?q=api%E5%85%BC%E5%AE%B9+%E4%BE%B5%E6%9D%83
在pro工程文件里添加如下内容:
QMAKE_CXXFLAGS += -g
构建后下载到开发板并调试程序依然无法在设定的断点处停止?
step by step 使用gdb调试Linux平台应用程序
https://whycan.com/t_1210.html#p7384
@yuanbao
ch340和f1c200没有关系,只有ch340电脑也能识别
@ChocolateCK
或者用xfel试一试:
用 MSVC2017 编译 XFEL 项目
https://whycan.com/t_6660.html#p70027
lemonvv 说:现在v3x多少钱一片
49
在实际使用中,比如我用不到mipi接口,我可不可以不对该部分进行供电,不对该处引脚进行上下拉操作,如图所示:
https://whycan.com/files/members/7574/pic2.png
可以不供电,这组口没有复用。
小弟从早上玩这个奇葩主线uboot,主线linux,builtroot,发现我烧录成鱼落雁,闭月羞花的tf卡spl uboot是可以usb 供电启动的,我自己编译的spl uboot就不能通过usb供电启动.是不是有个什么pin使得usb进入fel下载模式?read the fucking code.
感觉cpu或者ddr要降频
参考:
(V3s/V3x/S3/S3L/R11通吃)小智V3x开发板smallwitpi lite u-boot/linux/buildroot测试
https://whycan.com/t_7248.html#p69168
#
#
#
# [ 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 ]---
#
#
诡异,放这里什么都没干,也挂了。
@司徒
感谢司徒大佬回复,
#
#
# 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 引起吗?
@twzy
SDIO ESP8089开源Linux驱动现在可以直接编译通过了, 有没有朋友一起试一试
https://whycan.com/t_4326.html#p69705
和我这情况一样了, 有人说是电源问题,一脸懵x。
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 字节包之后挂。
https://github.com/al177/esp8089/issues/24
可能是电源问题,遇事不决,先查电源
在主线Linux中支持无blob摄像头的开源全志V3 ISP驱动程序
https://cnx-software.cn/2021/10/14/open-source-allwinner-v3-isp-driver/
Allwinner SDK 原本是附带了几个二进制 blob的,也就是闭源二进制,但 Bootlin 公司正致力于淘汰这些blob。他们首先为V4L2 框架,以及 Rockchip PX30、RK1808、RK3128 和 RK3288 等处理器中的摄像头接口驱动程序开发了Allwinner A31、V3s/V3/S3 和 A83T MIPI CSI-2的支持,并在不久前实现了对 Omnivision OV8865 和 OV5648 图像传感器的支持。
你的问题貌似就是缺一个32bit c库兼容包,20楼的方法试了吗?
由于历史问题,全志bsp包里面的二进制工具都是32bit的,而比较新的linux发行版本里面基本都是64bit,所以需要安装一个兼容包。
WebGL 教程:
https://developer.mozilla.org/zh-CN/docs/Web/API/WebGL_API/Tutorial/Animating_textures_in_WebGL
WebGL 在线Demo:
https://mdn.github.io/webgl-examples/tutorial/sample1/
https://mdn.github.io/webgl-examples/tutorial/sample2/
https://mdn.github.io/webgl-examples/tutorial/sample3/
https://mdn.github.io/webgl-examples/tutorial/sample4/
https://mdn.github.io/webgl-examples/tutorial/sample5/
https://mdn.github.io/webgl-examples/tutorial/sample6/
https://mdn.github.io/webgl-examples/tutorial/sample7/
https://mdn.github.io/webgl-examples/tutorial/sample8/
雷龙的32GB sd nand
https://whycan.com/files/members/7056/1_20210922-1712.png
xtx 的试一试?
转载: https://bbs.aw-ol.com/topic/258/d1-f133/9 跑的是melis系统。
请问这个是单通道还是双通道芯片呢?
感谢楼主分享, 已转载到:
[转载] 画了个V3S,慢更语音助手(LUCKY)
https://bbs.aw-ol.com/topic/288
编译成功:
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'zu_ZA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'am_ET' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'hi_IN' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'en_XA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'ar_XB' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'fr_CA' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'xlarge' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'hdpi' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'xhdpi' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'large' in packages/apps/Settings/res
aapt: warning: **** string 'wimax_settings_summary' has no default or required localization for 'nodpi' in packages/apps/Settings/res
Install: out/target/product/vstar/system/app/Gallery2.apk
Install: out/target/product/vstar/system/priv-app/Settings.apk
target Symbolic: libwebviewchromium (out/target/product/vstar/symbols/system/lib/libwebviewchromium.so)
target Strip: libwebviewchromium (out/target/product/vstar/obj/lib/libwebviewchromium.so)
Install: out/target/product/vstar/system/lib/libwebviewchromium.so
Install: out/target/product/vstar/system/framework/webviewchromium.jar
Install: out/target/product/vstar/fake_packages/webview-timestamp
build/tools/generate-notice-files.py out/target/product/vstar/obj/NOTICE.txt out/target/product/vstar/obj/NOTICE.html "Notices for files contained in the filesystem images in this directory:" out/target/product/vstar/obj/NOTICE_FILES/src
Combining NOTICE files into HTML
Combining NOTICE files into text
Installed file list: out/target/product/vstar/installed-files.txt
Target system fs image: out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img
Running: mkuserimg.sh -s out/target/product/vstar/system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img ext4 system 805306368 out/target/product/vstar/root/file_contexts
+ echo 'in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/java/jdk1.6.0_45/bin:/usr/local/gnu-mcu-eclipse/riscv-none-gcc/7.2.0-4-20180606-1631/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/a33/a33_android_sdk/android/out/host/linux-x86/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.7/bin:/opt/a33/a33_android_sdk/android/development/emulator/qtools:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/development/scripts:/opt/a33/a33_android_sdk/android/prebuilts/devtools/tools:'
in mkuserimg.sh PATH=out/host/linux-x86/bin/:/usr/java/jdk1.6.0_45/bin:/usr/local/gnu-mcu-eclipse/riscv-none-gcc/7.2.0-4-20180606-1631/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/a33/a33_android_sdk/android/out/host/linux-x86/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/mips/mipsel-linux-android-4.7/bin:/opt/a33/a33_android_sdk/android/development/emulator/qtools:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.7/bin:/opt/a33/a33_android_sdk/android/prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin:/opt/a33/a33_android_sdk/android/development/scripts:/opt/a33/a33_android_sdk/android/prebuilts/devtools/tools:
+ ENABLE_SPARSE_IMAGE=
+ '[' -s = -s ']'
+ ENABLE_SPARSE_IMAGE=-s
+ shift
+ '[' 6 -ne 5 -a 6 -ne 6 ']'
+ SRC_DIR=out/target/product/vstar/system
+ '[' '!' -d out/target/product/vstar/system ']'
+ OUTPUT_FILE=out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img
+ EXT_VARIANT=ext4
+ MOUNT_POINT=system
+ SIZE=805306368
+ FC=out/target/product/vstar/root/file_contexts
+ case $EXT_VARIANT in
+ '[' -z system ']'
+ '[' -z 805306368 ']'
+ '[' -n out/target/product/vstar/root/file_contexts ']'
+ FCOPT='-S out/target/product/vstar/root/file_contexts'
+ MAKE_EXT4FS_CMD='make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system'
+ echo make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
+ make_ext4fs -s -S out/target/product/vstar/root/file_contexts -l 805306368 -a system out/target/product/vstar/obj/PACKAGING/systemimage_intermediates/system.img out/target/product/vstar/system
Creating filesystem with parameters:
Size: 805306368
Block size: 4096
Blocks per group: 32768
Inodes per group: 8192
Inode size: 256
Journal blocks: 3072
Label:
Blocks: 196608
Block groups: 6
Reserved block group size: 47
Created filesystem with 1596/49152 inodes and 87533/196608 blocks
+ '[' 0 -ne 0 ']'
Install system fs image: out/target/product/vstar/system.img
out/target/product/vstar/system.img+out/target/product/vstar/obj/PACKAGING/recovery_patch_intermediates/recovery_from_boot.p maxsize=822163584 blocksize=4224 total=349827018 reserve=8308608
cube@ubuntu:/opt/a33/a33_android_sdk/android$
打包成功:
cube@ubuntu:/opt/a33/a33_android_sdk/android$ pack
copying tools file
copying configs file
copying boot resource
copying boot file
packing for android
normal
/opt/a33/a33_android_sdk/lichee/tools/pack/pctools/linux/eDragonEx/
/opt/a33/a33_android_sdk/lichee/tools/pack/out
Begin Parse sys_partion.fex
Add partion boot-resource.fex BOOT-RESOURCE_FEX
Add partion very boot-resource.fex BOOT-RESOURCE_FEX
FilePath: boot-resource.fex
FileLength=4bec00Add partion env.fex ENV_FEX000000000
Add partion very env.fex ENV_FEX000000000
FilePath: env.fex
FileLength=20000Add partion boot.fex BOOT_FEX00000000
Add partion very boot.fex BOOT_FEX00000000
FilePath: boot.fex
FileLength=b09000Add partion system.fex SYSTEM_FEX000000
Add partion very system.fex SYSTEM_FEX000000
FilePath: system.fex
FileLength=14b64864Add partion recovery.fex RECOVERY_FEX0000
Add partion very recovery.fex RECOVERY_FEX0000
FilePath: recovery.fex
FileLength=dd1000Add partion diskfs.fex DISKFS_FEX000000
Add partion very diskfs.fex DISKFS_FEX000000
FilePath: diskfs.fex
FileLength=200sys_config.fex Len: 0xf8df
config.fex Len: 0x9c24
split_xxxx.fex Len: 0x200
sys_partition.fex Len: 0xf0a
boot0_nand.fex Len: 0x8000
boot0_sdcard.fex Len: 0x8000
u-boot.fex Len: 0xbc000
fes1.fex Len: 0x1fc0
usbtool.fex Len: 0x20600
aultools.fex Len: 0x25d92
aultls32.fex Len: 0x2295a
cardtool.fex Len: 0x14000
cardscript.fex Len: 0x6ea
sunxi_mbr.fex Len: 0x10000
dlinfo.fex Len: 0x4000
arisc.fex Len: 0x2ed88
boot-resource.fex Len: 0x4bec00
Vboot-resource.fex Len: 0x4
env.fex Len: 0x20000
Venv.fex Len: 0x4
boot.fex Len: 0xb09000
Vboot.fex Len: 0x4
system.fex Len: 0x14b64864
Vsystem.fex Len: 0x4
recovery.fex Len: 0xdd1000
Vrecovery.fex Len: 0x4
diskfs.fex Len: 0x200
Vdiskfs.fex Len: 0x4
BuildImg 0
Dragon execute image.cfg SUCCESS !
----------image is at----------
/opt/a33/a33_android_sdk/lichee/tools/pack/sun8iw5p1_android_vstar.img
pack finish
cube@ubuntu:/opt/a33/a33_android_sdk/android$
大佬sdk哪里下载的
链接: https://pan.baidu.com/s/1wWYHReHEUaYoES_EBDrE6Q
提取码:waku
--来自百度网盘超级会员V1的分享
make 出现错误:
including ./sdk/hierarchyviewer/src/Android.mk ...
including ./sdk/monitor/Android.mk ...
including ./sdk/sdklauncher/Android.mk ...
including ./system/core/Android.mk ...
including ./system/extras/Android.mk ...
including ./system/media/audio_route/Android.mk ...
including ./system/media/audio_utils/Android.mk ...
including ./system/media/camera/src/Android.mk ...
including ./system/media/camera/tests/Android.mk ...
including ./system/netd/Android.mk ...
including ./system/security/keystore-engine/Android.mk ...
including ./system/security/keystore/Android.mk ...
including ./system/security/softkeymaster/Android.mk ...
including ./system/vold/Android.mk ...
including ./tools/external/fat32lib/Android.mk ...
No private recovery resources for TARGET_DEVICE vstar
build/core/main.mk:945: *** missing 'endif'. Stop.
解决方案:
在 build/core/main.mk 945 行插入: endif
正在愉快地编译:
host C: libcrypto-host <= external/openssl/crypto/des/rpc_enc.c
host C: libcrypto-host <= external/openssl/crypto/des/set_key.c
host C: libcrypto-host <= external/openssl/crypto/des/str2key.c
host C: libcrypto-host <= external/openssl/crypto/des/xcbc_enc.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_ameth.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_asn1.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_check.c
external/openssl/crypto/dh/dh_ameth.c:500:2: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dh/dh_ameth.c:500:2: warning: (near initialization for 'dh_asn1_meth.old_priv_decode') [-Wmissing-field-initializers]
host C: libcrypto-host <= external/openssl/crypto/dh/dh_depr.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_err.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_gen.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_key.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_lib.c
host C: libcrypto-host <= external/openssl/crypto/dh/dh_pmeth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_ameth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_asn1.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_depr.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_err.c
external/openssl/crypto/dsa/dsa_ameth.c:650:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:650:3: warning: (near initialization for 'dsa_asn1_meths[0].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:656:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:656:3: warning: (near initialization for 'dsa_asn1_meths[1].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:662:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:662:3: warning: (near initialization for 'dsa_asn1_meths[2].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:668:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:668:3: warning: (near initialization for 'dsa_asn1_meths[3].pem_str') [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:702:3: warning: missing initializer [-Wmissing-field-initializers]
external/openssl/crypto/dsa/dsa_ameth.c:702:3: warning: (near initialization for 'dsa_asn1_meths[4].item_verify') [-Wmissing-field-initializers]
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_gen.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_key.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_lib.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_ossl.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_pmeth.c
host C: libcrypto-host <= external/openssl/crypto/dsa/dsa_prn.c
cube@ubuntu:/opt/a33/a33_android_sdk/android$ make
build/core/main.mk:45: ********************************************************************************
build/core/main.mk:46: * You are using version 4.1 of make.
build/core/main.mk:47: * Android can only be built by versions 3.81 and 3.82.
build/core/main.mk:48: * see https://source.android.com/source/download.html
build/core/main.mk:49: ********************************************************************************
build/core/main.mk:50: *** stopping. Stop.
修改 build/core/main.mk
ifeq (,$(findstring CYGWIN,$(shell uname -sm)))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.81))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 3.82))
ifeq (0,$(shell expr $$(echo $(MAKE_VERSION) | sed "s/[^0-9\.].*//") = 4.1))
插入一行
1. 下载 jdk-6u45-linux-x64.bin,解压到 /usr/java/ 目录
2. 导出环境变量:
export ANDROID_JAVA_HOME="/usr/java/jdk1.6.0_45"
export JAVA_HOME="/usr/java/jdk1.6.0_45"
搞定:
cube@ubuntu:/opt/a33/a33_android_sdk/android$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. aosp_hammerhead-userdebug
6. aosp_mako-userdebug
7. vstar-eng
8. vstar-user
9. astar_y3-eng
10. astar_y3-user
11. aosp_manta-userdebug
12. aosp_deb-userdebug
13. aosp_grouper-userdebug
14. aosp_tilapia-userdebug
15. aosp_flo-userdebug
16. mini_x86-userdebug
17. mini_mips-userdebug
18. mini_armv7a_neon-userdebug
Which would you like? [aosp_arm-eng] 7
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.4.2
TARGET_PRODUCT=vstar
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-80-generic-x86_64-with-Ubuntu-18.04-bionic
HOST_BUILD_TYPE=release
BUILD_ID=KVT49L
OUT_DIR=out
============================================
cube@ubuntu:/opt/a33/a33_android_sdk/android$ lunch
You're building on Linux
Lunch menu... pick a combo:
1. aosp_arm-eng
2. aosp_x86-eng
3. aosp_mips-eng
4. vbox_x86-eng
5. aosp_hammerhead-userdebug
6. aosp_mako-userdebug
7. vstar-eng
8. vstar-user
9. astar_y3-eng
10. astar_y3-user
11. aosp_manta-userdebug
12. aosp_deb-userdebug
13. aosp_grouper-userdebug
14. aosp_tilapia-userdebug
15. aosp_flo-userdebug
16. mini_x86-userdebug
17. mini_mips-userdebug
18. mini_armv7a_neon-userdebug
Which would you like? [aosp_arm-eng] 7
build/core/config.mk:365: *** Error: could not find jdk tools.jar, please install JDK6, which you can download from java.sun.com. Stop.
** Don't have a product spec for: 'vstar'
** Do you have the right repo manifest?
cube@ubuntu:/opt/a33/a33_android_sdk/android$
Error: could not find jdk tools.jar, please install JDK6
出师不利, 开局就暴击, A33 android sdk 编译出现 jdk 相关错误的问题。
XIVN1987 说:这个帖子是我开的,当时二楼的回复是兼容ARM的SWD,后面他们自己删了😅
实际上真兼容吗?
挺可惜的,虽然是算是竞争对手,但是都是RISC-V大生态下的玩家,而且BeagledBoard和starfive的芯片和板子主要是面向PC及服务器领域,跟D1(AIoT领域)并不是直接对位的,我们还是希望大家都好,一起把生态做大做强。同时我们也深知RISC-V生态起步阶段的艰难,庆幸我们在产品落地方面有多年的成熟经验,所以BeagledBoard和starfive有需要经验交流或者帮助的,我们很乐意一起深入沟通,一起为生态添砖加瓦(Respect!
----------------
以上转自全志在线产品总监对于BeagledBoard和starfive RISC-V SBC项目失败的看法
这是今年初的新闻:
https://www.techradar.com/news/heres-a-new-well-stocked-risc-v-raspberry-pi-challenger
总部位于深圳的开放硬件供应商 Seeed 发布了 BeagleV,这是一款可以运行Linux的信用卡大小的 RISC-V 单板计算机 (SBC) 。
BeagleV 是 Seeed 和 BeagleBoard.org 合作的结果,BeagleBoard.org 是总部位于密歇根州的非营利组织,为流行的同名系列开放 SBC 提供支持,以及来自上海 StarFive 的 RISC-V 专业知识。
在一次发布中,两家公司指出,“BeagleV 将开源推向了一个新的水平,并为开发人员提供了更多的自由和能力来创新和设计行业领先的解决方案,其入门价格为 149 美元,随后在后续版本中提供更低成本的变体。”
BeagleV Starlight RISC-V single board computer cancelled :
https://www.geeky-gadgets.com/beaglev-02-08-2021/
Unfortunately the development team behind the BeagleV Starlight RISC-V single board computer first unveiled back in January 2021 has now been cancelled. But all is not last as the team at BeagleBoard is now working with Seeed Studio to design and manufacture a new RISC-V board which could be ready to ship as early as Q1 2022.
这个开发板要取消了吗?
* 获取一个循环设备
sudo losetup -f
* 关联循环设备与镜像文件
sudo losetup /dev/loop22 output/images/rootfs.ext2
* 挂载到 /tmp/test
sudo mount /dev/loop22 /tmp/test
* 测试
ls /tmp/test
如何使用xui,参考cmd-overview.c这个程序,用c写的。
lua没有绑定xui,两者完全独立的
原来如此。那xboot有没有xui 绑定 lua的计划呢?
raspberryman 说:请问 @xboot
https://github.com/xboot/xboot/tree/master/src/framework/romdisk/application
这些 demo 是基于 XUI 的吗?
不是,这些demo是lua 框架的,非xui
怎么在xboot使用xui呢?
或者有没有lua绑定的demo?
QQ群看到的外设齐全,封装友好,内置64M ddr的RV64芯片F133,有没有哪位用过?
XUI移植基本完成 https://gitee.com/891085309/xui , enjoy it!
哇酷小二 说:因为搜狗是腾讯的
怪不得叫 狗日的的TX 🐶
https://blog.csdn.net/qq_28877125/article/details/85158323
key_state_t key_state = {
.key_time = 0,
.current_state = RELEASE,
.state = NO_PRESS,
};
// 1ms 定时器中断服务函数
void Timer0_IRQ_Handler(void)
{
...
if(key_state.current_state == RELEASE)
{
if(KEY_PIN == 0) // 按键被按下
{
key_state.current_state = MAY_PRESS;
key_state.key_time = 0;
}
}
else if(key_state.current_state == MAY_PRESS)
{
key_state.key_time++; // 累加每次为1ms
if(KEY_PIN == 1) // 按键释放
{
// 由释放时的时间长短区分出长按与短按
if((key_state.key_time > 10)&&(key_state.key_time < SHORTPRESS_THRESHOLD))
{
key_state.state = SHORT_PRESS; // 按下时间为:10ms~1500ms 判定为短按
key_state.current_state = RELEASE;
}
else if(key_state.key_time > SHORTPRESS_THRESHOLD)
{
key_state.state = LONG_PRESS; // 按下时间超过1500ms判定为长按
key_state.current_state = RELEASE;
}
else // 按下时间小于10ms就释放视为杂波
{
key_state.current_state = RELEASE;
}
}
}
...
}
https://www.cnblogs.com/UPUPDay2152/p/9673886.html
单片机按键识别篇---单击---双击----长按
最近做一任务需要使用一个按键实现三种功能,分别是按键单击功能,按键双击功能和按键长按功能,可能之前没有接触过这类按键复用情况,顶多也只是简单识别单击和长按,没有想过双击以上按键功能,也是绞尽脑汁,想了半天,又上网看了些例程,算是对于按键的识别有点小小的了解,感觉这个功能挺实用,在此做个随笔。
一、思路
1.识别长按操作思路:我们使用系统定时器定时,然后让系统每过一段时间去扫描按键I/O口状态,当扫描到按键按下I/O口状态超过设定长按时间的阀值,就判定这次按键操作为“长按”操作;
2.识别单击操作思路:当系统扫描按键按下的I/O口时间小于我们设定的长按阀值,这时就可能出现两种情况,情况1.可能是单击;情况2.可能是双击;首先我们来说情况1,单击操作,这时我们可以检测按键按下后,按键弹起的时间到下次按键按下的时间间隔,当按键按下弹起到下次按键按下的时间超过某个值,则我们判定这次操作为“单击”操作;
3.识别双击操作思路:上面刚说的情况1,这次来说情况2,:双击操作,当我们检测按键按弹起后在一定时间阀值内,又检测到按键I/O口有电平变化,则我们判断这次操作为“双击”操作
二、程序部分
unsigned char scan_key()
{
/*
值key_return如下:
1---------单击
2---------双击
3---------长按
*/
static unsigned char key_state=0; //按键状态
static unsigned char state=0;
static unsigned char time,time1,time2;
static unsigned char key_up_flag=0; //按键弹起标志位
static unsigned char key_return;
if(Key==0) //按键按下消抖
{
delay(50);
if(Key==0)
{
key_state=0;
}
}
else
{
delay(50); //按键松开消抖
if(Key==1)
{
key_state=1;
key_up_flag=0;
}
}
if((state==0)&&(key_state==0)&&(key_up_flag==0)) //这里主要防止,按键在识别长按后,又会执行一遍单击操作
{
state=1;
time=key_time; //记录按键按下的时间为多少,做标记
}
if(state==1)
{
time1=key_time;
time2=time1-time; //计算按键按下时长
if(time2>50) //长按判断
{
state=2;
}
if(key_state==1) //按键弹起
{
state=3;
time=key_time; //标志什么时间按键弹起的
}
}
if(state==2) //长按
{
state=0; //重置状态
key_up_flag=1;
key_return=3;
}
if((state==3)&&(key_up_flag==0))
{
time1=key_time;
time2=time1-time; //计算按键弹起后时间
if(time2>6) //判断按键弹起后的时间,超过300ms,则说明为单击
{
state=0;
key_return=1;
}
else if(key_state==0) //按键弹起后,300ms内又有按键按下
{
state=4;
}
}
if(state==4)
{
if(key_state==1) //按键弹起
{
state=0;
key_return=2;
}
}
return key_return;
}
void timer0() interrupt 1 //定时器T0中断函数入口
{
TH0=0X9E; //初值重载
TL0=0X57; //定时50ms=50000us; 50000/2=25000
key_time++; //50MS++
}
SPI NOR FLASH 版本: widora-tiny200-sysimage- spinor-20210623.7z (16M)
TF卡版本: widora-tiny200-sysimage-tfcard-20210623.7z
命令行执行: echo host > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode 切换到 USB HOST
执行 udhcpc -i eth0 从AIR724 获取IP地址.
参考:
主线Linux用shell命令切换 OTG(分享)tiny200/licheepi nano|zero均可以使用
https://whycan.com/t_6021.html
请问为什么AIR720 4G模块插入到V3s linux4.13系统, 只有一个 RNDIS 设备, 确没有像 Windows再多四个串口
https://whycan.com/t_3825.html#p61611
终于搞定, 不是设置LD_LIBRARY_PATH环境变量, 而是加 -L 参数:
$qemu-riscv64 -L /usr/riscv64-linux-gnu/ hello
hello
$
或者用 QEMU_LD_PREFIX 环境变量:
QEMU_LD_PREFIX=/usr/riscv64-linux-gnu/ qemu-riscv64 hello
https://askubuntu.com/questions/1144537/arm-32-bit-elf-does-not-execute-using-qemu-arm
按这个加上 LD_LIBRARY_PATH 没用?
$ LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/ qemu-riscv64 hello
qemu-riscv64: Could not open '/lib/ld-linux-riscv64-lp64d.so.1': No such file or directory
$
$ LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib/ qemu-riscv64 hello
qemu-riscv64: Could not open '/lib/ld-linux-riscv64-lp64d.so.1': No such file or directory
$
好像一定要用静态链接, 否则会这样:
$ riscv64-linux-gnu-gcc -o hello hello.c
$
$ qemu-riscv64 hello
qemu-riscv64: Could not open '/lib/ld-linux-riscv64-lp64d.so.1': No such file or directory
$
F1C600 唱戏机主板包邮50元, 报哇酷网网友45元包邮, 可以接7寸(800x480)显示屏
https://whycan.com/t_6616.html#p64192
(出处:哇酷开发者社区)
Hello World
First let’s present the program and then we’ll discuss it. This program works by making Linux system calls and like all Linux programs starts execution at the globally exported _start label. The program uses the Assembly directives specified in the GCC documentation.
#
# Risc-V Assembler program to print "Hello World!"
# to stdout.
#
# a0-a2 - parameters to linux function services
# a7 - linux function number
#
.global _start # Provide program starting address to linker
# Setup the parameters to print hello world
# and then call Linux to do it.
_start: addi a0, x0, 1 # 1 = StdOut
la a1, helloworld # load address of helloworld
addi a2, x0, 13 # length of our string
addi a7, x0, 64 # linux write system call
ecall # Call linux to output the string
# Setup the parameters to exit the program
# and then call Linux to do it.
addi a0, x0, 0 # Use 0 return code
addi a7, x0, 93 # Service command code 93 terminates
ecall # Call linux to terminate the program
.data
helloworld: .ascii "Hello World!\n"
The ‘#’ character is the comment character and anything after it on a line is a comment.
【【柴知道】搜索引擎怎么搜不到信息了?因为互联网正在孤岛化-哔哩哔哩】 https://b23.tv/MgHOOO
微信公众号禁止爬虫
F1C500s 是 32M DRAM:
[0]HELLO! BOOT0 is starting!
[2]boot0 commit : 80628dcde5dc4ecdc757a9e782c58d7cf1abf959
[60]dram size =32
[62]Reg pull reg_val=0x00000000,read=0x00000010
[66]Succeed in reading toc file head.
[69]The size of toc is 00054000.
[127]Reg pull reg_val=0x00000000,read=0x00000010
[136]Ready to disable icache.
[138]Jump to secend Boot.
F1C100s 和 F1C500s 只有一个寄存器值不同, DRAM大小一模一样.
tina sdk 可以直接跑在这两个芯片可能都会出错.
[0]HELLO! BOOT0 is starting!
[2]boot0 commit : 80628dcde5dc4ecdc757a9e782c58d7cf1abf959
[60]dram size =32
[62]Reg pull reg_val=0x00000000,read=0x00000010
[66]Succeed in reading toc file head.
[69]The size of toc is 00054000.
[127]Reg pull reg_val=0x00000000,read=0x00000010
[136]Ready to disable icache.
[138]Jump to secend Boot.
U-Boot 2014.07 (Aug 21 2019 - 14:53:43) Allwinner Technology
uboot commit : 78cb55af380c57c0278162e241a9999cdc16e1d6
i2c_init: by cpux
[I2C-DEBUG]:i2c_set_clock() 354
[I2C-ERROR]:twi_send_clk_9pulse() 136 SDA is still Stuck Low, failed.
i2c_init ok
[0.187]pmbus: ready
axp: get node[/soc/pmu0] error
axp_probe error
[0.193]PMU: cpux 408 Mhz,AXI=408 Mhz
PLL6=600 Mhz,AHB1=200 Mhz, APB1=100Mhz
key value = 4294967295, fel_key = [256,426]
DRAM: 32 MiB
Relocation Offset is: 01580000
axp: get node[/soc/pmu0] error
int sunxi_dma_init---
irq enable
workmode = 0,storage type = 3
[0.260]spinor: 0
flash size =0x4000 sectors
sunxi spinor is initing...int sunxi_dma_init---
irq enable
sunxi_dma_install_int ok
sunxi_dma_install_int ok
OK
spinor id:0x1840ef
spi_freq = 40000000
[0.278]sunxi flash init ok
spinor read: start 0x3e0, sector 0x20
used mbr [0], count = 8
spinor read: start 0x800, sector 0x200
env size is 256
env partition is too small!
can't enabled backup env functions
logo addr = 0x81f00000
spinor read: start 0x400, sector 0x400
sunxi_read_bootlogo: read bootlogo partition successful
do not find fastboot status flag
--------fastboot partitions--------
-total partitions:8-
-name- -start- -size-
bootlogo : 4000 80000
env : 84000 20000
boot : a4000 300000
rootfs : 3a4000 c00000
rootfs_data : fa4000 180000
misc : 1124000 10000
private : 1134000 10000
UDISK : 1144000 0
-----------------------------------
spinor read: start 0x8d00, sector 0x4
disable nand error: FDT_ERR_BADPATH
disable nand error: FDT_ERR_BADPATH
## error: update_fdt_dram_para : FDT_ERR_NOTFOUND
PowerBus = 0( 2:vBus 3:acBus other: not exist)
no battery exist
sunxi_bmp_logo_display
Hit any key to stop autoboot: 0
spinor read: start 0x900, sector 0x40
spinor read: start 0x940, sector 0x1380
## Booting kernel from Legacy Image at 80007fc0 ...
Image Name: ARM OpenWrt Linux-3.10.65
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2588104 Bytes = 2.5 MiB
Load Address: 80008000
Entry Point: 80008000
XIP Kernel Image ... OK
reserving fdt memory region: addr=81000000 size=10000
Using Device Tree in place at 81000000, end 8100f49f
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.10.65 (cube@ubuntu) (gcc version 6.4.1 (OpenWrt/Linaro GCC 6.4-2017.11 2017-11) ) #203 Sat May 29 15:10:02 UTC 2021
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Allwinner A1X (Device Tree), model: sun3iw1p1
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] cma: CMA: failed to reserve 32 MiB
[ 0.000000] Memory policy: ECC disabled, Data cache writeback
[ 0.000000] On node 0 totalpages: 8192
[ 0.000000] free_area_init_node: node 0, pgdat c0546bcc, node_mem_map c0574000
[ 0.000000] Normal zone: 64 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 8192 pages, LIFO batch:0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: enforcing=1 earlyprintk=sunxi-uart,0x01c25000 initcall_debug=0 console=ttyS1,115200 loglevel=8 root=/dev/mtdblock4 init=/pseudo_init rdinit=/rdinit partitions=bootlogo@mtdblock1:env@mtdblock2:boot@mtdblock3:rootfs@mtdblock4:rootfs_data@mtdblock5:misc@mtdblock6:private@mtdblock7:UDISK@mtdblock8 cma=32M fb_base=0x81f00000 androidboot.serialno=<NULL> boot_type=3
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Memory: 32MB = 32MB total
[ 0.000000] Memory: 26748k/26748k available, 6020k reserved, 0K highmem
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
[ 0.000000] vmalloc : 0xc2800000 - 0xff000000 ( 968 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xc2000000 ( 32 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0xc0008000 - 0xc0441f84 (4328 kB)
[ 0.000000] .init : 0xc0442000 - 0xc046013c ( 121 kB)
[ 0.000000] .data : 0xc0462000 - 0xc05474e8 ( 918 kB)
[ 0.000000] .bss : 0xc05474e8 - 0xc0573d00 ( 179 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:256
[ 0.000000] of_sunxi_clocks_init : sunxi_clk_base[0xf1c20000]
[ 0.000000] pll_cpu-set_default_rate=552000000 success!
[ 0.000000] pll_video-set_default_rate=297000000 success!
[ 0.000000] pll_ddr-set_default_rate=312000000 success!
[ 0.000000] timer_nr = 2 .......................
[ 0.000000] timer_base = 0xF1C20C00, irq = 15 -----
[ 0.000000] HZ = 100 JJJJJJJJJJJ
[ 0.000000] rate / (prescale * HZ) = 15000
[ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms
[ 0.000000] Console: colour dummy device 80x30
[ 0.005324] Calibrating delay loop... 275.25 BogoMIPS (lpj=1376256)
[ 0.075269] pid_max: default: 32768 minimum: 301
[ 0.080445] Mount-cache hash table entries: 512
[ 0.086432] CPU: Testing write buffer coherency: ok
[ 0.092219] Setting up static identity map for 0xc0341dc0 - 0xc0341e18
[ 0.101512] devtmpfs: initialized
[ 0.106978] pinctrl core: initialized pinctrl subsystem
[ 0.112842] NET: Registered protocol family 16
[ 0.117992] DMA: failed to allocate 256 KiB pool for atomic coherent allocation
[ 0.126064] dump_class_init,844, success
[ 0.135040] sun3iw1p1-pinctrl pio: initialized sunXi PIO driver
[ 0.158774] bio: create slab <bio-0> at 0
[ 0.164297] pwm module init!
[ 0.169095] SCSI subsystem initialized
[ 0.173384] usbcore: registered new interface driver usbfs
[ 0.179196] usbcore: registered new interface driver hub
[ 0.185071] usbcore: registered new device driver usb
[ 0.192771] gpio=140,mul_sel=6,pull=1,drv_level=-1,data=1
[ 0.198732] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.207294] pcf857x 0-0020: retry commucation.7
[ 0.212258] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.220785] pcf857x 0-0020: retry commucation.6
[ 0.225764] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.234289] pcf857x 0-0020: retry commucation.5
[ 0.239245] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.247766] pcf857x 0-0020: retry commucation.4
[ 0.252744] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.261235] pcf857x 0-0020: retry commucation.3
[ 0.266218] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.274740] pcf857x 0-0020: retry commucation.2
[ 0.279699] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.288219] pcf857x 0-0020: retry commucation.1
[ 0.293200] sunxi_i2c_do_xfer()928 - [i2c0] incomplete xfer (status: 0x48, dev addr: 0x20)
[ 0.301723] pcf857x: probe of 0-0020 failed with error -70
[ 0.309718] Linux video capture interface: v2.00
[ 0.315105] Advanced Linux Sound Architecture Driver Initialized.
[ 0.323321] cfg80211: Calling CRDA to update world regulatory domain
[ 0.330754] Switching to clocksource sun3i high-res couter
[ 0.356484] get det_vbus is fail, 84
[ 0.361928] NET: Registered protocol family 2
[ 0.368585] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[ 0.375701] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[ 0.382367] TCP: Hash tables configured (established 512 bind 512)
[ 0.388941] TCP: reno registered
[ 0.392337] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.398453] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.405527] NET: Registered protocol family 1
[ 0.423545] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.430206] jffs2: version 2.2. 漏 2001-2006 Red Hat, Inc.
[ 0.436762] msgmni has been set to 52
[ 0.443775] io scheduler noop registered
[ 0.448068] io scheduler cfq registered (default)
[ 0.452946] [pm]aw_pm_init!
[ 0.456217] [pm]valid
[ 0.458710] [pm]valid
[ 0.461449] [DISP]disp_module_init
[ 0.526640] pll_freq=297000000HZ, lcd_dclk_freq=20000000HZ, clk_div=14
[ 0.534016] *******************************
[ 0.538443] ***
[ 0.540318] *** LCD Panel Parameter Check
[ 0.544473] ***
[ 0.546340] *** by guozhenjie
[ 0.550539] ***
[ 0.552411] ********************************
[ 0.556861] ***
[ 0.558732] *** Interface:
[ 0.561304] *** Parallel HV Panel
[ 0.565028] *** Lcd Frm to RGB666
[ 0.568513] ***
[ 0.570382] *** Timing:
[ 0.572955] *** lcd_x: 800
[ 0.576231] *** lcd_y: 480
[ 0.579540] *** lcd_ht: 928
[ 0.582817] *** lcd_hbp: 88
[ 0.586005] *** lcd_vt: 525
[ 0.589311] *** lcd_vbp: 32
[ 0.592501] *** lcd_hspw: 48
[ 0.595688] *** lcd_vspw: 3
[ 0.598820] *** lcd_frame_frq: 41Hz
[ 0.602536] ***
[ 0.604407] *** WRN03: Recommend "lcd_dclk_frq = 29"
[ 0.609560] ***
[ 0.611430] *** LCD Panel Parameter Check End
[ 0.615938] *******************************
[ 0.620387] num_screens=1
[ 0.623176] screen_id=0
[ 0.625754] para->mclk[MOD_CLK_LCD1CH0]=0xc180c300
[ 0.630771] para->mclk[MOD_CLK_LCD1CH1]=0xc180c400
[ 0.635725] disp tv init
[ 0.638432] tcon_clk=0xc180c300, tcon_clk_parent=0x0
[ 0.643567] tcon_clk=0xc180c300, tcon_clk_parent=0xc18043c0
[ 0.649351] tve_clk=0xc180c400, tve_clk_parent=0xc18043c0
[ 0.654919] disp al tv init
[ 0.660585] fetch script datadisp.screen2_output_type fail
[ 0.666663] fetch script datadisp.screen2_output_mode fail
[ 0.674907] fetch script datadisp.fb2_format fail
[ 0.680160] fetch script datadisp.fb2_scaler_mode_enable fail
[ 0.686390] fetch script datadisp.fb2_width fail
[ 0.691546] fetch script datadisp.fb2_height fail
[ 0.696450] disp_malloc fail, size=0x2ee000
[ 0.700855] disp_malloc fail!
[ 0.704288] Unable to handle kernel paging request at virtual address 0005dfc0
[ 0.711847] pgd = c0004000
[ 0.714694] [0005dfc0] *pgd=00000000
[ 0.718502] Internal error: Oops: 805 [#1] ARM
[ 0.723102] Modules linked in:
[ 0.726315] CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.65 #203
[ 0.732507] task: c1832000 ti: c1834000 task.ti: c1834000
[ 0.738097] PC is at memcpy+0x244/0x330
[ 0.742087] LR is at 0xadc8ff9e
[ 0.745376] pc : [<c0125564>] lr : [<adc8ff9e>] psr: 20000013
[ 0.745376] sp : c1835c40 ip : ff9eaec8 fp : c1835d7c
[ 0.757200] r10: 000000ef r9 : ff9dacc8 r8 : ff99a8c7
[ 0.762595] r7 : ff97a6c6 r6 : ff96a5c7 r5 : ff94a2c4 r4 : ff93a2c4
[ 0.769310] r3 : ff9ca7c2 r2 : 00000460 r1 : c2854b58 r0 : 0005dfc0
[ 0.776027] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
[ 0.783535] Control: 0005317f Table: 80004000 DAC: 00000017
[ 0.789454]
[ 0.789454] PC: 0xc01254e4:
[ 0.793966] 54e4 cafffff9 e2411003 eaffffba e252201c ba00001f e92d03e0 f5d1f000 e2522060
[ 0.802457] 5504 f5d1f01c ba000002 f5d1f03c f5d1f05c f5d1f07c e8b100f0 e1a0382e e2522020
[ 0.810942] 5524 e8b15300 e1833804 e1a04824 e1844805 e1a05825 e1855806 e1a06826 e1866807
[ 0.819425] 5544 e1a07827 e1877808 e1a08828 e1888809 e1a09829 e189980c e1a0c82c e18cc80e
[ 0.827909] 5564 e8a013f8 aaffffe9 e3720060 aaffffe8 e8bd03e0 e212c01c 0a000005 e1a0382e
[ 0.836393] 5584 e491e004 e25cc004 e183380e e4803004 cafffff9 e2411002 eaffff8e e252201c
[ 0.844878] 55a4 ba00001f e92d03e0 f5d1f000 e2522060 f5d1f01c ba000002 f5d1f03c f5d1f05c
[ 0.853363] 55c4 f5d1f07c e8b100f0 e1a03c2e e2522020 e8b15300 e1833404 e1a04c24 e1844405
[ 0.861850]
[ 0.861850] SP: 0xc1835bc0:
[ 0.866362] 5bc0 c0546bcc 81f00000 c1835bfc c1835bd8 c006e17c c006d4e4 c0125564 20000013
[ 0.874846] 5be0 ffffffff c1835c2c c1835d7c c1835bf8 c000f4b8 c000a1a0 0005dfc0 c2854b58
[ 0.883329] 5c00 00000460 ff9ca7c2 ff93a2c4 ff94a2c4 ff96a5c7 ff97a6c6 ff99a8c7 ff9dacc8
[ 0.891813] 5c20 000000ef c1835d7c ff9eaec8 c1835c40 adc8ff9e c0125564 20000013 ffffffff
[ 0.900297] 5c40 0005dfc0 c1835d88 000001e0 0004b036 00000000 0005dfc0 c18f0800 c0158590
[ 0.908780] 5c60 c054abf8 00000000 00000001 00000140 00000140 000000f0 c280a000 c280a036
[ 0.917264] 5c80 000001e0 00000320 00000000 00000320 c001c89c 00000000 00000000 00000000
[ 0.925748] 5ca0 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 0.934232]
[ 0.934232] IP: 0xff9eae48:
[ 0.938745] ae48 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.947239] ae68 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.955723] ae88 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.964207] aea8 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.972691] aec8 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.981174] aee8 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.989658] af08 ******** ******** ******** ******** ******** ******** ******** ********
[ 0.998141] af28 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.006627]
[ 1.006627] FP: 0xc1835cfc:
[ 1.011141] 5cfc 000001e0 ffffffff 00000000 00000000 00000320 000001e0 00000000 00000000
[ 1.019623] 5d1c 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.028104] 5d3c 00000320 000001e0 00000000 00000000 00000000 00000000 c05592f8 00000000
[ 1.036586] 5d5c 00000000 c0559568 c0559570 c0559568 00000004 c1835ddc c1835d80 c0159300
[ 1.045070] 5d7c c0157e10 c0559570 00000001 00000000 00000000 00000002 00000320 000001e0
[ 1.053552] 5d9c 00000320 000001e0 00000000 00000000 00000000 c0154b30 c05592f8 c185f800
[ 1.062035] 5dbc c185f810 c047ce34 00000000 c045bf18 00000000 c1835dfc c1835de0 c0156540
[ 1.070519] 5ddc c01588a8 c185f810 c055cbc4 00000000 c047ce34 c1835e0c c1835e00 c01a4744
[ 1.079005]
[ 1.079005] R1: 0xc2854ad8:
[ 1.083517] 4ad8 2376ff0e 2073ff0d 2173ff0b 2372ff0b 2273ff0b 2272ff0b 2170ff0b 206fff0a
[ 1.092004] 4af8 2170ff0c 2170ff0c 206dff0c 206cff0c 206cff0d 206cff0d 206aff0d 1f6aff0d
[ 1.100492] 4b18 1f6aff0d 216aff0d 1f68ff0d 1e65ff0b 1e65ff0a 1f66ff0a 6c94ff0b a7c2ff62
[ 1.108980] 4b38 a2c4ff9c a2c4ff93 a5c7ff94 a6c6ff96 a8c7ff97 acc8ff99 aec8ff9d adc8ff9e
[ 1.117468] 4b58 adc8ff9f b1cbff9f b1ccffa3 b1ccffa3 b4ceffa5 b2ccffa8 b3ceffa6 b8cdffa7
[ 1.125956] 4b78 bbcfffad bcd0ffb0 bed2ffb1 bed0ffb3 bfd1ffb3 c1d3ffb4 c3d5ffb6 c5d5ffb8
[ 1.134444] 4b98 c8d9ffbb c9daffbf cbdcffc0 c8d8ffc2 cad9ffbf ccdbffc1 cddcffc3 cedeffc4
[ 1.142932] 4bb8 d0e0ffc3 d0e0ffc4 d0e0ffc4 d2e3ffc4 d1e3ffc8 d3e4ffc8 d1e2ffca d0e0ffc8
[ 1.151423]
[ 1.151423] R3: 0xff9ca742:
[ 1.155935] a740 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.164420] a760 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.172904] a780 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.181388] a7a0 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.189871] a7c0 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.198355] a7e0 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.206838] a800 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.215322] a820 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.223805] a840 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.232291]
[ 1.232291] R4: 0xff93a244:
[ 1.236803] a244 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.245287] a264 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.253770] a284 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.262254] a2a4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.270738] a2c4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.279222] a2e4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.287705] a304 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.296189] a324 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.304675]
[ 1.304675] R5: 0xff94a244:
[ 1.309188] a244 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.317672] a264 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.326155] a284 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.334639] a2a4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.343122] a2c4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.351605] a2e4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.360090] a304 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.368573] a324 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.377060]
[ 1.377060] R6: 0xff96a547:
[ 1.381572] a544 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.390055] a564 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.398539] a584 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.407023] a5a4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.415507] a5c4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.423990] a5e4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.432475] a604 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.440959] a624 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.449443] a644 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.457929]
[ 1.457929] R7: 0xff97a646:
[ 1.462441] a644 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.470925] a664 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.479408] a684 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.487891] a6a4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.496374] a6c4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.504858] a6e4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.513342] a704 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.521826] a724 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.530309] a744 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.538796]
[ 1.538796] R8: 0xff99a847:
[ 1.543308] a844 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.551792] a864 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.560276] a884 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.568760] a8a4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.577243] a8c4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.585726] a8e4 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.594209] a904 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.602694] a924 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.611177] a944 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.619664]
[ 1.619664] R9: 0xff9dac48:
[ 1.624176] ac48 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.632660] ac68 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.641144] ac88 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.649628] aca8 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.658112] acc8 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.666595] ace8 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.675079] ad08 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.683563] ad28 ******** ******** ******** ******** ******** ******** ******** ********
[ 1.692056] Process swapper (pid: 1, stack limit = 0xc18341b8)
[ 1.698066] Stack: (0xc1835c40 to 0xc1836000)
[ 1.702599] 5c40: 0005dfc0 c1835d88 000001e0 0004b036 00000000 0005dfc0 c18f0800 c0158590
[ 1.711002] 5c60: c054abf8 00000000 00000001 00000140 00000140 000000f0 c280a000 c280a036
[ 1.719403] 5c80: 000001e0 00000320 00000000 00000320 c001c89c 00000000 00000000 00000000
[ 1.727803] 5ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.736203] 5cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.744603] 5ce0: 00000000 00000000 ff000001 00000000 00000000 00000000 00000320 000001e0
[ 1.753003] 5d00: ffffffff 00000000 00000000 00000320 000001e0 00000000 00000000 00000000
[ 1.761404] 5d20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000320
[ 1.769804] 5d40: 000001e0 00000000 00000000 00000000 00000000 c05592f8 00000000 00000000
[ 1.778207] 5d60: c0559568 c0559570 c0559568 00000004 c1835ddc c1835d80 c0159300 c0157e10
[ 1.786607] 5d80: c0559570 00000001 00000000 00000000 00000002 00000320 000001e0 00000320
[ 1.795009] 5da0: 000001e0 00000000 00000000 00000000 c0154b30 c05592f8 c185f800 c185f810
[ 1.803412] 5dc0: c047ce34 00000000 c045bf18 00000000 c1835dfc c1835de0 c0156540 c01588a8
[ 1.811815] 5de0: c185f810 c055cbc4 00000000 c047ce34 c1835e0c c1835e00 c01a4744 c01563e0
[ 1.820218] 5e00: c1835e34 c1835e10 c01a3518 c01a4738 c185f810 c185f844 c047ce34 00000000
[ 1.828621] 5e20: 00000000 c045bf18 c1835e54 c1835e38 c01a366c c01a33e4 00000000 c047ce34
[ 1.837024] 5e40: c01a3618 00000000 c1835e7c c1835e58 c01a1b68 c01a3628 c1823f4c c185c870
[ 1.845428] 5e60: c18d4e14 c047ce34 c18d4de0 c0537f48 c1835e8c c1835e80 c01a2fc8 c01a1af0
[ 1.853832] 5e80: c1835ebc c1835e90 c01a2bf8 c01a2fb8 c03f672a c0460008 c1835ebc c047ce34
[ 1.862235] 5ea0: c03f672a 00000000 c0460008 00000000 c1835ee4 c1835ec0 c01a3c1c c01a2ac0
[ 1.870638] 5ec0: c0559080 c03f672a 00000000 c0460008 00000000 c045bf18 c1835ef4 c1835ee8
[ 1.879041] 5ee0: c01a4ca4 c01a3b84 c1835f1c c1835ef8 c044f410 c01a4c68 c03f672a c01a3b84
[ 1.887445] 5f00: c1835f1c c1834000 c044f334 c0547500 c1835f5c c1835f20 c000a4d4 c044f344
[ 1.895847] 5f20: 00000006 00000006 0000005a c05c4169 c003b8a0 00000007 c0547500 0000005a
[ 1.904251] 5f40: c0460008 c045bf10 c045bf18 00000000 c1835f94 c1835f60 c0442c0c c000a3c8
[ 1.912652] 5f60: 00000006 00000006 c04424d0 00000000 00000000 c033cb4c 00000000 00000000
[ 1.921054] 5f80: 00000000 00000000 c1835fac c1835f98 c033cb5c c0442a78 00000000 c033cb4c
[ 1.929455] 5fa0: 00000000 c1835fb0 c000f930 c033cb5c 00000000 00000000 00000000 00000000
[ 1.937855] 5fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.946255] 5fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[ 1.954634] Backtrace:
[ 1.957276] [<c0157e00>] (Display_Fb_Request+0x0/0x814) from [<c0159300>] (Fb_Init+0xa68/0xc24)
[ 1.966220] [<c0158898>] (Fb_Init+0x0/0xc24) from [<c0156540>] (disp_probe+0x170/0x1f0)
[ 1.974466] [<c01563d0>] (disp_probe+0x0/0x1f0) from [<c01a4744>] (platform_drv_probe+0x1c/0x20)
[ 1.983468] r7:c047ce34 r6:00000000 r5:c055cbc4 r4:c185f810
[ 1.989378] [<c01a4728>] (platform_drv_probe+0x0/0x20) from [<c01a3518>] (driver_probe_device+0x144/0x1f8)
[ 1.999283] [<c01a33d4>] (driver_probe_device+0x0/0x1f8) from [<c01a366c>] (__driver_attach+0x54/0x94)
[ 2.008811] r9:c045bf18 r8:00000000 r7:00000000 r6:c047ce34 r5:c185f844
r4:c185f810
[ 2.017027] [<c01a3618>] (__driver_attach+0x0/0x94) from [<c01a1b68>] (bus_for_each_dev+0x88/0x98)
[ 2.026204] r7:00000000 r6:c01a3618 r5:c047ce34 r4:00000000
[ 2.032105] [<c01a1ae0>] (bus_for_each_dev+0x0/0x98) from [<c01a2fc8>] (driver_attach+0x20/0x28)
[ 2.041105] r6:c0537f48 r5:c18d4de0 r4:c047ce34
[ 2.045935] [<c01a2fa8>] (driver_attach+0x0/0x28) from [<c01a2bf8>] (bus_add_driver+0x148/0x220)
[ 2.054957] [<c01a2ab0>] (bus_add_driver+0x0/0x220) from [<c01a3c1c>] (driver_register+0xa8/0x124)
[ 2.064132] r8:00000000 r7:c0460008 r6:00000000 r5:c03f672a r4:c047ce34
[ 2.071110] [<c01a3b74>] (driver_register+0x0/0x124) from [<c01a4ca4>] (platform_driver_register+0x4c/0x60)
[ 2.081078] r9:c045bf18 r8:00000000 r7:c0460008 r6:00000000 r5:c03f672a
r4:c0559080
[ 2.089322] [<c01a4c58>] (platform_driver_register+0x0/0x60) from [<c044f410>] (disp_module_init+0xdc/0x128)
[ 2.099409] [<c044f334>] (disp_module_init+0x0/0x128) from [<c000a4d4>] (do_one_initcall+0x11c/0x148)
[ 2.108850] r6:c0547500 r5:c044f334 r4:c1834000
[ 2.113689] [<c000a3b8>] (do_one_initcall+0x0/0x148) from [<c0442c0c>] (kernel_init_freeable+0x1a4/0x1e4)
[ 2.123513] [<c0442a68>] (kernel_init_freeable+0x0/0x1e4) from [<c033cb5c>] (kernel_init+0x10/0xe8)
[ 2.132776] r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c033cb4c
r4:00000000
[ 2.141006] [<c033cb4c>] (kernel_init+0x0/0xe8) from [<c000f930>] (ret_from_fork+0x14/0x24)
[ 2.149567] r5:c033cb4c r4:00000000
[ 2.153324] Code: e1a09829 e189980c e1a0c82c e18cc80e (e8a013f8)
[ 2.159782] ---[ end trace 7c1a1d285d2959a2 ]---
[ 2.164615] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.164615]
#include <stdio.h>
#include "types.h"
#include "io.h"
#include "reg-ccu.h"
typedef unsigned int u32_t;
#define __O volatile
#define __IO volatile
#define CPU_PORT_BASE 0x01C20800
#define GPIOG_BASE (CPU_PORT_BASE + 0xD8)
#define GPIOG_INTERRUPT_BASE (GPIO_CPU_INTERRUPT_BASE + 0x20)
typedef struct{
__IO u32_t CFG[4];
__IO u32_t DAT;
__IO u32_t DRV[2];
__IO u32_t PUL[2];
}GPIO_Typedef;
#define GPIOG ((GPIO_Typedef *)GPIOG_BASE)
static void wait_pll_stable(u32_t base)
{
u32_t rval = 0;
u32_t time = 0xfff;
do {
rval = read32(base);
time--;
} while(time && !(rval & (1 << 28)));
}
static void clock_set_pll_cpu(u32_t clk)
{
u32_t n, k, m, p;
u32_t rval = 0;
u32_t div = 0;
if(clk > 720000000)
clk = 720000000;
if((clk % 24000000) == 0)
{
div = clk / 24000000;
n = div - 1;
k = 0;
m = 0;
p = 0;
}
else if((clk % 12000000) == 0)
{
m = 1;
div = clk / 12000000;
if((div % 3) == 0)
k = 2;
else if((div % 4) == 0)
k = 3;
else
k = 1;
n = (div / (k + 1)) - 1;
p = 0;
}
else
{
div = clk / 24000000;
n = div - 1;
k = 0;
m = 0;
p = 0;
}
rval = read32(F1C100S_CCU_BASE + CCU_PLL_CPU_CTRL);
rval &= ~((0x3 << 16) | (0x1f << 8) | (0x3 << 4) | (0x3 << 0));
rval |= (1U << 31) | (p << 16) | (n << 8) | (k << 4) | m;
write32(F1C100S_CCU_BASE + CCU_PLL_CPU_CTRL, rval);
wait_pll_stable(F1C100S_CCU_BASE + CCU_PLL_CPU_CTRL);
}
void sys_clock_init(void)
{
write32(F1C100S_CCU_BASE + CCU_PLL_STABLE_TIME0, 0x1ff);
write32(F1C100S_CCU_BASE + CCU_PLL_STABLE_TIME1, 0x1ff);
write32(F1C100S_CCU_BASE + CCU_CPU_CFG, 0x00020000);
write32(F1C100S_CCU_BASE + CCU_AHB_APB_CFG, 0x00012110);
clock_set_pll_cpu(408000000);
}
void sys_uart_init(void)
{
u32_t addr;
u32_t val;
/* Config GPIOF4 and GPIOF2 to txd0 and rxd0 */
// addr = 0x01c208b4 + 0x00;//uart0 base
addr = 0x01c20800 + 0x00;//uart1 base
val = read32(addr);
//val &= ~(0xf << ((4 & 0x7) << 2));
//val |= ((0x3 & 0x7) << ((4 & 0x7) << 2));
val &= ~((0xf << 8) | (0xf << 12));
val |= (0x05 << 8) | (0x05 << 12);
write32(addr, val);
//val = read32(addr);
//val &= ~(0xf << ((2 & 0x7) << 2));
//val |= ((0x3 & 0x7) << ((2 & 0x7) << 2));
//write32(addr, val);
addr = 0x01c20068;
val = read32(addr);
// val |= 1 << 20; /* Open the clock gate for uart0 */
val |= 1 << 21; /* Open the clock gate for uart1 */
write32(addr, val);
addr = 0x01c202d0;
val = read32(addr);
// val |= 1 << 20; /* Deassert uart0 reset */
val |= 1 << 21; /* Deassert uart1 reset */
write32(addr, val);
/* Config uart to 115200-8-1-0 */
// addr = 0x01c25000; //uart0 base
addr = 0x01c25400; //uart1 base
write32(addr + 0x04, 0x0);
write32(addr + 0x08, 0xf7);
write32(addr + 0x10, 0x0);
val = read32(addr + 0x0c);
val |= (1 << 7);
write32(addr + 0x0c, val);
write32(addr + 0x00, 0x37 & 0xff);
write32(addr + 0x04, (0x37 >> 8) & 0xff);
val = read32(addr + 0x0c);
val &= ~(1 << 7);
write32(addr + 0x0c, val);
val = read32(addr + 0x0c);
val &= ~0x1f;
val |= (0x3 << 0) | (0 << 2) | (0x0 << 3);
write32(addr + 0x0c, val);
}
void sys_uart_putc(char c)
{
// u32_t addr = 0x01c25000;//uart0 base
u32_t addr = 0x01c25400;//uart1 base
while((read32(addr + 0x7c) & (0x1 << 1)) == 0);
write32(addr + 0x00, c);
}
int main(void)
{
sys_clock_init();
sys_uart_init();
while(1)
{
sys_uart_putc('A');
}
return 0;
}
MDK widora r3 裸奔 工程, UART1 (PA2, PA3)输出A:
咋说,awtk 本地编译有包吗,我弄来看看
duanchangstar 说:楼主很厉害啊,可以顺便搞一下AWTK的双缓冲吗
新手报道,请问荔枝派如何使用定时器和GPIO呢?
http://whycan.com/t_2439.html#p18892
(出处:哇酷开发者社区)
uboot可以跑脚本的,先判断mmc2是否存在,然后可以生成不同的 bootargs,然后再boot
大佬这个脚本写得太刁了:
buildroot-tiny200 (F1C100/200s) 开发包近期更新内容 * 已支持DVP摄像头 *
http://whycan.com/t_5221.html
# tinymix contents
Number of controls: 25
ctl type num name value
0 INT 1 DAC Playback Volume 63 (range 0->63)
1 INT 1 Headphone Playback Volume 32 (range 0->63)
2 BOOL 2 Headphone Playback Switch On, On
3 INT 1 Line In Playback Volume 0 (range 0->7)
4 INT 1 FM In Playback Volume 0 (range 0->7)
5 INT 1 Mic In Playback Volume 3 (range 0->7)
6 INT 1 Mic Boost Volume 7 (range 0->7)
7 INT 1 ADC Capture Volume 3 (range 0->7)
8 BOOL 1 ADC Mixer Right Out Capture Switch Off
9 BOOL 1 ADC Mixer Left Out Capture Switch Off
10 BOOL 1 ADC Mixer Line In Capture Switch Off
11 BOOL 1 ADC Mixer Right FM In Capture Switch Off
12 BOOL 1 ADC Mixer Left FM In Capture Switch Off
13 BOOL 1 ADC Mixer Mic Capture Switch On
14 BOOL 1 Left Mixer Right DAC Playback Switch Off
15 BOOL 1 Left Mixer Left DAC Playback Switch Off
16 BOOL 1 Left Mixer FM In Playback Switch Off
17 BOOL 1 Left Mixer Line In Playback Switch Off
18 BOOL 1 Left Mixer Mic In Playback Switch On
19 BOOL 1 Right Mixer Left DAC Playback Switch Off
20 BOOL 1 Right Mixer Right DAC Playback Switch Off
21 BOOL 1 Right Mixer FM In Playback Switch Off
22 BOOL 1 Right Mixer Line In Playback Switch Off
23 BOOL 1 Right Mixer Mic In Playback Switch Off
24 ENUM 2 Headphone Source Playback Route , DACMixer, , DACMixer
#
# tinycap /tmp/test.wav
Capturing sample: 2 ch, 48000 hz, 16 bit
^CCaptured 421920 frames
#
#
# tinyplay /tmp/test.wav
playing '/tmp/test.wav': 2 ch, 48000 hz, 16 bit
#
搞定, 感谢楼主, 只是底噪声音有点大, 不知道是F1C200s声卡本身问题, 还是PCB的滤波没做好?
启动日志:
=>
=>
=> ums 0 mmc 1:0
UMS: LUN 0, dev 1, hwpart 0, sector 0x0, count 0xf6000
\musb-hdrc: peripheral reset irq lost!
/
U-Boot SPL 2020.07 (Oct 20 2020 - 11:09:37 +0800)
DRAM: 64 MiB
Trying to boot from MMC1
Card did not respond to voltage select!
spl: mmc init failed with error: -95
Trying to boot from MMC2
U-Boot 2020.07 (Oct 20 2020 - 11:09:37 +0800) Allwinner Technology
CPU: Allwinner F Series (SUNIV)
Model: Allwinner F1C100s Generic Device
DRAM: 64 MiB
MMC: mmc@1c0f000: 0, mmc@1c10000: 1
Setting up a 800x480 lcd console (overscan 0x0)
In: serial
Out: vga
Err: vga
Allwinner mUSB OTG (Peripheral)
Hit any key to stop autoboot: 0
Card did not respond to voltage select!
switch to partitions #0, OK
mmc1 is current device
=========================
Boot Device: mmc1
Boot Slot 0: empty
Boot Slot 1: mmc1
=========================
DFU waiting on MMC1...
switch to partitions #0, OK
mmc1 is current device
musb-hdrc: peripheral reset irq lost!
switch to partitions #0, OK
mmc1 is current device
Booting from MMC1...
4687296 bytes read in 1555 ms (2.9 MiB/s)
15537 bytes read in 9 ms (1.6 MiB/s)
## Flattened Device Tree blob at 80700000
Booting using the fdt blob at 0x80700000
Loading Device Tree to 816f9000, end 816ffcb0 ... OK
Cannot setup simplefb: node not found
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.4.66 (cube@ubuntu) (gcc version 8.4.0 (Buildroot 2020.02.4-00005-g9d84975a2d)) #4 Sat Apr 10 10:38:29 CST 2021
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=0005317f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Widora MangoPi R3
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] cma: Reserved 16 MiB at 0x83000000
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk rootwait consoleblank=0 net.ifnames=0 biosdevname=0 root=/dev/mmcblk1p3
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 37700K/65536K available (7168K kernel code, 256K rwdata, 1796K rodata, 1024K init, 229K bss, 11452K reserved, 16384K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x254/0x444 with crng_init=0
[ 0.000050] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[ 0.000142] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000890] Console: colour dummy device 80x30
[ 0.000995] Calibrating delay loop... 203.16 BogoMIPS (lpj=1015808)
[ 0.070264] pid_max: default: 32768 minimum: 301
[ 0.070792] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.070837] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.072654] CPU: Testing write buffer coherency: ok
[ 0.074798] Setting up static identity map for 0x80100000 - 0x80100058
[ 0.076112] devtmpfs: initialized
[ 0.087917] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.087981] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.092122] pinctrl core: initialized pinctrl subsystem
[ 0.094847] NET: Registered protocol family 16
[ 0.098589] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.100974] cpuidle: using governor menu
[ 0.150566] SCSI subsystem initialized
[ 0.151257] usbcore: registered new interface driver usbfs
[ 0.151454] usbcore: registered new interface driver hub
[ 0.151677] usbcore: registered new device driver usb
[ 0.152155] mc: Linux media interface: v0.10
[ 0.152270] videodev: Linux video capture interface: v2.00
[ 0.152396] pps_core: LinuxPPS API ver. 1 registered
[ 0.152420] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.152483] PTP clock support registered
[ 0.153584] ion_parse_dt_heap_common: id 4 type 4 name cma align 1000
[ 0.154579] Advanced Linux Sound Architecture Driver Initialized.
[ 0.157006] clocksource: Switched to clocksource timer
[ 0.188590] thermal_sys: Registered thermal governor 'step_wise'
[ 0.189373] NET: Registered protocol family 2
[ 0.191001] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.191096] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.191152] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.191201] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.191540] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.191606] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.192128] NET: Registered protocol family 1
[ 0.194809] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.196685] Initialise system trusted keyrings
[ 0.197462] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.219547] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.220149] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.334515] Key type asymmetric registered
[ 0.334559] Asymmetric key parser 'x509' registered
[ 0.334742] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.334771] io scheduler mq-deadline registered
[ 0.334791] io scheduler kyber registered
[ 0.350352] suniv-f1c100s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.374739] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.381056] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pa not found, using dummy regulator
[ 0.382387] printk: console [ttyS0] disabled
[ 0.402720] 1c25400.serial: ttyS0 at MMIO 0x1c25400 (irq = 28, base_baud = 6250000) is a 16550A
[ 0.832944] printk: console [ttyS0] enabled
[ 0.842777] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 0.864150] panel-simple panel: panel supply power not found, using dummy regulator
[ 0.873857] SCSI Media Changer driver v0.25
[ 0.880356] libphy: Fixed MDIO Bus: probed
[ 0.884634] usbcore: registered new interface driver rndis_wlan
[ 0.890813] usbcore: registered new interface driver asix
[ 0.896317] usbcore: registered new interface driver ax88179_178a
[ 0.902600] usbcore: registered new interface driver cdc_ether
[ 0.908641] usbcore: registered new interface driver net1080
[ 0.914398] usbcore: registered new interface driver rndis_host
[ 0.920500] usbcore: registered new interface driver cdc_subset
[ 0.926509] usbcore: registered new interface driver zaurus
[ 0.932312] usbcore: registered new interface driver cdc_ncm
[ 0.938039] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.944553] ehci-platform: EHCI generic platform driver
[ 0.950225] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 0.956452] ohci-platform: OHCI generic platform driver
[ 0.962326] usbcore: registered new interface driver usb-storage
[ 0.968720] usbcore: registered new interface driver usbserial_generic
[ 0.975312] usbserial: USB Serial support registered for generic
[ 0.982406] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 0.994295] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.000270] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 1
[ 1.010325] hub 1-0:1.0: USB hub found
[ 1.014222] hub 1-0:1.0: 1 port detected
[ 1.021316] i2c /dev entries driver
[ 1.025440] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pd not found, using dummy regulator
[ 1.039215] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pe not found, using dummy regulator
[ 1.050186] sun4i-csi 1cb0000.csi: Packed (RAW) format enabled.
[ 1.058081] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.068224] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 1.106198] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.113713] suniv-f1c100s-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pc not found, using dummy regulator
[ 1.151841] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 1.161385] usbcore: registered new interface driver usbhid
[ 1.166962] usbhid: USB HID core driver
[ 1.171250] sunxi-cedar 1c0e000.video-codec: sunxi cedar version 0.01alpha
[ 1.178586] sunxi-cedar 1c0e000.video-codec: cedar-ve the get irq is 19
[ 1.190016] debugfs: Directory '1c23c00.codec' with parent 'F1C100s Audio Codec' already present!
[ 1.204029] sun4i-codec 1c23c00.codec: Codec <-> 1c23c00.codec mapping ok
[ 1.220473] NET: Registered protocol family 17
[ 1.225033] Key type dns_resolver registered
[ 1.230567] Loading compiled-in X.509 certificates
[ 1.254655] sun4i-drm soc:display-engine: bound 1e00000.display-frontend (ops 0xc083d0a0)
[ 1.263758] sun4i-drm soc:display-engine: bound 1e60000.display-backend (ops 0xc083c8e0)
[ 1.273348] sun4i-drm soc:display-engine: bound 1c0c000.lcd-controller (ops 0xc083b480)
[ 1.281963] sun4i-drm soc:display-engine: bound 1c0a000.tv-encoder (ops 0xc083c1a0)
[ 1.289742] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 1.296344] [drm] No driver support for vblank timestamp query.
[ 1.304148] [drm] Initialized sun4i-drm 1.0.0 20150629 for soc:display-engine on minor 0
[ 1.313183] [drm] kms: can't enable cloning when we probably wanted to.
[ 1.343782] mmc1: host does not support reading read-only switch, assuming write-enable
[ 1.345550] mmc1: Problem switching card into high-speed mode!
[ 1.345823] mmc1: new SD card at address 211f
[ 1.348299] mmcblk1: mmc1:211f APPSD 492 MiB
[ 1.354863] mmcblk1: p1 p2 p3
[ 1.385100] Console: switching to colour frame buffer device 100x30
[ 1.449668] sun4i-drm soc:display-engine: fb0: sun4i-drmdrmfb frame buffer device
[ 1.458889] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.476711] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.483637] ALSA device list:
[ 1.486630] #0: F1C100s Audio Codec
[ 1.490987] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.499764] cfg80211: failed to load regulatory.db
[ 1.528073] EXT4-fs (mmcblk1p3): mounted filesystem with ordered data mode. Opts: (null)
[ 1.536307] VFS: Mounted root (ext4 filesystem) readonly on device 179:3.
[ 1.544877] devtmpfs: mounted
[ 1.554425] Freeing unused kernel memory: 1024K
[ 1.559152] Run /sbin/init as init process
[ 1.607922] random: fast init done
[ 2.416759] EXT4-fs (mmcblk1p3): re-mounted. Opts: (null)
Mounting OverlayFS: Skip
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Populating /dev using udev: [ 3.341323] udevd[97]: starting version 3.2.9
[ 3.412996] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.423602] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.431874] random: udevd: uninitialized urandom read (16 bytes read)
[ 3.533460] udevd[98]: starting eudev-3.2.9
[ 5.339444] Goodix-TS 0-005d: 0-005d supply AVDD28 not found, using dummy regulator
[ 5.347616] Goodix-TS 0-005d: 0-005d supply VDDIO not found, using dummy regulator
[ 5.363105] ov2640 0-0030: Product ID error fa:fa
[ 5.487591] Goodix-TS 0-005d: i2c test failed attempt 1: -6
[ 5.527671] Goodix-TS 0-005d: i2c test failed attempt 2: -6
[ 5.567421] Goodix-TS 0-005d: I2C communication failure: -6
done
Saving random seed: [ 6.300976] random: dd: uninitialized urandom read (512 bytes read)
OK
Starting system message bus: [ 6.620491] random: dbus-uuidgen: uninitialized urandom read (12 bytes read)
[ 6.628152] random: dbus-uuidgen: uninitialized urandom read (8 bytes read)
done
Starting network: OK
modprobe: module usb_f_rndis not found in modules.dep
modprobe: module usb_f_mass_storage not found in modules.dep
[ 7.188584] using random self ethernet address
[ 7.193063] using random host ethernet address
[ 7.214159] Mass Storage Function, version: 2009/09/11
[ 7.219479] LUN: removable file: (no medium)
[ 7.226145] mass_storage.ms0/lun.0: unable to open backing file: /dev/mmcblk0
sh: write error: No such file or directory
[ 7.319131] usb0: HOST MAC 16:22:92:5a:bb:ad
[ 7.323561] usb0: MAC 5a:de:b0:37:cc:f4
Starting DHCP server: [ 7.676138] configfs-gadget gadget: high-speed config #1: c
OK
Starting uMTPrd: mount: mounting none on /sys/kernel/config failed: Device or resource busy
[ 8.571633] file system registered
[ 8.726522] read descriptors
[ 8.729717] read strings
OK
MJPG Streamer Version: git rev: 9d84975a2da97b17a4fe5eb7c85faa6b005cadae
i: Using V4L2 device.: (null)
i: Desired Resolution: 640 x 480
i: Frames Per Second.: 15
i: Format............: YUYV
i: JPEG Quality......: 80
i: TV-Norm...........: DEFAULT
i: init_VideoIn failed
# [ 31.847106] vcc3v0: disabling
[ 31.850109] vcc5v0: disabling
# [
0. 下载 zadig 和 sunxi-fel.exe :
编译、安装Windows版本sunxi-fel步骤 (32M spi flash补丁,支持W25Q256/MX25L256)
http://whycan.com/t_444.html
1. 把SD NAND芯片焊到转接板上, 再把转接板焊到 TINY200主板
2. 修改 board/widora/mangopi/r3/devicetree/linux/devicetree.dts
屏蔽spi0:
&spi0 {
- status = "okay";
+ status = "disabled";
使能mmc1:
+&mmc1 {
+ status = "okay";
+ broken-cd;
+};
+
然后make打包成固件 output/images/sysimage-sdcard.img
3. 烧录
进入usb fel模式, windows命令行运行 "D:\sunxi-tools-win32support_f1c100s_v3s_201812219\F1C100s\sunxi-fel.exe" uboot u-boot-sunxi-with-spl.bin
uboot下载: u-boot-sunxi-with-spl.7z
u-boot命令行输入: ums 0 mmc 1:0
这时电脑出现一个U盘, 用win32imager烧录 sysimage-sdcard.img即可。
烧录固件下载: sysimage-sdcard-1bit.7z
1. google一下uip,点击进入主页 http://www.sics.se/~adam/uip/index.php/Main_Page
当前最新的uIP版本是 1.0,这个版本比较复杂,所以还是移植历史版本吧.
打开 http://www.sics.se/~adam/old-uip/ 下载0.9版:
http://www.sics.se/~adam/download/?f=uip-0.9.tar.gz
2. 打开Keil新建项目uIP0.9.uv2, 设置项目属性.
memory_model 设置为large 模式,这样默认的存储方式是xdata
因为uIP0.9编译后占用20K rom, 所以必须选一个32K(>20K)的rom的单片机,
比如Device可设置为SST89x58或者SST89x516xx,
解压缩官方下载的uIP0.9压缩包,添加文件至项目,
需添加至项目的文件有:uip\uip.c, uip.c\uip.h, uip.c\uip_arch.h,
uip.c\uip_arp.c,uip.c\uip_arp.h
unix\main.c, unix\uip_arch.c, unix\uipopt.h,
apps\httpd\所有文件
3. 因为data是系统关键字, 所以标识符data => dat
以下文件需要改动: fs.h, fsdata.h,httpd.c
4. 为RTL8019AS 编写驱动程序(具体如何操作寄存器老古的网站有详细的教程),
内容在压缩包中的RTL8019AS.c, RTL8019AS.h
需要更改main.h中的如下地方:
include "tapdev.h" => #include "rtl8019as.h"
tapdev_init() -> rtl8019as_init()
tapdev_send() -> rtl8019as_send()
tapdev_read() -> rtl8019as_read()
5. fsdata.c 首行添加 #include "fsdata.h"
关键字替换:
static const char -> const char code
const struct fsdata_file -> const struct fsdata_file code
fsdata.h 文件末尾添加:
#define FS_ROOT file_tcp_header_html
#define FS_NUMFILES 14
const char code data_cgi_files[];
const char code data_cgi_stats[];
const char code data_cgi_tcp[];
const char code data_img_bg_png[];
const char code data_about_html[];
const char code data_control_html[];
const char code data_404_html[];
const char code data_files_footer_plain[];
const char code data_files_header_html[];
const char code data_index_html[];
const char code data_stats_footer_plain[];
const char code data_stats_header_html[];
const char code data_tcp_footer_plain[];
const char code data_tcp_header_html[];
const struct fsdata_file code file_cgi_files[];
const struct fsdata_file code file_cgi_stats[];
const struct fsdata_file code file_cgi_tcp[];
const struct fsdata_file code file_img_bg_png[];
const struct fsdata_file code file_about_html[];
const struct fsdata_file code file_control_html[];
const struct fsdata_file code file_404_html[];
const struct fsdata_file code file_files_footer_plain[];
const struct fsdata_file code file_files_header_html[];
const struct fsdata_file code file_index_html[];
const struct fsdata_file code file_stats_footer_plain[];
const struct fsdata_file code file_stats_header_html[];
const struct fsdata_file code file_tcp_footer_plain[];
const struct fsdata_file code file_tcp_header_html[];
6. fs.c 第55行删除: #include "fsdata.c"
7. uipopt.h
181行: #define UIP_FIXEDETHADDR 0 -> 1
299行: #define UIP_ACTIVE_OPEN 1 ->0
497行: #define BYTE_ORDER LITTLE_ENDIAN -> BIG_ENDIAN
280行: #define UIP_UDP_APPCALL udp_appcall -> httpd_appcall
更改单片机的IP地址和子网掩码(比如我的demo项目改为192.168.2.254,255.255.0.0)
文件末尾添加:
#ifndef NULL
#define NULL (void *)0
#endif /* NULL */
8. httpd.c
删除以下内容:
extern const struct fsdata_file file_index_html;
extern const struct fsdata_file file_404_html;
220行更改:
fs_open(file_index_html.name, &fsfile); => file_index_html->name
224行同上更改
9. 烧录,运行。
命令提示符下运行 c:\>ping 192.168.2.254
cat: checkout: No such file or directory
/*
* f_rndis.c -- RNDIS link function driver
*
* Copyright (C) 2003-2005,2008 David Brownell
* Copyright (C) 2003-2004 Robert Schwebel, Benedikt Spranger
* Copyright (C) 2008 Nokia Corporation
* Copyright (C) 2009 Samsung Electronics
* Author: Michal Nazarewicz (mina86@mina86.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
/* #define VERBOSE_DEBUG */
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/etherdevice.h>
#include <linux/atomic.h>
#include "u_ether.h"
#include "rndis.h"
/*
* This function is an RNDIS Ethernet port -- a Microsoft protocol that's
* been promoted instead of the standard CDC Ethernet. The published RNDIS
* spec is ambiguous, incomplete, and needlessly complex. Variants such as
* ActiveSync have even worse status in terms of specification.
*
* In short: it's a protocol controlled by (and for) Microsoft, not for an
* Open ecosystem or markets. Linux supports it *only* because Microsoft
* doesn't support the CDC Ethernet standard.
*
* The RNDIS data transfer model is complex, with multiple Ethernet packets
* per USB message, and out of band data. The control model is built around
* what's essentially an "RNDIS RPC" protocol. It's all wrapped in a CDC ACM
* (modem, not Ethernet) veneer, with those ACM descriptors being entirely
* useless (they're ignored). RNDIS expects to be the only function in its
* configuration, so it's no real help if you need composite devices; and
* it expects to be the first configuration too.
*
* There is a single technical advantage of RNDIS over CDC Ethernet, if you
* discount the fluff that its RPC can be made to deliver: it doesn't need
* a NOP altsetting for the data interface. That lets it work on some of the
* "so smart it's stupid" hardware which takes over configuration changes
* from the software, and adds restrictions like "no altsettings".
*
* Unfortunately MSFT's RNDIS drivers are buggy. They hang or oops, and
* have all sorts of contrary-to-specification oddities that can prevent
* them from working sanely. Since bugfixes (or accurate specs, letting
* Linux work around those bugs) are unlikely to ever come from MSFT, you
* may want to avoid using RNDIS on purely operational grounds.
*
* Omissions from the RNDIS 1.0 specification include:
*
* - Power management ... references data that's scattered around lots
* of other documentation, which is incorrect/incomplete there too.
*
* - There are various undocumented protocol requirements, like the need
* to send garbage in some control-OUT messages.
*
* - MS-Windows drivers sometimes emit undocumented requests.
*/
struct f_rndis {
struct gether port;
u8 ctrl_id, data_id;
u8 ethaddr[ETH_ALEN];
u32 vendorID;
const char *manufacturer;
int config;
struct usb_ep *notify;
struct usb_request *notify_req;
atomic_t notify_count;
};
static inline struct f_rndis *func_to_rndis(struct usb_function *f)
{
return container_of(f, struct f_rndis, port.func);
}
/* peak (theoretical) bulk transfer rate in bits-per-second */
static unsigned int bitrate(struct usb_gadget *g)
{
if (gadget_is_superspeed(g) && g->speed == USB_SPEED_SUPER)
return 13 * 1024 * 8 * 1000 * 8;
else if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
return 13 * 512 * 8 * 1000 * 8;
else
return 19 * 64 * 1 * 1000 * 8;
}
/*-------------------------------------------------------------------------*/
/*
*/
#define RNDIS_STATUS_INTERVAL_MS 32
#define STATUS_BYTECOUNT 8 /* 8 bytes data */
/* interface descriptor: */
static struct usb_interface_descriptor rndis_control_intf = {
.bLength = sizeof rndis_control_intf,
.bDescriptorType = USB_DT_INTERFACE,
/* .bInterfaceNumber = DYNAMIC */
/* status endpoint is optional; this could be patched later */
.bNumEndpoints = 1,
.bInterfaceClass = USB_CLASS_COMM,
.bInterfaceSubClass = USB_CDC_SUBCLASS_ACM,
.bInterfaceProtocol = USB_CDC_ACM_PROTO_VENDOR,
/* .iInterface = DYNAMIC */
};
static struct usb_cdc_header_desc header_desc = {
.bLength = sizeof header_desc,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_HEADER_TYPE,
.bcdCDC = cpu_to_le16(0x0110),
};
static struct usb_cdc_call_mgmt_descriptor call_mgmt_descriptor = {
.bLength = sizeof call_mgmt_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_CALL_MANAGEMENT_TYPE,
.bmCapabilities = 0x00,
.bDataInterface = 0x01,
};
static struct usb_cdc_acm_descriptor rndis_acm_descriptor = {
.bLength = sizeof rndis_acm_descriptor,
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_ACM_TYPE,
.bmCapabilities = 0x00,
};
static struct usb_cdc_union_desc rndis_union_desc = {
.bLength = sizeof(rndis_union_desc),
.bDescriptorType = USB_DT_CS_INTERFACE,
.bDescriptorSubType = USB_CDC_UNION_TYPE,
/* .bMasterInterface0 = DYNAMIC */
/* .bSlaveInterface0 = DYNAMIC */
};
/* the data interface has two bulk endpoints */
static struct usb_interface_descriptor rndis_data_intf = {
.bLength = sizeof rndis_data_intf,
.bDescriptorType = USB_DT_INTERFACE,
/* .bInterfaceNumber = DYNAMIC */
.bNumEndpoints = 2,
.bInterfaceClass = USB_CLASS_CDC_DATA,
.bInterfaceSubClass = 0,
.bInterfaceProtocol = 0,
/* .iInterface = DYNAMIC */
};
static struct usb_interface_assoc_descriptor
rndis_iad_descriptor = {
.bLength = sizeof rndis_iad_descriptor,
.bDescriptorType = USB_DT_INTERFACE_ASSOCIATION,
.bFirstInterface = 0, /* XXX, hardcoded */
.bInterfaceCount = 2, // control + data
.bFunctionClass = USB_CLASS_COMM,
.bFunctionSubClass = USB_CDC_SUBCLASS_ETHERNET,
.bFunctionProtocol = USB_CDC_PROTO_NONE,
/* .iFunction = DYNAMIC */
};
/* full speed support: */
static struct usb_endpoint_descriptor fs_notify_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT),
.bInterval = RNDIS_STATUS_INTERVAL_MS,
};
static struct usb_endpoint_descriptor fs_in_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
};
static struct usb_endpoint_descriptor fs_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_OUT,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
};
static struct usb_descriptor_header *eth_fs_function[] = {
(struct usb_descriptor_header *) &rndis_iad_descriptor,
/* control interface matches ACM, not Ethernet */
(struct usb_descriptor_header *) &rndis_control_intf,
(struct usb_descriptor_header *) &header_desc,
(struct usb_descriptor_header *) &call_mgmt_descriptor,
(struct usb_descriptor_header *) &rndis_acm_descriptor,
(struct usb_descriptor_header *) &rndis_union_desc,
(struct usb_descriptor_header *) &fs_notify_desc,
/* data interface has no altsetting */
(struct usb_descriptor_header *) &rndis_data_intf,
(struct usb_descriptor_header *) &fs_in_desc,
(struct usb_descriptor_header *) &fs_out_desc,
NULL,
};
/* high speed support: */
static struct usb_endpoint_descriptor hs_notify_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT),
.bInterval = USB_MS_TO_HS_INTERVAL(RNDIS_STATUS_INTERVAL_MS)
};
static struct usb_endpoint_descriptor hs_in_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(512),
};
static struct usb_endpoint_descriptor hs_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_OUT,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(512),
};
static struct usb_descriptor_header *eth_hs_function[] = {
(struct usb_descriptor_header *) &rndis_iad_descriptor,
/* control interface matches ACM, not Ethernet */
(struct usb_descriptor_header *) &rndis_control_intf,
(struct usb_descriptor_header *) &header_desc,
(struct usb_descriptor_header *) &call_mgmt_descriptor,
(struct usb_descriptor_header *) &rndis_acm_descriptor,
(struct usb_descriptor_header *) &rndis_union_desc,
(struct usb_descriptor_header *) &hs_notify_desc,
/* data interface has no altsetting */
(struct usb_descriptor_header *) &rndis_data_intf,
(struct usb_descriptor_header *) &hs_in_desc,
(struct usb_descriptor_header *) &hs_out_desc,
NULL,
};
/* super speed support: */
static struct usb_endpoint_descriptor ss_notify_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_INT,
.wMaxPacketSize = cpu_to_le16(STATUS_BYTECOUNT),
.bInterval = USB_MS_TO_HS_INTERVAL(RNDIS_STATUS_INTERVAL_MS)
};
static struct usb_ss_ep_comp_descriptor ss_intr_comp_desc = {
.bLength = sizeof ss_intr_comp_desc,
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
/* the following 3 values can be tweaked if necessary */
/* .bMaxBurst = 0, */
/* .bmAttributes = 0, */
.wBytesPerInterval = cpu_to_le16(STATUS_BYTECOUNT),
};
static struct usb_endpoint_descriptor ss_in_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_IN,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(1024),
};
static struct usb_endpoint_descriptor ss_out_desc = {
.bLength = USB_DT_ENDPOINT_SIZE,
.bDescriptorType = USB_DT_ENDPOINT,
.bEndpointAddress = USB_DIR_OUT,
.bmAttributes = USB_ENDPOINT_XFER_BULK,
.wMaxPacketSize = cpu_to_le16(1024),
};
static struct usb_ss_ep_comp_descriptor ss_bulk_comp_desc = {
.bLength = sizeof ss_bulk_comp_desc,
.bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
/* the following 2 values can be tweaked if necessary */
/* .bMaxBurst = 0, */
/* .bmAttributes = 0, */
};
static struct usb_descriptor_header *eth_ss_function[] = {
(struct usb_descriptor_header *) &rndis_iad_descriptor,
/* control interface matches ACM, not Ethernet */
(struct usb_descriptor_header *) &rndis_control_intf,
(struct usb_descriptor_header *) &header_desc,
(struct usb_descriptor_header *) &call_mgmt_descriptor,
(struct usb_descriptor_header *) &rndis_acm_descriptor,
(struct usb_descriptor_header *) &rndis_union_desc,
(struct usb_descriptor_header *) &ss_notify_desc,
(struct usb_descriptor_header *) &ss_intr_comp_desc,
/* data interface has no altsetting */
(struct usb_descriptor_header *) &rndis_data_intf,
(struct usb_descriptor_header *) &ss_in_desc,
(struct usb_descriptor_header *) &ss_bulk_comp_desc,
(struct usb_descriptor_header *) &ss_out_desc,
(struct usb_descriptor_header *) &ss_bulk_comp_desc,
NULL,
};
/* string descriptors: */
static struct usb_string rndis_string_defs[] = {
[0].s = "RNDIS Communications Control",
[1].s = "RNDIS Ethernet Data",
[2].s = "RNDIS",
{ } /* end of list */
};
static struct usb_gadget_strings rndis_string_table = {
.language = 0x0409, /* en-us */
.strings = rndis_string_defs,
};
static struct usb_gadget_strings *rndis_strings[] = {
&rndis_string_table,
NULL,
};
/*-------------------------------------------------------------------------*/
static struct sk_buff *rndis_add_header(struct gether *port,
struct sk_buff *skb)
{
struct sk_buff *skb2;
skb2 = skb_realloc_headroom(skb, sizeof(struct rndis_packet_msg_type));
if (skb2)
rndis_add_hdr(skb2);
dev_kfree_skb_any(skb);
return skb2;
}
static void rndis_response_available(void *_rndis)
{
struct f_rndis *rndis = _rndis;
struct usb_request *req = rndis->notify_req;
struct usb_composite_dev *cdev = rndis->port.func.config->cdev;
__le32 *data = req->buf;
int status;
if (atomic_inc_return(&rndis->notify_count) != 1)
return;
/* Send RNDIS RESPONSE_AVAILABLE notification; a
* USB_CDC_NOTIFY_RESPONSE_AVAILABLE "should" work too
*
* This is the only notification defined by RNDIS.
*/
data[0] = cpu_to_le32(1);
data[1] = cpu_to_le32(0);
status = usb_ep_queue(rndis->notify, req, GFP_ATOMIC);
if (status) {
atomic_dec(&rndis->notify_count);
DBG(cdev, "notify/0 --> %d\n", status);
}
}
static void rndis_response_complete(struct usb_ep *ep, struct usb_request *req)
{
struct f_rndis *rndis = req->context;
struct usb_composite_dev *cdev = rndis->port.func.config->cdev;
int status = req->status;
/* after TX:
* - USB_CDC_GET_ENCAPSULATED_RESPONSE (ep0/control)
* - RNDIS_RESPONSE_AVAILABLE (status/irq)
*/
switch (status) {
case -ECONNRESET:
case -ESHUTDOWN:
/* connection gone */
atomic_set(&rndis->notify_count, 0);
break;
default:
DBG(cdev, "RNDIS %s response error %d, %d/%d\n",
ep->name, status,
req->actual, req->length);
/* FALLTHROUGH */
case 0:
if (ep != rndis->notify)
break;
/* handle multiple pending RNDIS_RESPONSE_AVAILABLE
* notifications by resending until we're done
*/
if (atomic_dec_and_test(&rndis->notify_count))
break;
status = usb_ep_queue(rndis->notify, req, GFP_ATOMIC);
if (status) {
atomic_dec(&rndis->notify_count);
DBG(cdev, "notify/1 --> %d\n", status);
}
break;
}
}
static void rndis_command_complete(struct usb_ep *ep, struct usb_request *req)
{
struct f_rndis *rndis = req->context;
int status;
/* received RNDIS command from USB_CDC_SEND_ENCAPSULATED_COMMAND */
// spin_lock(&dev->lock);
status = rndis_msg_parser(rndis->config, (u8 *) req->buf);
if (status < 0)
pr_err("RNDIS command error %d, %d/%d\n",
status, req->actual, req->length);
// spin_unlock(&dev->lock);
}
static int
rndis_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
{
struct f_rndis *rndis = func_to_rndis(f);
struct usb_composite_dev *cdev = f->config->cdev;
struct usb_request *req = cdev->req;
int value = -EOPNOTSUPP;
u16 w_index = le16_to_cpu(ctrl->wIndex);
u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
/* composite driver infrastructure handles everything except
* CDC class messages; interface activation uses set_alt().
*/
switch ((ctrl->bRequestType << 8) | ctrl->bRequest) {
/* RNDIS uses the CDC command encapsulation mechanism to implement
* an RPC scheme, with much getting/setting of attributes by OID.
*/
case ((USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8)
| USB_CDC_SEND_ENCAPSULATED_COMMAND:
if (w_value || w_index != rndis->ctrl_id)
goto invalid;
/* read the request; process it later */
value = w_length;
req->complete = rndis_command_complete;
req->context = rndis;
/* later, rndis_response_available() sends a notification */
break;
case ((USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE) << 8)
| USB_CDC_GET_ENCAPSULATED_RESPONSE:
if (w_value || w_index != rndis->ctrl_id)
goto invalid;
else {
u8 *buf;
u32 n;
/* return the result */
buf = rndis_get_next_response(rndis->config, &n);
if (buf) {
memcpy(req->buf, buf, n);
req->complete = rndis_response_complete;
req->context = rndis;
rndis_free_response(rndis->config, buf);
value = n;
}
/* else stalls ... spec says to avoid that */
}
break;
default:
invalid:
VDBG(cdev, "invalid control req%02x.%02x v%04x i%04x l%d\n",
ctrl->bRequestType, ctrl->bRequest,
w_value, w_index, w_length);
}
/* respond with data transfer or status phase? */
if (value >= 0) {
DBG(cdev, "rndis req%02x.%02x v%04x i%04x l%d\n",
ctrl->bRequestType, ctrl->bRequest,
w_value, w_index, w_length);
req->zero = (value < w_length);
req->length = value;
value = usb_ep_queue(cdev->gadget->ep0, req, GFP_ATOMIC);
if (value < 0)
ERROR(cdev, "rndis response on err %d\n", value);
}
/* device either stalls (value < 0) or reports success */
return value;
}
static int rndis_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
struct f_rndis *rndis = func_to_rndis(f);
struct usb_composite_dev *cdev = f->config->cdev;
/* we know alt == 0 */
if (intf == rndis->ctrl_id) {
if (rndis->notify->driver_data) {
VDBG(cdev, "reset rndis control %d\n", intf);
usb_ep_disable(rndis->notify);
}
if (!rndis->notify->desc) {
VDBG(cdev, "init rndis ctrl %d\n", intf);
if (config_ep_by_speed(cdev->gadget, f, rndis->notify))
goto fail;
}
usb_ep_enable(rndis->notify);
rndis->notify->driver_data = rndis;
} else if (intf == rndis->data_id) {
struct net_device *net;
if (rndis->port.in_ep->driver_data) {
DBG(cdev, "reset rndis\n");
gether_disconnect(&rndis->port);
}
if (!rndis->port.in_ep->desc || !rndis->port.out_ep->desc) {
DBG(cdev, "init rndis\n");
if (config_ep_by_speed(cdev->gadget, f,
rndis->port.in_ep) ||
config_ep_by_speed(cdev->gadget, f,
rndis->port.out_ep)) {
rndis->port.in_ep->desc = NULL;
rndis->port.out_ep->desc = NULL;
goto fail;
}
}
/* Avoid ZLPs; they can be troublesome. */
rndis->port.is_zlp_ok = false;
/* RNDIS should be in the "RNDIS uninitialized" state,
* either never activated or after rndis_uninit().
*
* We don't want data to flow here until a nonzero packet
* filter is set, at which point it enters "RNDIS data
* initialized" state ... but we do want the endpoints
* to be activated. It's a strange little state.
*
* REVISIT the RNDIS gadget code has done this wrong for a
* very long time. We need another call to the link layer
* code -- gether_updown(...bool) maybe -- to do it right.
*/
rndis->port.cdc_filter = 0;
DBG(cdev, "RNDIS RX/TX early activation ... \n");
net = gether_connect(&rndis->port);
if (IS_ERR(net))
return PTR_ERR(net);
rndis_set_param_dev(rndis->config, net,
&rndis->port.cdc_filter);
} else
goto fail;
return 0;
fail:
return -EINVAL;
}
static void rndis_disable(struct usb_function *f)
{
struct f_rndis *rndis = func_to_rndis(f);
struct usb_composite_dev *cdev = f->config->cdev;
if (!rndis->notify->driver_data)
return;
DBG(cdev, "rndis deactivated\n");
rndis_uninit(rndis->config);
gether_disconnect(&rndis->port);
usb_ep_disable(rndis->notify);
rndis->notify->driver_data = NULL;
}
/*-------------------------------------------------------------------------*/
/*
* This isn't quite the same mechanism as CDC Ethernet, since the
* notification scheme passes less data, but the same set of link
* states must be tested. A key difference is that altsettings are
* not used to tell whether the link should send packets or not.
*/
static void rndis_open(struct gether *geth)
{
struct f_rndis *rndis = func_to_rndis(&geth->func);
struct usb_composite_dev *cdev = geth->func.config->cdev;
DBG(cdev, "%s\n", __func__);
rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3,
bitrate(cdev->gadget) / 100);
rndis_signal_connect(rndis->config);
}
static void rndis_close(struct gether *geth)
{
struct f_rndis *rndis = func_to_rndis(&geth->func);
DBG(geth->func.config->cdev, "%s\n", __func__);
rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0);
rndis_signal_disconnect(rndis->config);
}
/*-------------------------------------------------------------------------*/
/* ethernet function driver setup/binding */
static int
rndis_bind(struct usb_configuration *c, struct usb_function *f)
{
struct usb_composite_dev *cdev = c->cdev;
struct f_rndis *rndis = func_to_rndis(f);
int status;
struct usb_ep *ep;
/* allocate instance-specific interface IDs */
status = usb_interface_id(c, f);
if (status < 0)
goto fail;
rndis->ctrl_id = status;
rndis_iad_descriptor.bFirstInterface = status;
rndis_control_intf.bInterfaceNumber = status;
rndis_union_desc.bMasterInterface0 = status;
status = usb_interface_id(c, f);
if (status < 0)
goto fail;
rndis->data_id = status;
rndis_data_intf.bInterfaceNumber = status;
rndis_union_desc.bSlaveInterface0 = status;
status = -ENODEV;
/* allocate instance-specific endpoints */
ep = usb_ep_autoconfig(cdev->gadget, &fs_in_desc);
if (!ep)
goto fail;
rndis->port.in_ep = ep;
ep->driver_data = cdev; /* claim */
ep = usb_ep_autoconfig(cdev->gadget, &fs_out_desc);
if (!ep)
goto fail;
rndis->port.out_ep = ep;
ep->driver_data = cdev; /* claim */
/* NOTE: a status/notification endpoint is, strictly speaking,
* optional. We don't treat it that way though! It's simpler,
* and some newer profiles don't treat it as optional.
*/
ep = usb_ep_autoconfig(cdev->gadget, &fs_notify_desc);
if (!ep)
goto fail;
rndis->notify = ep;
ep->driver_data = cdev; /* claim */
status = -ENOMEM;
/* allocate notification request and buffer */
rndis->notify_req = usb_ep_alloc_request(ep, GFP_KERNEL);
if (!rndis->notify_req)
goto fail;
rndis->notify_req->buf = kmalloc(STATUS_BYTECOUNT, GFP_KERNEL);
if (!rndis->notify_req->buf)
goto fail;
rndis->notify_req->length = STATUS_BYTECOUNT;
rndis->notify_req->context = rndis;
rndis->notify_req->complete = rndis_response_complete;
/* support all relevant hardware speeds... we expect that when
* hardware is dual speed, all bulk-capable endpoints work at
* both speeds
*/
hs_in_desc.bEndpointAddress = fs_in_desc.bEndpointAddress;
hs_out_desc.bEndpointAddress = fs_out_desc.bEndpointAddress;
hs_notify_desc.bEndpointAddress = fs_notify_desc.bEndpointAddress;
ss_in_desc.bEndpointAddress = fs_in_desc.bEndpointAddress;
ss_out_desc.bEndpointAddress = fs_out_desc.bEndpointAddress;
ss_notify_desc.bEndpointAddress = fs_notify_desc.bEndpointAddress;
status = usb_assign_descriptors(f, eth_fs_function, eth_hs_function,
eth_ss_function);
if (status)
goto fail;
rndis->port.open = rndis_open;
rndis->port.close = rndis_close;
status = rndis_register(rndis_response_available, rndis);
if (status < 0)
goto fail;
rndis->config = status;
rndis_set_param_medium(rndis->config, RNDIS_MEDIUM_802_3, 0);
rndis_set_host_mac(rndis->config, rndis->ethaddr);
if (rndis->manufacturer && rndis->vendorID &&
rndis_set_param_vendor(rndis->config, rndis->vendorID,
rndis->manufacturer))
goto fail;
/* NOTE: all that is done without knowing or caring about
* the network link ... which is unavailable to this code
* until we're activated via set_alt().
*/
DBG(cdev, "RNDIS: %s speed IN/%s OUT/%s NOTIFY/%s\n",
gadget_is_superspeed(c->cdev->gadget) ? "super" :
gadget_is_dualspeed(c->cdev->gadget) ? "dual" : "full",
rndis->port.in_ep->name, rndis->port.out_ep->name,
rndis->notify->name);
return 0;
fail:
usb_free_all_descriptors(f);
if (rndis->notify_req) {
kfree(rndis->notify_req->buf);
usb_ep_free_request(rndis->notify, rndis->notify_req);
}
/* we might as well release our claims on endpoints */
if (rndis->notify)
rndis->notify->driver_data = NULL;
if (rndis->port.out_ep)
rndis->port.out_ep->driver_data = NULL;
if (rndis->port.in_ep)
rndis->port.in_ep->driver_data = NULL;
ERROR(cdev, "%s: can't bind, err %d\n", f->name, status);
return status;
}
static void
rndis_unbind(struct usb_configuration *c, struct usb_function *f)
{
struct f_rndis *rndis = func_to_rndis(f);
rndis_deregister(rndis->config);
rndis_exit();
rndis_string_defs[0].id = 0;
usb_free_all_descriptors(f);
kfree(rndis->notify_req->buf);
usb_ep_free_request(rndis->notify, rndis->notify_req);
kfree(rndis);
}
/* Some controllers can't support RNDIS ... */
static inline bool can_support_rndis(struct usb_configuration *c)
{
/* everything else is *presumably* fine */
return true;
}
int
rndis_bind_config_vendor(struct usb_configuration *c, u8 ethaddr[ETH_ALEN],
u32 vendorID, const char *manufacturer, struct eth_dev *dev)
{
struct f_rndis *rndis;
int status;
if (!can_support_rndis(c) || !ethaddr)
return -EINVAL;
if (rndis_string_defs[0].id == 0) {
/* ... and setup RNDIS itself */
status = rndis_init();
if (status < 0)
return status;
status = usb_string_ids_tab(c->cdev, rndis_string_defs);
if (status)
return status;
rndis_control_intf.iInterface = rndis_string_defs[0].id;
rndis_data_intf.iInterface = rndis_string_defs[1].id;
rndis_iad_descriptor.iFunction = rndis_string_defs[2].id;
}
/* allocate and initialize one new instance */
status = -ENOMEM;
rndis = kzalloc(sizeof *rndis, GFP_KERNEL);
if (!rndis)
goto fail;
memcpy(rndis->ethaddr, ethaddr, ETH_ALEN);
rndis->vendorID = vendorID;
rndis->manufacturer = manufacturer;
rndis->port.ioport = dev;
/* RNDIS activates when the host changes this filter */
rndis->port.cdc_filter = 0;
/* RNDIS has special (and complex) framing */
rndis->port.header_len = sizeof(struct rndis_packet_msg_type);
rndis->port.wrap = rndis_add_header;
rndis->port.unwrap = rndis_rm_hdr;
rndis->port.func.name = "rndis";
rndis->port.func.strings = rndis_strings;
/* descriptors are per-instance copies */
rndis->port.func.bind = rndis_bind;
rndis->port.func.unbind = rndis_unbind;
rndis->port.func.set_alt = rndis_set_alt;
rndis->port.func.setup = rndis_setup;
rndis->port.func.disable = rndis_disable;
status = usb_add_function(c, &rndis->port.func);
if (status) {
kfree(rndis);
fail:
rndis_exit();
}
return status;
}
直接替换这个文件试一试: drivers/usb/gadget/f_rndis.c
smallwit-x3-sdcard-auto-burn-spinor.tgz
烧录成功慢闪LED, 烧录失败快闪LED
这是我们公司做的TF卡烧SPI NOR的量产固件: smallwit_x3_tfcard_自动烧录spinor.tgz
你可以烧到TF卡启动试一试。
一开始是在小智开发板做的,现在都是公司自己做板子了,参考了小智X3的原理图。
页次: 1