I am posting these instructions in order to try and help people successfully compile working RouterStation firwmare. Enjoy
==================================
- Get VMware Player (free) here: http://www.vmware.com/download/player/
- Get "Ubuntu 8.10 Desktop" here (press the green down arrow): http://linhost.info/vmware/
- Windows users: This WMware image requires NTFS filesystem to work.
- Don't forget to save the password information too. The above image has username: user, password: user.
- Get a 7zip decompressor here: http://www.7-zip.org/
- Install VMware player and 7zip decompressor (Windows users: reboot)
- Uncompress the Ubuntu 8.10 Desktop
- Use VMware Player to open Ubuntu 8.10 Desktop. Select the option "I copied it".
- username: user, password: user
- I recommend changing the user password and root password to something you will remember.
- To change the root password, use the command "sudo passwd root".
- The password for the user account gives you the required access.
- Use the Update manager to patch Ubuntu to the latest versions of software
- click the red down arrow at the top of the screen. The user password gives the necessary credentials
- Install the utilities needed to build
- Issue the following command (all one line without the single quotes): 'apt-get install gcc g++ binutils patch bzip2 flex bison make autoconf gettext texinfo unzip sharutils subversion libncurses5-dev ncurses-term zlib1g-dev gawk quilt libuclib0 texinfo'
- Make sure you are not logged in as root.
- Download the small package files attached to this post (RSbuildSetup.zip and RSredbootROM.zip).
- Create a directory in the users home folder for the build.
- I recommend using the build number (e.g. bld16442)
- Extract the downloaded file contents into the build folder. Included in the files are:
- A Makefile that adds more help to the set of commands. This saves you a lot of researching of the OpenWRT build structure.
- Patches to certain files for subversion tag 16442.
- Both kernel and OpenWRT configuration files for subversion tag 16442. These files have my recommended selections.
- The build target 16442 is pre-selected. It works properly with the RouterStation.
- A folder with the speed fixed RouterStation RedBoot partition. The make will package the build result with the RedBoot partition file. The resulting file will be named FullFlash.bin.
- Issue the command 'make' for verbose help on all make targets.
- Start the build with the command 'make all'.
- Answer 'y' to the prompt for ubnt-webinfo.
- A successful build results in the flash file "(build folder)/openwrt/bin/FullFlash.bin"
- Send this file to the RouterStation with tftp.
- Set up your computer's Ethernet interface to the ip address 192.168.1.3
- Cycle power on the RouterStation and hold in the SW4 pushbutton. The RF LED should light. Release SW4.
- Try to ping 192.168.1.20. If it fails, try again. When successful, move to the next step.
- Send the flash file to the RouterStation (e.g. 'tftp -i 192.168.1.20 PUT FullFlash.bin')
- Wait about 5 minutes before cycling power or rebooting the RouterStation. If you have a serial port connection to the RouterStation, you will see the /jffs output when the flash is finished.
Notes:
=====
To add packages (or feeds), add the package name to the file AddedFeeds (space delimited). Then, either 'make clean' or delete "(build folder)/openwrt/.prepared" to add the packages after a previous build.
To add X-Wrt support, add these feeds: webif webif-applications. Then, 'make clean' and rename "(build folder)/packages-other/ubnt-webinfo" or choose 'n' to ubnt-webinfo when reconfiguring.
Other files are built to support this build version and others may be built depending on selected options (e.g. files in the Packages folder). These may need to be transferred to the RouterStation after the RouterStation is flashed. To do this:
- Run the ftp daemon on the RouterStation (it is included in this build config) and transfer the files. See the help on how to run it.
- Install the transferred file with the opkg command.
The typical file build target "(build folder)/openwrt/bin/openwrt-ar71xx-ubnt-rs-squashfs.bin" is also created. Use this file for future flash updates if you don't want to update RedBoot each successive time you flash.
To add ipsec support, add these feeds: ipsec-tools isakmpd libgmp openswan tcpdump. The component libgmp is required to build OpenSwan therefore, issue this command on the Ubuntu platform: 'apt-get libgmp3-dev'. During the make, answer 'm' to openswan, and kmod-openswan. OPENSWAN FAILS TO PRODUCE A VALID PACKAGE FOR BUILD 16442. To get the latest version (2.6.23dr1), edit the openswan Makefile as follows:
- PKG_NAME:=openswan
- PKG_VERSION:=2.6.23dr1
- PKG_RELEASE:=1
- PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
- PKG_SOURCE_URL:=http://www.openswan.org/download/development/
- PKG_MD5SUM:=100f49503a0909f3e6cd14fcba663062
Useful command to search for an Ubuntu package: 'apt-cache search <package>' where <package> is the package name or name portion you are looking for.
Tips & tricks:
==========
Modify "(build folder)/patches/002-default-ubnt-configuration.patch" to change the defaults.
- root password: Update the change at Index: openwrt-routerstation/openwrt/package/base-files/files/etc/passwd
- initial network configuration: Update the change at Index: openwrt-routerstation/openwrt/target/linux/ar71xx/base-files/etc/defconfig/routerstation/network
- hostname: Update the change at Index: openwrt-routerstation/openwrt/target/linux/ar71xx/base-files/etc/defconfig/routerstation/system
Copying between Windows host and Ubuntu VMware:
========================================
- To transfer between systems, install a TFTP daemon on Ubuntu and use a Windows TFTP client to copy the files. XP comes with one installed. A free one is available here: http://www.tftp-server.com/tftp-download.html
- Issue the following command on Ubuntu: 'apt-get install tftpd-hpa'.
- Create a new directory on the Ubuntu system at /tftpfiles and 'chmod 777 /tftpfiles'.
- Edit /etc/default/tftpd-hpa and change 'OPTIONS="-l -s /var/lib/tftpboot"' to 'OPTIONS="-c -s /tftpfiles"'. Also change RUN_DAEMON=no to RUN_DAEMON=yes.
- Start the daemon with the command '/etc/init.d/tftpd-hpa start'.
- Copy the file that you want to send to Windows into the /tftpfiles folder.
- From Windows, transfer the file with tftp. When you tranfser a file, specify the destination (e.g. tftp -i 192.168.0.1 PUT x.tgz /tftpfiles/x.tgz) or you will get an error.
- Note: other settings of interest in /etc/xinetd.d/tftp