通过Docker方式安装海思Hi3516EV200交叉编译工具arm-himix100-linux

2023-11-03

前言:

安装交叉编译环境,繁琐,耗时间,还得解决ubuntu版本不同,导致的各种错误。docker很好的解决了,不同版本,不同系统之间的差异性的问题。DOPI制作了docker方式的交叉编译环境。

工作环境:

     vmare安装的ubuntu18.04

安装docker

sudo chmod 777 /etc/apt/sources.list
vi /etc/apt/sources.list

从源中选择对应版本的更新源:复制到 source.list 中。

  • 卸载老版本:
 sudo apt-get remove docker docker-engine docker.io containerd runc
  • 安装docker
 sudo apt-get install -y curl
 curl https://releases.rancher.com/install-docker/18.09.sh | sh

执行过程:

dopi@ubuntu:$ curl https://releases.rancher.com/install-docker/18.09.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15521  100 15521    0     0  16406      0 --:--:-- --:--:-- --:--:-- 16389
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sudo -E sh -c apt-get update
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]                                                                             
Get:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]                                                                           
Get:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]                                                                          
Hit:5 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                                     
Get:6 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]                                                                                    
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]                                                             
Hit:8 https://download.docker.com/linux/ubuntu bionic InRelease                            
Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [46.0 kB]    
Get:10 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [49.2 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Get:12 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 DEP-11 Metadata [295 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 DEP-11 Metadata [279 kB]                                                                
Get:15 http://us.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 DEP-11 Metadata [2,468 B]                                                             
Get:16 http://us.archive.ubuntu.com/ubuntu bionic-backports/universe amd64 DEP-11 Metadata [7,968 B]                                                             
Fetched 1,186 kB in 17s (69.0 kB/s)                                                                                                                              
Reading package lists... Done
+ sudo -E sh -c apt-get install -y -q apt-transport-https ca-certificates curl software-properties-common
Reading package lists...
Building dependency tree...
Reading state information...
ca-certificates is already the newest version (20190110~18.04.1).
curl is already the newest version (7.58.0-2ubuntu3.9).
software-properties-common is already the newest version (0.96.24.32.13).
apt-transport-https is already the newest version (1.6.12ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded.
+ + sudo -E sh -c apt-key add -
curl -fsSl https://download.docker.com/linux/ubuntu/gpg
OK
+ sudo -E sh -c add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Get:2 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]                                                                             
Get:3 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]                                                                           
Hit:4 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                                                     
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                                              
Get:6 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]                                                                          
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                                                                       
Hit:8 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                                   
Hit:9 https://download.docker.com/linux/ubuntu bionic InRelease                                        
Fetched 252 kB in 1s (179 kB/s)
Reading package lists... Done
+ [ ubuntu = debian ]
+ sudo -E sh -c apt-get update
Hit:1 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic InRelease
Hit:2 http://security.ubuntu.com/ubuntu bionic-security InRelease                                                                                  
Hit:3 http://us.archive.ubuntu.com/ubuntu bionic InRelease                                                                    
Get:4 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-updates InRelease [88.7 kB]                                          
Hit:5 https://download.docker.com/linux/ubuntu bionic InRelease                 
Hit:6 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease                   
Hit:7 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease                 
Get:8 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-backports InRelease [74.6 kB]
Get:9 https://mirrors.tuna.tsinghua.edu.cn/ubuntu bionic-security InRelease [88.7 kB]
Fetched 252 kB in 2s (116 kB/s)     
Reading package lists... Done
+ apt-cache madison docker-ce
+ cut+ grep 18.09.9
 -d   -f 4
+ head -n 1
+ pkg_version=5:18.09.9~3-0~ubuntu-bionic
+ sudo -E sh -c apt-get install -y -q docker-ce=5:18.09.9~3-0~ubuntu-bionic docker-ce-cli=5:18.09.9~3-0~ubuntu-bionic
Reading package lists...
Building dependency tree...
Reading state information...
docker-ce-cli is already the newest version (5:18.09.9~3-0~ubuntu-bionic).
The following additional packages will be installed:
  aufs-tools cgroupfs-mount containerd.io pigz
The following NEW packages will be installed:
  aufs-tools cgroupfs-mount containerd.io docker-ce pigz
