Firefly开源社区

标题: 官方BUG请管理员修复! 默认demo 报错请教: firefly_rkmedia_vi_uvc_test.c [打印本页]

作者: ubuntu    时间: 2021-7-20 15:47
标题: 官方BUG请管理员修复! 默认demo 报错请教: firefly_rkmedia_vi_uvc_test.c
本帖最后由 ubuntu 于 2021-7-21 15:15 编辑

#  1. 运行环境
刷机包: 官方如下最新包:AIO-RV1126_RV1109-JD4_2021_0709_1611
demo程序来源:
firefly_rkmedia_vi_uvc_test.c
link: https://wiki.t-firefly.com/zh_CN/CORE-1126-JD4/Rkmedia.html#vi-uvc

# 2. 本人严格按照如下readme, step by step 执行的, 还是报错了.
sdk/app/firefly_rkmedia_uvc/README.md

# 3. 错误提示.
  1. [root@RV1126_RV1109:/]# /userdata/firefly_rkmedia_vi_uvc_test -a /oem/etc/iqfile
  2. s/ -c /oem/usr/share/rtsp-nn.cfg -p /oem/usr/share/rknn_model/ssd_inception_v2_r
  3. v1109_rv1126.rknn -l /oem/usr/share/rknn_model/coco_labels_list.txt -b /oem/usr/
  4. share/rknn_model/box_priors.txt
  5. /userdata/firefly_rkmedia_vi_uvc_test: error while loading shared libraries: librkuvc.so: cannot open shared object file: No such file or directory
复制代码

# 详细步骤log如下:
  1. 刷机重启后
  2. [root@RV1126_RV1109:/oem]# RkLunch-stop.sh

  3. adb push firefly_rkmedia_vi_uvc_test /userdata/

  4. # /oem/usb_config.sh
  5. NETINTERFACE=eth2

  6. # 无此文件, 文档是否修正一下?
  7. 需要移除文件 /etc/init.d/S58_lunch_init

  8. [root@RV1126_RV1109:/]# /oem/usb_config.sh rndis
  9. mkdir: cannot create directory '/dev/usb-ffs': File exists
  10. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6': File exists

  11. adb connect 10.3.1.20:5555
  12. adb shell
  13. /userdata/firefly_rkmedia_vi_uvc_test -a /oem/etc/iqfiles/ -c /oem/usr/share/rtsp-nn.cfg -p /oem/usr/share/rknn_model/ssd_inception_v2_rv1109_rv1126.rknn -l /oem/usr/share/rknn_model/coco_labels_list.txt -b /oem/usr/share/rknn_model/box_priors.txt

  14. $ adb shell
  15. adb[root@RV1126_RV1109:/]# /userdata/firefly_rkmedia_vi_uvc_test -a /oem/etc/iqfile
  16. s/ -c /oem/usr/share/rtsp-nn.cfg -p /oem/usr/share/rknn_model/ssd_inception_v2_r
  17. v1109_rv1126.rknn -l /oem/usr/share/rknn_model/coco_labels_list.txt -b /oem/usr/
  18. share/rknn_model/box_priors.txt
  19. /userdata/firefly_rkmedia_vi_uvc_test: error while loading shared libraries: librkuvc.so: cannot open shared object file: No such file or directory
复制代码





作者: 799959745    时间: 2021-7-20 17:54
请问你是用普通的 SDK 还是用 SDK-AI ?
目前这个 demo 只支持 SDK-AI。
由于该 demo 配置项比较多。已经固化到固件了。
编译命令:
./build.sh device/rockchip/rv1126_rv1109/aio-rv1126-rkmedia-uvcc.mk

