新路程--------安装海思Hi3516A/Hi3516D SDK出现问题

   搞板子首先要配置开发环境,这个编译的要求不高,所以虚拟机就可以搞定了,于是我就在windows上装了vm然后安装了虚拟机

vm的版本是11,ubuntu的版本是12.04,别的我没试过,至少可以保证这两个是ok的。

   然后装sdk,根据使用说明来,先copy sdk到home目录下(哪个目录应该无所谓,为了方便起见放在了home里),然后点击那个sdk.unpack,结果出问题了

解决如下

为了验证交叉编译工具是否安装好,第一先重启一下ubunut,然后

matt@ubuntu:~$ arm
arm2hpdl                       arm-hisiv400-linux-addr2line
arm-hisiv300-linux-addr2line   arm-hisiv400-linux-ar
arm-hisiv300-linux-ar          arm-hisiv400-linux-as
arm-hisiv300-linux-as          arm-hisiv400-linux-c++
arm-hisiv300-linux-c++         arm-hisiv400-linux-c++filt
arm-hisiv300-linux-c++filt     arm-hisiv400-linux-cpp
arm-hisiv300-linux-cpp         arm-hisiv400-linux-elfedit
arm-hisiv300-linux-elfedit     arm-hisiv400-linux-g++
arm-hisiv300-linux-g++         arm-hisiv400-linux-gcc
arm-hisiv300-linux-gcc         arm-hisiv400-linux-gcc-4.8.3
arm-hisiv300-linux-gcc-4.8.3   arm-hisiv400-linux-gcc-ar
arm-hisiv300-linux-gcc-ar      arm-hisiv400-linux-gcc-nm
arm-hisiv300-linux-gcc-nm      arm-hisiv400-linux-gcc-ranlib
arm-hisiv300-linux-gcc-ranlib  arm-hisiv400-linux-gcov
arm-hisiv300-linux-gcov        arm-hisiv400-linux-gdb
arm-hisiv300-linux-gdb         arm-hisiv400-linux-gprof
arm-hisiv300-linux-gprof       arm-hisiv400-linux-ld
arm-hisiv300-linux-ld          arm-hisiv400-linux-ld.bfd

可以看到有arm-hisiv300-linux-gcc  

可以写个hollow world验证一下

matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ arm-hisiv300-linux-gcc a.c -o a

能执行成功即可

matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ ls
package  scripts  sdk.cleanup  sdk.unpack
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ sudo ./sdk.unpack 
[sudo] password for matt: 
./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: 20: ./sdk.unpack: ECHO: not found
./sdk.unpack: 22: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 24: ./sdk.unpack: ECHO: not found
./sdk.unpack: 26: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 37: ./sdk.unpack: ECHO: not found
mkdir: created directory ‘mpp’
./sdk.unpack: 39: ./sdk.unpack: run_command_progress_float: not found
./sdk.unpack: 42: ./sdk.unpack: ECHO: not found
mkdir: created directory ‘drv’
./sdk.unpack: 44: ./sdk.unpack: run_command_progress_float: not found
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ cd osdrv/
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0/osdrv$ ls
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0/osdrv$ gedit sdk.unpack(看了一下脚本)
^C
第一行是#!/bin/sh

文件是解压出来了,但是osdev里为空,什么都没有,很奇怪



matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ source -h
bash: source: -h: invalid option  说明souce不行
source: usage: source filename [arguments]
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ su
Password: 
su: Authentication failure
matt@ubuntu:~/Hi3516A_SDK_V1.0.6.0$ sudo su


root@ubuntu:~# ls -al
total 16
drwx------  2 root root 4096 Oct 22  2014 .
drwxr-xr-x 22 root root 4096 Apr  5 19:07 ..
-rw-r--r--  1 root root 3106 Feb 19  2014 .bashrc
-rw-r--r--  1 root root  140 Feb 19  2014 .profile
root@ubuntu:~# vi .bashrc 
root@ubuntu:~# echo $0  
bash
root@ubuntu:~# vi .profile 
root@ubuntu:~# cd -
/home/matt/Hi3516A_SDK_V1.0.6.0
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# ls
drv  mpp  osdrv  package  scripts  sdk.cleanup  sdk.unpack  Untitled Document
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# vi sdk.cleanup 
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# ls /bin/sh
sh          sh.distrib  
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# ls /bin/sh
sh          sh.distrib  

root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# ls -al /bin/sh
lrwxrwxrwx 1 root root 4 Apr  5 19:02 /bin/sh -> dash   //这边说明那个脚本被dash给执行了,而本来应该是bash去执行的,这个就是/bin/sh软链接到dash,
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# ls /bin/
bash                  lessecho                 red
bunzip2               lessfile                 rm
busybox               lesskey                  rmdir
bzcat                 lesspipe                 rnano
bzcmp                 ln                       running-in-container
bzdiff                loadkeys                 run-parts
bzegrep               login                    sed
bzexe                 loginctl                 setfacl
bzfgrep               lowntfs-3g               setfont
bzgrep                ls                       setupcon
bzip2                 lsblk                    sh
bzip2recover          lsmod                    sh.distrib
bzless                machinectl               sleep
bzmore                mkdir                    ss
cat                   mknod                    static-sh
chacl                 mktemp                   stty
chgrp                 more                     su
chmod                 mount                    sync
chown                 mountpoint               systemctl
chvt                  mt                       systemd
cp                    mt-gnu                   systemd-ask-password
cpio                  mv                       systemd-inhibit
dash                  nano                     systemd-machine-id-setup
date                  nc                       systemd-notify
dbus-cleanup-sockets  nc.openbsd               systemd-tmpfiles
dbus-daemon           netcat                   systemd-tty-ask-password-agent
dbus-uuidgen          netstat                  tailf
dd                    nisdomainname            tar
df                    ntfs-3g                  tempfile
dir                   ntfs-3g.probe            touch
dmesg                 ntfs-3g.secaudit         true
dnsdomainname         ntfs-3g.usermap          udevadm
domainname            ntfscat                  ulockmgr_server
dumpkeys              ntfsck                   umount
echo                  ntfscluster              uname
ed                    ntfscmp                  uncompress
egrep                 ntfsdump_logfile         unicode_start
false                 ntfsfix                  vdir
fgconsole             ntfsinfo                 vmmouse_detect
fgrep                 ntfsls                   wdctl
findmnt               ntfsmftalloc             which
fuser                 ntfsmove                 whiptail
fusermount            ntfstruncate             ypdomainname
getfacl               ntfswipe                 zcat
grep                  open                     zcmp
gunzip                openvt                   zdiff
gzexe                 pidof                    zegrep
gzip                  ping                     zfgrep
hostname              ping6                    zforce
ip                    plymouth                 zgrep
journalctl            plymouth-upstart-bridge  zless
kbd_mode              ps                       zmore
kill                  pwd                      znew
kmod                  rbash
less                  readlink
root@ubuntu:/home/matt/Hi3516A_SDK_V1.0.6.0# sudo dpkg-reconfigure dash  //更改链接  
执行之后要选择no才行

 接下来就按照使用说明安装即可,遇到权限不够就用sudo 
  

 
  
 
 

你可能感兴趣的:(linux)