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 asciidoc binutils bzip2 gawk gettext git libncurses5-dev libz-dev patch unzip zlib1g-dev ia32-libs lib32gcc1 libc6-dev-i386 subversion flex

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://svn.openwrt.org/openwrt/branches/backfire

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 - 2.6.32.10-1
  • kmod-button-hotplug - 2.6.32.10-1
  • kmod-crc-ccitt - 2.6.32.10-1
  • kmod-input-core - 2.6.32.10-1
  • kmod-input-gpio-buttons - 2.6.32.10-1
  • kmod-input-polldev - 2.6.32.10-1
  • kmod-ipt-conntrack - 2.6.32.10-1
  • kmod-ipt-core - 2.6.32.10-1
  • kmod-ipt-nat - 2.6.32.10-1
  • kmod-ipt-nathelper - 2.6.32.10-1
  • kmod-leds-gpio - 2.6.32.10-1
  • kmod-ppp - 2.6.32.10-1
  • kmod-pppoe - 2.6.32.10-1
  • libc - 0.9.30.1-42
  • 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 192.168.1.20, but the OpenWRT image for the routerstation pro is 192.168.1.1.

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

tftp 192.168.1.20 -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 192.168.1.4 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 192.168.1.1 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:

  • http://blueheaven.ws/2010/05/10/routerstation-pro-openwrt-upgrade/
  • http://wiki.openwrt.org/doc/howto/build
  • http://wiki.openwrt.org/toh/ubiquiti/routerstation.pro

Blog tags: 

Comments

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.

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

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>
  • 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.
By submitting this form, you accept the Mollom privacy policy.