It is a fact of life that right after you download a buildroot distribution release, spend a few months getting everything working with your custom applications, and custom drivers, that a new release will be available. This will often add a new feature that you are looking for, or include a bug fix that you require. The problem is how to upgrade with minimum effort while ensuring that all your settings are not wiped out in the process.
There are a few configuration files which control the different parts of the distribution. Keep in mind that none of these files should be modified by hand.
buildroot/.config - the top level configuration file, which is generated by make menuconfig, which controls the Vendor/Product Selectionbuildroot/output/build/linux-custom/.config - kernel and driver configuration file
Each platform contains a default version of the top level configuration in the buildroot/configs folder. The default kernel configuration is taken from the Linux kernel (buildroot/linux/linux-kernel/arch/blackfin/configs/BF609-EZKIT_defconfig in this example).
For information on how to port the Linux kernel to your board (the files found under uClinux-dist/linux-2.6.x/ and the options that appear in the kernel configuration menu), see the guide specifically for this task of porting the Linux kernel.
The first step in any serious development would be to create your own platform into the GNU configuration system. This is a simple matter of creating a new directory, copying in a existing directory that is close, editing some files, and then setting the defaults, and saving them. To select the target, see the section on build_a_target.
Awesome vendor. $ mkdir target/device/Awesome
AnalogDevices vendor directory. We'll use the example MyBoard for the board name. $ cp -R target/device/AnalogDevices/ target/device/Awesome/ $ mv target/device/Awesome/arch-bfin/bf609-ezkit/ target/device/Awesome/bfin-arch/MyBoard $ rm -rf target/device/Awesome/arch-bfin/bf537-stamp/
$ cp linux-2.6.x/arch/blackfin/configs/BF609-EZKIT_defconfig linux-2.6.x/arch/blackfin/configs/MyBoard_defconfig
target/device/Awesome/Config.intarget/device/Awesome/arch-bfin/Config.in and target/device/Awesome/arch-bfin/Makefile.intarget/device/Awesome/Config.in in target/Config.inHaving done this, the new vendor name will show up as an option in the top level menu. The boards, based on directory entries, are also added automatically as each vendor selection is made.
When a new vendor / board combination is selected, the buildroot distribution will clean up all files from the previous board and then reconfigure and rebuild the kernel, libraries, and user code based on the default configuration options available for the new vendor / board selection.
Awesome vendor. $ mkdir board/Awesome
board/AnalogDevices directory. We'll use the example MyBoard for the board name. $ cp -R board/AnalogDevices/blackfin/ board/Awesome/
$ cp linux-2.6.x/arch/blackfin/configs/BF609-EZKIT_defconfig linux-2.6.x/arch/blackfin/configs/MyBoard_defconfig
make Myboard_defconfigmake menuconfig. Change target arch, ABI, processor, processor revision, toolchain configuration, system configuraton and kernel default config name, etc. according to your board.make savedefconfig and copy to your Myboard_defconfig.After all above is finished, build the buildroot for your board by running “make”.
These are files copied straight to the board via the romfs directory.
groupfstab - Put the file system you wish to mount in this file to mount it at booting up.host.confhosts - This file describes a number of hostname-to-address mappings for the IP subsystem. It is mostly used at boot time, when no name servers are running. On small systems, this file can be used instead of a “named” name server or a standard DNS server.inetd.conf - Services for the Internet super daemon to startup.inittab - The inittab file describes which processes are started at bootup and during normal operation (e.g. /etc/init.d/boot, /etc/init.d/rc, gettys…). Init distinguishes multiple runlevels, each of which can have its own set of processes that are started. Valid runlevels are 0-6 plus A, B, and C for ondemand entries. For more information check man 5 inittab on a Linux based host.motd - Message of the Day. This prints out at every login.passwdprotocols - Mapping of textual names of TCP/IP protocols to numerical values. See man 5 protocols for more information.rc - Script file run at every boot before processing /etc/inittab.services - Mapping of textual names of internet services and the actual port/protocol. See man 5 services for more information.
When you have a configuration that you would like to ensure is not lost, you can save the settings in the various user config files by selecting Save an Alternate Configuration File in make menuconfig.
If you have made a mistake when doing make menuconfig it is possible to remove any changes, and go back to previously saved settings by Load an Alternate Configuration File.