0 upgraded, 5 newly installed, 0 to remove and 93 not upgraded.
Need to get 0 B/41.6 MB of archives.
After this operation, 194 MB of additional disk space will be used.
Selecting previously unselected package pigz.
(Reading database ... 175687 files and directories currently installed.)
Preparing to unpack .../archives/pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package aufs-tools.
Preparing to unpack .../aufs-tools_1%3a4.9+20170918-1ubuntu1_amd64.deb ...
Unpacking aufs-tools (1:4.9+20170918-1ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package containerd.io.
Preparing to unpack .../containerd.io_1.2.13-2_amd64.deb ...
Unpacking containerd.io (1.2.13-2) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a18.09.9~3-0~ubuntu-bionic_amd64.deb ...
Unpacking docker-ce (5:18.09.9~3-0~ubuntu-bionic) ...
Setting up aufs-tools (1:4.9+20170918-1ubuntu1) ...
Setting up containerd.io (1.2.13-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/containerd.service → /lib/systemd/system/containerd.service.
Setting up cgroupfs-mount (1.4) ...
Setting up pigz (2.4-1) ...
Setting up docker-ce (5:18.09.9~3-0~ubuntu-bionic) ...
update-alternatives: using /usr/bin/dockerd-ce to provide /usr/bin/dockerd (dockerd) in auto mode
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for systemd (237-3ubuntu10.38) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
+ sudo -E sh -c docker version
Client:
 Version:           18.09.9
 API version:       1.39
 Go version:        go1.11.13
 Git commit:        039a7df9ba
 Built:             Wed Sep  4 16:57:28 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.9
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.11.13
  Git commit:       039a7df
  Built:            Wed Sep  4 16:19:38 2019
  OS/Arch:          linux/amd64
  Experimental:     false

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:

  sudo usermod -aG docker dopi

Remember that you will have to log out and back in for this to take effect!

WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

查看docker版本

dopi@ubuntu:$ sudo docker -v
Docker version 18.09.9, build 039a7df9ba

更换docker镜像源

修改 /etc/docker/daemon.json 文件配置,没有则 **新建**

{
  "registry-mirrors": ["https://m3dz4myl.mirror.aliyuncs.com"]
}

启动docker

sudo service docker start

镜像拉取

DOPI已经把交叉编译环境使用Docker进行构建 拉取Docker镜像:

docker pull cijliu/arm-himix100-linux

执行过程:

 dopi@ubuntu:$ sudo docker pull cijliu/arm-himix100-linux
Using default tag: latest
latest: Pulling from cijliu/arm-himix100-linux
396e9d6ee8c9: Already exists 
403b0fc2e6f1: Already exists 
7124ef1a91d2: Already exists 
f47441d15565: Already exists 
588e8920e707: Already exists 
9b7af414de8c: Already exists 
f9d6674257e7: Already exists 
Digest: sha256:cc8bcb23cc011a74faec7c0645d27eba26317efe5c32d65b793c768ff78e20be
Status: Downloaded newer image for cijliu/arm-himix100-linux:latest
dopi@ubuntu:/home/ev200_tools/arm-himix100-linux$ 

查看拉取的交叉编译环境:

dopi@ubuntu:$ sudo docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
cijliu/arm-himix100-linux   latest              cdaa62aa5d4c        8 weeks ago         4.73GB

创建Docker容器

假设您的git的uboot,linux,rootfs文件在/usr/dopi目录下,然后执行:

sudo docker run -it -v $PWD:/usr/dopi --name dopi_ev200  cijliu/arm-himix100-linux bash

这样,就进入到了Docker容器内,并且把当前路径挂载在容器的/usr/dopi路径,接下来开始编译。

感谢阅读

感谢您的阅读,此文献给初学者,关注DOPI的海思开源项目。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

通过Docker方式安装海思Hi3516EV200交叉编译工具arm-himix100-linux 的相关文章

随机推荐

  • 李宏毅机器学习:self-attention(自注意力机制)和transformer及其变形

    目录 self attention self attention的输入 文字处理领域 语音领域 图 自注意力机制的输出 输出序列长度与输入序列相同 输出序列长度为1 模型决定输出序列长度 Self attention 原理 self att
  • codeforces Epic Game 题解

    Simon and Antisimon play a game Initially each player receives one fixed positive integer that doesn t change throughout
  • MOT学习 - 卡尔曼滤波

    参考资料 https www bzarg com p how a kalman filter works in pictures 协方差矩阵 https youzipi blog csdn net article details 48788
  • 关于Qt和C++中的反射机制实现与运用(2)

    看到一个很好的实例 这里就转载过来了 原文地址 C 反射机制 一 前言 Java有着一个非常突出的动态相关机制 Reflection 用在Java身上指的是我们可以于运行时加载 探知 使用编译期间完全未知的classes 换句话说 Java
  • Springboot+Vue前后端分离实现token登录验证和状态保存

    token可用于登录验证和权限管理 大致步骤分为 前端登录 post用户名和密码到后端 后端验证用户名和密码 若通过 生成一个token返回给前端 前端拿到token用vuex和localStorage管理 登录成功进入首页 之后前端每一次
  • 从放弃到再入门之拉格朗日对偶问题推导

    https blog csdn net qq 34564612 article details 79974635
  • 【第19篇】SSD论文翻译和代码汇总

    文章目录 摘要 1 简介 2 单次检测器 SSD 2 1 模型 2 2 训练 3 实验结果 3 1 PASCAL VOC2007 3 2 模型分析 3 3 PASCAL VOC2012 3 4 COCO 3 5 初步的ILSVRC结果 3
  • 2021-07-08

    阿里DevOps发布策略简介 前言 DevOps追求更短的迭代周期 更高频的发布 但发布的次数越多 引入故障的可能性就越大 更多的故障将会降低服务的可用性 进而影响到客户体验 所以 为了保证服务质量 守好发布这个最后一道关 阿里逐步发展出了
  • Vue3+Element-Plus中的Tree组件,多选时的赋值与取值

    el tree 是 element ui 提供的一个树形组件 可以在 Vue js 应用中使用 el tree 组件提供了 getCheckedNodes 方法 可以用来获取树形结构中被选中的节点
  • C/C++混合编程编译问题

    以下为本实验使用的编译器版本 系统环境为 目的 搞清以下几个问题 1 g 能否编译c文件 2 g 编出的s文件和gcc编出来的有何异同 3 cplusplus宏在何时被定义 4 c调用c 的注意事项 5 c 调用c的注意事项 6 针对上述问
  • js检测是否为数组的方法-JavaScript学习笔记

    1 方法一 instanceof 运算符 它可以用来检测是否为数组 代码 var arr var obj console log arr instanceof Array true console log obj instanceof Ar
  • Spring Boot 学习研究笔记(九) - Spring Data JPA常用注解

    Spring Data JPA 常用注解详细说明 1 Entity Entity 说明这个class 是实体类 并且使用默认的orm 规则 即 class 名对应数据库表中的表明 class 字段名即表中的字段名 如果想要改变这种默认的or
  • shell之多分支if语句

    1 语法格式 if 条件测试1 then 命令序列1 elif 条件测试2 then 命令序列2 elif 条件测试3 then 命令序列3 else 命令序列n fi 2 吃鸡段位排行 bin bash Author hejing Dat
  • 蓝牙硬件设备没有链接到计算机,电脑未发现蓝牙硬件设备怎么办

    有时我们想连接蓝牙硬件设备 却发现找不到了 没发现 怎么办 下面是学习啦小编为大家介绍电脑未发现蓝牙硬件设备的解决方法 欢迎大家阅读 电脑未发现蓝牙硬件设备的解决方法 首先我们在桌面找到 我的电脑 当然如果是WIN7 WIN8等系统以上的电
  • Postman 中文汉化界面

    参考 大佬的Gitee地址 gitee地址
  • GateWay 中StripPrefix的作用

    StripPrefix网关过滤器工厂采用一个参数StripPrefix StripPrefix参数表示在将请求发送到下游之前从请求中剥离的路径个数 spring cloud gateway routes id crm uri http cr
  • [1068]启动hdfs时,报错 Canary 测试无法在目录 /tmp/.cloudera_health_monitoring_canary_files 中创建文件

    启动hdfs时 报错 Canary 测试无法在目录 tmp cloudera health monitoring canary files 中创建文件 经过查看日志 发现 Name node is in safe mode 解决方法 sud
  • python练习10

    活动 10 while 循环的应用实例 一 程序示例 问 题 编程实现 猜数游戏 在给定某数后 让用户进行猜测并输入数 计算机给出相应提示 如偏大 偏小或正 确 若所猜测的数正确 则输出猜测次数 否则继续猜数 设计算法 初始 给定数 num
  • logback最详细配置讲解,及命名规范

    介绍 logback是一款日志框架 这个就不详细赘述了 命名规范 一般来说logback的配置文件可以命名为logback xml 项目启动时就可以读取到里面的配置 但是在spring boot项目中 这样会有一点问题 因为logback
  • 通过Docker方式安装海思Hi3516EV200交叉编译工具arm-himix100-linux

    前言 安装交叉编译环境 繁琐 耗时间 还得解决ubuntu版本不同 导致的各种错误 docker很好的解决了 不同版本 不同系统之间的差异性的问题 DOPI制作了docker方式的交叉编译环境 工作环境 vmare安装的ubuntu18 0