User Tools

Site Tools


OpenWrt Buildroot – Installation

OpenWrt Buildroot is the buildsystem for the OpenWrt Linux distribution. OpenWrt Buildroot works on Linux, BSD or MacOSX operating system. A case-sensitive filesystem is required.

It is recommended that you use a Linux distribution (Debian), either a standalone installation or one running in a virtual environment (VMware or Qemu).

Cygwin(Windows) will not be supported because of the lack of case sensitiveness in the file system.


to generate an installable OpenWrt firmware image file with a size of e.g. 8MB:

  • ca. 150 MB of hard disk space for OpenWrt Buildroot
  • ca. 350 MB of hard disk space for OpenWrt Buildroot + OpenWrt Feeds
  • ca. 2.1 GB of hard disk space for source packages downloaded during build from OpenWrt Feeds
  • ca. 3-4 GB of available hard disk space to build (i.e. cross-compile) OpenWrt and generate the firmware file

Install procedure on Linux

1. Do everything as non-root user!
2. Issue all OpenWrt Buildroot commands in the <buildsystem root> directory, e.g. ~/openwrt/trunk/
3. Do not build in a directory that has spaces in its full path
4. Change Ownership other than root user,of the directory where you Download the OpenWrt (sudo chown -R user:user /openwrt/)
  1. Install git , to conveniently download the OpenWrt source code, and build tools to do the cross-compilation process:
    sudo apt-get update
    sudo apt-get install git-core build-essential libssl-dev
    Some feeds might not available over git but only via subversion (short: svn). If you want to obtain their source-code, you need to install svn as well:
    sudo apt-get install subversion
  2. Download the OpenWrt bleeding edge with git (see Downloading Sources for more options!):
    git clone git://

    this creates a directory 'openwrt', which is the OpenWrt Buildroot build-directory
    the OpenWrt toolchain "OpenWrt Buildroot" is included

  3. (optional) Download and install all available "feeds" (see Downloading and Installing Feeds for more options!):
    cd openwrt
    ./scripts/feeds update -a
    ./scripts/feeds install -a
  4. Make OpenWrt Buildroot check for missing packages on your build-system using one of the following commands:
    make defconfig
    make prereq
    make menuconfig

    There you will need to select what you want to compile.

  5. Proceed with build (i.e. cross-compile the downloaded sources to binaries)

    After the cross-compilation process the ''trunk''-directory contained 244,451 files with a total size of 3.2GiB!

Table of known prerequisites and their corresponding packages

Here's a table with the package name for each prerequisite separated for different GNU/Linux and Unix like distributions.

Prerequisite Debian SUSE Red Hat OS X (via MacPorts) Fedora NetBSD Arch Gentoo
asciidoc asciidoc asciidoc asciidoc asciidoc asciidoc ? asciidoc app-text/asciidoc
GNU Bash bash bash bash bash bash bash bash app-shells/bash
GNU bc bc bc bc bc sys-devel/bc
GNU Binutils binutils binutils binutils binutils binutils ? binutils sys-devel/binutils
bzip2 bzip2 bzip2 bzip2 bzip2 bzip2 ? bzip2 app-arch/bzip2
fastjar fastjarfastjar libgcj fastjar libgcj ? fastjar app-arch/fastjar
flex flexflex flex flex flex ? flex sys-devel/flex
git git-core git-core git git-core git ? git dev-vcs/git
GNU C++ Compiler g++ gcc-c++ gcc-c++ ? gcc-c++ ? gcc sys-devel/gcc
GNU C Compiler gcc gcc gcc ? gcc ? gcc sys-devel/gcc
getopt util-linux util-linux util-linux getopt util-linux getopt util-linux sys-apps/util-linux
GNU awk gawk gawk gawk gawk gawk ? gawk sys-apps/gawk
gtk2.0-dev libgtk2.0-dev gtk2-devel gtk2-devel gtk2 gtk2-devel ? gtk2 x11-libs/gtk+ (?)
intltool-update intltool intltool intltool intltool intltool ? intltool dev-util/intltool
jikes jikespg jikes ? jikes ? aur/jikes dev-java/jikes
libz, libz-dev zlib1g-dev zlib-devel zlib-devel zlib zlib-devel ? zlib sys-libs/zlib
Mercurial / hg mercurial hg
make make make make gmake make gmake make sys-devel/make
mkisofs genisoimage genisoimage ? ? genisoimage ? cdrkit app-cdr/cdrtools
ncurses libncurses5-dev ncurses-devel ncurses-devel ncurses ncurses-devel ? ncurses sys-libs/ncurses
openssl/ssl.h libssl-dev libopenssl-devel openssl-devel openssl openssl-devel ? openssl dev-libs/openssl
patch patch patch patch patchutils patch ? patch sys-devel/patch
perl-ExtUtils-MakeMaker perl-modules perl-ExtUtils-MakeMaker perl-ExtUtils-MakeMaker p5-extutils-makemaker perl-ExtUtils-MakeMaker ? perl-extutils-makemaker virtual/perl-ExtUtils-MakeMaker
python2.6-dev python2.6-dev python-devel ? python26 python-devel ? python2 dev-lang/python
rsync rsync rsync rsync rsync rsync ? rsync net-misc/rsync
ruby ruby ruby ? ruby ruby ? ruby dev-lang/ruby
sdcc sdcc sdcc sdcc sdcc sdcc ? sdcc dev-embedded/sdcc
unzip unzip unzip unzip unzip unzip ? unzip app-arch/unzip
GNU Wget wget wget wget wget wget ? wget net-misc/wget
xgettext gettext gettext-tools gettext gettext gettext ? gettext sys-devel/gettext
xsltproc xsltproc libxslt-tools ? libxslt libxslt ? libxslt dev-libs/libxslt
zlib, zlib-static zlib1g-dev zlib-devel zlib-devel zlib-devel zlib-devel ? zlib sys-libs/zlib

