User Tools

Site Tools


Development FAQ

See also the OpenWrt development center website. There you can browse the source code and send reproducible bugs with the ticket system (in trac).

other articles worth reading:

  1. about the Toolchain
  2. about it's installation OpenWrt Buildroot – Installation
  3. about it's usage OpenWrt Buildroot – Usage

What system can I build OpenWrt on?

OpenWrt Buildroot needs a case sensitive file system. It should work on almost any Linux distribution.

  • Tested: Debian (6, 7, 8), Ubuntu, Fedora 19,20 , Arch Linux, OpenSuse 13.3
  • Exotic Linux variants might have some bugs regarding headers (Alpine Linux).
  • BSD (FreeBSD), MacOSX are somewhat untested.
  • Cygwin (Windows) has possible issues with file system being not case sensitive.

Recommended: Build older versions with older Linux versions in a VM.

Where is the source code?

Almost every software in OpenWrt is available as a package. OpenWrt *downloads* code (using archive, git …) compiles it and includes in the final image. Every archive lands in "dl" directory". Every code (from archive or git) is available in build_dir.

A mirror of package sources is maintained at

How much disk space is needed for compiling?

Approximately required disc space for compiling OpenWrt:

Branch Min. Max.
typical, Stable 1.5 GB 3.5 GB
Development ? 3.8 GB
Development+feeds ? >5 GB
all feeds/pkgs x ~45 GB
all feeds+debug FIXME

Typical: Compile an Image that is working on typical consumer routers that have 4MB or 8MB flash.

Compiling also tested on some Windows OS under AndLinux (coLinux + Ubuntu)

How much time is needed for compiling?

Build-time is highly dependable on the number of Cores/Jobs and can be shrunk to less than 30 minutes (from 90 minutes). Build time with single core can take several hours.

make jobs time needed source
1, typical ?
1, all 10h48min buildbot
2, all, local feed mirrors 3h40min
4, typical 45min
4, all, local feed mirrors 2h17min

Typical: Select packages fitting into 8MB flash, build on HDD, ar71xx or brcm47xx target


How can I speed up build process?

  • Use -j switch to enable parallel builds
  • Use local mirror to avoid downloads (advanced build options)


  • use local feeds ( src-link ) instead of downloading with git

Building on multi-core CPU

:!: Build may FAIL

The build process can be accelerated by running multiple concurrent job processes using the -j-option:

make -j 3

  • Use the standard formula <your number of CPU cores + 1>
  • If this produces random build errors try compiling again without the -j-option

Errors building gcc

If the build fails with errors that include [s-attrib] Killed and [all-gcc] Error 2 while compiling gcc, this indicates you are out of disk space or RAM. This could be likely if you are building within a virtual machine with < 1 Gb RAM allocated and no swap.

I built an image and it's too large! My rootfs is too small! My router does not remember settings!

Root cause:

  • You selected too many packages in menuconfig: Packages selected with "y" or shown as "*" get included in squashfs instead of installing them later to jffs2.


  • Delete unused base packages: :!: be very careful :!:
    Example ppp: luci automatically selects ppp. This is not always needed. In menuconfig,
    1. de-select luci
    2. pick the components manually: luci-base, luci-mod-admin-full, luci-theme-bootstrap
  • Use extroot
  • Disable busybox features
  • Hardware mod your router with larger flash ( :!: possible bootloader modification )

How do I create a package?

I can't find my package in menuconfig

  1. Have you run this command? See this.
    ./scripts/feeds install <package>
  2. Maybe you are not looking for it in the right submenu. See the Makefile of the package to find out.
    cat feeds/<feedname>/<package>/Makefile
    You are looking for this:
    define Package/<package>/Default SUBMENU:=Firewall SECTION:=net CATEGORY:=Network
  3. Menuconfig appears to cache package lists and (especially) profiles. Try deleting the <buildroot_dir>/tmp directory and then running make menuconfig again.
    cd ~/openwrt/trunk
    rm -rf tmp
    make menuconfig
    Also try refreshing your package indexes:
    ./scripts/feeds update -i
    The -i is important if you're not using the latest revisions of any packages, as this flag prevents updates from the feed sources.

I can't find my router in menuconfig

Some platforms dont offer specialized single targets per router because most routers use almost the same configuration and do not require special packages for USB, ethernet or wireless. Selecting the default generic target will build images for all single targets. Examples: Ralink/Mediatek (ramips) devices

Common errors

Unclean buildroot

- Files inside the buildroot are specific to host systems.

Build dependency: Please install GNU find

# old files in staging_dir/host

- remove untracked files with the help of svn or git

- use make targets depending on what you don't want

make clean
make dirclean
make distclean
make target/linux/clean *
rm -rf tmp/
rm .config .config.old
* Kernel Config change is not triggering rebuild, see: openwrt-devel

If you are running a buildroot inside a VM with many threads you might experience random build failures.

Setup: Host: i7 16GB RAM, VM on Harddisk, Win 7 64bit, VMWare Player Guest: Lubuntu 13.04 64bit 4GB RAM ext4 partition make -j 8

Errors: Build fails like

mv: cannot stat '.deps/dlog.Tpo': No such file or directory


../libtool: line 46: -c: command not found
libtool: Version mismatch error.  This is libtool 2.4, but the
libtool: definition of this LT_INIT comes from libtool 2.2.6.
libtool: You should recreate aclocal.m4 with macros from libtool 2.4
libtool: and run autoconf again.

Cleaning up buildroot helps sometimes, reduce concurrency.

How do I send patches?

  • use git send-email
  • send patch inline
  • sending mail via web clients can break patches even if they say they support text format (gmail)

Yes, of course. If you find any bugs, please use our ticket system or send a report to . Patches for the bugs should be send to the mailing list.

/!\ NOTE: Changes to the buildroot system or the associated Makefiles could break the compile process. Please do not submit bug reports against modified copies of buildroot. Thanks!

How can I help or contribute?

see: How can I contribute?


The OpenWrt build bots provide a list of broken packages:

There is a comparison of OpenWrt and upstream package versions available:


The mailing list: generates Patchwork entries:

doc/faq/development.txt · Last modified: 2016/07/03 12:19 by theoradicus