ubuntu16.04-64位编译安装Hi3516CV300_SDK_V1.0.3.0

1.Hi3516CV300_SDK_V1.0.3.0# ./sdk.cleanup
./sdk.cleanup: 2: source: not found

解决方法

which sh
which bash
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
ls /bin/sh -l

2.安装交叉编译工具链,导出环境变量

swann@ubuntu:/opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/bin$ arm-hisiv500-linux-gcc
bash: /opt/hisi-linux/x86-arm/arm-hisiv500-linux/target/bin/arm-hisiv500-linux-gcc: No such file or directory

sudo apt-get install aptitude
sudo aptitude install lib32z1

swann@ubuntu:/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin$ sudo apt-get install aptitude
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

ps -A | grep apt

kill -9 xx

swann@ubuntu:/opt/hisi-linux/x86-arm/arm-hisiv500-linux/bin$ arm-hisiv500-linux-gcc -v
arm-hisiv500-linux-gcc: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

sudo aptitude install lib32stdc++6-4.8-dbg

vi ~/.bashrc,在文件末尾追加export PATH=/opt/hisi-linux/x86-arm/arm-hisiv300-linux/target/bin:$PATH

source ~/.bashrc

arm-hisiv500-linux-gcc -v,OK

3. make OSDRV_CROSS=arm-hisiv500-linux all CHIP=hi3516ev100

Makefile:110: "---------------------------------------------------------------------"
Makefile:111: " < !!! Attention:please check toolchain version !!! > "
Makefile:112: " The current toolchain version is (Hisilicon_v500_20170104) "
Makefile:113: " But requested toolchain version is (Hisilicon_v500_20170922)"
Makefile:114: " Please make sure the toolchain version is the best matching "
Makefile:115: "---------------------------------------------------------------------"
Press Enter to continue compiling; Ctrl + C to stop it !

不管

gcc commnd not found

sudo apt-get install gcc

4.mkimage command not found – U-Boot images will not be built

使用make uImage编译生成的内核能由uboot引导,编译时会用到mkimage工具,出现这种错误是因为编译器无法找到mkimage工具,该工具在uboot/tools目录下,以下两种方法可以解决问题:
方法一:在/etc/bashrc的末行加入以下语句:
export PATH:=$PATH:[uboot所在目录]/tools
方法二:将uboot/tools目录下的mkimage文件拷备到交叉编译环境的BIN目录:
cd [uboot所在目录]/tools

5.tar (child): /opt/hisi-linux/x86-arm/arm-hisiv500-linux/runtime_uclibc/armv5te_arm9_soft/lib.tgz: Cannot open: No such file or directory

屏蔽makefile中该行

6.compr_zlib.c:39:18: fatal error: zlib.h: No such file or directory

sudo apt install zlib1g-dev

7.

猜你喜欢

转载自www.cnblogs.com/ordinary-world/p/10193642.html
今日推荐