yoctoを使用してthisを参照してRaspberry pi 3の画像を構築しようとしています。エラーログでyoctoを使用してRaspberry pi 3の画像を構築する際に解析エラーが発生する
Pythonの関数の実行中に、エラーが言うが、エラーについての詳細いない、私は例外「例外:TypeError例外を:getVar()は、少なくとも3つの引数(2が与えられた)かかり」を参照してください可能性がありを。しかし、yoctoでは、getVarが2つの引数しか取っていないことがわかりました。
この問題を解決する方法を教えてください。私はd.getVar()の多くの場所を見ることができました。ここに何があるのか教えてください。私は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)
getVar関数{getVar(var、d、exp = False)}は内部で{d.getVar(var、exp)}を呼び出すdata.py(利用可能な@bitbake/lib/bb)で定義されています。 bbファイルに "import data"を追加しましたが、import文で解析エラーが出ます。 incファイルにも追加しようとすると同じ問題が発生します。このメタデータを "meta-raspberrypi"レイヤーにインポートする方法を教えてください。 – Ravi