On Thu, Nov 18, 2021 at 12:56 AM Daniel Díaz <daniel.diaz@linaro.org> wrote:
Hello!

Can you please also share the kernel recipe changes that you are using? 
 

+Rob, just to keep him in the loop of what we're finding.

The abomination below helps us work around the problem:

do_compile_prepend() {
    sed -i \
        -e 's#^%.dtb: dt_binding_check #%.dtb: #' \
        -e 's# \$(dtstree)/\$\*.dt.yaml$##' \
        ${S}/Makefile
}

hehe ;) 
  

Another thing I did not mention is that we're also seeing problems
with the dependencies pulled in while building dtschema, which are too
new for Python 3.5.5: f-strings and union types.

That is a bigger issue.. I suspect we should be able to easily fix the PATH issue you have.. but if dtschema does not work with python 3.5.5 which is the one you have in sumo, then there isn't much which can be done.. 


Greetings!

Daniel Díaz
daniel.diaz@linaro.org


On Wed, 17 Nov 2021 at 15:58, Daniel Díaz <daniel.diaz@linaro.org> wrote:
>
> Hello!
>
> We've been encountering a problem with recent kernels (post 5.15,
> since this commit [0]) which require a Python3 package called dtschema
> [1] (Rob Herring is a maintainer). This is easily installed via pip3
> [2] and a recipe works fine for OpenEmbedded [3], even in the ancient
> Sumo we're using (well, at least everything seems to be in place).
>
> The problem we're seeing is with the PATH set by the recipe, which has
> /poky/build/tmp/hosttools/ as the last bit in it. but no reference to
> the native Python (recipe-sysroot-native/usr/bin/python3-native/)
> built within OE. This version of Python (3.7.3) is from the host, and
> does not have the dtschema package in it (even if it's installed,
> dtschema fails to run).
>
> I have tried inheriting python3native in the kernel recipe, which
> defines PYTHON and other related variables, but it still fails to use
> the right python3 binary.
>
> Is there a recommended way to get the python3-native path into the PATH?
>
> Thanks and greetings!
>
> Daniel Díaz
> daniel.diaz@linaro.org
>
> [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=53182e81f47d4ea0c727c49ad23cb782173ab849
> [1] https://github.com/devicetree-org/dt-schema/
> [2] https://pypi.org/project/dtschema/
> [3] https://github.com/mrchapp/meta-lkft/blob/d/add-dtschema/recipes-devtools/python/dtschema_2021.10.bb
_______________________________________________
OpenEmbedded mailing list
OpenEmbedded@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/openembedded