RouterStation Pro OpenWRT Image Howto

A RouterStation Pro is an embedded Linux board produced by Ubiquity with some interesting and affordable hardware specs.  One of the main features that makes the Routerstation Pro such an attractive device is the 3 Mini-PCI slots and SDIO slot.

The RouterStation Pro comes preloaded with a relatively old installation of OpenWRT Kamikaze and I wanted to use the latest stable release of OpenWRT backfire.  This howto was for Kubuntu 11.04 x64, but I did have it built compiled on Fedora 15 x64.  Your milage may vary.


Building a custom OpenWRT Routerstation Pro image

Install the following for Kubuntu:

apt-get install build-essential manpages-dev manpages-posix-dev binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev lib32gcc1 libc6-dev-i386 subversion flex meld automake

Install the following in Fedora

yum install asciidoc binutils bzip2 libgcj gcc-c++ gcc gawk gtk2-devel intltool zlib-devel make ncurses-devel openssl-devel patch perl-ExtUtils-MakeMaker rsync ruby sdcc unzip wget gettext libxslt zlib-devel subversion

Checkout the latest stable sources:

mkdir ~/OpenWrt/

cd ~/OpenWrt/

svn co svn://

Now run the following:

cd backfire

./scripts/feeds update -a

./scripts/feeds install -a

The above two scripts update the packages for your build and installs them.

make menuconfig

You should now see a screen similar to the following:

Make menuconfig default menu after the first build

Now you select some options to specify that we are building an OpenWRT image for a RouterStation Pro:

Target System (Atheros AR71xx/AR7240/AR913x)

Target Profile (Ubiquiti RouterStation Pro)

Secondly, the openwrt prebuilt image listed here has the following packages installed - it might be a good idea to go ahead and build them into your image as well or just make sure that they are there.

  • base-files - 42-r20728
  • busybox - 1.15.3-2
  • dnsmasq - 2.52-2
  • dropbear - 0.52-4
  • firewall - 1-10
  • hotplug2 - 1.0-beta-1
  • iptables - 1.4.6-2
  • iptables-mod-conntrack - 1.4.6-2
  • iptables-mod-nat - 1.4.6-2
  • kernel -
  • kmod-button-hotplug -
  • kmod-crc-ccitt -
  • kmod-input-core -
  • kmod-input-gpio-buttons -
  • kmod-input-polldev -
  • kmod-ipt-conntrack -
  • kmod-ipt-core -
  • kmod-ipt-nat -
  • kmod-ipt-nathelper -
  • kmod-leds-gpio -
  • kmod-ppp -
  • kmod-pppoe -
  • libc -
  • libgcc - 4.3.3+cs-42
  • libiptc - 1.4.6-2
  • liblua - 5.1.4-6
  • libnl-tiny - 0.1-1
  • libuci - 12012009.5-1
  • libuci-lua - 12012009.5-1
  • libxtables - 1.4.6-2
  • lua - 5.1.4-6
  • luci - 0.9.0-1
  • luci-admin-core - 0.9.0-1
  • luci-admin-full - 0.9.0-1
  • luci-admin-mini - 0.9.0-1
  • luci-app-firewall - 0.9.0-1
  • luci-app-initmgr - 0.9.0-1
  • luci-cbi - 0.9.0-1
  • luci-core - 0.9.0-1
  • luci-http - 0.9.0-1
  • luci-i18n-english - 0.9.0-1
  • luci-ipkg - 0.9.0-1
  • luci-lmo - 0.9.0-1
  • luci-nixio - 0.9.0-1
  • luci-sgi-cgi - 0.9.0-1
  • luci-sys - 0.9.0-1
  • luci-theme-base - 0.9.0-1
  • luci-theme-openwrt - 0.9.0-1
  • luci-uci - 0.9.0-1
  • luci-uvl - 0.9.0-1
  • luci-web - 0.9.0-1
  • mtd - 12
  • opkg - 513-2
  • ppp - 2.4.4-5
  • ppp-mod-pppoe - 2.4.4-5
  • swconfig - 5
  • uci - 12012009.5-1
  • udevtrigger - 106-1
  • uhttpd - 7

If you have an Ubiquiti SR71-12 install the following three packages, but you may want to install other packages such as wireless tools and  openssh-server:

  • opkg install wpad
  • opkg install kmod-madwifi
  • opkg install kmod-ath9k

To configure Ubiquiti wireless cards please see the next post.

Select the Exit option by pressing the right arrow key, then hit Enter. Save the config, then:

make V=99 -j3

Note: -j3 will run 3 concurrent processes on a dualcore system to speed up the build process.

Once the compile has finished, you should have several image files like the ones listed below:

