petalinux-config --get-hw-description=
.
报错
[INFO] sourcing bitbake
ERROR: Failed to source bitbake
ERROR: Failed to config project.
ERROR: Get hw description Failed!.
vi ./build/config.log
Run devtool --help for further details.
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python v3.
Please set up python v2 as your default 'python' interpreter.
ERROR: Failed to source bitbake
python版本不对,在config.log中会有提示,应该将python版本设置为2.xx,而不是3.xx
折腾了半天发觉是安装了pyenv导致的python版本混乱,卸载后问题解决了。(卸载过程见https://github.com/pyenv/pyenv/blob/master/README.md#uninstalling-python-versions)
还需要将~/.bashrc中的相应代码行注释掉
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile $ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
还有pyenv init行
能正常config build。
以后