26.2. Custom Buildroot configs

We provide the following mechanisms:

  • ./build-buildroot --config-fragment data/br2: append the Buildroot configuration file data/br2 to a single build. Must be passed every time you run ./build. The format is the same as buildroot_config/default.

  • ./build-buildroot --config 'BR2_SOME_OPTION="myval"': append a single option to a single build.

For example, if you decide to Enable Buildroot compiler optimizations after an initial build is finished, you must Clean the build and rebuild:

./build-buildroot \
  --config 'BR2_OPTIMIZE_3=y' \
  --config 'BR2_PACKAGE_SAMPLE_PACKAGE=y' \
  --
  sample_package-dirclean \
  sample_package-reconfigure \
;

The clean is necessary because the source files didn’t change, so make would just check the timestamps and not build anything.

You will then likely want to make those more permanent as explained at: Section 38.4, “Default command line arguments”.