编译完成并烧录后在 PC 上位机执行:
/oem/usb_config.sh rndis
/userdata/firefly_rkmedia_vi_uvc_test -a /oem/etc/iqfiles/ -c /oem/usr/share/rtsp-nn.cfg -p /oem/usr/share/rknn_model/ssd_inception_v2_rv1109_rv1126.rknn -l /oem/usr/share/rknn_model/coco_labels_list.txt -b /oem/usr/share/rknn_model/box_priors.txt
作者: 799959745    时间: 2021-7-20 17:59
本帖最后由 799959745 于 2021-7-20 18:00 编辑

上面的代码有点乱。整理了:



作者: ubuntu    时间: 2021-7-20 21:08
799959745 发表于 2021-7-20 17:59
上面的代码有点乱。整理了:

谢谢兄台, 您也是做camera吗?
作者: ubuntu    时间: 2021-7-21 17:59
799959745 发表于 2021-7-20 17:54
请问你是用普通的 SDK 还是用 SDK-AI ?
目前这个 demo 只支持 SDK-AI。
由于该 demo 配置项比较多。已经 ...

请教一下,您说的

  1. 请问你是用普通的 SDK 还是用 SDK-AI ?
  2. 目前这个 demo 只支持 SDK-AI。
复制代码

从哪里知道是SDK还是SDK-AI? SDK-AI这个名词我第一次看到, 不知这个名词来源哪里, 我是从如下地址下载的code.
  1. repo init  --no-clone-bundle --repo-url https://gitlab.com/firefly-linux/git-repo.git -u https://gitlab.com/firefly-linux/manifests.git -b master -m rv1126_rv1109_linux_release.xml
复制代码

作者: 799959745    时间: 2021-7-24 10:02
维基不够完善。
参考 https://wiki.t-firefly.com/zh_CN/CAM-C11262U/Source_code.html 中的源码编译获取代码。不过版本比较旧,没有 aio-rv1126-rkmedia-uvcc.mk 文件。我们这几天尽快发布最新的 SDK-AI 版本。
作者: ubuntu    时间: 2021-7-26 11:09
799959745 发表于 2021-7-24 10:02
维基不够完善。
参考 https://wiki.t-firefly.com/zh_CN/CAM-C11262U/Source_code.html 中的源码编译获取 ...

谢谢!
请问我该用哪个配置项测试呢?

# RV1109: 编译人脸识别闸机固件
./build.sh cam-crv1109s2u-facial_gate.mk

# RV1126: 编译人脸识别闸机固件
./build.sh cam-crv1126s2u-facial_gate.mk

# RV1109: 编译 AI-UVC-CAMERA 固件
./build.sh cam-crv1109s2u-uvcc.mk

# RV1126: 编译 AI-UVC-CAMERA 固件
./build.sh cam-crv1126s2u-uvcc.mk
作者: 799959745    时间: 2021-8-2 14:18
这里面的mk文件在维基上都有介绍。功能不包括 firefly_rkmedia_vi_uvc_test 。
作者: 799959745    时间: 2021-8-3 17:24
尝试以下步骤运行demo。
1、使用 sdk-ai uvcc 固件。官网下载固件。或者手动编译 ./build.sh cam-crv1109s2u-uvcc.mk
2、固件文件系统 /etc/init.d/S50usbdevice 和 sdk-ai-path/buildroot/board/rockchip/rv1126_rv1109/fs-overlay-uvc/etc/init.d/S50usbdevice 要一致
3、将 sdk-ai-path/app/firefly_rkmedia_uvc/1126/librkuvc/librkuvc.so 替换掉固件文件系统的 /usr/lib/librkuvc.so
4、将 sdk-ai-path/app/firefly_rkmedia_uvc/1126/libs/ 目录所有库文件拷贝到固件文件系统 /usr/lib/ 目录下
5、删除文件 /etc/init.d/S58_lunch_init
作者: ubuntu    时间: 2021-8-3 21:38
799959745 发表于 2021-8-3 17:24
尝试以下步骤运行demo。
1、使用 sdk-ai uvcc 固件。官网下载固件。或者手动编译 ./build.sh cam-crv1109s ...

