customize-configuration.txt 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. // -*- mode:doc; -*-
  2. // vim: set syntax=asciidoc:
  3. [[customize-store-basics]]
  4. === Basics for storing the configuration
  5. When you have a buildroot configuration that you are satisfied with and
  6. you want to share it with others, put it under revision control or move
  7. on to a different buildroot project, you need to store the configuration
  8. so it can be rebuilt later. The configuration that needs to be stored
  9. consists of the buildroot configuration, the configuration files for
  10. packages that you use (kernel, busybox, uClibc, ...), and your rootfs
  11. modifications.
  12. [[customize-store-buildroot-config]]
  13. ==== Buildroot configuration
  14. For storing the buildroot configuration itself, buildroot offers the
  15. following command: +make savedefconfig+.
  16. This strips the buildroot configuration down by removing configuration
  17. options that are at their default value. The result is stored in a file
  18. called +defconfig+. If you want to save it in another place, change
  19. the +BR2_DEFCONFIG+ option, or call make with +make savedefconfig
  20. BR2_DEFCONFIG=<path-to-defconfig>+. The usual place is
  21. +configs/<boardname>_defconfig+. The configuration can then be rebuilt by
  22. running +make <boardname>_defconfig+.
  23. Alternatively, you can copy the file to any other place and rebuild with
  24. +make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+.
  25. [[customize-store-package-config]]
  26. ==== Other package configuration
  27. The configuration files for busybox, the linux kernel, barebox and
  28. uClibc should be stored as well if changed. For each of these, a
  29. buildroot configuration option exists to point to an input
  30. configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. To
  31. save their configuration, set those configuration options to a path
  32. outside your output directory,
  33. e.g. +board/<manufacturer>/<boardname>/linux.config+. Then, copy the
  34. configuration files to that path.
  35. Make sure that you create a configuration file 'before' changing
  36. the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ etc. options. Otherwise,
  37. buildroot will try to access this config file, which doesn't exist
  38. yet, and will fail. You can create the configuration file by running
  39. +make linux-menuconfig+ etc.
  40. Buildroot provides a few helper targets to make the saving of
  41. configuration files easier.
  42. * +make linux-update-defconfig+ saves the linux configuration to the
  43. path specified by +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. It
  44. simplifies the config file by removing default values. However,
  45. this only works with kernels starting from 2.6.33. For earlier
  46. kernels, use +make linux-update-config+.
  47. * +make busybox-update-config+ saves the busybox configuration to the
  48. path specified by +BR2_PACKAGE_BUSYBOX_CONFIG+.
  49. * +make uclibc-update-config+ saves the uClibc configuration to the
  50. path specified by +BR2_UCLIBC_CONFIG+.
  51. * +make barebox-update-defconfig+ saves the barebox configuration to the
  52. path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
  53. * For at91bootstrap3, no helper exists so you have to copy the config
  54. file manually to +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.