world leader in high performance signal processing
Trace: » vendors

Managing buildroot Vendor/Board Settings

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.

Configuration Files

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 Selection
  • buildroot/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.

Adding Your Board to the buildroot Distribution

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.

In 2012R1-RC6-BF60X release

  1. Create your own vendors directory. We'll use the example Awesome vendor.
    $ mkdir target/device/Awesome
  2. Copy an existing similar board configuration directory. Many examples may be found in the 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/
  3. Copy an existing Linux kernel config.
    $ cp linux-2.6.x/arch/blackfin/configs/BF609-EZKIT_defconfig linux-2.6.x/arch/blackfin/configs/MyBoard_defconfig
  4. Rename the target company name in target/device/Awesome/Config.in
  5. Rename the target board name in target/device/Awesome/arch-bfin/Config.in and target/device/Awesome/arch-bfin/Makefile.in
  6. Source target/device/Awesome/Config.in in target/Config.in

Having 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.

In 2012R2 and later release

  1. Create your own vendors directory. We'll use the example Awesome vendor.
    $ mkdir board/Awesome
  2. Copy an existing similar board configuration directory. Change the board files and rootfs skeleton by hand. Many examples may be found in the board/AnalogDevices directory. We'll use the example MyBoard for the board name.
    $ cp -R board/AnalogDevices/blackfin/ board/Awesome/
  3. Copy an existing Linux kernel config.
    $ cp linux-2.6.x/arch/blackfin/configs/BF609-EZKIT_defconfig linux-2.6.x/arch/blackfin/configs/MyBoard_defconfig
  4. Copy an existing buildroot default config for the Blackfin evaluation board and run make Myboard_defconfig
  5. Run make menuconfig. Change target arch, ABI, processor, processor revision, toolchain configuration, system configuraton and kernel default config name, etc. according to your board.
  6. Run make savedefconfig and copy to your Myboard_defconfig.

After all above is finished, build the buildroot for your board by running “make”.

/etc files

These are files copied straight to the board via the romfs directory.

  • group
  • fstab - Put the file system you wish to mount in this file to mount it at booting up.
  • host.conf
  • hosts - 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.
  • passwd
  • protocols - 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.

Saving buildroot Distribution Settings

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.

Recalling uClinux Distribution Settings

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.