问题:执行./sdk.unpack时
unpacking osdrv
run_command_progress_float: 'tar -xvzf package/osdrv.tgz'
[100%]##################################################|
unpacking kernel
run_command_progress_float: 'tar -xvzf osdrv/opensource/kernel/linux-3.10.y.tgz -C osdrv/opensource/kernel/'
tar: linux-3.10.y/arch/arm/boot/dts/include/dt-bindings: Cannot create symlink to `../../../../../include/dt-bindings': Operation not supported
tar: linux-3.10.y/arch/microblaze/boot/dts/system.dts: Cannot create symlink to `../../platform/generic/system.dts': Operation not supported
tar: Exiting with failure status due to previous errors————————————后面省略
解决:这个问题是自己犯的蠢问题,但作为嵌入式行业的白菜,安装东西时确实会遇到的问题。这个问题是因为我把SDK的安装放在了虚拟机的共享目录(还属于window系统)下,然后直接执行命令安装,这就会出现这个问题。解决:把SDK移到纯Linux的目录下进行安装。
问题:海思SDK安装时,无法运行sdk.unpack
解决:Ubuntu 默认的shell是dash,通过ls -l /bin/sh查看 改dash为bash,通过# sudo dpkg-reconfigure dash修改,选择no
OSDRV编译不成功:从未弄过海思sdk环境的,这里的编译就会出现很多错误,反复编译整个osdrv目录make OSDRV_CROSS=arm-hisiv300-linux CHIP=hi3521a all,根据提示的错误来一一解决问题,后来弄烦了就继续查资料,给我查到一个编译osdrv所需要的软件的安装╰( ̄▽ ̄)╮,我把其粘贴过来:
编译整个osdrv目录,遇到了各种问题。说起来大多是因为新安装的Ubuntu,系统中缺少相关的软件。
所以现在总结下都需要安装哪些软件:
sudo apt-get install xxx(xxx分别为下面的软件)
ncurses-dev build-essential u-boot-tools libusb-1.0-0 libusb-1.0-0-dev Git wget fakeroot
kernel-package zlib1g-dev libncurses5-dev cvs automake autoconf libtool bison flex
这是我在安装其他型号的SDK编译出现的问题:
root@ubuntu:/hisi/Hi3521D_SDK_V1.0.3.0/osdrv# make OSDRV_CROSS=arm-hisiv500-linux CHIP=hi3521d all
Makefile:122: (Hisilicon_v500_20170922)
Makefile:195: "---------------------------------------------------------------------"
Makefile:196: " Cannot found the v3.18.20 liunx kernel source file "
Makefile:197: " Please download the compression package from www.kernel.org "
Makefile:198: "---------------------------------------------------------------------"
Makefile:199: *** . Stop.
原因:在osdrv/osdrv/opensource/kernel 下没有个3.18.20.tar.gz的Linux kenrel包
解决:到官网www.kernel.org(具体看该目录下的readme_cn.txt),下个kenrel包放到该目录下
make[2]: Entering directory `/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image'
gcc -c -I/usr/include -O2 -Wall -DCONFIG_YAFFS_UTIL -static -Wshadow -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wnested-externs -Winline oob_config_v100.c -o oob_config_v100.o
gcc -o mkyaffs2image100 mkyaffs2image.o yaffs_ecc.o yaffs_packedtags2.o yaffs_tagsvalidity.o oob_config_v100.o -static
/usr/bin/ld: i386:x86-64 architecture of input file `mkyaffs2image.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `yaffs_ecc.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `yaffs_packedtags2.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `yaffs_tagsvalidity.o' is incompatible with i386 output
collect2: ld returned 1 exit status
make[2]: *** [mkyaffs2image100] Error 1
make[2]: Leaving directory `/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image'
make: *** [hipctools] Error 2
原因:在32bit系统中编译64bit的库文件不兼容导致。/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image下有个mkyaffs2image.tar.bz2,
每次编译整个目录或在这个目录下make都会解压产生mkyaffs2image目录,里面存在64bit系统中编译出来的东西。
解决问题:
1、可以切换到64bit的系统中进行编译;(这种方式的,我在网上没找到相关)
2、里面存在64bit系统中编译出来的东西,所以/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image在这个目录里面执行make clean 后重新编译就可以;验证这个错误是否已经成功解决,可以不用再一次编译整个osdrv目录,只需在上级目录/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/
pc/mkyaffs2image下make一下就可以。
注:在/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image下make clean 会删除该目录下mkyaffs2image目录,此时make就又会出现错误,
进入/hisi/Hi3521D_SDK_V1.0.3.0/osdrv/tools/pc/mkyaffs2image/mkyaffs2image下make clean,在返回上级目录make就可以了。