LaFonera Hardware LaFoneraPlus
From DD-WRT Wiki
You are here: DD-WRT wiki mainpage / LaFonera / Hardware / LaFoneraPlus
LaFonera Plus
There is a new Fon router : La fonera+ (plus). This router is quite similar than the classical Fonera except that’s it include two ethernet interfaces. This can be very usefull for a lot of things. Can OpenWrt Kamikaze 7.07 run on Fonera+ ? Yes, but not well. Here is my first try…
I just get my fonera+. Before test it like a FonSpot, i want to take a look inside.
On the hardware side we see lot of well know things : same CPU Atheros/MIPS, same memory and Flash size, same Wifi chip… The board layout is different, of course and the poser adapter is now 7.5 Volts (5 volts for The Fonera). Nothing very exciting here.
When looking closer we see an Ethernet controler with two PHY (LFE8505 de DELTA ELECTRONICS).
On the board we find à 4 pins connector (JP1) : the serial console port than ca be used with 3.3V/RS232 adapter (like the classical Fonera) :
- Masse
- RX
- TX
- +3.3 Volts
When connecting adapter and launching minicom (or screen) here is what we can see :
+Ethernet eth0: MAC address 00:18:84:a0:5b:98 IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0 Default server: 192.168.1.254 RedBoot(tm) bootstrap and debug environment [ROMRAM] OpenWrt certified release, version 1.1 - built 22:32:28, May 7 2007 Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. Board: FON 2201 RAM: 0x80000000-0x81000000, [0x80040290-0x80fe1000] available FLASH: 0xa8000000 - 0xa87f0000, 128 blocks of 0x00010000 bytes each. == Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot whit 2s for a ^C. Smell very good. After timout we got :
RedBoot> fis load -b 0x80100000 loader RedBoot> go 0x80100000 Failsafe loader v0.2 Looking for board config data... found at offset 0xa87f0000 Reset button GPIO: 6 Reading flash from 0xa8040000 to 0xa825b989... done. Verifying CRC... OK - 0xa7a3c6df Uncompressing Linux... Ok, booting the kernel. [sighandler]: No more events to be processed, quitting. [cleanup]: Waiting for children. [cleanup]: All children terminated. Unlocking rootfs ... Could not open mtd device: rootfs switching to jffs2 init started: BusyBox v1.4.1 (2007-06-08 12:11:45 UTC) multi-call binary : ifconfig: SIOCSIFADDR: No such device : ifconfig: SIOCSIFADDR: No such device : udhcpc (v1.4.1) started : route: fscanf : Sending discover... : Sending discover... : Sending discover...
Damn ! No serial console. We cannot access to the OS. Not very important, Fon firmware is not interesting. Just reset and see what RedBoot have to say :
== Executing boot script in 2.000 seconds - enter ^C to abort ^C RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0×80040400 0×00030000 0xA8000000 loader 0xA8030000 0×80100000 0×00010000 0×80100000 image 0xA8040000 0×80040400 0×00230004 0×80040400 image2 0xA8660000 0xA8660000 0×00140000 0×80040400 FIS directory 0xA87E0000 0xA87E0000 0×0000F000 0×00000000 RedBoot config 0xA87EF000 0xA87EF000 0×00001000 0×00000000
and :
RedBoot> fconfig -l -n boot_script: true boot_script_data: .. fis load -b 0×80100000 loader .. go 0×80100000 boot_script_timeout: 2 bootp: false bootp_my_gateway_ip: 0.0.0.0 bootp_my_ip: 192.168.1.1 bootp_my_ip_mask: 255.255.255.0 bootp_server_ip: 192.168.1.254 console_baud_rate: 9600 gdb_port: 9000 info_console_force: false net_debug: false
The boot script load a second (stage2) bootloader. Let’s clean this :
RedBoot> fconfig Run script at boot: true Boot script: .. fis load -b 0×80100000 loader .. go 0×80100000 Enter script, terminate with empty line >> fis load -l vmlinux.bin.l7 >> exec >> Boot script timeout (1000ms resolution): 2 Use BOOTP for network configuration: false Gateway IP address: Local IP address: 192.168.1.1 Local IP address mask: 255.255.255.0 Default server IP address: 192.168.1.254 Console baud rate: 9600 GDB connection port: 9000 Force console for special debug messages: false Network debug at boot time: false Update RedBoot non-volatile configuration - continue (y/n)?yy
And load OpenWrt Kamikaze 7.07 firmware as compiled for my old Fonera :
RedBoot> ip_address -l 192.168.0.12/24 -h 192.168.0.1 IP: 192.168.0.12/255.255.255.0, Gateway: 0.0.0.0 Default server: 192.168.0.1 RedBoot> fis init -f About to initialize [format] FLASH image system - continue (y/n)? y *** Initialize FLASH Image System … Erase from 0xa8030000-0xa87e0000: ……………………… … Erase from 0xa87e0000-0xa87f0000: . … Program from 0×80ff0000-0×81000000 at 0xa87e0000: . RedBoot> fis list Name FLASH addr Mem addr Length Entry point RedBoot 0xA8000000 0xA8000000 0×00030000 0×00000000 FIS directory 0xA87E0000 0xA87E0000 0×0000F000 0×00000000 RedBoot config 0xA87EF000 0xA87EF000 0×00001000 0×00000000 RedBoot> load -r -b 0×80041000 openwrt-atheros-2.6-root.jffs2-64k Using default protocol (TFTP) Raw file loaded 0×80041000-0×801e0fff, assumed entry at 0×80041000 RedBoot> fis create -b 0×80041000 -f 0xA8030000 -l 0×006F0000 -e 0×00000000 rootfs … Erase from 0xa8030000-0xa8720000: ………………………….. … Program from 0×80041000-0×80731000 at 0xa8030000: ………………….. … Erase from 0xa87e0000-0xa87f0000: . … Program from 0×80ff0000-0×81000000 at 0xa87e0000: . RedBoot> load -r -b 0×80041000 openwrt-atheros-2.6-vmlinux.lzma Using default protocol (TFTP) Raw file loaded 0×80041000-0×80100fff, assumed entry at 0×80041000 RedBoot> fis create -r 0×80041000 -e 0×80041000 vmlinux.bin.l7 … Erase from 0xa8720000-0xa87e0000: ………… … Program from 0×80041000-0×80101000 at 0xa8720000: ………… … Erase from 0xa87e0000-0xa87f0000: . … Program from 0×80ff0000-0×81000000 at 0xa87e0000: . RedBoot> reset
We got :
== Executing boot script in 2.000 seconds - enter ^C to abort RedBoot> fis load -l vmlinux.bin.l7 Image loaded from 0x80041000-0x80290086 RedBoot> exec Now booting linux kernel: Base address 0x80030000 Entry 0x80041000 Cmdline : Linux version 2.6.21.5 (denis@morgane) (gcc version 4.1.2) #9 Fri Sep 14 12:02:43 CEST 2007 CPU revision is: 00019064 Determined physical RAM map: memory: 01000000 @ 00000000 (usable) Initrd not found or empty - disabling initrd Built 1 zonelists. Total pages: 4064 Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2 init=/etc/preinit Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes. Primary data cache 16kB, 4-way, linesize 16 bytes. Synthesized TLB refill handler (20 instructions). Synthesized TLB load handler fastpath (32 instructions). Synthesized TLB store handler fastpath (32 instructions). Synthesized TLB modify handler fastpath (31 instructions). PID hash table entries: 64 (order: 6, 256 bytes) Using 92.000 MHz high precision timer. Dentry cache hash table entries: 2048 (order: 1, 8192 bytes) Inode-cache hash table entries: 1024 (order: 0, 4096 bytes) Memory: 13504k/16384k available (1955k kernel code, 2880k reserved, 292k data, 116k init, 0k highmem) Mount-cache hash table entries: 512 NET: Registered protocol family 16 Radio config found at offset 0xf8(0x1f8) Time: MIPS clocksource has been installed. NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 512 (order: 0, 4096 bytes) TCP bind hash table entries: 512 (order: -1, 2048 bytes) TCP: Hash tables configured (established 512 bind 512) TCP reno registered squashfs: version 3.0 (2006/03/15) Phillip Lougher Registering mini_fo version $Id$ JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc. io scheduler noop registered io scheduler deadline registered (default) Serial: 8250/16550 driver $Revision: 1.90 $ 1 ports, IRQ sharing disabled serial8250: ttyS0 at MMIO 0xb1100003 (irq = 37) is a 16550A eth0: Dropping NETIF_F_SG since no checksum feature. eth0: Atheros AR231x: 00:18:84:a0:5b:98, irq 4 cmdlinepart partition parsing not available Searching for RedBoot partition table in spiflash at offset 0x7d0000 Searching for RedBoot partition table in spiflash at offset 0x7e0000 5 RedBoot partitions found on MTD device spiflash Creating 5 MTD partitions on "spiflash": 0x00000000-0x00030000 : "RedBoot" 0x00030000-0x00720000 : "rootfs" 0x00720000-0x007e0000 : "vmlinux.bin.l7" 0x007e0000-0x007ef000 : "FIS directory" 0x007ef000-0x007f0000 : "RedBoot config" nf_conntrack version 0.5.0 (128 buckets, 1024 max) ip_tables: (C) 2000-2006 Netfilter Core Team TCP vegas registered NET: Registered protocol family 1 NET: Registered protocol family 17 802.1Q VLAN Support v1.8 Ben Greear All bugs added by David S. Miller eth0: Configuring MAC for full duplex jffs2_scan_eraseblock(): End of filesystem marker found at 0×180000 jffs2_build_filesystem(): unlocking the mtd device… done. jffs2_build_filesystem(): erasing all blocks after the end marker… done. VFS: Mounted root (jffs2 filesystem) readonly. Freeing unused kernel memory: 116k freed Warning: unable to open an initial console. Algorithmics/MIPS FPU Emulator v1.5 - preinit - - init - init started: BusyBox v1.4.2 (2007-09-05 17:39:32 CEST) multi-call binary Please press Enter to activate this console. device eth0 entered promiscuous mode br-lan: port 1(eth0) entering learning state br-lan: topology change detected, propagating br-lan: port 1(eth0) entering forwarding state PPP generic driver version 2.4.2 wlan: 0.8.4.2 (svn r2568) ath_hal: module license ‘Proprietary’ taints kernel. ath_hal: 0.9.30.13 (AR5212, AR5312, RF2316, TX_DESC_SWAP) ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (svn r2568) ath_rate_minstrel: look around rate set to 10% ath_rate_minstrel: EWMA rolloff level set to 75% ath_rate_minstrel: max segment size in the mrr set to 6000 us wlan: mac acl policy registered ath_ahb: 0.9.4.5 (svn r2568) ath_pci: switching rfkill capability off ath_pci: switching per-packet transmit power control off wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps wifi0: H/W encryption support: WEP AES AES_CCM TKIP wifi0: mac 11.0 phy 4.8 radio 7.0 wifi0: Use hw queue 1 for WME_AC_BE traffic wifi0: Use hw queue 0 for WME_AC_BK traffic wifi0: Use hw queue 2 for WME_AC_VI traffic wifi0: Use hw queue 3 for WME_AC_VO traffic wifi0: Use hw queue 8 for CAB traffic wifi0: Use hw queue 9 for beacons wifi0: Atheros 2315 WiSoC: mem=0xb0000000, irq=3 BusyBox v1.4.2 (2007-09-05 17:39:32 CEST) Built-in shell (ash) Enter ‘help’ for a list of built-in commands. _______ ________ __ | |.—–.—–.—–.| | | |.—-.| |_ | - || _ | -__| || | | || _|| _| |_______|| __|_____|__|__||________||__| |____| |__| W I R E L E S S F R E E D O M KAMIKAZE (7.07) ———————————– * 10 oz Vodka Shake well with ice and strain * 10 oz Triple sec mixture into 10 shot glasses. * 10 oz lime juice Salute! ————————————————— root@OpenWrt:/#
it works ! Partially. There is only one ethernet interface (eth0) and it don’t work (no ping, no MAC in ARP table). OpenWrt 7.07 run but cannot be used. There is a driver problem here.
After a little search on the web we can find this : https://dev.openwrt.org/ticket/2410
The message is quite clear : support for the switch hasn’t been merged yet. the code still needs some cleanup
We can use Fon’s firmware sources here :
http://download.fon.com/firmware/foneraplus/latest/foneraplus.tar.bz2
The ethernet drivers is different than OpenWrt’s one (ar2313.c). Different and yes, it need cleanup. The code’s comments are amazing : «FIXME: ugly, ugly hack!», «XXX: clean up this garbage!», «FIXME: does this work?».
Fonera+ users, the code inside your router is ugly, unfinished, and probably buggy…
I’m gonna try to build Fon’s firmware from sources and try it later.
Refrences
this page was made by wildblue!