Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    新 SDK 平台下载 D1-H/D1s SDK

    D1系列-RISC-V
    10
    18
    684
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • WhycanService
      WhycanService LV 8 last edited by WhycanService

      获取SDK

      SDK 使用 Repo 工具管理,拉取 SDK 需要配置安装 Repo 工具。

      Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.

      Repo官网:git-repo

      安装 Repo 工具

      可以用包管理器进行安装:

      # Debian/Ubuntu.
      $ sudo apt-get install repo
      
      # Gentoo.
      $ sudo emerge dev-vcs/repo
      

      也可以手动单独安装:

      $ mkdir -p ~/.bin
      $ PATH="${HOME}/.bin:${PATH}"
      $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
      $ chmod a+rx ~/.bin/repo
      

      国内镜像源安装:

      $ mkdir -p ~/.bin
      $ PATH="${HOME}/.bin:${PATH}"
      $ curl https://mirrors.bfsu.edu.cn/git/git-repo > ~/.bin/repo
      $ chmod a+rx ~/.bin/repo
      

      由于谷歌服务器位于国外,每次运行时Repo会检查更新导致下载较慢,国内用户可以配置镜像源。否则会像下图一样卡住不动然后失败。

      8d60364e-7c3d-42a9-88e8-40778344fee1-image.png

      更换镜像源

      Repo 的运行过程中会尝试访问官方的 git 源更新自己,更换镜像源可以提高下载速度。将如下内容复制到你的~/.bashrc 里

      $ echo export REPO_URL='https://mirrors.bfsu.edu.cn/git/git-repo' >> ~/.bashrc
      $ source ~/.bashrc
      

      如果您使用的是 dash、hash、 zsh 等 shell,请参照 shell 的文档配置。

      配置保存身份认证

      新版本 git 默认加强了安全性,身份认证不会保存,导致拉取 repo 需要多次输入密码,可以用下列命令配置:

      git config --global credential.helper store
      

      20c115a9-6a4c-40cc-8b35-9d70bc65974e-image.png

      常见问题

      • 卡在Downloading Repo source from https://gerrit.googlesource.com/git-repo 不动。

        • 国内网络较慢,参照上面的更换镜像源解决。
      • 配置保存身份认证无效不启用

        • 检查是否运行了 sudo git config --global credential.helper store 使用了 sudo 后保存的信息会存储到 root 用户下并非当前用户。
      • 出现错误 fatal: cannot make directory: File exists

        • 之前拉取了 repo 但是不完整,需要删除 .repo 文件夹重新拉取

      SDK 拉取

      以 tina-d1-h 为例,讲述如何拉取 SDK。

      新建文件夹保存 SDK

      使用 mkdir 命令新建文件夹,保存之后需要拉取的 SDK,然后 cd 进入到刚才新建的文件夹中。

      $ mkdir tina-d1-h
      $ cd tina-d1-h
      

      初始化 Repo 仓库

      使用 repo init 命令初始化仓库,tina-d1-h 的仓库地址是 https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git 需要执行命令:

      $ repo init -u https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml
      

      如果提示 Username for 'https://sdk.aw-ol.com': 请输入 全志在线开发者论坛 的用户名和密码。(注:需要全志在线开发者论坛LV2等级以上用户才有权限拉取 SDK)

      拉取 SDK

      使用命令 repo sync 拉取 SDK

      $ repo sync
      

      由于 SDK 普遍较大,拉取可能需要一定的时间。

      创建开发环境

      使用命令 repo start 创建开发环境分支

      $ repo start product-smartx-d1-h-tina-stable-v2.0 --all
      

      至此,SDK 获取完毕。

      houxc01 Z 3 Replies Last reply Reply Quote Share 5
      • Referenced by  xiaowenge xiaowenge 
      • Referenced by  xiaowenge xiaowenge 
      • Referenced by  whycan whycan 
      • L
        lxia7212 LV 2 last edited by

        ec911483-4c61-4a9a-af2f-cc54cc6102fb-image.png

        这是由于我不是L2级别的用户还是其他原因?

        WhycanService 1 Reply Last reply Reply Quote Share 0
        • WhycanService
          WhycanService LV 8 @lxia7212 last edited by

          @lxia7212 没到lv2,现在可以了

          1 Reply Last reply Reply Quote Share 0
          • H
            ht1123 LV 4 last edited by

            This post is deleted!
            1 Reply Last reply Reply Quote Share 0
            • B
              bubailong LV 3 last edited by

              不错,来升个LV2

              1 Reply Last reply Reply Quote Share 0
              • Y
                yelong98 LV 7 last edited by

                T113能在新平台下么?

                1 Reply Last reply Reply Quote Share 0
                • houxc01
                  houxc01 LV 2 @WhycanService last edited by

                  @whycanservice 怎么升级快一点,还是lv1

                  1 Reply Last reply Reply Quote Share 0
                  • Z
                    zhouyuan369 LV 3 @WhycanService last edited by

                    @whycanservice aaa@aaa-M800:~/tina-d1-h$ repo init -u https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml
                    Traceback (most recent call last):
                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 56, in <module>
                    from subcmds.version import Version
                    File "/home/aaa/tina-d1-h/.repo/repo/subcmds/init.py", line 38, in <module>
                    ['%s' % name])
                    File "/home/aaa/tina-d1-h/.repo/repo/subcmds/start.py", line 26, in <module>
                    from project import SyncBuffer
                    File "/home/aaa/tina-d1-h/.repo/repo/project.py", line 33, in <module>
                    import requests
                    ImportError: No module named requests
                    没有提示

                    WhycanService 1 Reply Last reply Reply Quote Share 0
                    • WhycanService
                      WhycanService LV 8 @zhouyuan369 last edited by

                      @zhouyuan369 repo安装的问题,参考repo安装文档

                      Z 1 Reply Last reply Reply Quote Share 0
                      • Z
                        zhouyuan369 LV 3 @WhycanService last edited by

                        @whycanservice repo init -u https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml

                        现在是动都不动了

                        Z 1 Reply Last reply Reply Quote Share 0
                        • Z
                          zhouyuan369 LV 3 @zhouyuan369 last edited by

                          @zhouyuan369 最后用python3 /usr/bin/repo init -u https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml输入用户密码了,就是不够级

                          1 Reply Last reply Reply Quote Share 0
                          • V
                            vuiot LV 3 last edited by

                            @whycanservice 在 新 SDK 平台下载 D1-H/D1s SDK 中说:

                            repo start

                            a60f43ad-9b54-4c67-b88b-c927a45b4b7d-image.png

                            这个错误怎么回事

                            WhycanService 1 Reply Last reply Reply Quote Share 0
                            • WhycanService
                              WhycanService LV 8 @vuiot last edited by

                              @vuiot 基础开发环境没有安装,缺少bison命令

                              8e9f9774-928b-410f-8066-1a2ea19d5284-image.png

                              sudo apt-get install build-essential subversion git libncurses5-dev zlib1g-dev gawk flex bison quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lsof kconfig-frontends android-tools-mkbootimg python2 libpython3-dev gcc-multilib libc6:i386 libstdc++6:i386 lib32z1
                              
                              V 1 Reply Last reply Reply Quote Share 0
                              • V
                                vuiot LV 3 @WhycanService last edited by

                                @whycanservice 谢谢大佬 不过命令里面都没有这个 我手动安装就可以了

                                1 Reply Last reply Reply Quote Share 0
                                • Z
                                  zhouyuan369 LV 3 @WhycanService last edited by xiaowenge

                                  @whycanservice

                                  aa@aaa-M800:~/tina-d1-h$ repo init -u https://sdk.aw-ol.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-h.xml
                                  Username for 'https://sdk.aw-ol.com': zhouyuan369
                                  Password for 'https://zhouyuan369@sdk.aw-ol.com': 
                                  
                                  Traceback (most recent call last):
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 896, in <module>
                                      _Main(sys.argv[1:])
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 861, in _Main
                                      result = repo._Run(name, gopts, argv) or 0
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 293, in _Run
                                      result = run()
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 276, in <lambda>
                                      run = lambda: self._RunLong(name, gopts, argv) or 0
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 450, in _RunLong
                                      execute_command()
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 416, in execute_command
                                      execute_command_helper()
                                    File "/home/aaa/tina-d1-h/.repo/repo/main.py", line 382, in execute_command_helper
                                      result = cmd.Execute(copts, cargs)
                                    File "/home/aaa/tina-d1-h/.repo/repo/subcmds/init.py", line 393, in Execute
                                      self._ConfigureUser(opt)
                                    File "/home/aaa/tina-d1-h/.repo/repo/subcmds/init.py", line 210, in _ConfigureUser
                                      name = self._Prompt("Your Name", mp.UserName)
                                    File "/home/aaa/tina-d1-h/.repo/repo/project.py", line 756, in UserName
                                      self._LoadUserIdentity()
                                    File "/home/aaa/tina-d1-h/.repo/repo/project.py", line 769, in _LoadUserIdentity
                                      u = self.bare_git.var("GIT_COMMITTER_IDENT")
                                    File "/home/aaa/tina-d1-h/.repo/repo/project.py", line 3701, in runner
                                      p.Wait()
                                    File "/home/aaa/tina-d1-h/.repo/repo/git_command.py", line 407, in Wait
                                      git_stderr=stderr,
                                  git_command.GitCommandError: GitCommandError: git command failure
                                      Project: manifests
                                      Args: var GIT_COMMITTER_IDENT
                                      Stdout:
                                  None
                                      Stderr:
                                  

                                  这个怎么办呀?卡两天了,网上也找不到

                                  V 1 Reply Last reply Reply Quote Share 0
                                  • V
                                    vuiot LV 3 @zhouyuan369 last edited by

                                    @zhouyuan369 不要用apt insatll repo 用后面的方法,刚踩完坑😬

                                    1 Reply Last reply Reply Quote Share 0
                                    • Y
                                      yz00000 LV 2 last edited by

                                      升完lv2,再来试试看

                                      1 Reply Last reply Reply Quote Share 0
                                      • K
                                        krhougs LV 2 last edited by

                                        坐等lv2。zzzz斜体字

                                        1 Reply Last reply Reply Quote Share 0
                                        • 1 / 1
                                        • First post
                                          Last post

                                        Copyright © 2023 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                                        行为准则 | 用户协议 | 隐私权政策