Hi Michael, On 16/04/19 21:57, Monaghan, Michael L. (GSFC-5870) wrote: > Hello all, > > > > Thank you in advance for your time. I’m new to the Yocto Project and > OpenEmbedded. > > > > I am trying to add the meta-xilinx-tools layer to a working Yocto/OE > build for the zcu102 board, but bitbake subsequently fails to parse > meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb. Here > are some snippets from the console. > > > > WARNING: > /yocto/projects/yocto-zcu102/build/../meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb: > Error during finalise of > /yocto/projects/yocto-zcu102/build/../meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb > > … > > ERROR: Unable to parse > /yocto/projects/yocto-zcu102/build/../meta-xilinx/meta-xilinx-bsp/recipes-bsp/device-tree/device-tree.bb:20:23 > > Traceback (most recent call last): > > … > > File "/yocto/projects/yocto-zcu102/bitbake/lib/bb/codeparser.py", line > 327, in PythonParser.parse_python(node="\n\t[ -e > ${DTS_FILES_PATH}/system.dts ] && rm ${DTS_FILES_PATH}/system.dts\n > bb.build.exec_func('devicetree_do_compile', d)\n", lineno=1, > filename='autogenerated'): > > code = compile(check_indent(str(node)), filename, "exec", > > > ast.PyCF_ONLY_AST) > > > > File "autogenerated", line 2 > > [ -e ${DTS_FILES_PATH}/system.dts ] && rm ${DTS_FILES_PATH}/system.dts > > ^ > > SyntaxError: invalid syntax > > > > > > Summary: There were 10 WARNING messages shown. > > Summary: There was 1 ERROR message shown, returning a non-zero exit code. > > > > I found the offending function at > meta-xilinx-tools/recipes-bsp/device-tree/device-tree.bbappend:71 > > > > do_compile_prepend() { > > [ -e ${DTS_FILES_PATH}/system.dts ] && > rm ${DTS_FILES_PATH}/system.dts > > } > > > > And it appears to ultimately override this python function at > openembedded-core/meta/classes/devicetree.bbclass:119 > > > > python devicetree_do_compile() { > > … > > } > > > > devicetree.bbappend:do_compile_prepend() is clearly a shell script, but > the “SyntaxError: invalid syntax” message indicates that *it is being > parsed as a python function!* It looks like this could be a problem with > bitbake or yocto/oe but I thought I would reach out to the community > here first. Has anyone here encountered this?
append and prepend functions must use the same language as the function being appended/prepended. Either all python or all shell, no mixing allowed. That's because bitbake simply concatenates the prepends, base functions and appends and then parses the result as a whole. For the problem you're facing a patch has been sent by Jean-Francois, check it out: https://lists.yoctoproject.org/pipermail/meta-xilinx/2019-January/004205.html -- Luca -- _______________________________________________ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx