debugging-buildroot.txt 1.1 KB

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