Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用yocto为Raspberry pi 3生成图像时分析错误_Python_Linux_Raspberry Pi_Yocto - Fatal编程技术网

Python 使用yocto为Raspberry pi 3生成图像时分析错误

Python 使用yocto为Raspberry pi 3生成图像时分析错误,python,linux,raspberry-pi,yocto,Python,Linux,Raspberry Pi,Yocto,我试图通过引用使用yocto为Raspberry pi 3构建图像,在运行bitbake命令时,我遇到以下错误 在错误日志中,它在执行python函数时显示error,但没有关于错误的详细信息,我可以看到异常“exception:TypeError:getVar()至少接受3个参数(给定2个)”。但在yocto的许多地方,我可以看到getVar只接受了两个参数 你能指导解决这个问题吗。我可以在很多地方看到d.getVar(),你能告诉我这里的d是什么吗?我在yocto文档中搜索了一下,但没有找到

我试图通过引用使用yocto为Raspberry pi 3构建图像,在运行bitbake命令时,我遇到以下错误

在错误日志中,它在执行python函数时显示error,但没有关于错误的详细信息,我可以看到异常“exception:TypeError:getVar()至少接受3个参数(给定2个)”。但在yocto的许多地方,我可以看到getVar只接受了两个参数

你能指导解决这个问题吗。我可以在很多地方看到d.getVar(),你能告诉我这里的d是什么吗?我在yocto文档中搜索了一下,但没有找到任何解释d是什么的信息

ERROR: /home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was: File: '<code>', lineno: 17, function: <module>
     0013:__anon_146__home_ubuntu_raspberryYocto_poky_meta_classes_siteinfo_bbclass(d)
     0014:__anon_381__home_ubuntu_raspberryYocto_poky_meta_classes_kernel_yocto_bbclass(d)
     0015:__anon_6__home_ubuntu_raspberryYocto_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
     0016:__anon_148__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)  *** 0017:__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d) File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 38, function:
__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
     0034:# See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
     0035:python __anonymous () {
     0036:    kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
     0037:    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))  *** 0038:    d.setVar("KERNEL_DEVICETREE", kerneldt)
     0039:}
     0040:
     0041:do_kernel_configme_prepend() {
     0042:    install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available." File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass', lineno: 6, function: get_dts
     0002:
     0003:def get_dts(d, ver=None):
     0004:    import re
     0005:  *** 0006:    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
     0007:    dts = d.getVar("KERNEL_DEVICETREE")
     0008:
     0009:    # d.getVar() might return 'None' as a normal string
     0010:    # leading to 'is None' check isn't enough. Exception: TypeError: getVar() takes at least 3 arguments (2 given)

ERROR: Failed to parse recipe: /home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb ERROR: /home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.4.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was: File: '<code>', lineno: 17, function: <module>
     0013:__anon_146__home_ubuntu_raspberryYocto_poky_meta_classes_siteinfo_bbclass(d)
     0014:__anon_381__home_ubuntu_raspberryYocto_poky_meta_classes_kernel_yocto_bbclass(d)
     0015:__anon_6__home_ubuntu_raspberryYocto_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
     0016:__anon_148__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)  *** 0017:__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d) File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 38, function:
