petalinux版本是2019.01。
用petalinux-config --get-hw-description=../hsi
时提示:
INFO: Getting hardware description...
INFO: Rename design_1_wrapper.hdf to system.hdf
[INFO] generating Kconfig for project
[INFO] menuconfig project
configuration written to /home/jason/Learn/Edge-AI-Platform-Tutorials/docs/DPU-Integration/reference-files/petalinux/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
ERROR: Failed to generate meta-plnx-generated layer
ERROR: Failed to config project.
ERROR: Get hw description Failed!.
查看build/config.log,提示:
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
File "genprop.py", line 40
print "\tINFO:"+conf+" not define in system config"
^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print("\tINFO:"+conf+" not define in system config")?
ERROR: Failed to generate meta-plnx-generated layer
看上去是python版本的问题。
xilinx forum上也有相应的帖子。
以及这篇帖子
因此,问题原因是petalinux-config不支持python3。
解决方法有两种:
- 修改~/.bashrc中的export,去掉anaconda3,让python默认的链接是python2.7;
- 用conda或virtualenv创建一个python2.7的虚拟环境,在这个环境下使用python2.7:
conda create --name petalinux python=2.7
conda activate petalinux