customize-configuration.txt 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[customize-store-buildroot-config]]
  4. === Storing the Buildroot configuration
  5. The Buildroot configuration can be stored using the command
  6. +make savedefconfig+.
  7. This strips the Buildroot configuration down by removing configuration
  8. options that are at their default value. The result is stored in a file
  9. called +defconfig+. If you want to save it in another place, change the
  10. +BR2_DEFCONFIG+ option in the Buildroot configuration itself, or call
  11. make with +make savedefconfig BR2_DEFCONFIG=<path-to-defconfig>+.
  12. The recommended place to store this defconfig is
  13. +configs/<boardname>_defconfig+. If you follow this recommendation, the
  14. configuration will be listed in +make help+ and can be set again by
  15. running +make <boardname>_defconfig+.
  16. Alternatively, you can copy the file to any other place and rebuild with
  17. +make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+.
  18. [[customize-store-package-config]]
  19. === Storing the configuration of other components
  20. The configuration files for BusyBox, the Linux kernel, Barebox, U-Boot
  21. and uClibc should be stored as well if changed. For each of these
  22. components, a Buildroot configuration option exists to point to an input
  23. configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. To store
  24. their configuration, set these configuration options to a path where you
  25. want to save the configuration files, and then use the helper targets
  26. described below to actually store the configuration.
  27. As explained in xref:customize-dir-structure[], the recommended path to
  28. store these configuration files is
  29. +board/<company>/<boardname>/foo.config+.
  30. Make sure that you create a configuration file 'before' changing
  31. the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ etc. options. Otherwise,
  32. Buildroot will try to access this config file, which doesn't exist
  33. yet, and will fail. You can create the configuration file by running
  34. +make linux-menuconfig+ etc.
  35. Buildroot provides a few helper targets to make the saving of
  36. configuration files easier.
  37. * +make linux-update-defconfig+ saves the linux configuration to the
  38. path specified by +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. It
  39. simplifies the config file by removing default values. However,
  40. this only works with kernels starting from 2.6.33. For earlier
  41. kernels, use +make linux-update-config+.
  42. * +make busybox-update-config+ saves the busybox configuration to the
  43. path specified by +BR2_PACKAGE_BUSYBOX_CONFIG+.
  44. * +make uclibc-update-config+ saves the uClibc configuration to the
  45. path specified by +BR2_UCLIBC_CONFIG+.
  46. * +make barebox-update-defconfig+ saves the barebox configuration to the
  47. path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
  48. * +make uboot-update-defconfig+ saves the U-Boot configuration to the
  49. path specified by +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE+.
  50. * For at91bootstrap3, no helper exists so you have to copy the config
  51. file manually to +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.