ls bin/ar71xx/

  • md5sums
  • openwrt-ar71xx-rootfs.tar.gz
  • openwrt-ar71xx-root.jffs2-128k
  • openwrt-ar71xx-root.jffs2-64k
  • openwrt-ar71xx-root.squashfs
  • openwrt-ar71xx-root.squashfs-4k
  • openwrt-ar71xx-ubnt-rspro-jffs2-factory.bin
  • openwrt-ar71xx-ubnt-rspro-jffs2-sysupgrade.bin
  • openwrt-ar71xx-ubnt-rspro-squashfs-factory.bin
  • openwrt-ar71xx-ubnt-rspro-squashfs-sysupgrade.bin
  • openwrt-ar71xx-uImage-gzip.bin
  • openwrt-ar71xx-uImage-lzma.bin
  • openwrt-ar71xx-vmlinux.bin
  • openwrt-ar71xx-vmlinux.elf
  • openwrt-ar71xx-vmlinux.gz
  • openwrt-ar71xx-vmlinux.lzma
  • packages

The file we want to use for the image is this one: “openwrt-ar71xx-ubnt-rspro-jffs2-factory.bin”.


Flashing the Routerstation Pro with your custom image

Boot the system in recovery mode by holding the reset switch for a few seconds while powering on the device.

Check what IP address your router is using because the default IP from the factory firmware is, but the OpenWRT image for the routerstation pro is

Upload the new firmware to the device through WAN port using TFTP on the default IP address,

tftp -m binary -c put openwrt-ar71xx-ubnt-rspro-jffs2-factory.bin

Give your router 10 minutes for the recovery process to run.

Now you can get back into the device by using OpenWrt's failsafe mode to change the password.

  • Unplug the router's power cord.

  • Connect the router's LAN1 port directly to your PC.

  • Configure your PC with a static IP address between and plug your ethernet connection into LAN port 1.

  •  Hold the reset button down and plug the power back in. 

  • Hold the reset button down until the RF LED on the front of the board becomes solid.

  • You should be able to Telnet to the router at now (there is no username and password)

Run the passwd command to change your password, reboot and SSH into the device using your new credentials.


For more information:

Blog tags: 


differences from

It's a really good tutorial, very useful but at the beginning I try to run the instructions ./scripts update -a ./scripts install -a They do not work. Then I've read the openwrt wiki and I found the instruction ./scripts/feeds update -a ./scripts/feeds install -a
admin's picture


Thanks for the update.  You are correct and I will make the changes.  How did the rest of your install go?

It was ok, thank you. Do you

It was ok, thank you. Do you know if it is possible to install gcc in the RouterStation Pro? I would like to compile my applications on there, because cross-compilation cause me a lot of errors.
admin's picture

GCC and uclibc

Shouldn't be an issue, I installed uclibc and gcc without issue although the programs will use up a fair bit of flash.It might be a good idea to make the programs seperately then put them onto say an SD card to avoid using flash and the read/writes on the flash itself.Run makemenuconfig and they are listed like so.libraries >> uclibcxxdevelopment >> binutilsdevelopment >> makedevelopment >> patchbase system >> libcbase system >> libpthreadIn feeds/packages.index I see GCC listed as well so I don't see why not. Source-Makefile: feeds/packages/devel/gcc/Makefile Package: gcc Version: 1 Depends: @TARGET_x86 @NO_STRIP Provides: Section: devel Category: Development Title: gcc Maintainer: OpenWrt Developers Team Source: gcc-.tar.bz2 Type: ipkg Description: build a native toolchain for compiling on target @@

How to install native gcc compiler in OpenWrt

Sorry, I am quite new to the OpenWrt. But I need to install a gcc compiler into the Openwrt for compiling some C codes for libraries of software to be install in the OpenWrt (which is currently installed in a Virtual Box in Ubuntu environment). (later will be transfer to a router like hardware) Can you describe in more details how to install gcc in OpenWrt? I found that the current gcc Makefile is transfer to root/packages/devel/Makefile and I cannot find in into the feeds path. Thank you very much
admin's picture

gcc compiler

Well you can cross compile the package you want to port or you can do what you are proposing - building a gcc package that is cross compiled.You can build gcc, provided that:- you build x86 target- select NO_STRIP optionIn menuconfig select: Advanced configuration options (for developers): y > build a non-stripped system, so gcc can be run natively on target: y and save your config. By the way on backfire it is not under Advanced option, but Global build settings -> Binary stripping method -> none and then change target to x86.Run: ./scripts/feeds install -d m build-essentialThen in that case just select devel/build-essential package (gcc, binutils, ...)GCC appears to live in the make menuconfig > devel > build-essential and give it a M to build the package.Finally go to to the bin directory where armeb is your arch - bin/packages/armeb/The package should be there with the extension .ipk.All you have to do then is get it onto your router or VM and run opkg install YourPackage. Unfortunately, cross-compiling is what you should do since gcc and having a native environment isn't exactly the best since space and speed on embeded systems isn't what a workstation environment is.

gcc for other platform of Openwrt

Thank you for your instructions! What if the gcc for other platform other than x86? Can we generated gcc for other platform by buildroot?
admin's picture


In this case you would have to create another config or profile for your build environment - which in fact we have done that. You can create a config directory and copy your .config file into it. Then remake the build environment and specify different targets.. Whenever you change platforms just copy your config into the buildroot main directory and overwrite the other one.See comment below on how to get gcc to work - but it can be done no sweat. Cross compiling is probably a better option since most embedded devices don't have that much space (although usb and sdio are there) and flash has limited writes.

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <python> <c>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.