bitbake-user-manual-ref-variables.rst 68 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617
  1. .. SPDX-License-Identifier: CC-BY-2.5
  2. ==================
  3. Variables Glossary
  4. ==================
  5. |
  6. This chapter lists common variables used by BitBake and gives an
  7. overview of their function and contents.
  8. .. note::
  9. Following are some points regarding the variables listed in this
  10. glossary:
  11. - The variables listed in this glossary are specific to BitBake.
  12. Consequently, the descriptions are limited to that context.
  13. - Also, variables exist in other systems that use BitBake (e.g. The
  14. Yocto Project and OpenEmbedded) that have names identical to those
  15. found in this glossary. For such cases, the variables in those
  16. systems extend the functionality of the variable as it is
  17. described here in this glossary.
  18. .. glossary::
  19. :sorted:
  20. :term:`ASSUME_PROVIDED`
  21. Lists recipe names (:term:`PN` values) BitBake does not
  22. attempt to build. Instead, BitBake assumes these recipes have already
  23. been built.
  24. In OpenEmbedded-Core, :term:`ASSUME_PROVIDED` mostly specifies native
  25. tools that should not be built. An example is ``git-native``, which
  26. when specified allows for the Git binary from the host to be used
  27. rather than building ``git-native``.
  28. :term:`AZ_SAS`
  29. Azure Storage Shared Access Signature, when using the
  30. :ref:`Azure Storage fetcher <bitbake-user-manual/bitbake-user-manual-fetching:fetchers>`
  31. This variable can be defined to be used by the fetcher to authenticate
  32. and gain access to non-public artifacts::
  33. AZ_SAS = ""se=2021-01-01&sp=r&sv=2018-11-09&sr=c&skoid=<skoid>&sig=<signature>""
  34. For more information see Microsoft's Azure Storage documentation at
  35. https://docs.microsoft.com/en-us/azure/storage/common/storage-sas-overview
  36. :term:`B`
  37. The directory in which BitBake executes functions during a recipe's
  38. build process.
  39. :term:`BB_ALLOWED_NETWORKS`
  40. Specifies a space-delimited list of hosts that the fetcher is allowed
  41. to use to obtain the required source code. Following are
  42. considerations surrounding this variable:
  43. - This host list is only used if
  44. :term:`BB_NO_NETWORK` is either not set or
  45. set to "0".
  46. - Limited support for the "``*``" wildcard character for matching
  47. against the beginning of host names exists. For example, the
  48. following setting matches ``git.gnu.org``, ``ftp.gnu.org``, and
  49. ``foo.git.gnu.org``. ::
  50. BB_ALLOWED_NETWORKS = "\*.gnu.org"
  51. .. important::
  52. The use of the "``*``" character only works at the beginning of
  53. a host name and it must be isolated from the remainder of the
  54. host name. You cannot use the wildcard character in any other
  55. location of the name or combined with the front part of the
  56. name.
  57. For example, ``*.foo.bar`` is supported, while ``*aa.foo.bar``
  58. is not.
  59. - Mirrors not in the host list are skipped and logged in debug.
  60. - Attempts to access networks not in the host list cause a failure.
  61. Using :term:`BB_ALLOWED_NETWORKS` in conjunction with
  62. :term:`PREMIRRORS` is very useful. Adding the
  63. host you want to use to :term:`PREMIRRORS` results in the source code
  64. being fetched from an allowed location and avoids raising an error
  65. when a host that is not allowed is in a
  66. :term:`SRC_URI` statement. This is because the
  67. fetcher does not attempt to use the host listed in :term:`SRC_URI` after
  68. a successful fetch from the :term:`PREMIRRORS` occurs.
  69. :term:`BB_BASEHASH_IGNORE_VARS`
  70. Lists variables that are excluded from checksum and dependency data.
  71. Variables that are excluded can therefore change without affecting
  72. the checksum mechanism. A common example would be the variable for
  73. the path of the build. BitBake's output should not (and usually does
  74. not) depend on the directory in which it was built.
  75. :term:`BB_CACHEDIR`
  76. Specifies the code parser cache directory (distinct from :term:`CACHE`
  77. and :term:`PERSISTENT_DIR` although they can be set to the same value
  78. if desired). The default value is "${TOPDIR}/cache".
  79. :term:`BB_CHECK_SSL_CERTS`
  80. Specifies if SSL certificates should be checked when fetching. The default
  81. value is ``1`` and certificates are not checked if the value is set to ``0``.
  82. :term:`BB_HASH_CODEPARSER_VALS`
  83. Specifies values for variables to use when populating the codeparser cache.
  84. This can be used selectively to set dummy values for variables to avoid
  85. the codeparser cache growing on every parse. Variables that would typically
  86. be included are those where the value is not significant for where the
  87. codeparser cache is used (i.e. when calculating variable dependencies for
  88. code fragments.) The value is space-separated without quoting values, for
  89. example::
  90. BB_HASH_CODEPARSER_VALS = "T=/ WORKDIR=/ DATE=1234 TIME=1234"
  91. :term:`BB_CONSOLELOG`
  92. Specifies the path to a log file into which BitBake's user interface
  93. writes output during the build.
  94. :term:`BB_CURRENTTASK`
  95. Contains the name of the currently running task. The name does not
  96. include the ``do_`` prefix.
  97. :term:`BB_CURRENT_MC`
  98. Contains the name of the current multiconfig a task is being run under.
  99. The name is taken from the multiconfig configuration file (a file
  100. ``mc1.conf`` would make this variable equal to ``mc1``).
  101. :term:`BB_DEFAULT_TASK`
  102. The default task to use when none is specified (e.g. with the ``-c``
  103. command line option). The task name specified should not include the
  104. ``do_`` prefix.
  105. :term:`BB_DEFAULT_UMASK`
  106. The default umask to apply to tasks if specified and no task specific
  107. umask flag is set.
  108. :term:`BB_DISKMON_DIRS`
  109. Monitors disk space and available inodes during the build and allows
  110. you to control the build based on these parameters.
  111. Disk space monitoring is disabled by default. When setting this
  112. variable, use the following form::
  113. BB_DISKMON_DIRS = "<action>,<dir>,<threshold> [...]"
  114. where:
  115. <action> is:
  116. HALT: Immediately halt the build when
  117. a threshold is broken.
  118. STOPTASKS: Stop the build after the currently
  119. executing tasks have finished when
  120. a threshold is broken.
  121. WARN: Issue a warning but continue the
  122. build when a threshold is broken.
  123. Subsequent warnings are issued as
  124. defined by the
  125. BB_DISKMON_WARNINTERVAL variable,
  126. which must be defined.
  127. <dir> is:
  128. Any directory you choose. You can specify one or
  129. more directories to monitor by separating the
  130. groupings with a space. If two directories are
  131. on the same device, only the first directory
  132. is monitored.
  133. <threshold> is:
  134. Either the minimum available disk space,
  135. the minimum number of free inodes, or
  136. both. You must specify at least one. To
  137. omit one or the other, simply omit the value.
  138. Specify the threshold using G, M, K for Gbytes,
  139. Mbytes, and Kbytes, respectively. If you do
  140. not specify G, M, or K, Kbytes is assumed by
  141. default. Do not use GB, MB, or KB.
  142. Here are some examples::
  143. BB_DISKMON_DIRS = "HALT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
  144. BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
  145. BB_DISKMON_DIRS = "HALT,${TMPDIR},,100K"
  146. The first example works only if you also set the
  147. :term:`BB_DISKMON_WARNINTERVAL`
  148. variable. This example causes the build system to immediately halt
  149. when either the disk space in ``${TMPDIR}`` drops below 1 Gbyte or
  150. the available free inodes drops below 100 Kbytes. Because two
  151. directories are provided with the variable, the build system also
  152. issues a warning when the disk space in the ``${SSTATE_DIR}``
  153. directory drops below 1 Gbyte or the number of free inodes drops
  154. below 100 Kbytes. Subsequent warnings are issued during intervals as
  155. defined by the :term:`BB_DISKMON_WARNINTERVAL` variable.
  156. The second example stops the build after all currently executing
  157. tasks complete when the minimum disk space in the ``${TMPDIR}``
  158. directory drops below 1 Gbyte. No disk monitoring occurs for the free
  159. inodes in this case.
  160. The final example immediately halts the build when the number of
  161. free inodes in the ``${TMPDIR}`` directory drops below 100 Kbytes. No
  162. disk space monitoring for the directory itself occurs in this case.
  163. :term:`BB_DISKMON_WARNINTERVAL`
  164. Defines the disk space and free inode warning intervals.
  165. If you are going to use the :term:`BB_DISKMON_WARNINTERVAL` variable, you
  166. must also use the :term:`BB_DISKMON_DIRS`
  167. variable and define its action as "WARN". During the build,
  168. subsequent warnings are issued each time disk space or number of free
  169. inodes further reduces by the respective interval.
  170. If you do not provide a :term:`BB_DISKMON_WARNINTERVAL` variable and you
  171. do use :term:`BB_DISKMON_DIRS` with the "WARN" action, the disk
  172. monitoring interval defaults to the following:
  173. BB_DISKMON_WARNINTERVAL = "50M,5K"
  174. When specifying the variable in your configuration file, use the
  175. following form::
  176. BB_DISKMON_WARNINTERVAL = "<disk_space_interval>,<disk_inode_interval>"
  177. where:
  178. <disk_space_interval> is:
  179. An interval of memory expressed in either
  180. G, M, or K for Gbytes, Mbytes, or Kbytes,
  181. respectively. You cannot use GB, MB, or KB.
  182. <disk_inode_interval> is:
  183. An interval of free inodes expressed in either
  184. G, M, or K for Gbytes, Mbytes, or Kbytes,
  185. respectively. You cannot use GB, MB, or KB.
  186. Here is an example::
  187. BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
  188. BB_DISKMON_WARNINTERVAL = "50M,5K"
  189. These variables cause BitBake to
  190. issue subsequent warnings each time the available disk space further
  191. reduces by 50 Mbytes or the number of free inodes further reduces by
  192. 5 Kbytes in the ``${SSTATE_DIR}`` directory. Subsequent warnings
  193. based on the interval occur each time a respective interval is
  194. reached beyond the initial warning (i.e. 1 Gbytes and 100 Kbytes).
  195. :term:`BB_ENV_PASSTHROUGH`
  196. Specifies the internal list of variables to allow through from
  197. the external environment into BitBake's datastore. If the value of
  198. this variable is not specified (which is the default), the following
  199. list is used: :term:`BBPATH`, :term:`BB_PRESERVE_ENV`,
  200. :term:`BB_ENV_PASSTHROUGH`, and :term:`BB_ENV_PASSTHROUGH_ADDITIONS`.
  201. .. note::
  202. You must set this variable in the external environment in order
  203. for it to work.
  204. :term:`BB_ENV_PASSTHROUGH_ADDITIONS`
  205. Specifies an additional set of variables to allow through from the
  206. external environment into BitBake's datastore. This list of variables
  207. are on top of the internal list set in
  208. :term:`BB_ENV_PASSTHROUGH`.
  209. .. note::
  210. You must set this variable in the external environment in order
  211. for it to work.
  212. :term:`BB_FETCH_PREMIRRORONLY`
  213. When set to "1", causes BitBake's fetcher module to only search
  214. :term:`PREMIRRORS` for files. BitBake will not
  215. search the main :term:`SRC_URI` or
  216. :term:`MIRRORS`.
  217. :term:`BB_FILENAME`
  218. Contains the filename of the recipe that owns the currently running
  219. task. For example, if the ``do_fetch`` task that resides in the
  220. ``my-recipe.bb`` is executing, the :term:`BB_FILENAME` variable contains
  221. "/foo/path/my-recipe.bb".
  222. :term:`BB_GENERATE_MIRROR_TARBALLS`
  223. Causes tarballs of the Git repositories, including the Git metadata,
  224. to be placed in the :term:`DL_DIR` directory. Anyone
  225. wishing to create a source mirror would want to enable this variable.
  226. For performance reasons, creating and placing tarballs of the Git
  227. repositories is not the default action by BitBake. ::
  228. BB_GENERATE_MIRROR_TARBALLS = "1"
  229. :term:`BB_GENERATE_SHALLOW_TARBALLS`
  230. Setting this variable to "1" when :term:`BB_GIT_SHALLOW` is also set to
  231. "1" causes bitbake to generate shallow mirror tarballs when fetching git
  232. repositories. The number of commits included in the shallow mirror
  233. tarballs is controlled by :term:`BB_GIT_SHALLOW_DEPTH`.
  234. If both :term:`BB_GIT_SHALLOW` and :term:`BB_GENERATE_MIRROR_TARBALLS` are
  235. enabled, bitbake will generate shallow mirror tarballs by default for git
  236. repositories. This separate variable exists so that shallow tarball
  237. generation can be enabled without needing to also enable normal mirror
  238. generation if it is not desired.
  239. For example usage, see :term:`BB_GIT_SHALLOW`.
  240. :term:`BB_GIT_SHALLOW`
  241. Setting this variable to "1" enables the support for fetching, using and
  242. generating mirror tarballs of `shallow git repositories <https://riptutorial.com/git/example/4584/shallow-clone>`_.
  243. The external `git-make-shallow <https://git.openembedded.org/bitbake/tree/bin/git-make-shallow>`_
  244. script is used for shallow mirror tarball creation.
  245. When :term:`BB_GIT_SHALLOW` is enabled, bitbake will attempt to fetch a shallow
  246. mirror tarball. If the shallow mirror tarball cannot be fetched, it will
  247. try to fetch the full mirror tarball and use that.
  248. This setting causes an initial shallow clone instead of an initial full bare clone.
  249. The amount of data transferred during the initial clone will be significantly reduced.
  250. However, every time the source revision (referenced in :term:`SRCREV`)
  251. changes, regardless of whether the cache within the download directory
  252. (defined by :term:`DL_DIR`) has been cleaned up or not,
  253. the data transfer may be significantly higher because entirely
  254. new shallow clones are required for each source revision change.
  255. Over time, numerous shallow clones may cumulatively transfer
  256. the same amount of data as an initial full bare clone.
  257. This is especially the case with very large repositories.
  258. Existing initial full bare clones, created without this setting,
  259. will still be utilized.
  260. If the Git error "Server does not allow request for unadvertised object"
  261. occurs, an initial full bare clone is fetched automatically.
  262. This may happen if the Git server does not allow the request
  263. or if the Git client has issues with this functionality.
  264. See also :term:`BB_GIT_SHALLOW_DEPTH` and
  265. :term:`BB_GENERATE_SHALLOW_TARBALLS`.
  266. Example usage::
  267. BB_GIT_SHALLOW ?= "1"
  268. # Keep only the top commit
  269. BB_GIT_SHALLOW_DEPTH ?= "1"
  270. # This defaults to enabled if both BB_GIT_SHALLOW and
  271. # BB_GENERATE_MIRROR_TARBALLS are enabled
  272. BB_GENERATE_SHALLOW_TARBALLS ?= "1"
  273. :term:`BB_GIT_SHALLOW_DEPTH`
  274. When used with :term:`BB_GENERATE_SHALLOW_TARBALLS`, this variable sets
  275. the number of commits to include in generated shallow mirror tarballs.
  276. With a depth of 1, only the commit referenced in :term:`SRCREV` is
  277. included in the shallow mirror tarball. Increasing the depth includes
  278. additional parent commits, working back through the commit history.
  279. If this variable is unset, bitbake will default to a depth of 1 when
  280. generating shallow mirror tarballs.
  281. For example usage, see :term:`BB_GIT_SHALLOW`.
  282. :term:`BB_GLOBAL_PYMODULES`
  283. Specifies the list of Python modules to place in the global namespace.
  284. It is intended that only the core layer should set this and it is meant
  285. to be a very small list, typically just ``os`` and ``sys``.
  286. :term:`BB_GLOBAL_PYMODULES` is expected to be set before the first
  287. ``addpylib`` directive.
  288. See also ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:extending python library code`".
  289. :term:`BB_HASHCHECK_FUNCTION`
  290. Specifies the name of the function to call during the "setscene" part
  291. of the task's execution in order to validate the list of task hashes.
  292. The function returns the list of setscene tasks that should be
  293. executed.
  294. At this point in the execution of the code, the objective is to
  295. quickly verify if a given setscene function is likely to work or not.
  296. It's easier to check the list of setscene functions in one pass than
  297. to call many individual tasks. The returned list need not be
  298. completely accurate. A given setscene task can still later fail.
  299. However, the more accurate the data returned, the more efficient the
  300. build will be.
  301. :term:`BB_HASHCONFIG_IGNORE_VARS`
  302. Lists variables that are excluded from base configuration checksum,
  303. which is used to determine if the cache can be reused.
  304. One of the ways BitBake determines whether to re-parse the main
  305. metadata is through checksums of the variables in the datastore of
  306. the base configuration data. There are variables that you typically
  307. want to exclude when checking whether or not to re-parse and thus
  308. rebuild the cache. As an example, you would usually exclude ``TIME``
  309. and ``DATE`` because these variables are always changing. If you did
  310. not exclude them, BitBake would never reuse the cache.
  311. :term:`BB_HASHSERVE`
  312. Specifies the Hash Equivalence server to use.
  313. If set to ``auto``, BitBake automatically starts its own server
  314. over a UNIX domain socket. An option is to connect this server
  315. to an upstream one, by setting :term:`BB_HASHSERVE_UPSTREAM`.
  316. If set to ``unix://path``, BitBake will connect to an existing
  317. hash server available over a UNIX domain socket.
  318. If set to ``host:port``, BitBake will connect to a remote server on the
  319. specified host. This allows multiple clients to share the same
  320. hash equivalence data.
  321. The remote server can be started manually through
  322. the ``bin/bitbake-hashserv`` script provided by BitBake,
  323. which supports UNIX domain sockets too. This script also allows
  324. to start the server in read-only mode, to avoid accepting
  325. equivalences that correspond to Share State caches that are
  326. only available on specific clients.
  327. :term:`BB_HASHSERVE_UPSTREAM`
  328. Specifies an upstream Hash Equivalence server.
  329. This optional setting is only useful when a local Hash Equivalence
  330. server is started (setting :term:`BB_HASHSERVE` to ``auto``),
  331. and you wish the local server to query an upstream server for
  332. Hash Equivalence data.
  333. Example usage::
  334. BB_HASHSERVE_UPSTREAM = "hashserv.yoctoproject.org:8686"
  335. :term:`BB_INVALIDCONF`
  336. Used in combination with the ``ConfigParsed`` event to trigger
  337. re-parsing the base metadata (i.e. all the recipes). The
  338. ``ConfigParsed`` event can set the variable to trigger the re-parse.
  339. You must be careful to avoid recursive loops with this functionality.
  340. :term:`BB_LOADFACTOR_MAX`
  341. Setting this to a value will cause BitBake to check the system load
  342. average before executing new tasks. If the load average is above the
  343. the number of CPUs multipled by this factor, no new task will be started
  344. unless there is no task executing. A value of "1.5" has been found to
  345. work reasonably. This is helpful for systems which don't have pressure
  346. regulation enabled, which is more granular. Pressure values take
  347. precedence over loadfactor.
  348. :term:`BB_LOGCONFIG`
  349. Specifies the name of a config file that contains the user logging
  350. configuration. See
  351. :ref:`bitbake-user-manual/bitbake-user-manual-execution:logging`
  352. for additional information
  353. :term:`BB_LOGFMT`
  354. Specifies the name of the log files saved into
  355. ``${``\ :term:`T`\ ``}``. By default, the :term:`BB_LOGFMT`
  356. variable is undefined and the log filenames get created using the
  357. following form::
  358. log.{task}.{pid}
  359. If you want to force log files to take a specific name, you can set this
  360. variable in a configuration file.
  361. :term:`BB_MULTI_PROVIDER_ALLOWED`
  362. Allows you to suppress BitBake warnings caused when building two
  363. separate recipes that provide the same output.
  364. BitBake normally issues a warning when building two different recipes
  365. where each provides the same output. This scenario is usually
  366. something the user does not want. However, cases do exist where it
  367. makes sense, particularly in the ``virtual/*`` namespace. You can use
  368. this variable to suppress BitBake's warnings.
  369. To use the variable, list provider names (e.g. recipe names,
  370. ``virtual/kernel``, and so forth).
  371. :term:`BB_NICE_LEVEL`
  372. Allows BitBake to run at a specific priority (i.e. nice level).
  373. System permissions usually mean that BitBake can reduce its priority
  374. but not raise it again. See :term:`BB_TASK_NICE_LEVEL` for
  375. additional information.
  376. :term:`BB_NO_NETWORK`
  377. Disables network access in the BitBake fetcher modules. With this
  378. access disabled, any command that attempts to access the network
  379. becomes an error.
  380. Disabling network access is useful for testing source mirrors,
  381. running builds when not connected to the Internet, and when operating
  382. in certain kinds of firewall environments.
  383. :term:`BB_NUMBER_PARSE_THREADS`
  384. Sets the number of threads BitBake uses when parsing. By default, the
  385. number of threads is equal to the number of cores on the system.
  386. :term:`BB_NUMBER_THREADS`
  387. The maximum number of tasks BitBake should run in parallel at any one
  388. time. If your host development system supports multiple cores, a good
  389. rule of thumb is to set this variable to twice the number of cores.
  390. :term:`BB_ORIGENV`
  391. Contains a copy of the original external environment in which BitBake
  392. was run. The copy is taken before any variable values configured to
  393. pass through from the external environment are filtered into BitBake's
  394. datastore.
  395. .. note::
  396. The contents of this variable is a datastore object that can be
  397. queried using the normal datastore operations.
  398. :term:`BB_PRESERVE_ENV`
  399. Disables environment filtering and instead allows all variables through
  400. from the external environment into BitBake's datastore.
  401. .. note::
  402. You must set this variable in the external environment in order
  403. for it to work.
  404. :term:`BB_PRESSURE_MAX_CPU`
  405. Specifies a maximum CPU pressure threshold, above which BitBake's
  406. scheduler will not start new tasks (providing there is at least
  407. one active task). If no value is set, CPU pressure is not
  408. monitored when starting tasks.
  409. The pressure data is calculated based upon what Linux kernels since
  410. version 4.20 expose under ``/proc/pressure``. The threshold represents
  411. the difference in "total" pressure from the previous second. The
  412. minimum value is 1.0 (extremely slow builds) and the maximum is
  413. 1000000 (a pressure value unlikely to ever be reached).
  414. This threshold can be set in ``conf/local.conf`` as::
  415. BB_PRESSURE_MAX_CPU = "500"
  416. :term:`BB_PRESSURE_MAX_IO`
  417. Specifies a maximum I/O pressure threshold, above which BitBake's
  418. scheduler will not start new tasks (providing there is at least
  419. one active task). If no value is set, I/O pressure is not
  420. monitored when starting tasks.
  421. The pressure data is calculated based upon what Linux kernels since
  422. version 4.20 expose under ``/proc/pressure``. The threshold represents
  423. the difference in "total" pressure from the previous second. The
  424. minimum value is 1.0 (extremely slow builds) and the maximum is
  425. 1000000 (a pressure value unlikely to ever be reached).
  426. At this point in time, experiments show that IO pressure tends to
  427. be short-lived and regulating just the CPU with
  428. :term:`BB_PRESSURE_MAX_CPU` can help to reduce it.
  429. :term:`BB_PRESSURE_MAX_MEMORY`
  430. Specifies a maximum memory pressure threshold, above which BitBake's
  431. scheduler will not start new tasks (providing there is at least
  432. one active task). If no value is set, memory pressure is not
  433. monitored when starting tasks.
  434. The pressure data is calculated based upon what Linux kernels since
  435. version 4.20 expose under ``/proc/pressure``. The threshold represents
  436. the difference in "total" pressure from the previous second. The
  437. minimum value is 1.0 (extremely slow builds) and the maximum is
  438. 1000000 (a pressure value unlikely to ever be reached).
  439. Memory pressure is experienced when time is spent swapping,
  440. refaulting pages from the page cache or performing direct reclaim.
  441. This is why memory pressure is rarely seen, but setting this variable
  442. might be useful as a last resort to prevent OOM errors if they are
  443. occurring during builds.
  444. :term:`BB_RUNFMT`
  445. Specifies the name of the executable script files (i.e. run files)
  446. saved into ``${``\ :term:`T`\ ``}``. By default, the
  447. :term:`BB_RUNFMT` variable is undefined and the run filenames get
  448. created using the following form::
  449. run.{func}.{pid}
  450. If you want to force run files to take a specific name, you can set this
  451. variable in a configuration file.
  452. :term:`BB_RUNTASK`
  453. Contains the name of the currently executing task. The value includes
  454. the "do\_" prefix. For example, if the currently executing task is
  455. ``do_config``, the value is "do_config".
  456. :term:`BB_SCHEDULER`
  457. Selects the name of the scheduler to use for the scheduling of
  458. BitBake tasks. Three options exist:
  459. - *basic* --- the basic framework from which everything derives. Using
  460. this option causes tasks to be ordered numerically as they are
  461. parsed.
  462. - *speed* --- executes tasks first that have more tasks depending on
  463. them. The "speed" option is the default.
  464. - *completion* --- causes the scheduler to try to complete a given
  465. recipe once its build has started.
  466. :term:`BB_SCHEDULERS`
  467. Defines custom schedulers to import. Custom schedulers need to be
  468. derived from the ``RunQueueScheduler`` class.
  469. For information how to select a scheduler, see the
  470. :term:`BB_SCHEDULER` variable.
  471. :term:`BB_SETSCENE_DEPVALID`
  472. Specifies a function BitBake calls that determines whether BitBake
  473. requires a setscene dependency to be met.
  474. When running a setscene task, BitBake needs to know which
  475. dependencies of that setscene task also need to be run. Whether
  476. dependencies also need to be run is highly dependent on the metadata.
  477. The function specified by this variable returns a "True" or "False"
  478. depending on whether the dependency needs to be met.
  479. :term:`BB_SIGNATURE_EXCLUDE_FLAGS`
  480. Lists variable flags (varflags) that can be safely excluded from
  481. checksum and dependency data for keys in the datastore. When
  482. generating checksum or dependency data for keys in the datastore, the
  483. flags set against that key are normally included in the checksum.
  484. For more information on varflags, see the
  485. ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:variable flags`"
  486. section.
  487. :term:`BB_SIGNATURE_HANDLER`
  488. Defines the name of the signature handler BitBake uses. The signature
  489. handler defines the way stamp files are created and handled, if and
  490. how the signature is incorporated into the stamps, and how the
  491. signature itself is generated.
  492. A new signature handler can be added by injecting a class derived
  493. from the ``SignatureGenerator`` class into the global namespace.
  494. :term:`BB_SRCREV_POLICY`
  495. Defines the behavior of the fetcher when it interacts with source
  496. control systems and dynamic source revisions. The
  497. :term:`BB_SRCREV_POLICY` variable is useful when working without a
  498. network.
  499. The variable can be set using one of two policies:
  500. - *cache* --- retains the value the system obtained previously rather
  501. than querying the source control system each time.
  502. - *clear* --- queries the source controls system every time. With this
  503. policy, there is no cache. The "clear" policy is the default.
  504. :term:`BB_STRICT_CHECKSUM`
  505. Sets a more strict checksum mechanism for non-local URLs. Setting
  506. this variable to a value causes BitBake to report an error if it
  507. encounters a non-local URL that does not have at least one checksum
  508. specified.
  509. :term:`BB_TASK_IONICE_LEVEL`
  510. Allows adjustment of a task's Input/Output priority. During
  511. Autobuilder testing, random failures can occur for tasks due to I/O
  512. starvation. These failures occur during various QEMU runtime
  513. timeouts. You can use the :term:`BB_TASK_IONICE_LEVEL` variable to adjust
  514. the I/O priority of these tasks.
  515. .. note::
  516. This variable works similarly to the :term:`BB_TASK_NICE_LEVEL`
  517. variable except with a task's I/O priorities.
  518. Set the variable as follows::
  519. BB_TASK_IONICE_LEVEL = "class.prio"
  520. For *class*, the default value is "2", which is a best effort. You can use
  521. "1" for realtime and "3" for idle. If you want to use realtime, you
  522. must have superuser privileges.
  523. For *prio*, you can use any value from "0", which is the highest
  524. priority, to "7", which is the lowest. The default value is "4". You
  525. do not need any special privileges to use this range of priority
  526. values.
  527. .. note::
  528. In order for your I/O priority settings to take effect, you need the
  529. Completely Fair Queuing (CFQ) Scheduler selected for the backing block
  530. device. To select the scheduler, use the following command form where
  531. device is the device (e.g. sda, sdb, and so forth)::
  532. $ sudo sh -c "echo cfq > /sys/block/device/queu/scheduler"
  533. :term:`BB_TASK_NICE_LEVEL`
  534. Allows specific tasks to change their priority (i.e. nice level).
  535. You can use this variable in combination with task overrides to raise
  536. or lower priorities of specific tasks. For example, on the `Yocto
  537. Project <https://www.yoctoproject.org>`__ autobuilder, QEMU emulation
  538. in images is given a higher priority as compared to build tasks to
  539. ensure that images do not suffer timeouts on loaded systems.
  540. :term:`BB_TASKHASH`
  541. Within an executing task, this variable holds the hash of the task as
  542. returned by the currently enabled signature generator.
  543. :term:`BB_USE_HOME_NPMRC`
  544. Controls whether or not BitBake uses the user's .npmrc file within their
  545. home directory within the npm fetcher. This can be used for authentication
  546. of private NPM registries, among other uses. This is turned off by default
  547. and requires the user to explicitly set it to "1" to enable.
  548. :term:`BB_VERBOSE_LOGS`
  549. Controls how verbose BitBake is during builds. If set, shell scripts
  550. echo commands and shell script output appears on standard out
  551. (stdout).
  552. :term:`BB_WORKERCONTEXT`
  553. Specifies if the current context is executing a task. BitBake sets
  554. this variable to "1" when a task is being executed. The value is not
  555. set when the task is in server context during parsing or event
  556. handling.
  557. :term:`BBCLASSEXTEND`
  558. Allows you to extend a recipe so that it builds variants of the
  559. software. Some examples of these variants for recipes from the
  560. OpenEmbedded-Core metadata are "natives" such as ``quilt-native``,
  561. which is a copy of Quilt built to run on the build system; "crosses"
  562. such as ``gcc-cross``, which is a compiler built to run on the build
  563. machine but produces binaries that run on the target ``MACHINE``;
  564. "nativesdk", which targets the SDK machine instead of ``MACHINE``;
  565. and "mulitlibs" in the form "``multilib:``\ multilib_name".
  566. To build a different variant of the recipe with a minimal amount of
  567. code, it usually is as simple as adding the variable to your recipe.
  568. Here are two examples. The "native" variants are from the
  569. OpenEmbedded-Core metadata::
  570. BBCLASSEXTEND =+ "native nativesdk"
  571. BBCLASSEXTEND =+ "multilib:multilib_name"
  572. .. note::
  573. Internally, the :term:`BBCLASSEXTEND` mechanism generates recipe
  574. variants by rewriting variable values and applying overrides such
  575. as ``_class-native``. For example, to generate a native version of
  576. a recipe, a :term:`DEPENDS` on "foo" is
  577. rewritten to a :term:`DEPENDS` on "foo-native".
  578. Even when using :term:`BBCLASSEXTEND`, the recipe is only parsed once.
  579. Parsing once adds some limitations. For example, it is not
  580. possible to include a different file depending on the variant,
  581. since ``include`` statements are processed when the recipe is
  582. parsed.
  583. :term:`BBDEBUG`
  584. Sets the BitBake debug output level to a specific value as
  585. incremented by the ``-D`` command line option.
  586. .. note::
  587. You must set this variable in the external environment in order
  588. for it to work.
  589. :term:`BBFILE_COLLECTIONS`
  590. Lists the names of configured layers. These names are used to find
  591. the other ``BBFILE_*`` variables. Typically, each layer appends its
  592. name to this variable in its ``conf/layer.conf`` file.
  593. :term:`BBFILE_PATTERN`
  594. Variable that expands to match files from
  595. :term:`BBFILES` in a particular layer. This
  596. variable is used in the ``conf/layer.conf`` file and must be suffixed
  597. with the name of the specific layer (e.g.
  598. ``BBFILE_PATTERN_emenlow``).
  599. :term:`BBFILE_PRIORITY`
  600. Assigns the priority for recipe files in each layer.
  601. This variable is used in the ``conf/layer.conf`` file and must be
  602. suffixed with a `_` followed by the name of the specific layer (e.g.
  603. ``BBFILE_PRIORITY_emenlow``). Colon as separator is not supported.
  604. This variable is useful in situations where the same recipe appears
  605. in more than one layer. Setting this variable allows you to
  606. prioritize a layer against other layers that contain the same recipe
  607. --- effectively letting you control the precedence for the multiple
  608. layers. The precedence established through this variable stands
  609. regardless of a recipe's version (:term:`PV` variable).
  610. For example, a layer that has a recipe with a higher :term:`PV` value but
  611. for which the :term:`BBFILE_PRIORITY` is set to have a lower precedence
  612. still has a lower precedence.
  613. A larger value for the :term:`BBFILE_PRIORITY` variable results in a
  614. higher precedence. For example, the value 6 has a higher precedence
  615. than the value 5. If not specified, the :term:`BBFILE_PRIORITY` variable
  616. is set based on layer dependencies (see the :term:`LAYERDEPENDS` variable
  617. for more information). The default priority, if unspecified for a
  618. layer with no dependencies, is the lowest defined priority + 1 (or 1
  619. if no priorities are defined).
  620. .. tip::
  621. You can use the command bitbake-layers show-layers to list all
  622. configured layers along with their priorities.
  623. :term:`BBFILES`
  624. A space-separated list of recipe files BitBake uses to build
  625. software.
  626. When specifying recipe files, you can pattern match using Python's
  627. `glob <https://docs.python.org/3/library/glob.html>`_ syntax.
  628. For details on the syntax, see the documentation by following the
  629. previous link.
  630. :term:`BBFILES_DYNAMIC`
  631. Activates content depending on presence of identified layers. You
  632. identify the layers by the collections that the layers define.
  633. Use the :term:`BBFILES_DYNAMIC` variable to avoid ``.bbappend`` files whose
  634. corresponding ``.bb`` file is in a layer that attempts to modify other
  635. layers through ``.bbappend`` but does not want to introduce a hard
  636. dependency on those other layers.
  637. Additionally you can prefix the rule with "!" to add ``.bbappend`` and
  638. ``.bb`` files in case a layer is not present. Use this avoid hard
  639. dependency on those other layers.
  640. Use the following form for :term:`BBFILES_DYNAMIC`::
  641. collection_name:filename_pattern
  642. The following example identifies two collection names and two filename
  643. patterns::
  644. BBFILES_DYNAMIC += "\
  645. clang-layer:${LAYERDIR}/bbappends/meta-clang/*/*/*.bbappend \
  646. core:${LAYERDIR}/bbappends/openembedded-core/meta/*/*/*.bbappend \
  647. "
  648. When the collection name is prefixed with "!" it will add the file pattern in case
  649. the layer is absent::
  650. BBFILES_DYNAMIC += "\
  651. !clang-layer:${LAYERDIR}/backfill/meta-clang/*/*/*.bb \
  652. "
  653. This next example shows an error message that occurs because invalid
  654. entries are found, which cause parsing to fail::
  655. ERROR: BBFILES_DYNAMIC entries must be of the form {!}<collection name>:<filename pattern>, not:
  656. /work/my-layer/bbappends/meta-security-isafw/*/*/*.bbappend
  657. /work/my-layer/bbappends/openembedded-core/meta/*/*/*.bbappend
  658. :term:`BBINCLUDED`
  659. Contains a space-separated list of all of all files that BitBake's
  660. parser included during parsing of the current file.
  661. :term:`BBINCLUDELOGS`
  662. If set to a value, enables printing the task log when reporting a
  663. failed task.
  664. :term:`BBINCLUDELOGS_LINES`
  665. If :term:`BBINCLUDELOGS` is set, specifies
  666. the maximum number of lines from the task log file to print when
  667. reporting a failed task. If you do not set :term:`BBINCLUDELOGS_LINES`,
  668. the entire log is printed.
  669. :term:`BBLAYERS`
  670. Lists the layers to enable during the build. This variable is defined
  671. in the ``bblayers.conf`` configuration file in the build directory.
  672. Here is an example::
  673. BBLAYERS = " \
  674. /home/scottrif/poky/meta \
  675. /home/scottrif/poky/meta-yocto \
  676. /home/scottrif/poky/meta-yocto-bsp \
  677. /home/scottrif/poky/meta-mykernel \
  678. "
  679. This example enables four layers, one of which is a custom, user-defined
  680. layer named ``meta-mykernel``.
  681. :term:`BBLAYERS_FETCH_DIR`
  682. Sets the base location where layers are stored. This setting is used
  683. in conjunction with ``bitbake-layers layerindex-fetch`` and tells
  684. ``bitbake-layers`` where to place the fetched layers.
  685. :term:`BBMASK`
  686. Prevents BitBake from processing recipes and recipe append files.
  687. You can use the :term:`BBMASK` variable to "hide" these ``.bb`` and
  688. ``.bbappend`` files. BitBake ignores any recipe or recipe append
  689. files that match any of the expressions. It is as if BitBake does not
  690. see them at all. Consequently, matching files are not parsed or
  691. otherwise used by BitBake.
  692. The values you provide are passed to Python's regular expression
  693. compiler. Consequently, the syntax follows Python's Regular
  694. Expression (re) syntax. The expressions are compared against the full
  695. paths to the files. For complete syntax information, see Python's
  696. documentation at http://docs.python.org/3/library/re.html.
  697. The following example uses a complete regular expression to tell
  698. BitBake to ignore all recipe and recipe append files in the
  699. ``meta-ti/recipes-misc/`` directory::
  700. BBMASK = "meta-ti/recipes-misc/"
  701. If you want to mask out multiple directories or recipes, you can
  702. specify multiple regular expression fragments. This next example
  703. masks out multiple directories and individual recipes::
  704. BBMASK += "/meta-ti/recipes-misc/ meta-ti/recipes-ti/packagegroup/"
  705. BBMASK += "/meta-oe/recipes-support/"
  706. BBMASK += "/meta-foo/.*/openldap"
  707. BBMASK += "opencv.*\.bbappend"
  708. BBMASK += "lzma"
  709. .. note::
  710. When specifying a directory name, use the trailing slash character
  711. to ensure you match just that directory name.
  712. :term:`BBMULTICONFIG`
  713. Enables BitBake to perform multiple configuration builds and lists
  714. each separate configuration (multiconfig). You can use this variable
  715. to cause BitBake to build multiple targets where each target has a
  716. separate configuration. Define :term:`BBMULTICONFIG` in your
  717. ``conf/local.conf`` configuration file.
  718. As an example, the following line specifies three multiconfigs, each
  719. having a separate configuration file::
  720. BBMULTIFONFIG = "configA configB configC"
  721. Each configuration file you use must reside in the
  722. build directory within a directory named ``conf/multiconfig`` (e.g.
  723. build_directory\ ``/conf/multiconfig/configA.conf``).
  724. For information on how to use :term:`BBMULTICONFIG` in an environment
  725. that supports building targets with multiple configurations, see the
  726. ":ref:`bitbake-user-manual/bitbake-user-manual-intro:executing a multiple configuration build`"
  727. section.
  728. :term:`BBPATH`
  729. A colon-separated list used by BitBake to locate class (``.bbclass``)
  730. and configuration (``.conf``) files. This variable is analogous to the
  731. ``PATH`` variable.
  732. If you run BitBake from a directory outside of the build directory,
  733. you must be sure to set :term:`BBPATH` to point to the build directory.
  734. Set the variable as you would any environment variable and then run
  735. BitBake::
  736. $ BBPATH="build_directory"
  737. $ export BBPATH
  738. $ bitbake target
  739. :term:`BBSERVER`
  740. Points to the server that runs memory-resident BitBake. The variable
  741. is only used when you employ memory-resident BitBake.
  742. :term:`BBTARGETS`
  743. Allows you to use a configuration file to add to the list of
  744. command-line target recipes you want to build.
  745. :term:`BITBAKE_UI`
  746. Used to specify the UI module to use when running BitBake. Using this
  747. variable is equivalent to using the ``-u`` command-line option.
  748. .. note::
  749. You must set this variable in the external environment in order
  750. for it to work.
  751. :term:`BUILDNAME`
  752. A name assigned to the build. The name defaults to a datetime stamp
  753. of when the build was started but can be defined by the metadata.
  754. :term:`BZRDIR`
  755. The directory in which files checked out of a Bazaar system are
  756. stored.
  757. :term:`CACHE`
  758. Specifies the directory BitBake uses to store a cache of the metadata
  759. so it does not need to be parsed every time BitBake is started.
  760. :term:`CVSDIR`
  761. The directory in which files checked out under the CVS system are
  762. stored.
  763. :term:`DEFAULT_PREFERENCE`
  764. Specifies a weak bias for recipe selection priority.
  765. The most common usage of this is variable is to set it to "-1" within
  766. a recipe for a development version of a piece of software. Using the
  767. variable in this way causes the stable version of the recipe to build
  768. by default in the absence of :term:`PREFERRED_VERSION` being used to
  769. build the development version.
  770. .. note::
  771. The bias provided by DEFAULT_PREFERENCE is weak and is overridden by
  772. :term:`BBFILE_PRIORITY` if that variable is different between two
  773. layers that contain different versions of the same recipe.
  774. :term:`DEPENDS`
  775. Lists a recipe's build-time dependencies (i.e. other recipe files).
  776. Consider this simple example for two recipes named "a" and "b" that
  777. produce similarly named packages. In this example, the :term:`DEPENDS`
  778. statement appears in the "a" recipe::
  779. DEPENDS = "b"
  780. Here, the dependency is such that the ``do_configure`` task for recipe "a"
  781. depends on the ``do_populate_sysroot`` task of recipe "b". This means
  782. anything that recipe "b" puts into sysroot is available when recipe "a" is
  783. configuring itself.
  784. For information on runtime dependencies, see the :term:`RDEPENDS`
  785. variable.
  786. :term:`DESCRIPTION`
  787. A long description for the recipe.
  788. :term:`DL_DIR`
  789. The central download directory used by the build process to store
  790. downloads. By default, :term:`DL_DIR` gets files suitable for mirroring for
  791. everything except Git repositories. If you want tarballs of Git
  792. repositories, use the :term:`BB_GENERATE_MIRROR_TARBALLS` variable.
  793. :term:`EXCLUDE_FROM_WORLD`
  794. Directs BitBake to exclude a recipe from world builds (i.e.
  795. ``bitbake world``). During world builds, BitBake locates, parses and
  796. builds all recipes found in every layer exposed in the
  797. ``bblayers.conf`` configuration file.
  798. To exclude a recipe from a world build using this variable, set the
  799. variable to "1" in the recipe. Set it to "0" to add it back to world build.
  800. .. note::
  801. Recipes added to :term:`EXCLUDE_FROM_WORLD` may still be built during a world
  802. build in order to satisfy dependencies of other recipes. Adding a
  803. recipe to :term:`EXCLUDE_FROM_WORLD` only ensures that the recipe is not
  804. explicitly added to the list of build targets in a world build.
  805. :term:`FAKEROOT`
  806. Contains the command to use when running a shell script in a fakeroot
  807. environment. The :term:`FAKEROOT` variable is obsolete and has been
  808. replaced by the other ``FAKEROOT*`` variables. See these entries in
  809. the glossary for more information.
  810. :term:`FAKEROOTBASEENV`
  811. Lists environment variables to set when executing the command defined
  812. by :term:`FAKEROOTCMD` that starts the
  813. bitbake-worker process in the fakeroot environment.
  814. :term:`FAKEROOTCMD`
  815. Contains the command that starts the bitbake-worker process in the
  816. fakeroot environment.
  817. :term:`FAKEROOTDIRS`
  818. Lists directories to create before running a task in the fakeroot
  819. environment.
  820. :term:`FAKEROOTENV`
  821. Lists environment variables to set when running a task in the
  822. fakeroot environment. For additional information on environment
  823. variables and the fakeroot environment, see the
  824. :term:`FAKEROOTBASEENV` variable.
  825. :term:`FAKEROOTNOENV`
  826. Lists environment variables to set when running a task that is not in
  827. the fakeroot environment. For additional information on environment
  828. variables and the fakeroot environment, see the
  829. :term:`FAKEROOTENV` variable.
  830. :term:`FETCHCMD`
  831. Defines the command the BitBake fetcher module executes when running
  832. fetch operations. You need to use an override suffix when you use the
  833. variable (e.g. ``FETCHCMD_git`` or ``FETCHCMD_svn``).
  834. :term:`FILE`
  835. Points at the current file. BitBake sets this variable during the
  836. parsing process to identify the file being parsed. BitBake also sets
  837. this variable when a recipe is being executed to identify the recipe
  838. file.
  839. :term:`FILESPATH`
  840. Specifies directories BitBake uses when searching for patches and
  841. files. The "local" fetcher module uses these directories when
  842. handling ``file://`` URLs. The variable behaves like a shell ``PATH``
  843. environment variable. The value is a colon-separated list of
  844. directories that are searched left-to-right in order.
  845. :term:`FILE_LAYERNAME`
  846. During parsing and task execution, this is set to the name of the
  847. layer containing the recipe file. Code can use this to identify which
  848. layer a recipe is from.
  849. :term:`GITDIR`
  850. The directory in which a local copy of a Git repository is stored
  851. when it is cloned.
  852. :term:`HGDIR`
  853. The directory in which files checked out of a Mercurial system are
  854. stored.
  855. :term:`HOMEPAGE`
  856. Website where more information about the software the recipe is
  857. building can be found.
  858. :term:`INHERIT`
  859. Causes the named class or classes to be inherited globally. Anonymous
  860. functions in the class or classes are not executed for the base
  861. configuration and in each individual recipe. The OpenEmbedded build
  862. system ignores changes to :term:`INHERIT` in individual recipes.
  863. For more information on :term:`INHERIT`, see the
  864. ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:\`\`inherit\`\` configuration directive`"
  865. section.
  866. :term:`LAYERDEPENDS`
  867. Lists the layers, separated by spaces, upon which this recipe
  868. depends. Optionally, you can specify a specific layer version for a
  869. dependency by adding it to the end of the layer name with a colon,
  870. (e.g. "anotherlayer:3" to be compared against
  871. :term:`LAYERVERSION`\ ``_anotherlayer`` in
  872. this case). BitBake produces an error if any dependency is missing or
  873. the version numbers do not match exactly (if specified).
  874. You use this variable in the ``conf/layer.conf`` file. You must also
  875. use the specific layer name as a suffix to the variable (e.g.
  876. ``LAYERDEPENDS_mylayer``).
  877. :term:`LAYERDIR`
  878. When used inside the ``layer.conf`` configuration file, this variable
  879. provides the path of the current layer. This variable is not
  880. available outside of ``layer.conf`` and references are expanded
  881. immediately when parsing of the file completes.
  882. :term:`LAYERDIR_RE`
  883. When used inside the ``layer.conf`` configuration file, this variable
  884. provides the path of the current layer, escaped for use in a regular
  885. expression (:term:`BBFILE_PATTERN`). This
  886. variable is not available outside of ``layer.conf`` and references
  887. are expanded immediately when parsing of the file completes.
  888. :term:`LAYERSERIES_COMPAT`
  889. Lists the versions of the OpenEmbedded-Core (OE-Core) for which
  890. a layer is compatible. Using the :term:`LAYERSERIES_COMPAT` variable
  891. allows the layer maintainer to indicate which combinations of the
  892. layer and OE-Core can be expected to work. The variable gives the
  893. system a way to detect when a layer has not been tested with new
  894. releases of OE-Core (e.g. the layer is not maintained).
  895. To specify the OE-Core versions for which a layer is compatible, use
  896. this variable in your layer's ``conf/layer.conf`` configuration file.
  897. For the list, use the Yocto Project release name (e.g. "kirkstone",
  898. "mickledore"). To specify multiple OE-Core versions for the layer, use
  899. a space-separated list::
  900. LAYERSERIES_COMPAT_layer_root_name = "kirkstone mickledore"
  901. .. note::
  902. Setting :term:`LAYERSERIES_COMPAT` is required by the Yocto Project
  903. Compatible version 2 standard.
  904. The OpenEmbedded build system produces a warning if the variable
  905. is not set for any given layer.
  906. :term:`LAYERVERSION`
  907. Optionally specifies the version of a layer as a single number. You
  908. can use this variable within
  909. :term:`LAYERDEPENDS` for another layer in
  910. order to depend on a specific version of the layer.
  911. You use this variable in the ``conf/layer.conf`` file. You must also
  912. use the specific layer name as a suffix to the variable (e.g.
  913. ``LAYERDEPENDS_mylayer``).
  914. :term:`LICENSE`
  915. The list of source licenses for the recipe.
  916. :term:`MIRRORS`
  917. Specifies additional paths from which BitBake gets source code. When
  918. the build system searches for source code, it first tries the local
  919. download directory. If that location fails, the build system tries
  920. locations defined by :term:`PREMIRRORS`, the
  921. upstream source, and then locations specified by :term:`MIRRORS` in that
  922. order.
  923. :term:`OVERRIDES`
  924. A colon-separated list that BitBake uses to control what variables are
  925. overridden after BitBake parses recipes and configuration files.
  926. Following is a simple example that uses an overrides list based on
  927. machine architectures: OVERRIDES = "arm:x86:mips:powerpc" You can
  928. find information on how to use :term:`OVERRIDES` in the
  929. ":ref:`bitbake-user-manual/bitbake-user-manual-metadata:conditional syntax
  930. (overrides)`" section.
  931. :term:`P4DIR`
  932. The directory in which a local copy of a Perforce depot is stored
  933. when it is fetched.
  934. :term:`PACKAGES`
  935. The list of packages the recipe creates.
  936. :term:`PACKAGES_DYNAMIC`
  937. A promise that your recipe satisfies runtime dependencies for
  938. optional modules that are found in other recipes.
  939. :term:`PACKAGES_DYNAMIC` does not actually satisfy the dependencies, it
  940. only states that they should be satisfied. For example, if a hard,
  941. runtime dependency (:term:`RDEPENDS`) of another
  942. package is satisfied during the build through the
  943. :term:`PACKAGES_DYNAMIC` variable, but a package with the module name is
  944. never actually produced, then the other package will be broken.
  945. :term:`PE`
  946. The epoch of the recipe. By default, this variable is unset. The
  947. variable is used to make upgrades possible when the versioning scheme
  948. changes in some backwards incompatible way.
  949. :term:`PERSISTENT_DIR`
  950. Specifies the directory BitBake uses to store data that should be
  951. preserved between builds. In particular, the data stored is the data
  952. that uses BitBake's persistent data API and the data used by the PR
  953. Server and PR Service.
  954. :term:`PF`
  955. Specifies the recipe or package name and includes all version and
  956. revision numbers (i.e. ``eglibc-2.13-r20+svnr15508/`` and
  957. ``bash-4.2-r1/``).
  958. :term:`PN`
  959. The recipe name.
  960. :term:`PR`
  961. The revision of the recipe.
  962. :term:`PREFERRED_PROVIDER`
  963. Determines which recipe should be given preference when multiple
  964. recipes provide the same item. You should always suffix the variable
  965. with the name of the provided item, and you should set it to the
  966. :term:`PN` of the recipe to which you want to give
  967. precedence. Some examples::
  968. PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
  969. PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
  970. PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
  971. :term:`PREFERRED_PROVIDERS`
  972. Determines which recipe should be given preference for cases where
  973. multiple recipes provide the same item. Functionally,
  974. :term:`PREFERRED_PROVIDERS` is identical to
  975. :term:`PREFERRED_PROVIDER`. However, the :term:`PREFERRED_PROVIDERS` variable
  976. lets you define preferences for multiple situations using the following
  977. form::
  978. PREFERRED_PROVIDERS = "xxx:yyy aaa:bbb ..."
  979. This form is a convenient replacement for the following::
  980. PREFERRED_PROVIDER_xxx = "yyy"
  981. PREFERRED_PROVIDER_aaa = "bbb"
  982. :term:`PREFERRED_VERSION`
  983. If there are multiple versions of a recipe available, this variable
  984. determines which version should be given preference. You must always
  985. suffix the variable with the :term:`PN` you want to
  986. select, and you should set :term:`PV` accordingly for
  987. precedence.
  988. The :term:`PREFERRED_VERSION` variable supports limited wildcard use
  989. through the "``%``" character. You can use the character to match any
  990. number of characters, which can be useful when specifying versions
  991. that contain long revision numbers that potentially change. Here are
  992. two examples::
  993. PREFERRED_VERSION_python = "2.7.3"
  994. PREFERRED_VERSION_linux-yocto = "4.12%"
  995. .. important::
  996. The use of the " % " character is limited in that it only works at the
  997. end of the string. You cannot use the wildcard character in any other
  998. location of the string.
  999. If a recipe with the specified version is not available, a warning
  1000. message will be shown. See :term:`REQUIRED_VERSION` if you want this
  1001. to be an error instead.
  1002. :term:`PREMIRRORS`
  1003. Specifies additional paths from which BitBake gets source code. When
  1004. the build system searches for source code, it first tries the local
  1005. download directory. If that location fails, the build system tries
  1006. locations defined by :term:`PREMIRRORS`, the upstream source, and then
  1007. locations specified by :term:`MIRRORS` in that order.
  1008. Typically, you would add a specific server for the build system to
  1009. attempt before any others by adding something like the following to
  1010. your configuration::
  1011. PREMIRRORS:prepend = "\
  1012. git://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
  1013. ftp://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
  1014. http://.*/.* http://downloads.yoctoproject.org/mirror/sources/ \
  1015. https://.*/.* http://downloads.yoctoproject.org/mirror/sources/"
  1016. These changes cause the build system to intercept Git, FTP, HTTP, and
  1017. HTTPS requests and direct them to the ``http://`` sources mirror. You can
  1018. use ``file://`` URLs to point to local directories or network shares as
  1019. well.
  1020. :term:`PROVIDES`
  1021. A list of aliases by which a particular recipe can be known. By
  1022. default, a recipe's own :term:`PN` is implicitly already in its
  1023. :term:`PROVIDES` list. If a recipe uses :term:`PROVIDES`, the additional
  1024. aliases are synonyms for the recipe and can be useful satisfying
  1025. dependencies of other recipes during the build as specified by
  1026. :term:`DEPENDS`.
  1027. Consider the following example :term:`PROVIDES` statement from a recipe
  1028. file ``libav_0.8.11.bb``::
  1029. PROVIDES += "libpostproc"
  1030. The :term:`PROVIDES` statement results in the "libav" recipe also being known
  1031. as "libpostproc".
  1032. In addition to providing recipes under alternate names, the
  1033. :term:`PROVIDES` mechanism is also used to implement virtual targets. A
  1034. virtual target is a name that corresponds to some particular
  1035. functionality (e.g. a Linux kernel). Recipes that provide the
  1036. functionality in question list the virtual target in :term:`PROVIDES`.
  1037. Recipes that depend on the functionality in question can include the
  1038. virtual target in :term:`DEPENDS` to leave the
  1039. choice of provider open.
  1040. Conventionally, virtual targets have names on the form
  1041. "virtual/function" (e.g. "virtual/kernel"). The slash is simply part
  1042. of the name and has no syntactical significance.
  1043. :term:`PRSERV_HOST`
  1044. The network based :term:`PR` service host and port.
  1045. Following is an example of how the :term:`PRSERV_HOST` variable is set::
  1046. PRSERV_HOST = "localhost:0"
  1047. You must set the variable if you want to automatically start a local PR
  1048. service. You can set :term:`PRSERV_HOST` to other values to use a remote PR
  1049. service.
  1050. :term:`PV`
  1051. The version of the recipe.
  1052. :term:`RDEPENDS`
  1053. Lists a package's runtime dependencies (i.e. other packages) that
  1054. must be installed in order for the built package to run correctly. If
  1055. a package in this list cannot be found during the build, you will get
  1056. a build error.
  1057. Because the :term:`RDEPENDS` variable applies to packages being built,
  1058. you should always use the variable in a form with an attached package
  1059. name. For example, suppose you are building a development package
  1060. that depends on the ``perl`` package. In this case, you would use the
  1061. following :term:`RDEPENDS` statement::
  1062. RDEPENDS:${PN}-dev += "perl"
  1063. In the example, the development package depends on the ``perl`` package.
  1064. Thus, the :term:`RDEPENDS` variable has the ``${PN}-dev`` package name as part
  1065. of the variable.
  1066. BitBake supports specifying versioned dependencies. Although the
  1067. syntax varies depending on the packaging format, BitBake hides these
  1068. differences from you. Here is the general syntax to specify versions
  1069. with the :term:`RDEPENDS` variable::
  1070. RDEPENDS:${PN} = "package (operator version)"
  1071. For ``operator``, you can specify the following::
  1072. =
  1073. <
  1074. >
  1075. <=
  1076. >=
  1077. For example, the following sets up a dependency on version 1.2 or
  1078. greater of the package ``foo``::
  1079. RDEPENDS:${PN} = "foo (>= 1.2)"
  1080. For information on build-time dependencies, see the :term:`DEPENDS`
  1081. variable.
  1082. :term:`REPODIR`
  1083. The directory in which a local copy of a ``google-repo`` directory is
  1084. stored when it is synced.
  1085. :term:`REQUIRED_VERSION`
  1086. If there are multiple versions of a recipe available, this variable
  1087. determines which version should be given preference. :term:`REQUIRED_VERSION`
  1088. works in exactly the same manner as :term:`PREFERRED_VERSION`, except
  1089. that if the specified version is not available then an error message
  1090. is shown and the build fails immediately.
  1091. If both :term:`REQUIRED_VERSION` and :term:`PREFERRED_VERSION` are set for
  1092. the same recipe, the :term:`REQUIRED_VERSION` value applies.
  1093. :term:`RPROVIDES`
  1094. A list of package name aliases that a package also provides. These
  1095. aliases are useful for satisfying runtime dependencies of other
  1096. packages both during the build and on the target (as specified by
  1097. :term:`RDEPENDS`).
  1098. As with all package-controlling variables, you must always use the
  1099. variable in conjunction with a package name override. Here is an
  1100. example::
  1101. RPROVIDES:${PN} = "widget-abi-2"
  1102. :term:`RRECOMMENDS`
  1103. A list of packages that extends the usability of a package being
  1104. built. The package being built does not depend on this list of
  1105. packages in order to successfully build, but needs them for the
  1106. extended usability. To specify runtime dependencies for packages, see
  1107. the :term:`RDEPENDS` variable.
  1108. BitBake supports specifying versioned recommends. Although the syntax
  1109. varies depending on the packaging format, BitBake hides these
  1110. differences from you. Here is the general syntax to specify versions
  1111. with the :term:`RRECOMMENDS` variable::
  1112. RRECOMMENDS:${PN} = "package (operator version)"
  1113. For ``operator``, you can specify the following::
  1114. =
  1115. <
  1116. >
  1117. <=
  1118. >=
  1119. For example, the following sets up a recommend on version
  1120. 1.2 or greater of the package ``foo``::
  1121. RRECOMMENDS:${PN} = "foo (>= 1.2)"
  1122. :term:`SECTION`
  1123. The section in which packages should be categorized.
  1124. :term:`SRC_URI`
  1125. The list of source files --- local or remote. This variable tells
  1126. BitBake which bits to pull for the build and how to pull them. For
  1127. example, if the recipe or append file needs to fetch a single tarball
  1128. from the Internet, the recipe or append file uses a :term:`SRC_URI`
  1129. entry that specifies that tarball. On the other hand, if the recipe or
  1130. append file needs to fetch a tarball, apply two patches, and include
  1131. a custom file, the recipe or append file needs an :term:`SRC_URI`
  1132. variable that specifies all those sources.
  1133. The following list explains the available URI protocols. URI
  1134. protocols are highly dependent on particular BitBake Fetcher
  1135. submodules. Depending on the fetcher BitBake uses, various URL
  1136. parameters are employed. For specifics on the supported Fetchers, see
  1137. the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:fetchers`
  1138. section.
  1139. - ``az://``: Fetches files from an Azure Storage account using HTTPS.
  1140. - ``bzr://``: Fetches files from a Bazaar revision control
  1141. repository.
  1142. - ``ccrc://``: Fetches files from a ClearCase repository.
  1143. - ``cvs://``: Fetches files from a CVS revision control
  1144. repository.
  1145. - ``file://``: Fetches files, which are usually files shipped
  1146. with the Metadata, from the local machine.
  1147. The path is relative to the :term:`FILESPATH`
  1148. variable. Thus, the build system searches, in order, from the
  1149. following directories, which are assumed to be a subdirectories of
  1150. the directory in which the recipe file (``.bb``) or append file
  1151. (``.bbappend``) resides:
  1152. - ``${BPN}``: the base recipe name without any special suffix
  1153. or version numbers.
  1154. - ``${BP}`` - ``${BPN}-${PV}``: the base recipe name and
  1155. version but without any special package name suffix.
  1156. - ``files``: files within a directory, which is named ``files``
  1157. and is also alongside the recipe or append file.
  1158. - ``ftp://``: Fetches files from the Internet using FTP.
  1159. - ``git://``: Fetches files from a Git revision control
  1160. repository.
  1161. - ``gitsm://``: Fetches submodules from a Git revision control
  1162. repository.
  1163. - ``hg://``: Fetches files from a Mercurial (``hg``) revision
  1164. control repository.
  1165. - ``http://``: Fetches files from the Internet using HTTP.
  1166. - ``https://``: Fetches files from the Internet using HTTPS.
  1167. - ``npm://``: Fetches JavaScript modules from a registry.
  1168. - ``osc://``: Fetches files from an OSC (OpenSUSE Build service)
  1169. revision control repository.
  1170. - ``p4://``: Fetches files from a Perforce (``p4``) revision
  1171. control repository.
  1172. - ``repo://``: Fetches files from a repo (Git) repository.
  1173. - ``ssh://``: Fetches files from a secure shell.
  1174. - ``svn://``: Fetches files from a Subversion (``svn``) revision
  1175. control repository.
  1176. Here are some additional options worth mentioning:
  1177. - ``downloadfilename``: Specifies the filename used when storing
  1178. the downloaded file.
  1179. - ``name``: Specifies a name to be used for association with
  1180. :term:`SRC_URI` checksums or :term:`SRCREV` when you have more than one
  1181. file or git repository specified in :term:`SRC_URI`. For example::
  1182. SRC_URI = "git://example.com/foo.git;branch=main;name=first \
  1183. git://example.com/bar.git;branch=main;name=second \
  1184. http://example.com/file.tar.gz;name=third"
  1185. SRCREV_first = "f1d2d2f924e986ac86fdf7b36c94bcdf32beec15"
  1186. SRCREV_second = "e242ed3bffccdf271b7fbaf34ed72d089537b42f"
  1187. SRC_URI[third.sha256sum] = "13550350a8681c84c861aac2e5b440161c2b33a3e4f302ac680ca5b686de48de"
  1188. - ``subdir``: Places the file (or extracts its contents) into the
  1189. specified subdirectory. This option is useful for unusual tarballs
  1190. or other archives that do not have their files already in a
  1191. subdirectory within the archive.
  1192. - ``subpath``: Limits the checkout to a specific subpath of the
  1193. tree when using the Git fetcher is used.
  1194. - ``unpack``: Controls whether or not to unpack the file if it is
  1195. an archive. The default action is to unpack the file.
  1196. :term:`SRCDATE`
  1197. The date of the source code used to build the package. This variable
  1198. applies only if the source was fetched from a Source Code Manager
  1199. (SCM).
  1200. :term:`SRCREV`
  1201. The revision of the source code used to build the package. This
  1202. variable applies only when using Subversion, Git, Mercurial and
  1203. Bazaar. If you want to build a fixed revision and you want to avoid
  1204. performing a query on the remote repository every time BitBake parses
  1205. your recipe, you should specify a :term:`SRCREV` that is a full revision
  1206. identifier and not just a tag.
  1207. :term:`SRCREV_FORMAT`
  1208. Helps construct valid :term:`SRCREV` values when
  1209. multiple source controlled URLs are used in
  1210. :term:`SRC_URI`.
  1211. The system needs help constructing these values under these
  1212. circumstances. Each component in the :term:`SRC_URI` is assigned a name
  1213. and these are referenced in the :term:`SRCREV_FORMAT` variable. Consider
  1214. an example with URLs named "machine" and "meta". In this case,
  1215. :term:`SRCREV_FORMAT` could look like "machine_meta" and those names
  1216. would have the SCM versions substituted into each position. Only one
  1217. ``AUTOINC`` placeholder is added and if needed. And, this placeholder
  1218. is placed at the start of the returned string.
  1219. :term:`STAMP`
  1220. Specifies the base path used to create recipe stamp files. The path
  1221. to an actual stamp file is constructed by evaluating this string and
  1222. then appending additional information.
  1223. :term:`STAMPCLEAN`
  1224. Specifies the base path used to create recipe stamp files. Unlike the
  1225. :term:`STAMP` variable, :term:`STAMPCLEAN` can contain
  1226. wildcards to match the range of files a clean operation should
  1227. remove. BitBake uses a clean operation to remove any other stamps it
  1228. should be removing when creating a new stamp.
  1229. :term:`SUMMARY`
  1230. A short summary for the recipe, which is 72 characters or less.
  1231. :term:`SVNDIR`
  1232. The directory in which files checked out of a Subversion system are
  1233. stored.
  1234. :term:`T`
  1235. Points to a directory were BitBake places temporary files, which
  1236. consist mostly of task logs and scripts, when building a particular
  1237. recipe.
  1238. :term:`TOPDIR`
  1239. Points to the build directory. BitBake automatically sets this
  1240. variable.