Is it possible to pass in command line variables to a bitbake build?

后端 未结 5 1320
旧时难觅i
旧时难觅i 2021-02-04 01:50

I have an OpenEmbedded environment using bitbake to do some builds. I wanted to get something \"interactive\" going on where bitbake would pause and ask for input then continue

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-04 02:52

    There's also a convenient command-line way to do this, that's described in the bitbake manual using BB_ORIGENV:

    Sometimes, it is useful to be able to obtain information from the original execution environment. Bitbake saves a copy of the original environment into a special variable named BB_ORIGENV.

    To do so, you could read a variable exactly as they suggest (from a Python function):

     origenv = d.getVar("BB_ORIGENV", False)
     bar = origenv.getVar("BAR", False)
    

    Then, the way to pass that from the command line is simply:

    BAR=somevalue bitbake myimage
    

提交回复
热议问题