1 Star 0 Fork 0

clsx524 / device-sunxi-docker

Create your Gitee Account
Explore and code with more than 8 million developers,Free private repositories !:)
Sign up
Clone or Download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

参考 https://gitee.com/allwinnertech-d1/device_sunxi 在docker里build openharmony image

前提

  • 安装git lfs
  • [optional] miniconda3

文件夹布局

llvm-riscv

- 从 https://pan.baidu.com/s/19JVNwFrl5ISOAsruW_y9hA 提取码: chds 下载llvm-riscv工具链llvm-riscv-1124.tar.gz
- 解压缩到本根路径

sunxi-d1

  • 创建并进入sunxi-d1路径
  • 下载repo: curl -s https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > bin/repo
  • repo init -u https://gitee.com/allwinnertech-d1/manifest-sunxi-d1.git -b master -m sunxi_d1.xml--no-repo-verify
  • repo sync -c
  • repo forall -c 'git lfs pull'

tina-d1-open

  • 创建并进入tina-d1-open路径
  • 按照这个流程下载tina d1 SDK
    • 把repo放到tina-d1-open/bin
    • repo init -u ssh://xxxxxx@sdk.allwinnertech.com/git_repo/D1_Tina_Open/manifest.git -b master -m tina-d1-open.xml #xxxxxx替换为您的全志客户服务平台账号
    • repo sync -c
    • repo start product-smartx-d1-tina-v1.0.1-release --all

output

用来存放编译出来的img文件

repo使用的Python版本

  • sunxi-d1的repo需要python3,tina-d1的使用python2

  • 可自行管理python版本,或者

  • 使用conda管理python版本

    • 安装miniconda3,direnv
    • 在用户根目录 .direnvrc文件写入
    layout_anaconda() {
        local ACTIVATE="${HOME}/miniconda3/bin/activate"
    
        if [ -n "$1" ]; then
            # Explicit environment name from layout command.
            local env_name="$1"
            source $ACTIVATE ${env_name}
        elif (grep -q name: environment.yml); then
            # Detect environment name from `environment.yml` file in `.envrc` directory
            source $ACTIVATE `grep name: environment.yml | sed -e 's/name: //' | cut -d "'" -f 2 | cut -d '"' -f 2`
        else
            (>&2 echo No environment specified);
            exit 1;
        fi;
    }
    • 创建python2环境 conda create -n tina-d1 python=2.7
    • 创建python3环境 conda create -n openharmony python=3.9
    • 这样在进入tina-d1-open和sunxi-d1就可以自动切换python版本

Repository Comments ( 0 )

Sign in to post a comment

About

OpenHarmony构建nezha D1 - Docker Build expand collapse
Docker
MIT
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
Docker
1
https://gitee.com/clsx524/device-sunxi-docker.git
git@gitee.com:clsx524/device-sunxi-docker.git
clsx524
device-sunxi-docker
device-sunxi-docker
master

Search