ERROR: Failed .. bitbake ERROR: Failed..project. ERROR: Get hw description Failed 终极解决方案

ERROR: Failed to source bitbake ERROR: Failed to config project. ERROR: Get hw description Failed!.

pelalinux版本:2018.3

报错信息如下:

$ petalinux-config --get-hw-description ../hdf/Navigator_7020.sdk/
INFO: Getting hardware description...
INFO: Rename navigator_7020_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project


*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to config project.
ERROR: Get hw description Failed!.

每个人的遇到这个问题的原因可能都不太一样,导致度娘搜的解决方法都不一定有用,这个时候我们可以去打开你当前工程路径下的build/config.log,这个是配置生成的日志文件,绝大部分的问题都可以通过查看该日志文件去定位和解决;
以下是我的编译日志:

  1 [INFO] generating Kconfig for project
  2 INFO: [Hsi 55-1698] elapsed time for repository loading 0 seconds
  3 [INFO] menuconfig project
  4 /home/lyq/workspace/xilinx/petalinux/zynq-1/build/misc/config/Kconfig.syshw:29:warning: defaults for choice values not s    upported
  5 /home/lyq/workspace/xilinx/petalinux/zynq-1/build/misc/config/Kconfig:630:warning: config symbol defined without type
  6 [INFO] sourcing bitbake
  7 SDK environment now set up; additionally you may now run devtool to perform development tasks.
  8 Run devtool --help for further details.
  9 OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
 10 Please set up python v2 as your default 'python' interpreter.
 11 ERROR: Failed to source bitbake

可以清楚的看到第9行,提示python版本不对,第10行建议我把python的版本降到2.x,我目前使用的python是3.x,所以编译失败,更换一下:

$ petalinux-config --get-hw-description ../hdf/Navigator_7020.sdk/
INFO: Getting hardware description...
INFO: Rename navigator_7020_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /home/lyq/workspace/xilinx/petalinux/zynq-1/project-spec/configs/config

*** End of the configuration.
*** Execute 'make' to start the build or try 'make help'.

[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time ! 
[INFO] generating u-boot configuration files
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
[INFO] oldconfig rootfs
[INFO] generating petalinux-user-image.bb

成功!

上一篇:Python 文件同步脚本


下一篇:javascript 入门基础