Navigation

    全志在线开发者论坛

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

    新 SDK 平台下载 R329 SDK

    其它全志芯片讨论区
    1
    1
    2142
    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 q1215200171

      ---->>>>>>水经验专帖:https://bbs.aw-ol.com/topic/4008/----<<<<<<
      ---->>>>>>请不要在本帖回复与技术问题无关的话题----<<<<<<

      获取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 拉取

      以 R329-Tina-jishu 为例,讲述如何拉取 SDK。

      新建文件夹保存 SDK

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

      $ mkdir R329-Tina-jishu
      $ cd R329-Tina-jishu
      

      初始化 Repo 仓库

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

      $ repo init -u https://sdk.aw-ol.com/git_repo/R329_Tina_jishu/manifest.git -b master -m R329-Tina-jishu.xml
      

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

      LV2 升级需要 49积分,获取积分方法如下:

      ① 1次主题帖发布(发帖):50积分
      ② 1次有效回帖:25积分
      ③ 1次点赞:6积分
      ④ 每日登录:6积分

      拉取 SDK

      使用命令 repo sync 拉取 SDK

      $ repo sync
      

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

      创建开发环境

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

      $ repo start smartx-r329-tina-jishu --all
      

      至此,SDK 获取完毕。

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

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

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