Notas de entrada HiSilicon 3519A: (1) Construção do ambiente de desenvolvimento HiSilicon Hi3519A

Consulte os documentos oficiais da HiSilicon: "Hi3519AV100 / Hi3556AV100 Development Environment User Guide.pdf", "Hi3519AV100 SDK Installation and Upgrade Instructions.pdf"

1. Instale a máquina virtual ubuntu18.04

  • Versão da máquina virtual: VMware® Workstation 15 Pro
  • Versão do sistema operacional: ubuntu-18.04.1-desktop-x64
  • A ferramenta de compilação cruzada HiSilicon Hi3519A suporta apenas 32 bits
  • ubuntu18.04 sem imagem ISO oficial de 32 bits
  • No sistema de 32 bits do ubuntu16.04, vmware-tools não pode copiar arquivos normalmente
  • Portanto, escolha o sistema operacional ubuntu18.04 64 bits como o ambiente de desenvolvimento
# 系统版本
hisilicon@ubuntu:~$ uname -a
Linux ubuntu 5.3.0-28-generic #30~18.04.1-Ubuntu SMP Fri Jan 17 06:14:09 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
# 系统更新
hisilicon@ubuntu:~$ sudo apt update
......

hisilicon@ubuntu:~$ sudo apt upgrade
......

2. Instale a cadeia de ferramentas arm-himix200-linux

  • Mude para a conta root ou use o sudo para instalar e evitar permissões insuficientes
  • O conjunto de ferramentas será instalado por padrão no caminho / opt / hisi-linux / x86-arm
  • A descompressão leva muito tempo e requer paciência
  • Como o sistema operacional do ambiente de desenvolvimento é de 64 bits e a cadeia de ferramentas é de 32 bits, a execução do comando relevante diretamente após a instalação ser concluída avisará que o arquivo não existe
  • Portanto, você precisa instalar a biblioteca de 32 bits: sudo apt install lib32z1-dev
  • Se a fonte do software for modificada para uma fonte de espelho doméstica, como Ali, a instalação da biblioteca de 32 bits pode falhar devido à configuração incompleta do endereço de origem
# 切换root
hisilicon@ubuntu:~$ sudo su
[sudo] password for hisilicon: 
# 将安装包复制到Downloads目录,并进入该目录
root@ubuntu:/home/hisilicon# cd Downloads/arm-himix200-linux/
# 安装工具链
root@ubuntu:/home/hisilicon/Downloads/arm-himix200-linux# source ./arm-himix200-linux.install 
Installing HuaWei LiteOS Linux at /opt/hisi-linux/x86-arm
mkdir: created directory '/opt/hisi-linux'
mkdir: created directory '/opt/hisi-linux/x86-arm'
mkdir: created directory '/opt/hisi-linux/x86-arm/arm-himix200-linux'
Extract cross tools ...
export path /opt/hisi-linux/x86-arm/arm-himix200-linux/bin

# 安装32位库
hisilicon@ubuntu:~$ sudo apt install lib32z1-dev
[sudo] password for hisilicon: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cpp-7 gcc gcc-7 gcc-7-base gcc-7-multilib gcc-8-base gcc-multilib lib32asan4
  lib32atomic1 lib32cilkrts5 lib32gcc-7-dev lib32gcc1 lib32gomp1 lib32itm1
  lib32mpx2 lib32quadmath0 lib32stdc++6 lib32ubsan0 lib32z1 libasan4
  libatomic1 libc-dev-bin libc6-dev libc6-dev-i386 libc6-dev-x32 libc6-i386
  libc6-x32 libcc1-0 libcilkrts5 libgcc-7-dev libgcc1 libgomp1 libitm1
  liblsan0 libmpx2 libquadmath0 libstdc++6 libtsan0 libubsan0 libx32asan4
  libx32atomic1 libx32cilkrts5 libx32gcc-7-dev libx32gcc1 libx32gomp1
  libx32itm1 libx32quadmath0 libx32stdc++6 libx32ubsan0 linux-libc-dev
  manpages-dev zlib1g-dev
Suggested packages:
  gcc-7-locales make autoconf automake libtool flex bison gcc-doc gcc-7-doc
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan4-dbg
  liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg
  libquadmath0-dbg glibc-doc
The following NEW packages will be installed:
  gcc gcc-7 gcc-7-multilib gcc-multilib lib32asan4 lib32atomic1 lib32cilkrts5
  lib32gcc-7-dev lib32gcc1 lib32gomp1 lib32itm1 lib32mpx2 lib32quadmath0
  lib32stdc++6 lib32ubsan0 lib32z1 lib32z1-dev libasan4 libatomic1
  libc-dev-bin libc6-dev libc6-dev-i386 libc6-dev-x32 libc6-i386 libc6-x32
  libcilkrts5 libgcc-7-dev libitm1 liblsan0 libmpx2 libquadmath0 libtsan0
  libubsan0 libx32asan4 libx32atomic1 libx32cilkrts5 libx32gcc-7-dev
  libx32gcc1 libx32gomp1 libx32itm1 libx32quadmath0 libx32stdc++6 libx32ubsan0
  linux-libc-dev manpages-dev zlib1g-dev
The following packages will be upgraded:
  cpp-7 gcc-7-base gcc-8-base libcc1-0 libgcc1 libgomp1 libstdc++6
7 upgraded, 46 newly installed, 0 to remove and 179 not upgraded.
Need to get 43.8 MB/44.3 MB of archives.
After this operation, 152 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
......