谢谢帮忙.
请教一下, step3 step4 里面SDK 中lib库路径是不是贴错了? 以step3 为例, librkuvc.so 有如下路径, 用任何一个push到固件文件系统即可吗?

$ f librkuvc.so
f./buildroot/output/firefly_rv1126_rv1109_uvcc/build/uvc_app/librkuvc.so
./buildroot/output/firefly_rv1126_rv1109_uvcc/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib/librkuvc.so
./buildroot/output/firefly_rv1126_rv1109_uvcc/target/usr/lib/librkuvc.so
作者: 799959745    时间: 2021-8-4 09:06
看来固件很久没更新过了,今天完成SDK代码更新。
作者: ubuntu    时间: 2021-8-4 09:19
799959745 发表于 2021-8-4 09:06
看来固件很久没更新过了,今天完成SDK代码更新。

期待ing
作者: 799959745    时间: 2021-8-11 09:08
sdk-ai 代码已更新。请拉取最新的代码。
执行以下步骤:
  1. ./build.sh device/rockchip/rv1126_rv1109/aio-rv1126-rkmedia-uvcc.mk
  2. ./build.sh

  3. CORE-1126-JD4/CORE-1109-JD4 设备默认没有开启 OTG 功能,请先在内核开启 OTG,编译升级内核。
  4. # sdk-ai/kernel/arch/arm/boot/dts/rv1126-firefly-rk809.dtsi
  5. &usbdrd_dwc3 {                                                                                                               
  6.     status = "okay";                                                                                                        
  7.     dr_mode = "otg";  #开启OTG                                                                                                                              
  8.     extcon = <&u2phy0>;                                                                                                         
  9. };
复制代码

作者: ubuntu    时间: 2021-8-11 15:07
799959745 发表于 2021-8-11 09:08
sdk-ai 代码已更新。请拉取最新的代码。
执行以下步骤:

赞.  按照您的步骤可以正常build 为uvc设备了.

有两个小问题:
1.  build error.

  1. 2021-08-11T10:57:22 compilation terminated.                                                                                                                                                                          
  2. 2021-08-11T10:57:22 CMakeFiles/ff_uvc.dir/build.make:62: recipe for target 'CMakeFiles/ff_uvc.dir/uvc/uvc-gadget.c.o' failed                                                                                         
  3. 2021-08-11T10:57:22 make[4]: *** [CMakeFiles/ff_uvc.dir/uvc/uvc-gadget.c.o] Error 1                                                                                                                                 
  4. 2021-08-11T10:57:22 In file included from /root/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/uvc_control.h:42,                                    
  5. 2021-08-11T10:57:22 from /root/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/uvc-gadget.h:80,                                                      
  6. 2021-08-11T10:57:22 from /root/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/uvc_video.h:45,                                                        
  7. 2021-08-11T10:57:22 from /root/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/uvc_video.cpp:33:                                                      
  8. 2021-08-11T10:57:22 /root/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/mpi_enc.h:41:10: fatal error: mpp_osd.h: No such file or directory         
  9. 2021-08-11T10:57:22 #include "mpp_osd.h"                                                                                                                                                                             
  10. 2021-08-11T10:57:22 ^~~~~~~~~~~                                                                                                                                                                                      
  11. 2021-08-11T10:57:22 compilation terminated.
复制代码


workaroud 解决:
  1. => /home/ws/AI_UVC_CAM-CRV1126S2U/external/uvc_app/uvc [Wed 11-11:05:23] C:1
  2. $ cp * /home/ws/AI_UVC_CAM-CRV1126S2U/buildroot/output/firefly_rv1126_rv1109_rkmedia_uvcc/build/firefly_rkmedia_uvc-1.0/uvc/
  3. cp#
复制代码


2. 此贴的主题问题,uvc的demo 如何正确运行呢?

