Open main menu

DAVE Developer's Wiki β

Creating a RFS with Buildroot

Revision as of 13:24, 9 January 2013 by DevWikiAdmin (talk | contribs) (Configuring Buildroot)

Info Box
Tux.png Applies to Linux
Naon am387x-dm814x.png Applies to Naon

Contents

IntroductionEdit

Buildroot is a set of scripts and patches for the creation of a cross-compilation toolchain as well as the creation of a complete root file system. Buildroot provides:

  • support for prebuilt or external toolchains
  • configuration through menuconfig, gconfig and xconfig interfaces
  • lots of available libraries, tools, packages and utilities
  • support for all the major filesystems (JFFS2, UBIFS, CRAMFS, ...)
  • uClibc, glibc, eglibc generation, or use of the libc from the external toolchain
  • easy customization through Makefiles

ReferencesEdit

Getting BuildrootEdit

Buildroot releases can be downloaded from http://buildroot.net/downloads/

Daily Snapshots of the latest Buildroot source tree can be downloaded from http://buildroot.uclibc.org/downloads/snapshots/

The source tree can be browsed online: http://git.buildroot.net/buildroot/ and a copy of the repository can be grabbed with the following commands:

The following is the project directory tree:

.
├── arch
├── board
├── boot
├── CHANGES
├── Config.in
├── Config.in.legacy
├── configs
├── COPYING
├── docs
├── fs
├── linux
├── Makefile
├── Makefile.legacy
├── package
├── support
├── system
└── toolchain

Configuring BuildrootEdit

For modifying the Buildroot configuration, enter the project directory and enter the following command:

make menuconfig

You can optionally use the O= parameter to set a specific build folder:

make O=<path_to_build_directory> menuconfig


Setting up the target architectureEdit

From the menuconfig interface, you need to select:

  • Target Architecture -> Select "ARM (little endian)"
  • Target Architecture Variant -> Select "cortex-A8"
  • Target ABI -> Select "EABI"

 


Setting up the external toolchainEdit

You need to set the path and prefix for the external toolchain:

  • Toolchain -> Toolchain type -> Select "External Toolchain"
  • Toolchain -> Toolchain -> Select "Custom Toolchain"
  • Toolchain -> Toolchain origin-> Select "Pre-installed toolchain"
  • Toolchain -> Toolchain path (eg. /home/shared/devel/dave/naon-DAA/sw/linux/sdk/arm-2009q1)
  • Toolchain -> Toolchain prefix (eg. $(ARCH)-none-linux-gnueabi-)

 


System configurationEdit

Entering the "System configuration" option you should set:

  • System hostname (NEW)
  • System banner (NEW)
  • Port to run a getty (login prompt) on -> Enter ttyO0
  • () Custom script to run before creating filesystem images -> If required, you can run custom scripts to do board-specific cleanups, add-ons and the like, so the generated files can be used directly without further processing.

 


Package selectionEdit

The list of available packages can be accessed entering the Package selection for the target option