2014-09-19 03:39:26 +08:00
|
|
|
// -*- mode:doc; -*-
|
|
|
|
// vim: set syntax=asciidoc:
|
|
|
|
|
|
|
|
[[customize-store-buildroot-config]]
|
2014-09-19 03:39:27 +08:00
|
|
|
=== Storing the Buildroot configuration
|
2014-09-19 03:39:26 +08:00
|
|
|
|
2014-09-19 03:39:27 +08:00
|
|
|
The Buildroot configuration can be stored using the command
|
|
|
|
+make savedefconfig+.
|
2014-09-19 03:39:26 +08:00
|
|
|
|
2014-09-19 03:39:27 +08:00
|
|
|
This strips the Buildroot configuration down by removing configuration
|
2014-09-19 03:39:26 +08:00
|
|
|
options that are at their default value. The result is stored in a file
|
2014-09-19 03:39:27 +08:00
|
|
|
called +defconfig+. If you want to save it in another place, change the
|
|
|
|
+BR2_DEFCONFIG+ option in the Buildroot configuration itself, or call
|
|
|
|
make with +make savedefconfig BR2_DEFCONFIG=<path-to-defconfig>+.
|
|
|
|
|
|
|
|
The recommended place to store this defconfig is
|
|
|
|
+configs/<boardname>_defconfig+. If you follow this recommendation, the
|
2022-06-23 01:11:29 +08:00
|
|
|
configuration will be listed in +make list-defconfigs+ and can be set
|
|
|
|
again by running +make <boardname>_defconfig+.
|
2014-09-19 03:39:26 +08:00
|
|
|
|
|
|
|
Alternatively, you can copy the file to any other place and rebuild with
|
|
|
|
+make defconfig BR2_DEFCONFIG=<path-to-defconfig-file>+.
|
|
|
|
|
|
|
|
[[customize-store-package-config]]
|
2014-09-19 03:39:27 +08:00
|
|
|
=== Storing the configuration of other components
|
|
|
|
|
2015-07-17 03:19:05 +08:00
|
|
|
The configuration files for BusyBox, the Linux kernel, Barebox, U-Boot
|
|
|
|
and uClibc should be stored as well if changed. For each of these
|
2014-09-19 03:39:27 +08:00
|
|
|
components, a Buildroot configuration option exists to point to an input
|
|
|
|
configuration file, e.g. +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. To store
|
|
|
|
their configuration, set these configuration options to a path where you
|
|
|
|
want to save the configuration files, and then use the helper targets
|
|
|
|
described below to actually store the configuration.
|
2014-09-19 03:39:26 +08:00
|
|
|
|
2014-09-19 03:39:27 +08:00
|
|
|
As explained in xref:customize-dir-structure[], the recommended path to
|
|
|
|
store these configuration files is
|
|
|
|
+board/<company>/<boardname>/foo.config+.
|
2014-09-19 03:39:26 +08:00
|
|
|
|
|
|
|
Make sure that you create a configuration file 'before' changing
|
2014-12-19 15:12:33 +08:00
|
|
|
the +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+ etc. options. Otherwise,
|
2014-09-19 03:39:27 +08:00
|
|
|
Buildroot will try to access this config file, which doesn't exist
|
2014-09-19 03:39:26 +08:00
|
|
|
yet, and will fail. You can create the configuration file by running
|
|
|
|
+make linux-menuconfig+ etc.
|
|
|
|
|
|
|
|
Buildroot provides a few helper targets to make the saving of
|
|
|
|
configuration files easier.
|
|
|
|
|
|
|
|
* +make linux-update-defconfig+ saves the linux configuration to the
|
2014-12-19 15:12:33 +08:00
|
|
|
path specified by +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE+. It
|
|
|
|
simplifies the config file by removing default values. However,
|
|
|
|
this only works with kernels starting from 2.6.33. For earlier
|
2014-09-19 03:39:26 +08:00
|
|
|
kernels, use +make linux-update-config+.
|
|
|
|
* +make busybox-update-config+ saves the busybox configuration to the
|
|
|
|
path specified by +BR2_PACKAGE_BUSYBOX_CONFIG+.
|
|
|
|
* +make uclibc-update-config+ saves the uClibc configuration to the
|
|
|
|
path specified by +BR2_UCLIBC_CONFIG+.
|
|
|
|
* +make barebox-update-defconfig+ saves the barebox configuration to the
|
|
|
|
path specified by +BR2_TARGET_BAREBOX_CUSTOM_CONFIG_FILE+.
|
2015-07-17 03:19:05 +08:00
|
|
|
* +make uboot-update-defconfig+ saves the U-Boot configuration to the
|
|
|
|
path specified by +BR2_TARGET_UBOOT_CUSTOM_CONFIG_FILE+.
|
2014-09-19 03:39:26 +08:00
|
|
|
* For at91bootstrap3, no helper exists so you have to copy the config
|
|
|
|
file manually to +BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE+.
|
|
|
|
|
|
|
|
|