Build DebianWRT for Ubiquity RouterStation Pro

DebWrt is a Linux distribution mainly installed on embedded systems (e.g. residential gateways). It was built on top of an OpenWrt base which was used to load a fully functional version of Debian from the RootFS stored on the attached USB storage device. For easy installation and deinstallation of packages it relied on the dpkg Package management system. DebWrt used the command-line interface of Bash. There was no web-based GUI interface.

DebWrt offered all of the features provided in the stock firmware for residential gateways, such as DHCP services and wireless encryption via WEP, Wi-Fi Protected Access and WPA2. In addition it offered all of the features offered by Debian that are typically not included in a standard firmware.

Features included:

Package manager apt-get
Extensible configuration of your network involving VLAN with exhaustive possibilities to configure the routing itself
Customizable methods to filter, manipulate, delay and rearrange network packets:
Static DHCP leases

DebWrt had a fully writable file system, which allowed for package management via the dpkg package system, allowing users to install new software to meet their individual needs. This contrasted with Linux-based firmware built using a read-only SquashFS filesystem (or similar) that offered efficient compression but no way to modify the installed software without rebuilding and flashing a complete firmware image.

During the “preparation” I needed the following ingredients:
Debian squeeze
free space in / usr / src at least 10 GB
tea with liver
# apt-get update
# apt-get install build-essential sudo subversion debootstrap makedev libncurses5-dev zlib1g-dev gawk flex unzip git-core
#mkdir / usr / src / debwrt
#chmod 777 / usr / src / debwrt

You must not collect under the root.
#nano / etc / sudoers
non-root-user ALL = (ALL) ALL

Get the OpenWRT source code DebWRT
$ cd / usr / src
$ svn checkout debwrt
$ rm -rf / usr / src / debwrt /openwrt/.svn/
$ cd / usr / src / debwrt
$ svn co svn: // openwrt
$ / usr / src / debwrt / openwrt / scripts / feeds update -a

$ make menuconfig
We select the necessary system (in my case rspro)
Target System (Atheros AR71xx / AR7240 / AR913x)
Subtarget (Generic)
Target Profile (Ubiquiti RouterStation Pro)
Debian Root Filesystem Configuration —> Use qemu to perform Debian second stage install on the host [disable]
Save and exit

$ make openwrt / menuconfig
In the Kernel Modules menu, select the drivers we need.
Save and exit

$ make openwrt / all V = 99
first cup of tea

$ make debian / rootfs
second cup of tea

Next, you need to prepare a memory card and flash the device itself. We already wrote about this on the hub here. Only in our case we take the firmware from here: /
usr / src / debwrt / bin / platform name-angel-2.0-1-default/ – here the modules and headers
/usr/src/debwrt/build/rootfs-mips-angel-2.0-1/ are also located – and this is the system itself and you need to copy it to DEBWRT_ROOT

After the firmware, insert the card, reboot the router and click on
Login / the password is root / debwrt

Now you need to perform the second stage of installation:
-bash-4.1 # / debootstrap / debootstrap –second-stage
-bash-4.1 # rm -rf / var / cache / apt / archives
-bash-4.1 # mkdir -p / var / cache / apt / archives / partial
-bash-4.1 # echo “ squeeze main »>> / etc / apt / sources.list
-bash-4.1 # reboot

After rebooting, go to the router and, if all the steps are successful, we should see a standard Debian greeting and of course:

# apt-get update

PS The second stage can also be performed on the computer. To do this, activate the Use qemu to perform Debian second stage install on the host item and install the packages necessary for qemu

DebWRT project site:
DebWRT Wiki:
DebWRT HCL: TableOfSupportedHardware
Thanks to the author of the amain project for advice and support, and to drunken, the haberman, for the review


  • Processor: Atheros AR7161@680MHz
    • based on 32-bit MIPS 24Kc core
    • Includes two Gigabit Ethernet MACs
  • ROM: 16MB on-board flash
  • RAM: 128MB DDR
  • LAN: Two Gigabit Ethernet ports (1+3)
    • eth0 (WAN) supports 802.3af 48V POE. Using wit a 802.3af Mode-B POE injector disables Gigabit.
    • eth1 (LAN) is internally connected to an AR8316-based 6-port Gigabit switch.
    • Only 4 ports are physically enabled on board (3 external + 1 internal ports).
  • Mini-PCI: Three slots
    • One slot is located on the bottom side.
  • External Storage: SD
    • connected through USB internally
    • RedBoot w/default options doesn't support SD
  • USB: One 2.0 port
  • Serial: Two connectors (118200/8/N/1)
    • One DB9 (crossed internally)
    • One 6-pin header (3.3VDC/S_in/NC/NC/S_out/GND)
  • JTAG: 14-pin Header
  • GPIO: 7-pin Header
  • Reset Button: SW button based on GPIO_8
  • DC Power Jack: 40VDC ~ 56VDC
    • 3W idle w/o radio, 7W while passing Gigabit traffic
    • Some people say it also works stably with 12VDC or 24VDC.
  • Temperature Range: -30C ~ +75C

Issues POE issue
  • Most of legacy embedded boards support only 802.3af Mode B (or pre-802.3af).
    • 802.3af Mode B sends power through the pin 4/5/7/8, which are not used in 10/100Mbps Ethernet. In this mode, data cannot be sent through the pin 4/5/7/8.
  • RouterStation Pro supports both 802.3af Mode A and B.
    • 802.3af Mode A uses the pin 1/2/3/6, which are also used for data transmission (FYI: phanton power). In this mode, the pin 4/5/7/8 are free and can be used for Gigabit transmission.
    • When a Mode-B injector (such as PW130) supplies power to RouterStation Pro, the pin 4/5/7/8 are disabled and cannot be used for Gigabit. Thus, eth0 is recognized only as a Fast Ethernet (100Mbps) port.
  • POE injector selection
    • Mode A only injectors, such as PW183, do not support most legacy boards.
    • Some recent POE injector models support both Mode A and B.
SD Card Support in RedBoot
  • RedBoot in RouterStation Pro doesn't support SD (nor automatic bootscript running; AIAFEXEC.RBS).
RedBoot> load -v -m disk hda1:openwrt-ar71xx-vmlinux-initramfs.elf
Invalid 'mode': disk.  Valid modes are: fis tftp
  • FYI: The SD card reader is connected through USB internally.
root@OpenWrt:/# lsusb
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 05e3:0723 Genesys Logic, Inc. USB 2.0 SD/MMC/MS Flash Card Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
6-pin Serial Connector
  • In the case of using a self-powered serial connector (such as the USB-to-serial TTL converter, TTL-232R-3V3), PIN_1 has to be disconnected.
  • Currently, the terminal can receive from the board but cannot send to the board through the 6-pin connector.

Җавап калдыру

All fields are required. Your email address will not be published.