Search code examples
pythonyoctobitbake

How to execute python script from bitbake bb file during yocto build


Question: Symilary as in subject - I want to execute python script during yocto build.

Problem description: I have ready python script witch I want to execute during processing bb file of some meta-layer. I have no idea how to do this properly. Does anybody can support me in this case?


Solution

  • All the "do_{something}" steps run bash commands, which should be able to run python scripts.

    You probably want to run it in do_install.

    Alternatively you can run these steps in python instead of bash by writing python before the name of the steps. For example:

    python do_install{
    

    I didn't test any of this personally, but I saw this done in different recipe files(the opencv recipe for example)