petalinux 安装搭建环境报错解决办法

  • Post author:
  • Post category:linux


一,“mkimage” command not found – U-Boot images will not be built

我们需要安装依赖包:sudo apt-get install uboot-mkimage

但却提示”现在没有可用的软件包 uboot-mkimage,但是它被其它的软件包引用了,, 这可能意味着这个缺失的软件包可能已被废弃“

怎么破?按照其提示,安装”u-boot-tools“即可:sudo apt-get install u-boot-tools

二,/usr/lib/arm-linux-gnueabihf/libstdc++.so.6: version `GLIBCXX_3.4.21′ not found (required by ./BaslerCamera_wu)

[root@localhost ]# arm-linux-gcc hello.c -o helloarm

/opt/FriendlyARM/toolschain/4.4.3/libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1:

/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9′ not found (required by /opt/FriendlyARM/toolschain/4.4.3/lib/libppl_c.so.2)

/opt/FriendlyARM/toolschain/4.4.3/libexec/gcc/arm-none-linux-gnueabi/4.4.3/cc1:

/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.9′ not found (required by /opt/FriendlyARM/toolschain/4.4.3/lib/libppl.so.7)

出现如上现象。

原因:

ls -l     /usr/lib/libstdc++.so.6.0.8

-rwxr-xr-x   1 root root           0 06-14 17:52 libstdc++.so.6.0.8

libstdc++.so.6.0.8 库文件不兼容的原因。

解决办法:

1.下载 libstdc++.so.6.0.10

2.拷贝库文件到指定路径 cp ./libstdc++.so.6.0.10  /usr/lib

3.删除原为的链接    libstdc++.so.6 -> libstdc++.so.6.0.8

rm -rf /usr/lib/libstdc++.so.6

4.建立新的链接

ln -s /usr/lib/libstdc++.so.6.0.10     /usr/lib/libstdc++.so.6

三,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?

sudo rm /var/lib/dpkg/lock

sudo rm /var/lib/dpkg/lock

sudo dpkg –configure -a

四,petalinux编译报错:ERROR: Failed to source bitbake;

petalinux编译报错

[INFO] sourcing bitbake

ERROR: Failed to source bitbake

ERROR: Failed to config project.

ERROR: Get hw description Failed!.

解决方法1:

petalinux-config

–> Yocto Settings  —>

—>  YOCTO SOURCE MIRROR URL ( choose external path )

–>  EXTERNAL PATH

YOCTO SOURCE MIRROR URL SELECT EXTERNAL PATH

–>  http://petalinux.xilinx.com/sswreleases/rel-v2017.4/downloads


Note

: You do not need to follow the rel-v2017.4/2/ README

Adding MALI userspace binaries in Yocto builds – Xilinx Wiki – Confluence

when using this work-around.

SOURCE_MIRROR_URL ?= “http://petalinux.xilinx.com/sswreleases/rel-v2017.4/downloads”

INHERIT += “own-mirrors”

解决方法2:

vi ./build/config.log

将/usr/bin/python指向python2.7(先将之前指向3.x的软连接删除,然后建立新的指向2.7的软连接)能正常config , build。

/usr/bin/python3.7/bin在/usr/bin之前,把/usr/bin/python3.7/bin删了之后,重启shell,exec “$SHELL”,就可以。

解决方法3:

调用的pythoy代码中用os.mkdir()新建路径,该路径若已存在,便会报这个错误。找到导致FileExistsError的文件,删掉它们),问题解决。

五,虚拟机重启后进入initramfs的解决办法

fsck /dev/sda1

然后一直选Y,出现FILE SYSTEM WAS MODIFIED,文件系统修复成功了,这时候reboot

六,问题描述:

INFO: Checking component…

INFO: Generating make files and build linux

INFO: Generating make files for the subcomponents of linux

INFO: Building linux

[INFO ] pre-build linux/rootfs/fwupgrade

[INFO ] pre-build linux/rootfs/peekpoke

[INFO ] build linux/kernel

[ERROR] ERROR: “of_dma_request_slave_channel” [drivers/gpu/drm/xilinx/xilinx_drm.ko] undefined!

[ERROR] make[4]: *** [__modpost] Error 1

[ERROR] make[3]: *** [modules] Error 2

[ERROR] make[2]: *** [sub-make] Error 2

[ERROR] make[1]: *** [/home/work/petalinux/ad9226/ax7010/build/linux/kernel/xlnx-4.0/vmlinux] Error 2

ERROR: Failed to build linux


drivers/gpu/drm/radeon/radeon.ko] undefined!ERROR_qiongqiong421122的专栏-CSDN博客

解决办法:

禁止编译以上错误中提到的内核模块,可以 make menuconfig 在图形界面关掉,也可以直接编辑.config文件。

用make menuconfig编译内核时,如果不熟悉配置菜单,可以用如下命令查找选项:

find -name “Makefile” | xargs grep “xxxxx”       其中:xxxxx替换你想找到的 .o文件名。

例如:

find -name “Makefile” | xargs grep “radeon.o”

./drivers/gpu/drm/radeon/Makefile:obj-$(CONFIG_DRM_RADEON)+= radeon.o

打开该Makefile,注释掉  obj-$(CONFIG_DRM_RADEON)+= radeon.o  这一句。

#obj-$(CONFIG_DRM_RADEON)+= radeon.o

七,There was an error creating the child process for this terminal:

Failed to execute child process “oe-gnome-terminal-phonehome” (No such file or directory)

find ./ -type f |grep terminal.py

sh_cmd = “oe-gnome-terminal-phonehome ” + pidfile + ” ” + sh_cmd

sh_cmd=bb.utils.which(os.getenv(‘PATH’),”os-gnome-terminal-phonehome”)+” “+pidfile+” “+sh_cmd

sh_cmd = bb.utils.which(os.getenv(‘PATH’), “os-gnome-terminal-phonehome”)+” “+pidfile+” “+sh_cmd

sh_cmd = bb.utils.which(os.getenv(‘PATH’),”gnome-terminal”)+””+pidfile+””+sh_cmd

import oe.data

import oe.terminal

sh_cmd = “oe-gnome-terminal-phonehome ” + pidfile + ” ” + sh_cmd

TabError: inconsistent use of tabs and spaces in indentation

ERROR: linux-xlnx-4.9-xilinx-v2017.4+gitAUTOINC+b450e900fd-r0 do_menuconfig: Function failed: do_menuconfig

ERROR: Logfile of failure stored in: /home/work/petalinux/test_hdmi/ax_peta/build/tmp/work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUTOINC+b450e900fd-r0/temp/log.do_menuconfig.77499

ERROR: Task (/opt/pkg/petalinux/components/yocto/source/arm/layers/meta-xilinx/recipes-kernel/linux/linux-xlnx_4.9.bb:do_menuconfig) failed with exit code ‘1’

八,[Place 30-574] Poor placement for routing between an IO pin and BUFG. If this sub optimal condition is acceptable for this design, you may use the CLOCK_DEDICATED_ROUTE constraint in the .xdc file to demote this message to a WARNING. However, the use of this override is highly discouraged. These examples can be used directly in the .xdc file to override this clock rule.

< set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets clk_IBUF] >

clk_IBUF_inst (IBUF.O) is locked to IOB_X1Y66

and clk_IBUF_BUFG_inst (BUFG.I) is provisionally placed by clockplacer on BUFGCTRL_X0Y31

解决办法:添加约束set_property CLOCK_DEDICATED_ROUTE FALSE [get_nets clk]

九,OpenCV Error: Insufficient memory (Failed to allocate 307200 bytes) in OutOfMemoryError, file /opt/zedboard/opencv-3.1.0/modules/core/src/alloc.cpp, line 52

terminate called after throwing an instance of ‘cv::Exception’

what(): /opt/zedboard/opencv-3.1.0/modules/core/src/alloc.cpp:52: error: (-4) Failed to allocate 307200 bytes in function OutOfMemoryError

QSocketNotifier: Invalid socket 12 and type ‘Read’, disabling…

Aborted

翻译:

opencv错误:内存不足(未能分配307200字节)在OutOfMemoryError,文件/选择/ Zedboard / opencv-3.1.0/modules/core/src/alloc.cpp,线52

在抛出一个CV::异常的实例后终止调用

what():/选择/ Zedboard / opencv-3.1.0 /模块/核心/ SRC /分配。CPP:52:错误:(4)未能在功能OutOfMemoryError分配307200个字节

qsocketnotifier:无效的插座12型’读’,禁用…

中止

(1)如果是从新创造一个IplImage,则用IplImage* cvCreateImage( CvSize size, int depth, int nChannels ),它创建头并分配数据。或者IplImage* cvCreateImageHeader创建图像头,并用指针为其分配图像数据时。

注:当不再使用这个新图像时,要调用void cvReleaseImage( IplImage** image )将它的头和图像数据释放!

(2)如果有图像数据没有为图像头分配存储空间(即,没有为IplImage*指针分配动态存储空间),则先调用IplImage* cvCreateImageHeader( CvSize size, int depth, int nChannels )创建图像头,再调用void cvSetData( CvArr* arr, void* data, int step )指定图像数据,可以理解为将这个新图像的数据指针指向了一个已存在的图像数据上,不存在图像数据存储空间的分配操作。

注:当不再使用这个新图像时,要调用void cvReleaseImageHeader( IplImage** image )将它的图像头释放!

(3)如果有图像数据也有图像头(用于IplImage为静态分配存储空间的情况),则先调用IplImage* cvInitImageHeader( CvSize size, int depth, int nChannels )更改图像头,再调用void cvSetData( CvArr* arr, void* data, int step )指定图像数据。

注:因为这个新图像使用的是其它图像的数据和已有的图像头,所以不能使用cvReleaseImage将它的头和图像数据释放,也不能使用cvReleaseData将它的图像数据释放!

十,E: Unable to locate package lib

sudo apt-get update

sudo apt-get upgrade



版权声明:本文为wangjie36原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。