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

后端 未结 5 1321
旧时难觅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:33

    bitbake -Dfoo=bar oe-myimage
    

    -D flag is not recognized by bitbake. So, using above method will not work. Instead you could specify flags from command line using following steps -

    Say you want to export variable foo and expect it be recognized by bitbake.

    export foo="foobar"
    

    You will need to export this and inform bitbake via BB_ENV_EXTRAWHITE variable after sourcing oe-init-build-env. This means

    . oe-init-build-env
    export foo="foobar"
    export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE foo"      
    

    This whitelists variable 'foo' for bitbake and thus makes it visible to any recipe and subprocess during the build.

    After this you can invoke any bitbake operations using variable foo within bitbake via expressions like -

    ${foo}
    

提交回复
热议问题