Unfortunately not all dependencies are checked by make config:

Package Prerequisite Debian SUSE Red Hat OS X Fedora NetBSD Arch Gentoo
boost bjam / boost-jam libboost1.53-dev boost-jam boost dev-util/boost-build
intltool [Perl] XML::Parser libxml-parser-perl perl-XML-Parser perl-XML-Parser intltool dev-perl/XML-Parser
libftdi libusb-config libusb-dev libusb-devel libusb dev-libs/libusb-compat
lilo as86,ld86 bin86 dev86 bin86 sys-devel/bin86
lilo bcc bcc dev86 aur/bcc sys-devel/dev86
lilo uudecode sharutils sharutils sharutils app-arch/sharutils
classpath javac, gcj openjdk-7-jdk java-1.7.0-openjdk-devel jdk7-openjdk dev-java/icedtea-bin, dev-java/oracle-jdk-bin, USE="gcj" sys-devel/gcc
mac80211 b43-fwcutter b43-fwcutter b43-fwcutter net-wireless/b43-fwcutter
jamvm zip zip

Examples of Package Installations

  • Arch Linux
    pacman -S --needed subversion asciidoc bash bc binutils bzip2 fastjar flex git gcc util-linux gawk intltool zlib make cdrkit ncurses openssl patch perl-extutils-makemaker rsync sdcc unzip wget gettext libxslt boost libusb bin86 sharutils b43-fwcutter findutils
  • Debian 6 Squeeze:
    apt-get install libncurses5-dev zlib1g-dev gawk flex libssl-dev sdcc-nf
  • Debian 7 Wheezy:
    apt-get install libncurses5-dev zlib1g-dev gawk
  • Fedora 20 - 64Bit (Maybe also for lower versions, some packages seem to be missing above):
    yum install -y subversion binutils bzip2 gcc gcc-c++ gawk gettext flex ncurses-devel zlib-devel make patch unzip perl-ExtUtils-MakeMaker \
     glibc glibc-devel glibc-static quilt ncurses-lib sed sdcc intltool sharutils bison wget
  • openSUSE 13.2
    zypper install asciidoc bash bc binutils bzip2 fastjar flex git-core gcc-c++ gcc util-linux gawk gtk2-devel intltool jikes zlib-devel mercurial make genisoimage ncurses-devel libopenssl-devel patch perl-ExtUtils-MakeMaker python-devel rsync ruby sdcc unzip wget gettext-tools libxslt-tools zlib-devel subversion
  • Ubuntu 12.04LTS:
    sudo apt-get install build-essential subversion git-core libncurses5-dev zlib1g-dev gawk flex quilt libssl-dev xsltproc libxml-parser-perl mercurial bzr ecj cvs unzip
  • Ubuntu 64bit:
    sudo apt-get install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext libssl-dev

Known variants to be broken

  • alpine linux uses musl as libc replacement. Some host tools fail to compile (mtd-utils, e2fsprogs). Detection possibly has to be overridden (gcc -dumpmachine outputs a result where some scripts will fail - tools/sed)

Downloading Sources


cloning the Git repository using one of the following commands:

trunk (main development tree)

The development branch (trunk) contains everything from documentation to experimental patches.

Main repository

git clone git://

Packages feed

git clone git://

14.07 branch (Barrier Breaker)

Main repository

git clone git://

Packages feed

git clone git://

12.09 branch (Attitude Adjustment)

Main repository

git clone git://

Packages feed

git clone git://

Check out certain revision

git commits are tagged with SVN ids.

git log --grep=<svn id>


see ​buildroot.exigence.old

:!: Accessing SVN may get your IP blacklisted on SVN and forum. Full SVN checkout can take a very long time compared to git. Using git is recommended by the developers.

Downloading and Installing Feeds

See →feeds

  • to install only individual packages:
    ./scripts/feeds install PACKAGENAME

Problem downloading and installing feeds ? If yes follow below…

  1. Open your directory where you have downloaded openwrt source using git or svn …
  2. Edit feeds.conf.default
  3. Comment below lines
    src-svn packages svn:// svn://
    src-svn luci 
  4. Copy below lines and save
    src-git packages
    src-git luci
  5. ./scripts/feeds update -a
  6. ./scripts/feeds install -a


  • Beware of unusual environment variables such as
    • GREP_OPTIONS which should not have –initial-tab or other options affecting its output
    • SED should not be set. If it is, run `unset SED` before compiling. (See Ticket 10612.)
doc/howto/buildroot.exigence.txt · Last modified: 2015/02/28 22:37 by theoradicus