The mechanism used by BitBake to fetch source code is internally called the fetcher backend. There are several fetcher backends supported, which can be configured to align user requirements and optimize source code fetching.
BitBake supports several protocols for remote file downloads. The most commonly used are http://
, https://
, and git://
. When BitBake executes the do_fetch
task in a recipe, it checks the contents of SRC_URI
. We will discover, through the various fetchers, how to proceed based on our need.
The local file fetcher submodule handles URLs that begin with file://
. The filename you specify within the URL can either be an absolute or relative path to a file. For example, with a file called my_source_file.c
, we must write the SRC_URI
attribute's content like this:
SRC_URI = "file://my_source_file.c"