导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    分享 TinyVision 板子SDK编译的docker文件

    V Series
    1
    1
    920
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • I
      iamseer LV 4 最后由 编辑

      最近折腾了两天终于搞定了SDK编译,而且成功生成了img也烧录启动了。分享兼备份一下docker文件。毕竟docker比vmware这类的方便迁移多了。

      这里我跳过docker的介绍和安装过程。首先需要确认docker的内存要给足。我观察到编译到opencv的dnn模块时内存占用能上升到26G,如果内存不够,编译会失败。我使用的这台电脑有16G内存而docker默认是使用50%的内存以及25%的swap空间。这样一共12G是不够的。我设置内存分配12G和20G的swap空间,这样一共32G,可以编译。

      另外说明一点,这台主机的所有源全部可以直连,如果你不能的话需要添加或者更改源。另外Dockerfile里面的用户名密码要改成你的。

      如果你不用docker,也可以参考一下Dockerfile来手工安装。

      Dockerfile

      Compose.yaml

      容器启动以后,首先可以执行top看看内存和swap够不够。然后依次执行:

      # supress some git warning
      git config --global --add safe.directory /tina-v853-open/brandy/brandy-2.0/u-boot-2018
      source build/envsetup.sh
      echo "Y" | lunch v851se-tinyvision-tina
      # setup needed, can just save and exit
      m menuconfig 
      # for debug: make -j1 V=s
      make -j4
      pack
      #then copy the compiled img to host and use Phoenixcard 
      

      然后就可以把生成的img文件复制到主机上,然后用Phoenixcard烧写TF卡。如果你是用随附的yaml构建容器,那复制到/opt/script里就能出现在主机里了。

      另外附上Dockerfile内容,谨防附件失效。

      # Use the Ubuntu 20.04 minimal image as the base
      FROM ubuntu:20.04
      
      # Set environment variable to prevent tzdata asking for geographic area
      ENV DEBIAN_FRONTEND=noninteractive
      
      # Install any dependencies or packages required by your application
      RUN apt-get -y update
      
      # install dependencies
      RUN apt-get install -y build-essential subversion git libncurses5-dev zlib1g-dev gawk flex bison quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip lsof python3 python2 python3-dev android-tools-mkbootimg python2 libpython3-dev
      
      # add i386 architecture
      RUN dpkg --add-architecture i386
      RUN apt-get update
      RUN apt-get install -y gcc-multilib 
      RUN apt-get install -y libc6:i386 libstdc++6:i386 lib32z1
      
      # Install Repo tool
      RUN curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo
      RUN chmod a+x /usr/local/bin/repo
      
      # Start to set up the tina-v853 SDK
      RUN mkdir /tina-v853-open
      WORKDIR /tina-v853-open
      
      # # set up git credential
      RUN git config --global credential.helper store
      
      RUN git config --global user.name "名字"
      RUN git config --global user.email "邮箱"
      
      # Add credentials to credential store
      RUN echo "https://aw-ol的用户名:aw-ol的密码@sdk.aw-ol.com" > ~/.git-credentials
      
      ENV REPO_COLOR=0
      
      #initialize the repo
      RUN repo init -u https://sdk.aw-ol.com/git_repo/V853Tina_Open/manifest.git -b master -m tina-v853-open.xml
      
      #sync the repo, took about 30 minutes in midnight
      RUN repo sync
      
      #start SDK
      RUN repo start devboard-v853-tina-for-awol --all
      
      RUN curl -LO https://github.com/YuzukiHD/TinyVision/releases/download/tina.0.0.2/tina-bsp-tinyvision.tar.gz
      
      RUN tar xvf tina-bsp-tinyvision.tar.gz
      
      #init SDK
      
      # Use bash to run commands
      RUN apt-get install -y python wget rsync vim bc u-boot-tools cpio busybox
      
      #RUN ls openwrt/package/allwinner/vision/libAWIspApi/machinfo/v851se/
      #make sure it exists
      RUN cat openwrt/package/allwinner/vision/libAWIspApi/machinfo/v851se/build.mk
      
      #root can compile
      ENV FORCE_UNSAFE_CONFIGURE=1
      
      
      
      1 条回复 最后回复 回复 引用 分享 0
      • 1 / 1
      • First post
        Last post

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

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