---
title: "BitBake recipes and Variable History"
---

# BitBake recipes and Variable History

Recipes, appends, classes and includes in the editor with navigation along the build's BBPATH, and Variable History, which shows from bitbake -e why a variable has its value.

## Recipes in the editor

`.bb`, `.bbappend`, `.bbclass`, `.inc` and `.conf` files open in the BitBake language:

- colouring of operators, overrides, flags, directives, inline Python, and Python and shell tasks (this colouring is registered even when the module is off; it runs nothing);
- go to the file of `require`, `include` and `inherit` along the build's BBPATH (NXP's `BSPDIR` form is evaluated), and to a variable's assignments;
- an outline of the recipe's variables, directives and tasks;
- a hover on a variable listing each assignment in the files the recipe reads, in parse order, with a link **Show Variable History (bitbake -e ...)** for the value BitBake computes.

The hover and go-to are a static read of the recipe, its includes, classes and appends, and say so: conditional overrides and `${@...}` inherits are not evaluated there. Variable History gives BitBake's own answer.

![A hover on EXTRA_OECMAKE in a recipe, listing its four assignments in parse order and a link to Variable History.](https://neuralinverse.com/docs-images/modules/embedded-linux/bitbake-recipe-hover.webp)

**State:** modelled with BitBake 2.8.1 (poky scarthgap) and meta-freescale: BBPATH and class resolution equal to BitBake's on a build of 1,085 recipes; the grammar checked on 18 files from poky, dunfell, meta-freescale, meta-ti and meta-xilinx. Not run on Wind River Linux, on Windows or over a real SSH server. Completion is not built.

## Variable History

The **Variable History** view in the Embedded Linux side bar answers "why does this variable have this value":

1. Enter a recipe (empty for the global configuration) and a variable.
2. Choose **Run bitbake -e**. It runs on the build host; **Stop** cancels it.
3. The view shows the final value, the value before expansion, and every operation in the order BitBake recorded it, each with its file and line and whether its override is in effect, then the overrides in effect.

![Variable History for EXTRA_OECMAKE of a recipe: the final value, the value before expansion, and eight operations with their files and lines.](https://neuralinverse.com/docs-images/modules/embedded-linux/bitbake-variable-history.webp)

An agent tool reads a variable's history, read-only.

**State:** modelled with BitBake 2.8.1 on two recipes for `imx8mp-lpddr4-evk` in the running app; the parser read 2 MB of real output (2,917 variables) in about 40 ms. Not run against a real SSH server, on Windows, on Wind River Linux or with BitBake older than 2.8. `bitbake-getvar` is not used.

Next: [Builds](https://neuralinverse.com/docs/modules/embedded-linux/builds/).
