OpenEmbedded uses SRC_URI to determine where the source code is taken from. For many projects it would be convenient to use source code from local repository due to many reasons, in order to support that, it is possible to use file URI as ‘file://’
For example,
SRC_URI=”file:///path/to/local_repo/whatever_project”
This can create problem because it is not sharable between different people due to absolute path. It may be possible to update FILESPATH varible, but I preferred to use the following method.
- In $HOME/.bashrc, export a new environment variable, say LOCAL_REPO
export LOCAL_REPO='/path/to/local_repo'
- In /path/to/oe/source-me.txt, add the following lines
if [ -z ${LOCAL_REPO} ]; then echo No LOCAL_REPO environment variable set return 2 fi export BB_ENV_EXTRAWHITE="${BB_ENV_EXTRAWHITE} LOCAL_REPO"
- In related bb files, use SRC_URI as
SRC_URI = "file://${LOCAL_REPO}/whatever_project"