Firefly开源社区

12
发表新贴
打印 上一主题 下一主题

官方BUG请管理员修复! 默认demo 报错请教: firefly_rkmedia_vi_uvc_test.c

1万

积分

7

威望

0

贡献

技术大神

Rank: 8Rank: 8

积分
11422

突出贡献

发表于 2021-8-4 09:06:28        只看该作者  11#
看来固件很久没更新过了,今天完成SDK代码更新。
回复

使用道具 举报

408

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
408
发表于 2021-8-4 09:19:47        只看该作者  12#
799959745 发表于 2021-8-4 09:06
看来固件很久没更新过了,今天完成SDK代码更新。

期待ing
欢迎与我进行rv1109 rv1126 方面的技术交流.
我的QQ: 712715984
我擅长的: 手机平台的camera driver isp
回复

使用道具 举报

1万

积分

7

威望

0

贡献

技术大神

Rank: 8Rank: 8

积分
11422

突出贡献

发表于 2021-8-11 09:08:59        只看该作者  13#
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. };
复制代码
回复

使用道具 举报

408

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
408
发表于 2021-8-11 15:07:16        只看该作者  14#
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也无效.

欢迎与我进行rv1109 rv1126 方面的技术交流.
我的QQ: 712715984
我擅长的: 手机平台的camera driver isp
回复

使用道具 举报

408

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
408
发表于 2021-8-11 15:13:31        只看该作者  15#
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

复制代码
欢迎与我进行rv1109 rv1126 方面的技术交流.
我的QQ: 712715984
我擅长的: 手机平台的camera driver isp
回复

使用道具 举报

1万

积分

7

威望

0

贡献

技术大神

Rank: 8Rank: 8

积分
11422

突出贡献

发表于 2021-8-11 16:41:23        只看该作者  16#
使用以下 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. #程序还没完善,只能运行一次。想要再次打开只能重启板子。
复制代码

回复

使用道具 举报

408

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
408
发表于 2021-8-11 18:24:49        只看该作者  17#
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
复制代码


欢迎与我进行rv1109 rv1126 方面的技术交流.
我的QQ: 712715984
我擅长的: 手机平台的camera driver isp
回复

使用道具 举报

1万

积分

7

威望

0

贡献

技术大神

Rank: 8Rank: 8

积分
11422

突出贡献

发表于 2021-8-12 09:49:36        只看该作者  18#
一个是图像/视频采集,一个是metadata采集。
可以看下这个帖子:https://forum.ubuntu.org.cn/viewtopic.php?t=490552
回复

使用道具 举报

408

积分

0

威望

0

贡献

技术达人

Rank: 2

积分
408
发表于 2021-8-12 13:44:58        只看该作者  19#
799959745 发表于 2021-8-12 09:49
一个是图像/视频采集,一个是metadata采集。
可以看下这个帖子:https://forum.ubuntu.org.cn/viewtopic.p ...

感激不尽.

谢谢您专业负责的帮助.
欢迎与我进行rv1109 rv1126 方面的技术交流.
我的QQ: 712715984
我擅长的: 手机平台的camera driver isp
回复

使用道具 举报

返回列表
12
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

友情链接 : 爱板网 电子发烧友论坛 云汉电子社区 粤ICP备14022046号-2
快速回复 返回顶部 返回列表