加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

在centos下安装vivado和petalinux

(2014-09-12 09:27:27)
标签:

centos6.5

petalinux

vivado2014.2

1、安装vivado
运行 ./xsetup

2、按照 UG976 (v2014.2) June 3, 2014 page10 的指示安装库文件。
其中,有两个与文档不一致的情况:
libstdc++-4.4.6-4.el6.i686 没有安装,用 yum list libstdc++,依据结果 yum install libstdc++.i686,实际安装了 libstdc++-4.4.7-4.el6.i686。
libgomp.i386 也没有找到,用yum list libgomp,依据查找结果 yum install libgomp.i686 ,实际安装了 libgomp-4.4.7-4.el6.i686

3、安装tftp
yum install tftp-server
yum install tftp

4、安装 petalinux

运行 petalinux-config--get-hw-description 时报错:
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libncurses.so.5: cannot open shared object file: No such file or directory

补充安装 yum install ncurses-libs.i686 后该问题解除。

petalinux-build 在dpkg 时报错,
E: Sub-process /opt/petalinux-v2014.2-final/tools/packagemanager/bin/dpkg returned an error code (127) 
[ERROR] make[2]: *** [.pkg_stagefs] Error 255

对此问题给出了解答和解决方案。
采用了如下方案:

I got the issue fixed finally and this is how:

I started first by looking in the build.log file for more information about the issue and I found the following:

...

[ALL ] tinylogin-dev update-rc.d update-rc.d-dev

[ALL ] Authentication warning overridden.
[ALL ] /opt/PetaLinux/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory
[ERROR] E: Sub-process /opt/PetaLinux/petalinux-v2013.10-final/tools/packagemanager/bin/dpkg returned an error code (127)
[ERROR] make[2]: *** [pkg_stagefs] Error 255
[ALL ] make[2]: Leaving directory `/home/fyonga/Documents/Embedded_linux/Peta_projects/Xilinx-ZC702-2013.3/build/linux/rootfs/packages-repo'
...

 

and by checking at the depencies of dpkg used by petalinux, the command

ldd /petalinux/installation/folder/tools/packagemanager/bin/dpkg

 

returned:

 

linux-gate.so.1 => (0xf7731000)
libselinux.so.1 => not found
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf755f000)
/lib/ld-linux.so.2 (0xf7732000)

 

Effectively the shared library libselinux.so (that dpkg depends on) was missing. The solution was therefore to generate one and copy it inside the lib folder of the packagemanager. However, since those libraries are 32-bits and my computer is 64, I couldn't use directly the libselinux.so version in /lib/i386-linux-gnu/ (the standard one). I just copied the shared library on a 32-bit ubuntu version that I have installed on another computer and placed it in:  /petalinux/installation/folder/tools/packagemanager/lib

 

The file is attached here. A more beautiful solution (I think) would be to try generating one for a 32-bit version of your Ubuntu. 

 

Now it builds successfully the image! 


将 libselinux.so.1 文件拷贝到了 /petalinux/installation/folder/tools/packagemanager/lib 下,petalinux-build 即可正常运行。


20140913 UPDATE:

作其他编译时,依然报错。按照上述文档的另一回复:

I just put an Answer Record into the queue for publication on this as I got an answer from PetaLinux engineering about this.  To work around this properly requires a relatively small patch to the apt repository makefile.  Below is the ASCII contents of the patch:

 

diff --git a/components/packages-repo/Makefile  b/components/packages-repo/Makefile
index 2d90a90..e127b1b 100644
--- a/components/packages-repo/Makefile
+++ b/components/packages-repo/Makefile
@@ -73,7 +73,7 @@ TARGETROOT_APTROOT=$(BUILDROOT)/targetroot
TARGETROOT_APTROOT_CONF=$(TARGETDIR)/.targetroot.apt
TARGETROOT_APTCONFIG=$(TARGETROOT_APTROOT_CONF)/etc/apt/apt.conf.d/apt.conf

 -FALSEPATH=$(APTPATH)/bin:$(PATH)
+FALSEPATH=$(APTPATH)/bin:/usr/bin:/bin
FALSELDPATH=$(APTPATH)/lib:$(APTPATH)/lib/libfakeroot

 FAKEROOT=$(APTPATH)/bin/fakeroot
--
1.9.0


对 相关的makefile作了修改后,编译可以通过。(需要保留上面拷贝的库,该库在/components/packages-repo/i686下有,但如果不拷贝出来,就会报缺少该文件。)。


0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有