The debug messages from the Yocto Project are important when the build does not complete, or when a package does not behave as expected. Logs can help to verify if files are well placed, variables have the expected value, and the set of packages being built is enough.
FoundriesFactory provides the following files as reference for debugging the Yocto Project tools:
When the Image Builds
File | Description |
---|---|
<machine>/console.log | The console output of bitbake <image> command. |
<machine>/customize-target.log | Target information such as tags, hashes, URIs, some architecture information. |
<machine>/os-release | Some macro information on the LmP and factory version, name, tag and so on. |
<machine>/other/MD5SUMS.txt | MD5SUM for every artifact from that target. |
<machine>/other/bitbake_debug.log.gz | DEGUB and NOTE messages from bitbake <image> command line. |
<machine>/other/bitbake_global_env.txt.gz | The result of bitbake -e command line. |
<machine>/other/bitbake_image_env.txt.gz | The result of bitbake <image> -e command line. |
<machine>/other/bitbake_warning.log | WARNING messages from bitbake <image> command line. |
<machine>/other/kernel-config | The configuration used to build the Linux Kernel image. |
<machine>/other/u-boot-fio-config | The configuration used to build the U-Boot image. |
When the Image does NOT Build
File | Description |
---|---|
<machine>/other/bitbake_debug.log.gz | DEGUB and NOTE messages from bitbake <image> command line. |
<machine>/other/bitbake_global_env.txt.gz | The result of bitbake -e command line. |
<machine>/other/bitbake_image_env.txt.gz | The result of bitbake <image> -e command line. |
<machine>/other/bitbake_warning.log | WARNING messages from bitbake <image> command line. |
<machine>/console.log | The console output of bitbake <image> command. |
<machine>/customize-target.log | Target information such as tags, hashes, URIs, some architecture information. |
<machine>/manifest.pinned.xml | The list of meta-layers and commit id for each one. |
Yocto BitBake Environment & Commands
The command bitbake -e
is used to follow the values of variables (global or per-package), and how values changes during the parsing of meta data.
While bitbake -e | grep ^<VARIABLE>
can show the final value for that <VARIABLE>
, it does not include all changes of the value during the complete execution.
This debug resource is used mainly for variable names and double checking values, but can also be used to ensure the preferred versions and providers are properly set.
Yocto Configuration of Kernel Files
The configuration files for the Linux Kernel and U-Boot are deployed to the artifacts and can be used to double check if the expected variables are included.
They can be consulted when a image does not correspond to the configuration added on a .bbappend file, for example.
Get Yocto Kernel Build Artifacts
The artifacts can be downloaded from the Foundries.io Dashboard, or by using the fioctl
tool with the following commands:
$ export FIOCTL_FACTORY=<factory>
$ fioctl targets list
$ fioctl targets artifacts <target-number>
$ fioctl targets artifacts <target-number> <file> > ./log/<file>
The first fioctl
command lists all the available targets by target number. The second lists all the available artifacts for that target. Finally, the last command shown is used to download the file <file>
.
For details and more example commands on how to use fioctl, review the fioctl
Reference Manual and the User guide.