Freedom CPE

The Freedom CPE is based upon the Atheros AR5312 Wireless SoC. The Freedom CPE delivers dual-band, single channel, 2.4GHz/5.8GHz capability in a 85mmx85mm form.

Supported Versions

Version/Model S/N OpenWrt Version Supported Model Specific Notes
Rev 05 n/a Backfire 10.03 -

Hardware Highlights

CPU Ram Flash Network USB Serial JTag
Atheros AR5312@220MHz 32MiB 8MiB 1 No Yes Yes

Installation

Installing of OpenWrt for the first time

You may need to upgrade the bootloader on your board prior to installing of OpenWrt, because they were shipped with a bootloader which checks CRC on the installed firmware. You have to go to the Abicom's support page to obtain a new bootloader image which have ability to disable CRC checking.

Once you have a suitable bootloader and you can access it via serial console you can install OpenWrt with the following method.

You have to download two files:

Copy openwrt-atheros-vmlinux.lzma and openwrt-atheros-root.squashfs to /tftpboot/ and flash them with the following method.

Configure the IP address of the board

RedBoot> ip_address -h 192.168.1.254 -l 192.168.1.1/24
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254
RedBoot> 

Initialize the FLASH image system

RedBoot> fis init -y
*** Initialize FLASH Image System
... Erase from 0xbe7fa000-0xbe7fc000: .
... Program from 0x80fee400-0x80ff0400 at 0xbe7fa000: .
RedBoot> 

You have a default flash layout now:

RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBE000000  0xBE000000  0x00030000  0x00000000
APConfig          0xBE7D0000  0xBE7D0000  0x00020000  0x00000000
OEMData           0xBE7F0000  0xBE7F8000  0x00008000  0x00000000
RedBoot config    0xBE7F8000  0xBE7F8000  0x00002000  0x00000000
FIS directory     0xBE7FA000  0xBE7FA000  0x00002000  0x00000000
RedBoot> 

Load the kernel from the TFTP server

RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-vmlinux.lzma
Using default protocol (TFTP)
Raw file loaded 0x80000400-0x800e03ff, assumed entry at 0x80000400
RedBoot> 

Flash the kernel into the board

Note:

  • The values for the -e and -r switches in the 'fis create' RedBoot command below is the Kernel entry point. Do not change those values.
RedBoot> fis create -e 0x80041000 -r 0x80041000 vmlinux.bin.l7
... Erase from 0xbe030000-0xbe110000: ..............
... Program from 0x80000400-0x800e0400 at 0xbe030000: ..............
... Erase from 0xbe7fa000-0xbe7fc000: .
... Program from 0x80fee400-0x80ff0400 at 0xbe7fa000: .
RedBoot> 

Load the rootfs image from the TFTP server

RedBoot> load -r -b %{FREEMEMLO} openwrt-atheros-root.squashfs
Using default protocol (TFTP)
Raw file loaded 0x80000400-0x801c03ff, assumed entry at 0x80000400
RedBoot> 

Flash the rootfs image

'fis free' will print the first and last free block

RedBoot> fis free
0xBE110000 .. 0xBE7D0000
RedBoot> 

Now do the math (last - first, cause you need the difference)

0xBE7D0000 - 0xBE110000 = 0x6C0000

And use the computed value for the -l switch in the 'fis create' RedBoot command below.

RedBoot> fis create -l 0x6C0000 rootfs
... Erase from 0xbe110000-0xbe7d0000: ............................................................................................................
... Program from 0x80000400-0x801c0400 at 0xbe110000: ............................
... Erase from 0xbe7fa000-0xbe7fc000: .
... Program from 0x80fee400-0x80ff0400 at 0xbe7fa000: .
RedBoot> 

Upgrade RedBoots's configuration

Notes:

  • You have to disable CRC checking because the bootloader won't load the OpenWrt image if it is enabled.
  • The boot script is needed for automatic booting.
  • OpenWrt logs to its serial console with 9600bps, so you must have to set the same baud rate.
