CrossCompile your programs for
OpenWrt
CompileKernelModules for
OpenWrt
Set up
KeyAuthorization based access
Some
UsefulCommands here.
SetTime on openwrt
EasySetup for
OpenWrt on reboot.
AntennaDiversity on
OpenWrt
Building an image
- Obtain the OpenWrt build environment via subversion
svn export svn://svn.openwrt.org/openwrt/trunk/ kamikaze
- Add additional OpenWrt packages (optional)
./scripts/feeds update
./scripts/feeds install -a
- Configure OpenWrt and packages
make menuconfig
NOTE: Remember that some devices have less memory than others. For instance the Nanostation only has 4MB. So be careful of how many packages you select.
Recommended Configuration Selections:
- Target System ---> Atheros AR231x/AR5312
- Image configuration ---> LAN IP Address ---> 192.168.1.50
- Base System ---> libstdcpp
- IPv6 ---> aiccu
- IPv6 ---> ip6tables
- IPv6 ---> ip6tables ---> ip6tables-utils
- IPv6 ---> radvd
- Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-conntrack-extra (for recent matching)
- Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-extra (for owner matching)
- Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-ipopt (for mac, MARK, time matching)
- Kernel Modules ---> Netfilter Extensions ---> kmod-ipt-nat-extra (for REDIRECT target)
- Kernel Modules ---> Netfilter Extensions ---> kmod-nfnetlink-queue (for NFQUEUE target)
- Kernel Modules ---> Netfilter Extensions ---> NOT kmod-nfnetlink-queue (for NFQUEUE target)
- Network ---> Proxy Servers ---> tinyproxy
- Network --> Time Synchronization --> ntpclient
- Network ---> hostapd (NOT hostapd-mini, wpad, or wpad-mini) (for wpa-enterprise / radius auth)
- Network ---> hostapd-utils
- Network ---> iptables ---> iptables-mod-conntrack-extra (for recent matching)
- Network ---> iptables ---> iptables-mod-extra (for owner matching)
- Network ---> iptables ---> iptables-mod-ipopt (for mac, MARK, time matching)
- Network ---> iptables ---> iptables-mod-nat-extra (for REDIRECT target)
- Network ---> iptables ---> iptables-utils(for iptables-save and iptables-restore)
- Network ---> iw
- Network ---> ngrep
- Network ---> tcpdump
- Network ---> wget
- Libraries ---> SSL ---> libopenssl
- Libraries ---> libnetfilter-queue
- Utilities ---> bandwidthd (uses lots of cpu) (not being used on current bitsnet builds)
- Utilities ---> gdb
- layer7, c, c++ (appear to be included by default?)
NOTE: The xt_NFQUEUE.ko module does not seem to be included for some reason. Must make kernel_menuconfig and set the following to build as modules and copy them over manually:
- Networking support ---> Networking options ---> Network packet filtering framework (Netfilter) ---> Core Netfilter Configuration ---> Netfilter NFQUEUE over NFNETLINK interface
- Networking support ---> Networking options ---> Network packet filtering framework (Netfilter) ---> Core Netfilter Configuration ---> Netfilter Xtables supprt (required for ip_tables) ---> "NFQUEUE" target support
- Build OpenWrt
make
To debug: make V=99
Errors encountered: By default some of the warnings are treated as errors. To disable it go to $BASE_DIR/build_dir/toolchain-mips_gcc-4.1.2_uClibc-0.9.29/gdb-6./Makefile and comment out Werror
Upgrading firmware on ubnt picostation/bullet
- Power cycle the unit and immediately hold the reset button for ~10 seconds until the leds glow alternately
- TFTP the image to 192.168.1.20 (default ip of the ubnt device)
tftp 192.168.1.20
tftp> binary
tftp> rexmt 1
tftp> trace
tftp> put <image*>.bin
* For PicoStation2 devices, this is openwrt-atheros-ubnt2-pico2-squashfs.bin
- Wait for the image to load on the device
- This will usually take at least 5 to 10 minutes
- Once finished, the leds should stop glowing alternatively red and orange
- Once finished, you should be able to get a ping response from 192.168.1.1 (the default ip of openwrt) or from the ip you set when customizing the image
- Create a root password on the device
- Telnet the device ip
- Set the root password
passwd
Setting up wireless
- in /etc/config/network set optiont type to router ( this will destroy the br-lan)
- in /etc/config/wireless remove the line which disables wireless
More tips
--
AmitaEkbote - 19 May 2009