Firefly开源社区

标题: 如何使用RGA模块 [打印本页]

作者: FLLFFL    时间: 2022-4-1 19:54
标题: 如何使用RGA模块
我在RV1126上开发软件,想用到TPU和RGA模块。现在已经下载了firefly的SDK(https://www.t-firefly.com/doc/download/101.html#other_420),但是和瑞芯微官方的SDK目录结构有区别。我该如何使用firefly的REPO_SDK?
tchip_askquestions

no_log.zip

22 Bytes, 下载次数: 1, 下载积分: 灯泡 -1 , 经验 -1


作者: 板蓝根    时间: 2022-4-2 10:00
请问有什么区别呢?你提供的压缩包是空的
作者: FLLFFL    时间: 2022-4-2 10:45
板蓝根 发表于 2022-4-2 10:00
请问有什么区别呢?你提供的压缩包是空的

我好像搞错了,应该没区别。不过如果我想使用external下的库,我该怎么操作呢?有相关的demo和接口文档吗
作者: 板蓝根    时间: 2022-4-2 11:47
sdk/doc
作者: FLLFFL    时间: 2022-4-2 19:46
板蓝根 发表于 2022-4-2 11:47
sdk/doc


我下载下来的压缩包是这样的,没有sdk/doc

作者: 板蓝根    时间: 2022-4-6 09:15
看你获取 SDK 的云盘链接,README 呀

作者: FLLFFL    时间: 2022-4-6 22:43
本帖最后由 FLLFFL 于 2022-4-6 23:01 编辑
板蓝根 发表于 2022-4-6 09:15
看你获取 SDK 的云盘链接,README 呀

这个readme格式有点问题呀,应该是https://wiki.t-firefly.com/zh_CN/CORE-1126-JD4/Source_code.html吧,不过我按照这上面说的同步命令运行时有报错,说是XML文件的格式不对?
README:


链接里的命令:


报错:







作者: FLLFFL    时间: 2022-4-6 23:07
我又按照xml文件里的路径把真正的XML文件内容复制了过来,然后给我出了个报错。我检查了这个目录是存在的:.git/objects/pack,但为什么运行时告诉我Not a directory?
报错信息:
decatur@ubuntu:~/rock-chip-SDK/rv1126_rv1109_linux_release_20211022$ .repo/repo/repo sync -l
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
error: unable to open object pack directory: .git/objects/pack: Not a directory
error: unable to open object pack directory: .git/objects/pack: Not a directory
error: unable to open object pack directory: .git/objects/pack: Not a directory
fatal: failed to read object 4bf562db7718264772ed9c52e1afc54ccebc8356: Not a directory
Traceback (most recent call last):
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/subcmds/sync.py", line 821, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 1327, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 2486, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

    _Main(sys.argv[1:])
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/subcmds/sync.py", line 821, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 1327, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 2486, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

作者: 板蓝根    时间: 2022-4-7 09:22
这个是环境问题,你是 ubuntu 版本不是 18.04 吧,其他版本可能出现问题需要根据问题修复一下。或者你使用本机得 repo 试一下,

.repo/repo/repo sync -l
-> repo sync -l
作者: FLLFFL    时间: 2022-4-7 12:29
本帖最后由 FLLFFL 于 2022-4-7 13:21 编辑
板蓝根 发表于 2022-4-7 09:22
这个是环境问题,你是 ubuntu 版本不是 18.04 吧,其他版本可能出现问题需要根据问题修复一下。或者你使用 ...

我在ubuntu18.04下执行.repo/repo/repo sync -l ,还是No such file or directory,而且不提示到底是哪里No such file or directory


decatur@ubuntu:~/rockchipSDK/rv1126_rv1109_linux_release_20211022$ ./.repo/repo/repo --trace sync -l
: parsing /home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/manifests.git/config
: git config --file /home/decatur/.gitconfig --null --list 1>| 2>|
Traceback (most recent call last):
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 158, in _Run
    copts, cargs = cmd.OptionParser.parse_args(argv)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/command.py", line 67, in OptionParser
    self._Options(self._optparse)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/subcmds/sync.py", line 189, in _Options
    self.jobs = self.manifest.default.sync_j
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/manifest_xml.py", line 360, in default
    self._Load()
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/manifest_xml.py", line 400, in _Load
    b = m.GetBranch(m.CurrentBranch).merge
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 814, in GetBranch
    return self.config.GetBranch(name)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 200, in GetBranch
    b = Branch(self, name)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 729, in __init__
    self.remote = self._config.GetRemote(r)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 190, in GetRemote
    r = Remote(self, name)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 575, in __init__
    self.pushUrl = self._Get('pushurl')
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 716, in _Get
    return self._config.GetString(key, all_keys = all_keys)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 134, in GetString
    return self.defaults.GetString(name, all_keys = all_keys)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 131, in GetString
    v = self._cache[_key(name)]
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 248, in _cache
    self._cache_dict = self._Read()
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 254, in _Read
    d = self._ReadGit()
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 296, in _ReadGit
    d = self._do('--null', '--list')
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_config.py", line 321, in _do
    capture_stderr = True)
  File "/home/decatur/rockchipSDK/rv1126_rv1109_linux_release_20211022/.repo/repo/git_command.py", line 238, in __init__
    raise GitError('%s: %s' % (command[1], e))