2.1 如下默认方法执行失败,执行完这一步后adb 连接就断开了. 用adb ip:5555 shell 也不行.
  1. /oem/usb_config.sh rndis
复制代码


2.2 删除/etc/init.d/S58_lunch_init 后重启 adb 无法连接.
这个文件夹里面还有其他S**_lunch_init, 不确定删哪一个.

2.3 cd /oem;./RkLunch-stop.sh 之后再重复上述步骤2.1也无效.


作者: ubuntu    时间: 2021-8-11 15:13
ubuntu 发表于 2021-8-11 15:07
赞.  按照您的步骤可以正常build 为uvc设备了.

有两个小问题:

LOG

  1.      valid_lft forever preferred_lft forever
  2. [root@RV1126_RV1109:/]# /oem/usb_config.sh rndis
  3. killall: udevd: no process killed
  4. mkdir: cannot create directory '/dev/usb-ffs': File exists
  5. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6': File exists
  6. sh: write error: Device or resource busy
  7. sh: write error: Device or resource busy
  8. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/control/header/h': File exists
  9. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/control/class/fs/h/h': Operation not permitted
  10. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/control/class/ss/h/h': Operation not permitted
  11. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/uncompressed/u': File exists
  12. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/uncompressed/u/240p': File exists
  13. sh: write error: Device or resource busy
  14. sh: write error: Device or resource busy
  15. sh: write error: Device or resource busy
  16. sh: write error: Device or resource busy
  17. sh: write error: Device or resource busy
  18. sh: write error: Device or resource busy
  19. sh: write error: Device or resource busy
  20. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/uncompressed/u/480p': File exists
  21. sh: write error: Device or resource busy
  22. sh: write error: Device or resource busy
  23. sh: write error: Device or resource busy
  24. sh: write error: Device or resource busy
  25. sh: write error: Device or resource busy
  26. sh: write error: Device or resource busy
  27. sh: write error: Device or resource busy
  28. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/uncompressed/u/720p': File exists
  29. sh: write error: Device or resource busy
  30. sh: write error: Device or resource busy
  31. sh: write error: Device or resource busy
  32. sh: write error: Device or resource busy
  33. sh: write error: Device or resource busy
  34. sh: write error: Device or resource busy
  35. sh: write error: Device or resource busy
  36. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m': File exists
  37. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/240p': File exists
  38. sh: write error: Device or resource busy
  39. sh: write error: Device or resource busy
  40. sh: write error: Device or resource busy
  41. sh: write error: Device or resource busy
  42. sh: write error: Device or resource busy
  43. sh: write error: Device or resource busy
  44. sh: write error: Device or resource busy
  45. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/360p': File exists
  46. sh: write error: Device or resource busy
  47. sh: write error: Device or resource busy
  48. sh: write error: Device or resource busy
  49. sh: write error: Device or resource busy
  50. sh: write error: Device or resource busy
  51. sh: write error: Device or resource busy
  52. sh: write error: Device or resource busy
  53. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/480p': File exists
  54. sh: write error: Device or resource busy
  55. sh: write error: Device or resource busy
  56. sh: write error: Device or resource busy
  57. sh: write error: Device or resource busy
  58. sh: write error: Device or resource busy
  59. sh: write error: Device or resource busy
  60. sh: write error: Device or resource busy
  61. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/448p': File exists
  62. sh: write error: Device or resource busy
  63. sh: write error: Device or resource busy
  64. sh: write error: Device or resource busy
  65. sh: write error: Device or resource busy
  66. sh: write error: Device or resource busy
  67. sh: write error: Device or resource busy
  68. sh: write error: Device or resource busy
  69. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/720p': File exists
  70. sh: write error: Device or resource busy
  71. sh: write error: Device or resource busy
  72. sh: write error: Device or resource busy
  73. sh: write error: Device or resource busy
  74. sh: write error: Device or resource busy
  75. sh: write error: Device or resource busy
  76. sh: write error: Device or resource busy
  77. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/768p': File exists
  78. sh: write error: Device or resource busy
  79. sh: write error: Device or resource busy
  80. sh: write error: Device or resource busy
  81. sh: write error: Device or resource busy
  82. sh: write error: Device or resource busy
  83. sh: write error: Device or resource busy
  84. sh: write error: Device or resource busy
  85. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/1080p': File exists
  86. sh: write error: Device or resource busy
  87. sh: write error: Device or resource busy
  88. sh: write error: Device or resource busy
  89. sh: write error: Device or resource busy
  90. sh: write error: Device or resource busy
  91. sh: write error: Device or resource busy
  92. sh: write error: Device or resource busy
  93. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/mjpeg/m/1440p': File exists
  94. sh: write error: Device or resource busy
  95. sh: write error: Device or resource busy
  96. sh: write error: Device or resource busy
  97. sh: write error: Device or resource busy
  98. sh: write error: Device or resource busy
  99. sh: write error: Device or resource busy
  100. sh: write error: Device or resource busy
  101. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1': File exists
  102. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1/480p': File exists
  103. sh: write error: Device or resource busy
  104. sh: write error: Device or resource busy
  105. sh: write error: Device or resource busy
  106. sh: write error: Device or resource busy
  107. sh: write error: Device or resource busy
  108. sh: write error: Device or resource busy
  109. sh: write error: Device or resource busy
  110. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1/720p': File exists
  111. sh: write error: Device or resource busy
  112. sh: write error: Device or resource busy
  113. sh: write error: Device or resource busy
  114. sh: write error: Device or resource busy
  115. sh: write error: Device or resource busy
  116. sh: write error: Device or resource busy
  117. sh: write error: Device or resource busy
  118. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1/1080p': File exists
  119. sh: write error: Device or resource busy
  120. sh: write error: Device or resource busy
  121. sh: write error: Device or resource busy
  122. sh: write error: Device or resource busy
  123. sh: write error: Device or resource busy
  124. sh: write error: Device or resource busy
  125. sh: write error: Device or resource busy
  126. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1/1440p': File exists
  127. sh: write error: Device or resource busy
  128. sh: write error: Device or resource busy
  129. sh: write error: Device or resource busy
  130. sh: write error: Device or resource busy
  131. sh: write error: Device or resource busy
  132. sh: write error: Device or resource busy
  133. sh: write error: Device or resource busy
  134. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f1/2160p': File exists
  135. sh: write error: Device or resource busy
  136. sh: write error: Device or resource busy
  137. sh: write error: Device or resource busy
  138. sh: write error: Device or resource busy
  139. sh: write error: Device or resource busy
  140. sh: write error: Device or resource busy
  141. sh: write error: Device or resource busy
  142. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2': File exists
  143. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2/480p': File exists
  144. sh: write error: Device or resource busy
  145. sh: write error: Device or resource busy
  146. sh: write error: Device or resource busy
  147. sh: write error: Device or resource busy
  148. sh: write error: Device or resource busy
  149. sh: write error: Device or resource busy
  150. sh: write error: Device or resource busy
  151. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2/720p': File exists
  152. sh: write error: Device or resource busy
  153. sh: write error: Device or resource busy
  154. sh: write error: Device or resource busy
  155. sh: write error: Device or resource busy
  156. sh: write error: Device or resource busy
  157. sh: write error: Device or resource busy
  158. sh: write error: Device or resource busy
  159. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2/1080p': File exists
  160. sh: write error: Device or resource busy
  161. sh: write error: Device or resource busy
  162. sh: write error: Device or resource busy
  163. sh: write error: Device or resource busy
  164. sh: write error: Device or resource busy
  165. sh: write error: Device or resource busy
  166. sh: write error: Device or resource busy
  167. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2/1440p': File exists
  168. sh: write error: Device or resource busy
  169. sh: write error: Device or resource busy
  170. sh: write error: Device or resource busy
  171. sh: write error: Device or resource busy
  172. sh: write error: Device or resource busy
  173. sh: write error: Device or resource busy
  174. sh: write error: Device or resource busy
  175. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/framebased/f2/2160p': File exists
  176. sh: write error: Device or resource busy
  177. sh: write error: Device or resource busy
  178. sh: write error: Device or resource busy
  179. sh: write error: Device or resource busy
  180. sh: write error: Device or resource busy
  181. sh: write error: Device or resource busy
  182. sh: write error: Device or resource busy
  183. mkdir: cannot create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/header/h': File exists
  184. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/header/h/u/u': Operation not permitted
  185. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/header/h/m/m': Operation not permitted
  186. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/header/h/f1/f1': Operation not permitted
  187. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/header/h/f2/f2': Operation not permitted
  188. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/class/fs/h/h': Device or resource busy
  189. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/class/hs/h/h': Device or resource busy
  190. ln: failed to create symbolic link '/sys/kernel/config/usb_gadget/rockchip/functions/uvc.gs6/streaming/class/ss/h/h': Device or resource busy

  191. => /home/ws/AI_UVC_CAM-CRV1126S2U [Wed 11-14:51:50]
  192. $ adb shell
  193. adb