__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
     0034:# See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
     0035:python __anonymous () {
     0036:    kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
     0037:    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))  *** 0038:    d.setVar("KERNEL_DEVICETREE", kerneldt)
     0039:}
     0040:
     0041:do_kernel_configme_prepend() {
     0042:    install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available." File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass', lineno: 6, function: get_dts
     0002:
     0003:def get_dts(d, ver=None):
     0004:    import re
     0005:  *** 0006:    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
     0007:    dts = d.getVar("KERNEL_DEVICETREE")
     0008:
     0009:    # d.getVar() might return 'None' as a normal string
     0010:    # leading to 'is None' check isn't enough. Exception: TypeError: getVar() takes at least 3 arguments (2 given)

ERROR: /home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_dev.bb: Error executing a python function in <code>:

The stack trace of python calls that resulted in this exception/failure was: File: '<code>', lineno: 17, function: <module>
     0013:__anon_146__home_ubuntu_raspberryYocto_poky_meta_classes_siteinfo_bbclass(d)
     0014:__anon_381__home_ubuntu_raspberryYocto_poky_meta_classes_kernel_yocto_bbclass(d)
     0015:__anon_6__home_ubuntu_raspberryYocto_poky_meta_recipes_kernel_linux_linux_dtb_inc(d)
     0016:__anon_148__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_rpi_inc(d)  *** 0017:__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc(d) File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi.inc', lineno: 38, function:
__anon_39__home_ubuntu_raspberryYocto_meta_raspberrypi_recipes_kernel_linux_linux_raspberrypi_inc
     0034:# See http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python-functions
     0035:python __anonymous () {
     0036:    kerneltype = d.getVar('KERNEL_IMAGETYPE', True)
     0037:    kerneldt = get_dts(d, d.getVar('LINUX_VERSION', True))  *** 0038:    d.setVar("KERNEL_DEVICETREE", kerneldt)
     0039:}
     0040:
     0041:do_kernel_configme_prepend() {
     0042:    install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available." File: '/home/ubuntu/raspberryYocto/meta-raspberrypi/classes/linux-raspberrypi-base.bbclass', lineno: 6, function: get_dts
     0002:
     0003:def get_dts(d, ver=None):
     0004:    import re
     0005:  *** 0006:    staging_dir = d.getVar("STAGING_KERNEL_BUILDDIR")
     0007:    dts = d.getVar("KERNEL_DEVICETREE")
     0008:
     0009:    # d.getVar() might return 'None' as a normal string
     0010:    # leading to 'is None' check isn't enough. Exception: TypeError: getVar() takes at least 3 arguments (2 given)
ERROR:/home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.9.bb:在
中执行python函数时出错:
导致此异常/失败的python调用的堆栈跟踪是:文件:“
”,行号:17,函数:
0013:uuuu anon_146_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_uclasses_siteinfo_bbclass(d)
0014:uuuu anon_u381_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_u类kernel_yocto_bbclass(d)
0015:uuuu anon_u6_uuhome_uuubuntu_RaspberryOcto_poky_meta_u配方u内核linux linux dtb_inc.(d)
0016:uuu anon_148_uhome_uubuntu RaspberryOcto_MetaRaspberryPi_KernelLinux linux linux rpi_inc(d)***0017:uu anon_148;home_uUubuntuRaspberryOcto RaspberryOcto raspberrypi_KernelLinux linux linux raspberrypi inc(d)文件:'/home/ubuntu/RaspberryOcto raspberrypi/raspberrypi/linux.38,函数号:
__anon_39___home_ubuntu_RaspberryOcto_meta_raspberrypi_配方_内核_linux_linux_raspberrypi_公司
0034:#见http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python函数
0035:python匿名(){
0036:kerneltype=d.getVar('KERNEL\u IMAGETYPE',True)
0037:kerneldt=get\u dts(d,d.getVar('LINUX\u VERSION',True))***0038:d.setVar(“内核设备树”,kerneldt)
0039:}
0040:
0041:do_kernel_configme_prepend(){
0042:install-m0644${S}/arch/${arch}/configs/${KERNEL_-DEFCONFIG}${WORKDIR}/DEFCONFIG | | die“没有可用的${MACHINE}/${KERNEL_-DEFCONFIG}的默认配置。”文件:'/home/ubuntu/ubuntu/raspberryYocto/meta-raspberrypi/classes/linux-raspberrypi base.bbclass',行号:6,函数:get_dts
0002:
0003:def get_dts(d,版本=无):
0004:进口可再生能源
0005:**0006:staging\u dir=d.getVar(“staging\u KERNEL\u BUILDDIR”)
0007:dts=d.getVar(“内核设备树”)
0008:
0009:#d.getVar()可能会将“None”作为普通字符串返回
0010:#导致“is None”检查是不够的。异常:TypeError:getVar()至少接受3个参数(给定2个)
错误:无法解析配方:/home/ubuntu/RaspberryOcto/meta-raspberrypi/recipes内核/linux/linux-raspberrypi_4.9.bb错误:/home/ubuntu/RaspberryOcto/meta-raspberrypi/recipes内核/linux/linux-raspberrypi_4.4.bb:在
中执行python函数时出错:
导致此异常/失败的python调用的堆栈跟踪是:文件:“
”,行号:17,函数:
0013:uuuu anon_146_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_uclasses_siteinfo_bbclass(d)
0014:uuuu anon_u381_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_u类kernel_yocto_bbclass(d)
0015:uuuu anon_u6_uuhome_uuubuntu_RaspberryOcto_poky_meta_u配方u内核linux linux dtb_inc.(d)
0016:uuu anon_148_uhome_uubuntu RaspberryOcto_MetaRaspberryPi_KernelLinux linux linux rpi_inc(d)***0017:uu anon_148;home_uUubuntuRaspberryOcto RaspberryOcto raspberrypi_KernelLinux linux linux raspberrypi inc(d)文件:'/home/ubuntu/RaspberryOcto raspberrypi/raspberrypi/linux.38,函数号:
__anon_39___home_ubuntu_RaspberryOcto_meta_raspberrypi_配方_内核_linux_linux_raspberrypi_公司
0034:#见http://www.yoctoproject.org/docs/current/bitbake-user-manual/bitbake-user-manual.html#anonymous-python函数
0035:python匿名(){
0036:kerneltype=d.getVar('KERNEL\u IMAGETYPE',True)
0037:kerneldt=get\u dts(d,d.getVar('LINUX\u VERSION',True))***0038:d.setVar(“内核设备树”,kerneldt)
0039:}
0040:
0041:do_kernel_configme_prepend(){
0042:install-m0644${S}/arch/${arch}/configs/${KERNEL_-DEFCONFIG}${WORKDIR}/DEFCONFIG | | die“没有可用的${MACHINE}/${KERNEL_-DEFCONFIG}的默认配置。”文件:'/home/ubuntu/ubuntu/raspberryYocto/meta-raspberrypi/classes/linux-raspberrypi base.bbclass',行号:6,函数:get_dts
0002:
0003:def get_dts(d,版本=无):
0004:进口可再生能源
0005:**0006:staging\u dir=d.getVar(“staging\u KERNEL\u BUILDDIR”)
0007:dts=d.getVar(“内核设备树”)
0008:
0009:#d.getVar()可能会将“None”作为普通字符串返回
0010:#导致“is None”检查是不够的。异常:TypeError:getVar()至少接受3个参数(给定2个)
错误:/home/ubuntu/raspberryYocto/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi_dev.bb:在
中执行python函数时出错:
导致此异常/失败的python调用的堆栈跟踪是:文件:“
”,行号:17,函数:
0013:uuuu anon_146_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_uclasses_siteinfo_bbclass(d)
0014:uuuu anon_u381_uuuhome_uuuubuntu_RaspberryOcto_poky_meta_u类kernel_yocto_bbclass(d)
0015:uuuu anon_u6_uuhome_uuubuntu_RaspberryOcto_poky_meta_u配方u内核linux linux dtb_inc.(d)
0016:uuu anon_148_uhome_uubuntu RaspberryOcto_MetaRaspberryPi_KernelLinux linux linux rpi_inc(d)***0017:uu anon_148;home_uUubuntuRaspberryOcto RaspberryOcto raspberrypi_KernelLinux linux linux raspberrypi inc(d)文件:'/home/ubuntu/RaspberryOcto raspberrypi/raspberrypi/linux.38,函数号:
__anon_39___home_ubuntu_RaspberryOcto_meta_raspberrypi_配方_内核_linux_linux_raspberrypi_公司
0034:#见http://www.yoctoproject.org/docs/current