在 Ubuntu 20.04.1 LTS 上进行编译Yocto时报错,出现如下错误:
bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export PATH="/home/test/embeded/rockpis/yocto/poky/scripts:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot-native/usr/bin/aarch64-poky-linux:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot/usr/bin/crossscripts:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot-native/usr/sbin:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot-native/usr/bin:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot-native/sbin:/home/test/embeded/rockpis/yocto/poky/build/tmp/work/aarch64-poky-linux/create-ap/git-r0/recipe-sysroot-native/bin:/home/test/embeded/rockpis/yocto/poky/bitbake/bin:/home/test/embeded/rockpis/yocto/poky/build/tmp/hosttools"; export HOME="/home/test"; git -c core.fsyncobjectfiles=0 ls-remote https://github.com/oblique/create_ap.git failed with exit code 128, output:fatal: unable to access 'https://github.com/oblique/create_ap.git/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.Summary: There were 3 WARNING messages shown.Summary: There was 1 ERROR message shown, returning a non-zero exit code.
解决方法修改meta/classes/devtool-source.bbclass文件,如下:
DEVTOOL_TEMPDIR ?= "" DEVTOOL_PATCH_SRCDIR = "${DEVTOOL_TEMPDIR}/patchworkdir" # host Python fails to import correct _sysconfigdata if this variable is set_PYTHON_SYSCONFIGDATA_NAME[unexport] = "1" python() { tempdir = d.getVar('DEVTOOL_TEMPDIR')
参考Openembeded解决方法