1. 程式人生 > >ubuntu16.04-64位編譯安裝Hi3516CV300_SDK_V1.0.3.0

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.安裝交叉編譯工具鏈,匯出環境變數

[email protected]:/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

[email protected]:/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

[email protected]:/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.