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