Running Debian on ASUS WL-500W

This initial page is based on Running_Debian_on_ASUS_WL-500G_deluxe.
Please bear in mind this page is under construction and depends also on other enthousiasts who contribute to make this page in final stage.
It would be nice to see detailed instructions to get the wireless to work properly and to include a good web frontend

Installing Ubuntu linux

Install your favourite Linux distro, but make sure you can compile and also Internet should be available, below are instructions for Ubuntu 8.04 server

run update/upgrade:

Flashing the kernel

The kernel image was built using OpenWRT buildroot (kamikaze, revision 6580 from 2007-Apr-03). It is, and has built-in SCSI, USB and ext3 support (to be able to boot from USB devices). To flash the image, use tftp. Start tftp program and point it to the IP of your ASUS device ( Press the "restore" button and power on your device. Next step is to upload the image "openwrt-brcm-2.6-jffs2-128k.trx".

Writing Debian on your USB device

Download Debian base system and uncompress it to the /dev/sdb1, ext3-formatted partition, (so that you have /bin, /etc and all other directories at the top-dir of this partition). Make sure to use tune2fs on /dev/sda1 partition:

Plug in the USB stick

Make sure the USB stick will not be checked by e2fsck - otherwise, the device might not boot at all!

When I said use tune2fs, I meant it:

This means, your system will loop endlessly after checking the filesystem. This is because these devices don't have a battery-backed clock/rtc.

Configuring network

You will have to configure your network in the following files:

  • vi /media/usb-drive/etc/network/interfaces - to configure your network
  • NOTE! By default, SSH listens on and, so make sure to change the network settings appropriately.
  • vi /media/usb-drive/etc/resolv.conf - configure DNS (either or DNS from ISP)
  • vi /media/usb-drive/etc/hostname - the hostname of your machine


When you completed previous steps you should be able to boot your ASUS to a fully-working Debian.
It doesn't matter which USB port you choose (unless you connect more devices).

You can log in via SSH, or consoles: USB or serial (check /etc/inittab to see console settings). If you didn't change the network settings, SSH listens on and (available via LAN or WAN interfaces, so check both before reporting problems).
The default password for the "root" user is "toor", and of course you are encouraged to change it.

You should see something like:

login as: root
root@'s password:
Linux asus-debian #9 Tue Apr 3 21:30:54 CEST 2007 mips

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

asus-debian:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 477M 164M 288M 37% /
tmpfs 15M 0 15M 0% /lib/init/rw
udev 10M 12K 10M 1% /dev
tmpfs 15M 4.0K 15M 1% /dev/shm
none 15M 0 15M 0% /tmp

Building your own kernel

The author used revision 6850, however since it does not contain the WiFi for Asus 500W in this tutorial the latest revision from subversion will be extracted to build your own MIPS kernel. This should work in the end with Asus WL500-W BroadCom's 4704 Ethernet and BroadCom's 4321 WiFi on kernel 2.6.

1. Go to $HOME and download openwrt build environment

2. Go to trunk/ directory, and select all the required tools:

From this step onward I am currently testing with the original doc, please feel free to update accordingly!

Make sure the first three options will look like:

  • "Target System (Broadcom BCM947xx/953xx [2.6])"
  • "Target Profile (Broadcom BCM43xx WiFi)" and
  • "Target Images" needs be set to "jffs2".

As we want to use Debian only we don't need any OpenWRT packages. This will make our .trx image build faster and it'll be smaller too; the next six options need to be deselected:

  • "Select all packages by default"
  • "Advanced configuration options"
  • "Buildsystem settings"
  • "Build the OpenWRT Image Builder"
  • "Build the OpenWRT SDK"
  • "Image Configuration"

Leave one package enabled as it will be needed to build the .trx firmware (otherwise, .trx image will be "empty", and won't build)

  • "Base system -> base-files"

Deselect all packages in:

  • "Network"
  • "Libraries"
  • "IPv6"
  • "Kernel modules"
  • "Boot Loaders"
  • "Utilities"
  • "Languages"

3. Now, Exit, build all the tools needed for cross-compilation, and a (not yet configured) kernel.
This steps takes quite a while so go and do something else:

4. When all the tools are made, copy the .config file to trunk/build_dir/linux-brcm47xx/linux-2.6.x executing

5. Configure the kernel according to your preference:

Answer "n" on "Kexec system call (EXPERIMENTAL) (KEXEC) [N/y/?] (NEW)"
Answer "y" on "Enable seccomp to safely compute untrusted bytecode (SECCOMP) [Y/n/?] (NEW)"

Answer "n" on "User Namespaces (EXPERIMENTAL) (USER_NS) [N/y/?] (NEW)"

Answer "y" on "Create deprecated sysfs files (SYSFS_DEPRECATED) [Y/n/?] (NEW)"

Answer "y" on "Enable signalfd() system call (SIGNALFD) [Y/n/?] (NEW)"
Answer "y" on "Enable eventfd() system call (EVENTFD) [Y/n/?] (NEW)"

Answer "1" to select "SLAB"

Answer "n" on "Block layer SG support v4 (EXPERIMENTAL) (BLK_DEV_BSG) [N/y/?] (NEW)"

Answer "y" on "Power Management support (PM) [N/y/?] (NEW)"
Answer "y" on "Legacy Power Management API (DEPRECATED) (PM_LEGACY) [N/y/?] (NEW)"
Answer "n" on "Power Management Debug Support (PM_DEBUG) [N/y/?] (NEW)"
Answer "n" on "Suspend to RAM and standby (SUSPEND) [Y/n/?] (NEW)"

Answer "n" on "TCP: MD5 Signature Option support (RFC2385) (EXPERIMENTAL) (TCP_MD5SIG) [N/y/?] (NEW)"    

Answer "m" on "Netfilter connection tracking support (NF_CONNTRACK_ENABLED) [N/m/y/?] (NEW)"
Answer "n" on "Connection tracking flow accounting (NF_CT_ACCT) [N/y/?] (NEW)"
Answer "n" on "Connection tracking events (EXPERIMENTAL) (NF_CONNTRACK_EVENTS) [N/y/?] (NEW)"
Answer "n" on "SCTP protocol connection tracking support (EXPERIMENTAL) (NF_CT_PROTO_SCTP) [N/m/?] (NEW)"
Answer "n" on "UDP-Lite protocol connection tracking support (EXPERIMENTAL) (NF_CT_PROTO_UDPLITE) [N/m/?] (NEW)"
Answer "n" on "Amanda backup protocol support (NF_CONNTRACK_AMANDA) [N/m/?] (NEW)"
Answer "m" on "FTP protocol support (NF_CONNTRACK_FTP) [N/m/?] (NEW)"
Answer "m" on "H.323 protocol support (EXPERIMENTAL) (NF_CONNTRACK_H323) [N/m/?] (NEW)"
Answer "m" on "IRC protocol support (NF_CONNTRACK_IRC) [N/m/?] (NEW)"
Answer "n" on "NetBIOS name service protocol support (EXPERIMENTAL) (NF_CONNTRACK_NETBIOS_NS) [N/m/?] (NEW)"
Answer "m" on "PPtP protocol support (NF_CONNTRACK_PPTP) [N/m/?] (NEW)"
Answer "n" on "SANE protocol support (EXPERIMENTAL) (NF_CONNTRACK_SANE) [N/m/?] (NEW)"
Answer "m" on "SIP protocol support (EXPERIMENTAL) (NF_CONNTRACK_SIP) [N/m/?] (NEW)"
Answer "m" on "TFTP protocol support (NF_CONNTRACK_TFTP) [N/m/?] (NEW)"
Answer "n" on "RTSP protocol support (NF_CONNTRACK_RTSP) [N/m/?] (NEW)"
Answer "n" on "NFLOG" target support (NETFILTER_XT_TARGET_NFLOG) [N/m/y/?] (NEW)"
Answer "n" on "TRACE" target support (NETFILTER_XT_TARGET_TRACE) [N/m/?] (NEW)"
Answer "n" on "TARPIT" target support (NETFILTER_XT_TARGET_TARPIT) [N/m/y/?] (NEW)"
Answer "n" on "TCPMSS" target support (NETFILTER_XT_TARGET_TCPMSS) [N/m/y/?] (NEW)"
Answer "n" on "connlimit" match support" (NETFILTER_XT_MATCH_CONNLIMIT) [N/m/?] (NEW)"
Answer "n" on "u32" match support (NETFILTER_XT_MATCH_U32) [N/m/y/?] (NEW)"
Answer "n" on "hashlimit" match support (NETFILTER_XT_MATCH_HASHLIMIT) [N/m/y/?] (NEW)"
Answer "m" on "IPv4 connection tracking support (required for NAT) (NF_CONNTRACK_IPV4) [N/m/?] (NEW)"
Answer "y" on "proc/sysctl compatibility with old connection tracking (NF_CONNTRACK_PROC_COMPAT) [Y/n/?] (NEW)"
Answer "m" on "Full NAT (NF_NAT) [N/m/?] (NEW)"
Answer "n" on "Basic SNMP-ALG support (EXPERIMENTAL) (NF_NAT_SNMP_BASIC) [N/m/?] (NEW)"
Answer "n" on "ipporthash set support (IP_NF_SET_IPPORTHASH) [N/m/?] (NEW)"
Answer "n" on "iptreemap set support (IP_NF_SET_IPTREEMAP) [N/m/?] (NEW)"

Answer "m" on "Multi Band Round Robin Queuing (RR) (NET_SCH_RR) [N/m/y/?] (NEW)"
Answer "n" on "Connection Tracking Hash Types (NET_SCH_ESFQ_NFCT) [N/y/?] (NEW)"
Answer "n" on "Generic actions (NET_ACT_GACT) [N/m/y/?] (NEW)"
Answer "n" on "Redirecting and Mirroring (NET_ACT_MIRRED) [N/m/y/?] (NEW)"
Answer "n" on "IPtables targets (NET_ACT_IPT) [N/m/y/?] (NEW)"
Answer "n" on "Packet Editing (NET_ACT_PEDIT) [N/m/y/?] (NEW)"
Answer "n" on "Simple Example (Debug) (NET_ACT_SIMP) [N/m/y/?] (NEW)"

Answer "n" on "RxRPC session sockets (AF_RXRPC) [N/m/y/?] (NEW)"

Answer "y" on "Improved wireless configuration API (CFG80211) [N/m/y] (NEW)"
Answer "n" on "Generic IEEE 802.11 Networking Stack (mac80211) (MAC80211) [N/m/y/?] (NEW)"

Answer "n" on "RF switch subsystem support (RFKILL) [N/m/y/?] (NEW)"
Answer "n" on "Plan 9 Resource Sharing Support (9P2000) (Experimental) (NET_9P) [N/m/y/?] (NEW)"

Answer "y" on "Automatically set 'rootfs' partition to be root filesystem (MTD_ROOTFS_ROOT_DEV) [Y/n] (NEW)"
Answer "y" on "Automatically split 'rootfs' partition for squashfs (MTD_ROOTFS_SPLIT) [Y/n] (NEW)"

Answer "n" on "Enable UBI (MTD_UBI) [N/m/y/?] (NEW)"

Answer "y" on "Block devices (BLK_DEV) [Y/n/?] (NEW)"

Answer "y" on "Misc devices (MISC_DEVICES) [Y/n/?] (NEW)"
Answer "n" on "Sensable PHANToM (PHANTOM) [N/m/y/?] (NEW)"
Answer "n" on "EEPROM 93CX6 support (EEPROM_93CX6) [N/m/y/?] (NEW)"

Answer "m" on "SCSI target support (SCSI_TGT) [N/m/y/?] (NEW)"
Answer "n" on "Asynchronous SCSI scanning (SCSI_SCAN_ASYNC) [N/y/?] (NEW)"
Answer "y" on "SCSI low-level drivers (SCSI_LOWLEVEL) [Y/n] (NEW)"
Answer "n" on "SCSI RDMA Protocol helper library (SCSI_SRP) [N/m/y/?] (NEW)"

Answer "n" on "IEEE 1394 (FireWire) support - alternative stack, EXPERIMENTAL (FIREWIRE) [N/m/y/?] (NEW)"

Answer "n" on "Netdevice multiple hardware queue support (NETDEVICES_MULTIQUEUE) [N/y/?] (NEW)"
Answer "n" on "Intermediate Functional Block support (IFB) [N/m/y/?] (NEW)"
Answer "n" on "MAC-VLAN support (EXPERIMENTAL) (MACVLAN) [N/m/y/?] (NEW)"

Answer "n" on "ASIX AX88796 NE2000 clone support (AX88796) [N/m/y/?] (NEW)"
Answer "n" on "TOSHIBA TC35815 Ethernet support (TC35815) [N/m/y] (NEW)"
Answer "n" on "Silan SC92031 PCI Fast Ethernet Adapter driver (EXPERIMENTAL) (SC92031) [N/m/y/?] (NEW)"

Answer "n" on "Ethernet (1000 Mbit) (NETDEV_1000) [Y/n/?] (NEW)" Answer "n" on "Ethernet (10000 Mbit) (NETDEV_10000) [Y/n/?] (NEW)"

Answer "y" on "Wireless LAN (pre-802.11) (WLAN_PRE80211) [N/y/?] (NEW)"
Answer "n" on "Wireless LAN (IEEE 802.11) (WLAN_80211) [N/y/?] (NEW)"

Answer "n" on "ATM drivers (ATM_DRIVERS) [Y/n/?] (NEW)"
Answer "n" on "PPP over L2TP (EXPERIMENTAL) (PPPOL2TP) [N/m/?] (NEW)"

Answer "n" on "PPS support (PPS) [N/m/y/?] (NEW)"

Answer "n" on "Power supply class support (POWER_SUPPLY) [N/m/y/?] (NEW)"

Answer "n" on "SSB Broadcom MIPS core driver (EXPERIMENTAL) (SSB_DRIVER_MIPS) [N/y/?] (NEW)"

Answer "n" on "Support for Silicon Motion SM501 (MFD_SM501) [N/m/y/?] (NEW)"

Answer "n" on "DVB for Linux (DVB_CORE) [N/m/y/?] (NEW)"
Answer "n" on "DAB adapters (DAB) [Y/n/?] (NEW)"

Answer "n" on "Display panel/monitor support (DISPLAY_SUPPORT) [N/m/y/?] (NEW)"
Answer "n" on "Lowlevel video output switch controls (VIDEO_OUTPUT_CONTROL) [M/n/y/?] (NEW)"

Answer "y" on "USB support (USB_SUPPORT) [Y/n/?] (NEW)"
Answer "y" on "USB device class-devices (DEPRECATED) (USB_DEVICE_CLASS) [Y/n/?] (NEW)"
Answer "n" on "USB selective suspend/resume and wakeup (EXPERIMENTAL) (USB_SUSPEND) [N/y/?] (NEW)"
Answer "n" on "USB device persistence during system suspend (DANGEROUS) (USB_PERSIST) [N/y/?] (NEW)"
Answer "n" on "OHCI support for Broadcom SSB OHCI core (USB_OHCI_HCD_SSB) [N/y/?] (NEW)"
Answer "n" on "R8A66597 HCD support (USB_R8A66597_HCD) [N/m/y/?] (NEW)"
Answer "m" on "USB Ours Technology Inc. OTi-6858 USB To RS232 Bridge Controller (EXPERIMENTAL) (USB_SERIAL_OTI6858) [N/m/?] (NEW)"
Answer "n" on "USB Debugging Device (USB_SERIAL_DEBUG) [N/m/?] (NEW)"
Answer "n" on "USB BlackBerry recharge support (USB_BERRY_CHARGE) [N/m/y/?] (NEW)"
Answer "n" on "IO Warrior driver support (USB_IOWARRIOR) [N/m/y/?] (NEW)"

Answer "n" on "GPIO Support (NEW_GPIO) [N/y/?] (NEW)"

Answer "n" on "Userspace I/O drivers (UIO) [N/m/y/?] (NEW)"

Answer "n" on "SYSV68 partition table support (SYSV68_PARTITION) [N/y/?] (NEW)"

Answer "n" on "Distributed Lock Manager (DLM) (DLM) [N/m/y/?] (NEW)"

Answer "n" on "XCBC support (CRYPTO_XCBC) [N/m/y/?] (NEW)"
Answer "n" on "GF(2^128) multiplication functions (EXPERIMENTAL) (CRYPTO_GF128MUL) [N/m/y/?] (NEW)"
Answer "m" on "PCBC support (CRYPTO_PCBC) [M/n/y/?] (NEW)"
Answer "n" on "LRW support (EXPERIMENTAL) (CRYPTO_LRW) [N/m/y/?] (NEW)"
Answer "n" on "Software async crypto daemon (CRYPTO_CRYPTD) [N/m/y/?] (NEW)"
Answer "n" on "FCrypt cipher algorithm (CRYPTO_FCRYPT) [N/m/y/?] (NEW)"
Answer "n" on "Camellia cipher algorithms (CRYPTO_CAMELLIA) [N/m/y/?] (NEW)"
Testing module (CRYPTO_TEST) [N/m/?] n * * Hardware crypto devices * Hardware crypto devices (CRYPTO_HW) [Y/n/?] (NEW)

Answer "n" on "Hardware crypto devices (CRYPTO_HW) [Y/n/?] (NEW)"
Answer "m" on "CRC ITU-T V.41 functions (CRC_ITU_T) [N/m/y/?]"
Answer "m" on "CRC7 functions (CRC7) [N/m/y/?] (NEW)"

6. Rerun menuconfig although nothing will be changed, this step is needed to update some stamp files. On exit save the changes

7. Make a new image; this step won't be so time consuming

8. You will have new images in trunk/bin/

Now we have to build modules for our new kernel:

9. Remove .image and .modules in build_mipsel/linux/

10. Go back to trunk/ directory and run make again (now it compiles also the modules we want)

11. Put modules temporary somewhere (INSTALL_MOD_PATH is where we want to temporary put modules)

12. Now we have in /tmp/lib/modules/$our_kernel_version our modules and these need to be copied on the router in /usr/lib/

13. Log as root on the router and adjust permissions

14. Flash the image as explained before and that's it