OpenWrt is an open source project for embedded operating system based on Linux, primarily used on embedded devices to route network traffic. All components have been optimized to be small enough to fit into the limited storage and memory available in home routers.

OpenWrt is configured using a command-line interface (ash shell), or a web interface (LuCI). OpenWrt can run on various types of devices, including CPE routers, residential gateways, smartphones, pocket computers and laptops etc.

Currently the OpenWrt can build

  • AT91Bootstrap
  • u-boot-at91
  • linux-at91
  • A cross-compiler optimized for at91 SoC
  • Root filesystems of different types
  • Bootable SD card Image

Related Links

How to build OpenWrt for AT91


Host build system should be a Linux system with necessary software installed.

Note You can install missing packages using yum install with Fedora or apt-get install with Ubuntu or Debian. These commands may require root privileges or being in a correct sudoers group.

Get sources

You can easily download OpenWrt sources from our OpenWrt git repository.

To get the source code, you should clone the repository:

$ git clone
Cloning into openwrt-at91...
remote: Counting objects: 359853, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 359853 (delta 3), reused 2 (delta 2), pack-reused 359848
Receiving objects: 100% (359853/359853), 132.32 MiB | 4.01 MiB/s, done.
Resolving deltas: 100% (240869/240869), done.
Checking connectivity... done.
$ cd openwrt-at91

The source code has been taken from the master branch which is pointing on the latest version of OpenWrt. If you want to use a specific release, you can list them and use one of them by doing this:

$ git checkout  openwrt-2018.03-at91 -b openwrt-2018.03-at91 

To benefit the latest enhancements for Microchip products, you are advised to use the openwrt-2018.03-at91 branch.

Build OpenWrt images

The OpenWrt image contains the following components:

  • BOOT.BIN (AT91Bootstrap)
  • U-boot.bin (U-Boot)
  • zImage (kernel image)
  • at91 Device tree blob
  • Root filesystems of different types
  • Bootable SD card Image

The OpenWrt build system configuration interface handles the selection of the target platform, packages to be compiled, packages to be included in the firmware file, some kernel options, etc. Start the OpenWrt build system configuration interface by issuing the following command

Download and install all available "feeds" (see Openwrt feeds for more options):

$ ./scripts/feeds update  -a
$ ./scripts/feeds install  -a 

you'll find a configs folder containing several default configurations for different At91 sama5 targets. If you want to build the OpenWrt image we provide for sama5d2_Xplained board, you'll have to do:

$ cp configs/sama5d2_xplained_defconfig  .config
$ make defconfig 

Everything is now ready for building the image(s), which is done with one single command:

$ make 

After a successful build, the freshly built images can be found in the newly created <openwrt-at91> /bin/target/ directory. The compiled files are additionally classified by the target platform, so e.g. a firmware built for an at91 sama5d2 xplained device will be in <openwrt-at91>/bin/target/at91/sama5d2 directory

$ $ ls bin/targets/at91/sama5d2-glibc/

To write the compressed image on the SD card, follow steps mentioned in Create a SD card with the demo.

Cross toolchain

While creating the OpenWrt images, OpenWrt will build a cross toolchain (or will download or use one present on your machine). You can find it under staging_dir/toolchain-arm_cortex-a5_gcc-5.5.0_glibc_eabi/bin

