Basic Configuration of RB with OpenWrt

Compilation of image

For a detailed discussion on the compilation of OpenWrt image refer Compilation from trunk.

Steps described below are generic and can be used for compilation of any OpenWrt OS. There might be minor changes in what packages to select depending on the OS you want to compile. The steps given below are for OpenWrt Backfire.

  • Download Backfire 10.03 from Sourcefile-Backfire (Sourcefile-Attitude_Adjustment).
  • Untar the file and copy it in home folder and execute the following commands:

    cd backfire_10.03
    make menuconfig
    Select the following components:
            Target: AR71XXX
            Default: no WiFi
            Generate tar.gz, squashfs
            Wireless Modules: ath5k (Make sure it is selected as '*' and not 'm' - double space bar)
            wpa

    make V=99


  • Precompiled images
    I have compiled a few images for specific purposes. They can be found here.


    Install and Configure DHCP and TFTP Server on local system

    sudo apt-get install atftpd
    sudo apt-get install dhcp3-server
    sudo mkdir /tftpboot
    sudo cp vmlinux /tftpboot/vmlinux (Get this ramdisk file here)
    sudo atftpd --bind-address 10.107.48.210 --logfile ~/log --daemon

    For some reason this doesn't seem to work in Ubuntu 14.04.
    Use this instead:
  • Copy this file in the '/etc/default' directory.
  • To check if the atftpd server has started properly, check /var/log/syslog. Most probably, there will be an error stating can not bind to port 69. This is because there is already a process (inetd) running on this port.
  • To check exactly which process running, execute 'sudo netstat -nlp | grep 69'
  • Kill the process using 'sudo killall "processname"'

  • - configure file /etc/dhcp/dhcpd.conf file appropriately (sample), and then start dhcpd via the command:

    sudo dhcpd -cf /etc/dhcp/dhcpd.conf --no-pid eth0


    Network Boot and Flashing image

    Switch ON RB and enable network boot. To do this, interrupt normal boot process by pressing a key before the RB boots up.

    Once the device boots, execute the following:

    ifconfig br-lan down
    brctl delbr br-lan
    ifconfig eth0 10.107.48.50
    passwd
    (Set Password)

    In a new terminal, execute

    cd ~/backfire_10.03/bin/ar71xx/
    scp openwrt-ar71xx-vmlinux.elf openwrt-ar71xx-rootfs.tgz root@10.107.48.50:/tmp/

    If scp if giving problems try:

    ssh-keygen -f "/root/.ssh/known_hosts" -R 10.107.48.50

    At this point RB433AH has kernel image in its /tmp directory. To flash a permanent image of OpenWrt on RB433AH NAND, run following set of commands

    mount /dev/mtdblock1 /mnt/
    mv /tmp/openwrt-ar71xx-vmlinux.elf /mnt/kernel
    umount /mnt
    mount /dev/mtdblock2 /mnt/
    cd /mnt/
    tar -xzvf /tmp/openwrt-ar71xx-rootfs.tgz
    cd ..
    umount /mnt/
    sync

    reboot

    If all steps are executed correctly, the OS should be installed by now!


    Configuration

    Now that the RB boards have the OpenWrt OS flashed in the NAND, they are ready for operation. Check this file for configuration of the boards.


    OpenNMS

    To use OpenNMS in your system, check this page.


    IEEE 802.11g MCS Scheme


    Page maintained by Gaurang Naik.