There are many instructions out there on how to install OpenWRT on La Fonera. There are multiple methods and multiple sites explaining them. This method is my preferred method (preferred for simplicity).

Enable SSH

  1. Reset La Fonera firmware to the factory defaults : Power on La Fonera and let it finish booting completely. Press and hold the reset button on the bottom of the device for 20 seconds. Power cycle La Fonera.
  2. Confirm the firmware version
    1. connect to the WiFi network SSID “MyPlace”. For the password use the 10 digit serial number on the bottom of La Fonera
    2. Browse to http://192.168.10.1/cgi-bin/status.sh
  3. These instructions apply to the firware version “0.7.1 r1”. If you have a newer version you’ll need to use an alternative exploit method.
  4. Temporarily enable SSH on La Fonera with the “fondue” exploit : http://stefans.datenbruch.de/lafonera/#fondue
    1. Download fondue.pl : http://stefans.datenbruch.de/lafonera/scripts/fondue.pl
    2. Install per-requisite perl modules
      1. On Ubuntu : “sudo apt-get install libwww-mechanize-perl”
    3. Inject the code
      echo -e '/usr/sbin/iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT\n/etc/init.d/dropbear' | perl fondue.pl 192.168.10.1 admin
      

Disable write protection on La Fonera

  1. Reconnect your workstation to the internet (instead of “MyPlace”)
  2. Download this file and put them in /var/www on your workstation so you can serve them via apache ( http://wiki.openwrt.org/toh/fon/fonera#replace.the.kernel.to.disable.write.protection )
    wget http://ipkg.k1k2.de/hack/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
    
  3. Reconnect to “MyPlace”
  4. ssh into La Fonera with the password “admin”
    # This assumes your workstation IP is 192.168.10.168
    # You can confirm this by running /sbin/ifconfig
    # If it's something different in the 192.168.10.X network, use that
    ssh root@192.168.10.1
    cd /tmp
    wget http://192.168.10.168/openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma
    mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7
    
    Unlocking vmlinux.bin.l7 ...
    Erasing vmlinux.bin.l7 ...
    Writing from openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma to vmlinux.bin.l7 ...  [w]
    
    reboot
    

Enable telnet

  1. Wait for La Fonera to reboot and for your workstation to re-establish a wifi connection with “MyPlace”
  2. Again temporarily enable SSH on La Fonera with the “fondue” exploit : http://stefans.datenbruch.de/lafonera/#fondue
    echo -e '/usr/sbin/iptables -I INPUT 1 -p tcp --dport 22 -j ACCEPT\n/etc/init.d/dropbear' | perl fondue.pl 192.168.10.1 admin
    
  3. SSH back in
    ssh root@192.168.10.1
    
  4. Overwrite the Redboot config
    cd /tmp
    wget http://192.168.10.168/out.hex
    mtd -e "RedBoot config" write out.hex "RedBoot config"
    

Telnet into Redboot bootloader on La Fonera

  1. Now on a workstation with the potential for a wired connection to La Fonera
    1. Download the newest “atheros” openwrt build : http://wiki.openwrt.org/toh/fon/fonera#step.1downloading.the.openwrt.images
      1. These are the current “backfire” images as of March 2013
      2. http://downloads.openwrt.org/backfire/10.03.1/atheros/openwrt-atheros-vmlinux.lzma
      3. http://downloads.openwrt.org/backfire/10.03.1/atheros/openwrt-atheros-root.squashfs
  2. Download and install a TFTP Server (not a TFTP Client)
    1. Windows : http://tftpd32.jounin.net/
  3. Now prepare the workstation with a wired connection directly (or through a hub) to La Fonera and configure the workstation to have a static IP in the 192.168.1.0/24 network (for example 192.168.1.100)
  4. Launch the TFTP Server and point it to the directory that you downloaded the 2 OpenWRT images
  5. On that wired workstation begin pinging the address 192.168.1.254 with a timeout of 1 second for each ping. This will tell us when La Fonera is listening so we can telnet in during the 10 second window
  6. Open a window and prepare to “telnet 192.168.1.254 9000”
  7. Power off and power back on La Fonera
  8. Watch the ping and as soon as you see a response telnet into La Fonera
  9. Hit Ctrl-C to interupt the boot procedure

Install OpenWRT

  1. Now that you’re in Redboot, we’ll configure Redboot to talk to our currently running TFTP server and install openwrt : http://wiki.openwrt.org/toh/fon/fonera#step.2access.and.configure.redboot
    1. I followed the instructions linked here very closely and found them to be understandable. I highly recommend you follow those instructions but here is a brief summary
      # This assumes your wired workstation's IP is 192.168.1.100
      ip_address -h 192.168.1.100 -l 192.168.1.254/24
      load -r -b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
      fis init
      fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7
      load -r -b %{FREEMEMLO} openwrt-atheros-root.squashfs
      fis create rootfs
      reset
      
  2. After restarting La Fonera with the “reset” command in Redboot, telnet into 192.168.1.1 and set the root users password to enable ssh with the “passwd” command
  3. Next browse to http://192.168.1.1/ and configure OpenWRT as you wish

Attachments

Here are some of the files mentioned above in case the links to them ever change or break