RedBoot> fconfig
Disable CRC Checking: true
Automatic FirmwareUpdate: false
Run script at boot: true
Boot script:
.. fis load -l vmlinux.bin.l7
.. exec
Enter script, terminate with empty line
>> fis load -l vmlinux.bin.l7
>> exec
>>
Boot script timeout (1000ms resolution): 3
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
Safe Console: true
Update RedBoot non-volatile configuration - continue (y/n)? y
cfgbase 0xbe7f8000 cfgsize 2000
... Erase from 0xbe7f8000-0xbe7fa000: .
... Program from 0x80fe1400-0x80fe2400 at 0xbe7f8000: .
RedBoot> 

Finally, reset the board:

RedBoot> reset 

OpenWrt bootlog

If everything goes well, then you will see the following message during boot:

Ethernet eth0: MAC address 00:02:7f:00:47:60
IP: 192.168.1.1/255.255.255.0, Gateway: 0.0.0.0
Default server: 192.168.1.254

Freedom Bootstrap Version 1.4.2.1

Copyright (C) 2006-2008, Abicom International (FreedomCPE)
Copyright (C) 2000-2004 Red Hat, Inc.
Board: ap30
RAM: 0x80000400-0x80ff0400, [0x80000400-0x80fdf400] available
FLASH: 0xbe000000 - 0xbe7fc000, 128 blocks of 0x00010000 bytes each.

Calibration OK
FIS OK
Automatic CRC checking is disabled
== Executing boot script in 3.000 seconds - enter ^C to abort
RedBoot> fis load -l vmlinux.bin.l7
Image loaded from 0x80041000-0x802ea200
RedBoot> exec
Now booting linux kernel:
 Base address 0x80030000 Entry 0x80041000
 Cmdline :
Linux version 2.6.30.10 (openwrt@wrt1.marcant.net) (gcc version 4.3.3 (GCC) ) #24 Tue Apr 6 14:59:59 CEST 2010
console [early0] enabled
CPU revision is: 00018009 (MIPS 4Kc)
Determined physical RAM map:
 memory: 02000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
  Normal   0x00000000 -> 0x00002000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00002000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
Kernel command line: console=ttyS0,9600 rootfstype=squashfs,jffs2
Primary instruction cache 16kB, VIPT, 4-way, linesize 16 bytes.
Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 16 bytes
NR_IRQS:128
PID hash table entries: 128 (order: 7, 512 bytes)
console handover: boot [early0] -> real [ttyS0]
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory: 29268k/32768k available (2175k kernel code, 3500k reserved, 413k data, 136k init, 0k highmem)
Calibrating delay loop... 219.54 BogoMIPS (lpj=1097728)
Mount-cache hash table entries: 512
net_namespace: 1008 bytes
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
Radio config found at offset 0x2000(0x100)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
msgmni has been set to 57
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler deadline registered (default)
gpiodev: gpio device registered with major 254
gpiodev: gpio platform device registered with access mask FFFFFFFF
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0xbc000003 (irq = 37) is a 16550A
eth0: Atheros AR231x: 00:02:7f:00:47:60, irq 3
ar231x_eth_mii: probed
eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01)
eth1: Atheros AR231x: 00:02:7f:00:47:61, irq 4
ar231x_eth_mii: probed
physmap platform flash device: 00800000 at 1e000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
physmap-flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7d0000
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7e0000
Searching for RedBoot partition table in physmap-flash.0 at offset 0x7f0000
8 RedBoot partitions found on MTD device physmap-flash.0
Creating 8 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000030000 : "RedBoot"
0x000000030000-0x000000110000 : "vmlinux.bin.l7"
0x000000110000-0x0000007d0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2B0000, len=520000
0x0000002b0000-0x0000007d0000 : "rootfs_data"
0x0000007d0000-0x0000007f0000 : "APConfig"
eth0: Configuring MAC for full duplex
0x0000007f0000-0x0000007f8000 : "OEMData"
0x0000007f8000-0x0000007fa000 : "RedBoot config"
0x0000007fa000-0x0000007fc000 : "FIS directory"
0x0000007fc000-0x000000800000 : "boardconfig"
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 136k freed
Please be patient, while OpenWrt loads ...
- preinit -
Press the [f] key and hit [enter] to enter failsafe mode
- regular preinit -
jffs2 not rmini_fo: using base directory: /
eady yet; using mini_fo: using storage directory: /tmp/root
ramdisk
- init -

