0

I am trying to build an embedded image where some kernel scripts are in python 2.

The project is abl/tianocore/edk2

It is part of kernel 5.15, it contains some scripts inside Tests folder

In the layer.conf for that layer The tools are listed like this

# Tools needed on the build host for usage within build tasks by recipes of this layer.
HOSTTOOLS_NONFATAL += "xgettext msgmerge msgfmt gmsgfmt java zip python python2 flex bison"

The make file for Tests folder contains this line

@python RunTests.py

When I execute the make file from command line no errors are thrown

But when I try to build the image using bitbake.

I get syntax errors because the scripts are in python 2 and it is using python3 to compile them

In the make file if I replace

@python RunTests.py

with

@/usr/bin/python RunTests.py

There is no error thrown as it uses the correct python but I can't do this for all make files.

How do I make yocto/poky pick the correct python

Random Dude
  • 43
  • 1
  • 4

0 Answers0