Hi all!
I just found my old (SMC WBR14T-G) router again and decided to try putting OpenWRT on it.
The device has 16 MB of RAM, Atheros AR2316 WiSoC, almost identical to what is found here:
http://wiki.openwrt.org/OpenWrtDocs/Har … mens/SE551
(the only problem is that the flash is only 2 MB, so i'll probably use RedBoot with network booting...)
I downloaded kamikaze from SVN, changed start address from 0x80041000 to 0x80001000 and the serial port baud rate to 115200, compiled the kernel with built-in jffs2 and uploaded the vmlinux image to memory via serial interface (it uses arcadyan's bootloader)
ar531xPlus rev 0x00000087 boot loader startup...
Flash initialized
SDRAM initialized
Cache initialized
Copy program from 0xbfc00000 to 0x80520000, length 0x0000c56c bytes ... done
Jump to SDRAM 0x80520cb4 [0x10000008, 0x00000000, 0x00000000]
Clear BSS section ... done
Stack: 0x8053e390
Heap: 0x8053e3a0
==================================================================
Wireless Gateway WG4005E Loader V0.03 build Mar 29 2005 15:25:28
Arcadyan Technology Corporation
==================================================================
Flash Found. It is 2MB Flash....
Copying boot params.....DONE
cpuFreq=240000000 sysFreq=60000000 cntFreq=120000000
Press any key to enter command mode ...
[WG4005E Boot]:m
RAM upload destination: (default:0x80001000) : 0x
Starting XModem download...(press Enter to abort)
CCCCCCC
Done!
Do you want to execute the uploaded code? (Y/n) Linux version 2.6.23.16 (
norb@bt) (gcc version 4.1.2) #16 Sat Apr 26 20:48:21 GMT 2008
CPU revision is: 000
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Built 1 zonelists in Zone order. Total pages: 4064
Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2 init=/etc/pr
einit
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.
console [ttyS0] enabled
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 14832k/16384k available (1006k kernel code, 1552k reserved, 197k data, 8
0k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
WARNING: No board configuration data found!
Time: MIPS clocksource has been installed.
ar531x: Registering GPIODEV device
CPU 0 Unable to handle kernel paging request at virtual address 00000050, epc ==
8012f900, ra == 8012e780
Oops[#1]:
Cpu 0
$ 0 : 00000000 10008400 80140000 80140000
$ 4 : ffff8af2 00000000 000000b8 801017ec
$ 8 : ffffffff fffffffc 00000001 00000000
$12 : 80150000 80150000 fff7ffff 00200200
$16 : 00000000 00000000 8014100c 00000000
$20 : fffffffe 00000000 00000000 00000000
$24 : 00000000 800c57cc
$28 : 80188000 80189f38 80
Hi : 0000005b
Lo : c01e0000
epc : 8012f900 ar531x_init_reset+0x28/0x5c Not tainted
ra : 8012e780 kernel_init+0xbc/0x328
Status: 10008403 KERNEL EXL IE
Cause : 30800008
BadVA : 00000050
PrId : 00019064
Modules linked in:
Process swapper (pid: 1, threadinfo=80188000, task=80187568)
Stack : 8012f568 8012f4e0 00000000 8012b31c 8012b2e0 000001bf 8012e780 8012e780
00000000 8012e6c4 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 80005454 10008403 00000000 00000000 00000000
...
Call Trace:
[<8012f900>] ar531x_init_reset+0x28/0x5c
[<8012e780>] kernel_init+0xbc/0x328
[<80005454>] kernel_thread_helper+0x10/0x18
Code: 3c038014 ac652074 ac442078 <94a40050> 3c078011 3c058000 24840030 24a5
1c90 24e72a24
Kernel panic - not syncing: Attempted to kill init!
It seems that the flash does not contain atheros board config... i downloaded the whole 2MB flash and searched for the pattern 0x35333131 but found nothing, so i made an ugly hack and modified arch/mips/atheros/board.c and added a static board config, similar to the one here:
http://wiki.openwrt.org/WingedUnicorn
I also modified spiflash.c and added 5 static partitions.
Now everything works, except the wireless interface
wlan: trunk
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 (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
wlan: mac acl policy registered
ath_ahb: trunk
MadWifi: unable to attach hardware: 'EEPROM checksum invalid' (HAL status 7)
Since the Atheros HAL is not open source, i can't make a radio config structure the way i made the board config.
I tried to find radio config in the "Params Area" partition of the flash, but the whole partition is filled with 0xff bytes, except a small part of about 60 bytes which contain information for the bootloader. Maybe I missed something.
Is there any way i can make my wireless interfaces work?
BTW i heard that board config has gone missing in almost all ar2316 devices, but radio config is present in some of them. I'd be grateful if someone could send me his/her "params area" flash partition (i think D-Link DI624 has radio params in its flash ROM)
Thank you for your effort.
(Last edited by zinbatsu on 28 Apr 2008, 23:45)