$ ls staging_dir/toolchain-arm_cortex-a5+neon-vfpv4_gcc-7.3.0_glibc_eabi/bin/
arm-openwrt-linux-addr2line  arm-openwrt-linux-gcc-ar             arm-openwrt-linux-gnueabi-c++         arm-openwrt-linux-gnueabi-gcov       arm-openwrt-linux-gnueabi-ranlib   arm-openwrt-linux-objdump  iconv          sprof
arm-openwrt-linux-ar         arm-openwrt-linux-gcc-nm             arm-openwrt-linux-gnueabi-c++filt     arm-openwrt-linux-gnueabi-gcov-dump  arm-openwrt-linux-gnueabi-readelf  arm-openwrt-linux-ranlib   ldd            tzselect
arm-openwrt-linux-as         arm-openwrt-linux-gcc-ranlib         arm-openwrt-linux-gnueabi-cpp         arm-openwrt-linux-gnueabi-gcov-tool  arm-openwrt-linux-gnueabi-size     arm-openwrt-linux-readelf  locale         xtrace
arm-openwrt-linux-c++        arm-openwrt-linux-gcov               arm-openwrt-linux-gnueabi-elfedit     arm-openwrt-linux-gnueabi-gdb        arm-openwrt-linux-gnueabi-strings  arm-openwrt-linux-size     localedef
arm-openwrt-linux-c++filt    arm-openwrt-linux-gcov-dump          arm-openwrt-linux-gnueabi-g++         arm-openwrt-linux-gnueabi-gprof      arm-openwrt-linux-gnueabi-strip    arm-openwrt-linux-strings  makedb
arm-openwrt-linux-cpp        arm-openwrt-linux-gcov-tool          arm-openwrt-linux-gnueabi-gcc         arm-openwrt-linux-gnueabi-ld         arm-openwrt-linux-gprof            arm-openwrt-linux-strip    mtrace
arm-openwrt-linux-elfedit    arm-openwrt-linux-gdb                arm-openwrt-linux-gnueabi-gcc-7.3.0   arm-openwrt-linux-gnueabi-ld.bfd     arm-openwrt-linux-ld               catchsegv                  pcprofiledump
arm-openwrt-linux-g++        arm-openwrt-linux-gnueabi-addr2line  arm-openwrt-linux-gnueabi-gcc-ar      arm-openwrt-linux-gnueabi-nm         arm-openwrt-linux-ld.bfd           gencat                     pldd
arm-openwrt-linux-gcc        arm-openwrt-linux-gnueabi-ar         arm-openwrt-linux-gnueabi-gcc-nm      arm-openwrt-linux-gnueabi-objcopy    arm-openwrt-linux-nm               getconf                    readelf
arm-openwrt-linux-gcc-7.3.0  arm-openwrt-linux-gnueabi-as         arm-openwrt-linux-gnueabi-gcc-ranlib  arm-openwrt-linux-gnueabi-objdump    arm-openwrt-linux-objcopy          getent                     sotruss

The build system configuration interface

The build system configuration interface handles the selection of the target platform, packages to be compiled, packages to be included in the firmware file, some kernel options, etc. Start the build system configuration interface by writing the following command:

make menuconfig


Customizing Linux Kernel configuration

All the explanations are available in the OpenWrt developer guide under kernel configuration section.

Using an OpenWrt system

OpenWrt has the following ways to configure stuff:

  • There is “UCI” (Unified Configuration Interface) to store and manipulate all its configuration. This is an OpenWrt-own format and standard for config files and command line utilities to configure OpenWrt-related stuff)
  • There is “LuCi” - a web GUI interface for UCI, by default usually listening at LuCi is based on LUA and its a OpenWrt own standard as well. You can also enable https for LuCi access. Not all options may be available in LuCi and LuCi requires about 1MB of flash space.


  • There are several classic Linux config files also used in on OpenWrt devices. These files use the same format and config options as in other Linux distributions.
  • Optional installable packages sometimes integrate into the UCI config model and may also provide a LuCi config extension, but many extension packages also bring their own config files* Root File System's

Recent FAQ


Topic attachments
I Attachment Action Size Date Who Comment
PNGpng Openwrt-LuCi.png manage 77.8 K 2018-03-29 - 19:16 SandeepSheriker Openwrt-Luci
PNGpng Openwrt-Menuconfig.png manage 109.9 K 2018-03-29 - 19:14 SandeepSheriker Openwrt-Menuconfig
r4 - 04 Apr 2018 - 21:20:25 - SandeepSheriker
Linux & Open Source related information for AT91 Smart ARM Microcontrollers

Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.

Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.

Atmel® and others, are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. This site is powered by the TWiki collaboration platform

ARM® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.

Ideas, requests, contributions ? Connect to LinksToCommunities page.

Syndicate this siteRSS ATOM