# 验证工具链是否可正常运行
root@ubuntu:/home/hisilicon/Downloads/arm-himix200-linux# arm-himix200-linux-gcc -v
Using built-in specs.
COLLECT_GCC=arm-himix200-linux-gcc
COLLECT_LTO_WRAPPER=/opt/hisi-linux/x86-arm/arm-himix200-linux/host_bin/../libexec/gcc/arm-linux-gnueabi/6.3.0/lto-wrapper
Target: arm-linux-gnueabi
Configured with: /home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/src/gcc-6.3.0/configure --host=i386-redhat-linux --build=i386-redhat-linux --target=arm-linux-gnueabi --prefix=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/install --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --disable-nls --enable-clocale=gnu --enable-extra-hisi-multilibs --with-sysroot=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/install/target --with-build-sysroot=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/install/target --with-gmp=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/obj/host-libs/usr --with-mpfr=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/obj/host-libs/usr --with-mpc=/home/sying/SDK_CPU_UNIFIED/build/script/arm-himix200-linux/arm_himix200_build_dir/obj/host-libs/usr --enable-libgomp --disable-libitm --enable-poison-system-directories --with-pkgversion='HC&C V1R3C00SPC200B005_20190606' --disable-bootstrap
Thread model: posix
gcc version 6.3.0 (HC&C V1R3C00SPC200B005_20190606) 

# 如果重启后或者切换用户后无法使用相关工具命令,可重新引用相关环境变量
hisilicon@ubuntu:~/Downloads/arm-himix200-linux$ sudo su
root@ubuntu:/home/hisilicon/Downloads/arm-himix200-linux# source /etc/profile

3. Instale Hi3519AV100SDK

  • O SDK não é uma instalação real, mas o diretório atual foi descompactado e expandido e o diretório precisa ser planejado com antecedência
  • Devido ao shell padrão, executar diretamente ./sdk.unpack causará um erro. Você pode usar o shell bash para executar o script de descompactação
# 解压SDK
root@ubuntu:/home/hisilicon/3519A# tar -zxf Hi3519AV100_SDK_V2.0.2.0.tgz 
root@ubuntu:/home/hisilicon/3519A# cd Hi3519AV100_SDK_V2.0.2.0/
root@ubuntu:/home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0# ls
package  scripts  sdk.cleanup  sdk.unpack  smp_image_glibc
# 安装SDK
root@ubuntu:/home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0# /bin/bash sdk.unpack 
Unpacking SDK
WARN: Be sure you have installed the cross-compiler. if not, install it first!
WARN: ALL THE SOUCE FILES WILL BE OVERWRITED, FILES YOU MOTIFIED WILL BE LOST !!!

SDK_CHIP =hi3519av100
unpacking drv
mkdir: created directory 'drv/'
run_command_progress_float: 'tar -xvzf package/drv.tgz'
[100%]##################################################|
unpacking osal
mkdir: created directory 'osal/'
run_command_progress_float: 'tar -xvzf package/osal.tgz'
[100%]##################################################|
unpacking osdrv
run_command_progress_float: 'tar -xvzf package/osdrv.tgz'
[100%]##################################################|
mkdir: created directory 'smp'
mkdir: created directory 'smp/a53_linux/'
unpacking mpp_smp_linux.tgz 
run_command_progress_float: 'tar -xvzf package/mpp_smp_linux.tgz -C smp/a53_linux'
[100%]##################################################|
/home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0/smp/a53_linux /home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0
/home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0
直接执行./sdk.unpack进行解压安装会报错,因为Ubuntu中,/bin/sh默认已经指向dash,这是一个不同于bash的shell,主要是为了执行脚本而出现,而不是交互,dash速度更快,但功能比bash少很多,语法严格遵守POSIX标准,**出现错误后不会执行后续脚本命令**。

Solução 1:
  Etapa 1: / bin / bash sdk.unpack
Solução 2:
  Etapa 1: vim scripts / common.sh; Primeira linha: #! / Bin / sh ->! / Bin / bash
  Etapa 2: vim sdk .unpack; Primeira linha: #! / bin / sh ->! / bin / bash
  Etapa 3: ./sdk.unpack
Solução 3:
  Etapa 1: sudo dpkg-reconfigure dash
  Etapa 2: Um menu aparece e pergunta se o traço é necessário, Selecione o nº
  Etapa 3: ./sdk.unpack

root@ubuntu:/home/hisilicon/3519A/Hi3519AV100_SDK_V2.0.2.0# ./sdk.unpack 
./sdk.unpack: 2: ./sdk.unpack: source: not found
./sdk.unpack: 4: ./sdk.unpack: ECHO: not found
./sdk.unpack: 6: ./sdk.unpack: WARN: not found
./sdk.unpack: 7: ./sdk.unpack: WARN: not found
./sdk.unpack: 8: ./sdk.unpack: ECHO: not found
./sdk.unpack: 15: ./sdk.unpack: ECHO: not found
./sdk.unpack: 20: ./sdk.unpack: ECHO: not found
mkdir: created directory 'drv/'
./sdk.unpack: 22: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 24: ./sdk.unpack: ECHO: not found
mkdir: created directory 'osal/'
./sdk.unpack: 26: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 28: [: =: unexpected operator
./sdk.unpack: 28: [: =: unexpected operator
./sdk.unpack: 34: ./sdk.unpack: ECHO: not found
mkdir: created directory 'osdrv/'
./sdk.unpack: 36: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 39: [: =: unexpected operator
./sdk.unpack: 54: [: =: unexpected operator
./sdk.unpack: 54: [: =: unexpected operator
./sdk.unpack: 82: [: =: unexpected operator
./sdk.unpack: 82: [: =: unexpected operator
./sdk.unpack: 110: [: =: unexpected operator
./sdk.unpack: 110: [: =: unexpected operator

Acho que você gosta

Origin blog.51cto.com/dusthunter/2543550
Recomendado
Clasificación