Please press Enter to activate this console. device eth0 entered promiscuous mode
br-lan: port 1(eth0) entering forwarding state
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (512 buckets, 2048 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel paramater, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
ath_hal: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 2009-05-08 (AR5212, AR5312, RF5111, RF5112, RF2316, RF2317, REGOPS_FUNC, TX_DESC_SWAP, XR)
ath_ahb: trunk
wlan: trunk
wlan: mac acl policy registered
ath_rate_minstrel: Minstrel automatic rate control algorithm 1.2 (trunk)
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
Atheros HAL provided by OpenWrt, DD-WRT and MakSat Technologies
wifi0: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
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: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
ath_ahb: wifi0: Atheros 5312 WiSoC: mem=0xb8000000, irq=2
IRQ 2/wifi0: IRQF_DISABLED is not guaranteed on shared IRQs
Atheros HAL provided by OpenWrt, DD-WRT and MakSat Technologies
wifi1: 11a rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi1: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi1: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi1: turboA rates: 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi1: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi1: H/W encryption support: WEP AES AES_CCM TKIP
ath_ahb: wifi1: Atheros 5312 WiSoC: mem=0xb8500000, irq=5
IRQ 5/wifi1: IRQF_DISABLED is not guaranteed on shared IRQs
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay



BusyBox v1.15.3 (2010-04-06 03:13:33 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
 Backfire (10.03, r20728) --------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua
  * 1/3 shot Bailey's  on the bottom, then Bailey's,
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt:/#

Upgrading OpenWrt

If you have already installed OpenWrt and like to reflash for e.g. upgrading to a new OpenWrt version you can upgrade using the sysupgrade command line tool.

It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing.

root@OpenWrt:/# cd /tmp
root@OpenWrt:/tmp# wget ftp://192.168.1.254/openwrt-atheros-combined.squashfs.img
Connecting to 192.168.1.254:2121 (192.168.1.254:2121)
openwrt-atheros-comb 100% |*******************************|  2752k 00:00:00 ETA
root@OpenWrt:/#

When it is done, use the sysupgrade command to flash it:

root@OpenWrt:/tmp# sysupgrade openwrt-atheros-combined.squashfs.img
Saving config files...
Switching to ramdisk...
mount: mounting mini_fo:/overlay on /mnt failed: Function not implemented
Performing system upgrade...
Unlocking vmlinux.bin.l7 ...
Unlocking rootfs ...
Writing from <stdin> to vmlinux.bin.l7 ...
Writing from <stdin> to rootfs ...
Appending jffs2 data from /tmp/sysupgrade.tgz to rootfs...
Updating FIS table...
Rebooting ...
br-lan: port 1(eth0) entering disabled state
device eth0 left promiscuous mode
br-lan: port 1(eth0) entering disabled state
Restarting system.

Hardware

Info

Architecture: MIPS
Vendor: Atheros
Bootloader: RedBoot
System-On-Chip: AR5312
CPU Speed: 220 MHz
Flash-Chip: Spansion S29JL064H90T
Flash size: 8MiB
RAM: 32MiB
Wireless: Atheros 802.11b/g/a (built-in)
Ethernet: 1xRJ45
USB: No
Serial: Yes
JTAG: Yes

Photos

PCB

Serial Port

The signals of the built-in UART lines can be found on the expansion connector. The full pinout of the expansion connector can be found in the user guide of the device.

Serial pinout:
           |                   |                   |    |     SHIELD
           |                   |        CPU        |    |_____________
           |                   |___________________|                  
 7: 3.3V   |                                                          
41: GND    |                                                          
45: TX     |       49         _____________________________         1 
47: RX     |        o o o o o|o o o o o o o o o o o o o o o|o o o o o
           |        o o o o o|o o o o o o o o o o o o o o o|o o o o o
           |       50         -----------------------------         2
           |__________________________________________________________

The UART lines are operating at TTL voltage levels, so if you want to connect it to your PC, you need a TTL-to-RS232 level shifter. See the Serial Console article for more informations.

Interfaces

The default network configuration is:

Interface Name Description Default configuration
br-lan eth0, wifi0 & wifi1 192.168.1.1/24
eth0 RJ45 port None
eth1 Expansion connector None
wifi0 improperly detected in Backfire 10.03
wifi1 WiFi 2.4+5.0 GHz Disabled

Other Info

Back to top

toh/abicom/freedom_cpe.txt · Last modified: 2010/06/19 13:10 by juhosg