debugging-buildroot.txt 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[debugging-buildroot]]
  4. == Debugging Buildroot
  5. It is possible to instrument the steps +Buildroot+ does when building
  6. packages. Define the variable +BR2_INSTRUMENTATION_SCRIPTS+ to contain
  7. the path of one or more scripts (or other executables), in a
  8. space-separated list, you want called before and after each step. The
  9. scripts are called in sequence, with three parameters:
  10. - +start+ or +end+ to denote the start (resp. the end) of a step;
  11. - the name of the step about to be started, or which just ended.
  12. - the name of the package
  13. For example :
  14. ----
  15. make BR2_INSTRUMENTATION_SCRIPTS="/path/to/my/script1 /path/to/my/script2"
  16. ----
  17. That script has access to the following variables:
  18. - +BR2_CONFIG+: the path to the Buildroot .config file
  19. - +HOST_DIR+, +STAGING_DIR+, +TARGET_DIR+: see
  20. xref:generic-package-reference[]
  21. - +BUILD_DIR+: the directory where packages are extracted and built
  22. - +BINARIES_DIR+: the place where all binary files (aka images) are
  23. stored
  24. - +BASE_DIR+: the base output directory