复制代码

作者: 799959745    时间: 2021-8-11 16:41
使用以下 mk 文件编译出来的固件可以直接使用,不用操作板子。
./build.sh device/rockchip/rv1126_rv1109/aio-rv1126-rkmedia-uvcc.mk

固件烧进板子之后。电脑查看 /dev/video 是哪个节点,根据出现的节点修改 client.cpp 。
修改以下内容:
#define VIDEO_NODE 1

编译执行:
  1. cd sdk-ai-path/app/firefly_rkmedia_uvc/host/
  2. ./build.sh
  3. sudo ./client
  4. #正常运行的话就能看到信息了
  5. #程序还没完善,只能运行一次。想要再次打开只能重启板子。
复制代码


作者: ubuntu    时间: 2021-8-11 18:24
799959745 发表于 2021-8-11 16:41
使用以下 mk 文件编译出来的固件可以直接使用,不用操作板子。
./build.sh device/rockchip/rv1126_rv1109 ...

太赞了, 已经导通!

可否再麻烦请教一下,查看video设备的话,其实Core-1126-JD4核心板会显示如下两个video设备.
我目前用的是video8, 请教一下和video9 有什么区别?

  1. $ v4l2-ctl --list-devices
  2. v4l2-ctlUVC: UVC Camera (usb-0000:00:14.0-2):
  3.         /dev/video8
  4.         /dev/video9
  5.         /dev/media1

  6. $ v4l2-ctl -d /dev/video8 --list-formats
  7. v4l2-ctlioctl: VIDIOC_ENUM_FMT
  8.         Type: Video Capture

  9.         [0]: 'YUYV' (YUYV 4:2:2)
  10.         [1]: 'MJPG' (Motion-JPEG, compressed)
  11.         [2]: 'H264' (H.264, compressed)
  12.         [3]: '' (35363248-0000-0010-8000-00aa003, compressed)

  13. $ v4l2-ctl -d /dev/video9 --list-formats
  14. v4l2-ctlioctl: VIDIOC_ENUM_FMT
  15.         Type: Video Capture
复制代码



作者: 799959745    时间: 2021-8-12 09:49
一个是图像/视频采集,一个是metadata采集。
可以看下这个帖子:https://forum.ubuntu.org.cn/viewtopic.php?t=490552
作者: ubuntu    时间: 2021-8-12 13:44
799959745 发表于 2021-8-12 09:49
一个是图像/视频采集,一个是metadata采集。
可以看下这个帖子:https://forum.ubuntu.org.cn/viewtopic.p ...

感激不尽.

谢谢您专业负责的帮助.




欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1