error.GitError: config: [Errno 2] No such file or directory


作者: FLLFFL    时间: 2022-4-7 13:19
我尝试了查看repo的具体trace,发现ubuntu20.04下运行到了git read-tree命令,这比ubuntu18.04下运行得更多,但我还是没法解决。

ubuntu20.04的repo trace:
decatur@ubuntu:~/rock-chip-SDK/rv1126_rv1109_linux_release_20211022$ ./.repo/repo/repo --trace sync -l
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
: parsing /home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/manifests.git/config
: git config --file /home/decatur/.gitconfig --null --list 1>| 2>|
: parsing /home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/.git/config
: load refs /home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/manifests.git
: cd /home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/app/CameraFactoryTestServer
: git read-tree --reset -u -v HEAD 1>| 2>|
error: unable to open object pack directory: .git/objects/pack: Not a directory
error: unable to open object pack directory: .git/objects/pack: Not a directory
error: unable to open object pack directory: .git/objects/pack: Not a directory
fatal: failed to read object 4bf562db7718264772ed9c52e1afc54ccebc8356: Not a directory
Traceback (most recent call last):
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 531, in <module>
    _Main(sys.argv[1:])
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 507, in _Main
    result = repo._Run(argv) or 0
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/main.py", line 180, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/subcmds/sync.py", line 821, in Execute
    project.Sync_LocalHalf(syncbuf, force_sync=opt.force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 1327, in Sync_LocalHalf
    self._InitWorkTree(force_sync=force_sync)
  File "/home/decatur/rock-chip-SDK/rv1126_rv1109_linux_release_20211022/.repo/repo/project.py", line 2486, in _InitWorkTree
    raise GitError("cannot initialize work tree")
error.GitError: cannot initialize work tree

作者: 板蓝根    时间: 2022-4-7 15:14
难道你的是虚拟机,sdk 在 windows 解压的或者是挂在到 windows?
作者: FLLFFL    时间: 2022-4-7 15:19
板蓝根 发表于 2022-4-7 15:14
难道你的是虚拟机,sdk 在 windows 解压的或者是挂在到 windows?

是虚拟机,我在windows下解压然后用winSCP传给虚拟机的,跟放在linux下直接tar命令解压有区别吗?
作者: 板蓝根    时间: 2022-4-7 16:26
这样我不确定有没有问题,因为 sdk 有一些软链接文件,应该是 linux 下才有效
作者: FLLFFL    时间: 2022-4-8 09:33
板蓝根 发表于 2022-4-7 16:26
这样我不确定有没有问题,因为 sdk 有一些软链接文件,应该是 linux 下才有效

我在Linux下解压结果是一样的,怎么办呢?
作者: 板蓝根    时间: 2022-4-8 10:27
有校验过压缩包的 md5sum 吗? SDK 已经被很多客户验证过了,应该是没有问题
作者: FLLFFL    时间: 2022-4-10 15:15
已解决
giterror的原因是我在新系统下没有运行git config
no such directory的原因是没有~/.gitconfig
安装git之后进行全局设置即可按照官方步骤同步最新SDK
还是感谢官方的答疑





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