OpenWrt Forum Archive

Topic: Bootloader/Image for a DLink DWL-2100AP

The content of this topic has been archived between 26 Mar 2018 and 5 May 2018. Unfortunately there are posts – most likely complete pages – missing.

Hi ramcheck,

jtag-brecis-ok give an error when it try to erase but i works.
If you have done the fix... can you send it me at ramponis<at>tiscali.it?

I have compiled openwrt for the 2100AP but i start only from network.
I need to compile a new bootloader (redboot) to flash openwrt on 2100AP
Do you have compiled it corretly?
When i try to compile it... i receive this error:

/ecos-c/PROGRA~1/cygwin/home/Administrator/redboot_mini/redboot/ap30/rom/install
/include/stddef.h:64:25: stddef.h: No such file or directory
make[2]: *** [/ecos-c/PROGRA~1/cygwin/home/Administrator/redboot_mini/redboot/ap
30/rom/install/include/cyg/hal/plf_defs.inc] Error 1

i use this command to set the compile:

make DRAM_MB=16 FLASH_MB=4 CLK_MHZ=180 ENET_PHY=icplus ap30

(Last edited by ramponis on 11 Jun 2007, 18:22)

Hi ramponis,

I have created a diff with my changes to jtag-brecis-ok. These fix the problem with flash_erase and also implement the new command d (dump) which I found most useful. Here is the link to the diff: http://www.dm.ufscar.br/profs/waldeck/j … ldeck.diff

As to building redboot, it seems that your toolkit is either missing something or it is not installed properly. I followed the instructions on http://ecos.sourceware.org/docs-latest/ … dboot.html and now I can build redboot. I used

> cd <path to ecos/redboot distro>
> source ./ecosenv.sh
> mkdir /tmp/redboot
> cd /tmp/redboot
> ecosconfig new atheros_ap43 redboot
> ecosconfig import ${ECOS_REPOSITORY}/hal/mips/ap43/v2_0/misc/redboot_ROM.ecm
> ecosconfig tree
> # at this point I had to fix the makefiles that used tail +2 and changed this into tail -n 2
> # you may or may not need this, but the following command will do the trick:
> sed -ie 's/tail +2/tail -n 2/' $(grep -rl "tail +2" *)
> make

This worked just fine for me and produced some ELF files in install/bin. The problem now is that I don't know what to do with these files. I suppose they have to be converted into plain binary form, but I don't know how.

Please tell me if this helps.
ramcheck

Followup on my post: To create an flash image, go into install/bin and type the following command:

mipsisa32-elf-objcopy -O binary redboot.elf redboot.bin

(Last edited by ramcheck on 17 Jun 2007, 23:30)

Hi ramponis,

Using the procedure I described above, I could compile and make an image of redboot for atheros_ap51, which seemed to match the hardware more closely. However, as the following log shows, there seems to be something wrong with the flash memory driver. I'm not so sure about the cause, but I'm glad that at least it will boot and give me the prompt, so I could say the thing is alive. At the moment I have no idea about how to integrate openwrt into this picture, but I'll continue to investigate. I would very much like to be able to write openwrt on flash. Can you help me?

Thanks,
ramcheck

RedBoot startup                                                                 
FLASH: driver init failed: Driver does not support device                       
FLASH: driver init failed: Driver does not support device                       
Ethernet eth0: MAC address 00:11:95:da:63:8d                                    
IP: 0.0.0.0/255.255.255.0, Gateway: 0.0.0.0                                     
Default server: 0.0.0.0, DNS server IP: 0.0.0.0                                 
                                                                                
RedBoot(tm) bootstrap and debug environment [ROM]                               
Non-certified release, version v2_0 - built 23:44:55, Jun 12 2007               
                                                                                
Copyright (C) 2000, 2001, 2002, Red Hat, Inc.                                   
                                                                                
RAM: 0x80000400-0x81000000, 0x80000400-0x80ff4000 available                     
RedBoot>

Now i'm out for work and i have not my linux pc.
Next week i came back to italy and i restart my work on the 2100AP.
What type of flash does your 2100AP use?
Is your version of redboot for rom or ram?

Bye

Hey ramponis,

I'm certainly not in a hurry to get this working and I can wait for your return. After digging into the reference redboot I realized it lacked support for my flash chip, the Atmel AT49BV322A. After I added it to the list of supported chips the flash was finally recognized. Before I could do anything useful I had to erase the whole flash using jtag.

Here is the log of a typical startup and some sample commands:

RedBoot startup
Could not find valid MAC address for enet1.  Using default!
Ethernet eth0: MAC address 00:03:7f:**:**:**
IP: 192.168.0.50/255.255.255.0, Gateway: 192.168.0.1
Default server: 192.168.0.1, DNS server IP: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 01:08:19, Jun 16 2007

Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x80000400-0x81000000, 0x80000400-0x80fe1000 available
FLASH: 0xbfc00000 - 0xbffe0000, 62 blocks of 0x00010000 bytes each.
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBFC00000  0xBFC00000  0x00030000  0x00000000
RedBoot config    0xBFFC0000  0xBFFC0000  0x00001000  0x00000000
FIS directory     0xBFFD0000  0xBFFD0000  0x00010000  0x00000000
RedBoot> fconfig -l
Run script at boot: false
Use BOOTP for network configuration: false
Gateway IP address: 192.168.0.1
Local IP address: 192.168.0.50
Local IP address mask: 255.255.255.0
Default server IP address: 192.168.0.1
Console baud rate: 9600
DNS server IP address: 0.0.0.0
GDB connection port: 9000
Force console for special debug messages: false
Network debug at boot time: false
RedBoot> load -r -v -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
Raw file loaded 0x80041000-0x80100fff, assumed entry at 0x80041000
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin
... Erase from 0xbfe70000-0xbff30000: ............
... Program from 0x80041000-0x80101000 at 0xbfe70000: ............
... Erase from 0xbffd0000-0xbffe0000: 
Error erasing FIS directory at 0xbffd0000: Device/region is write-protected
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBFC00000  0xBFC00000  0x00030000  0x00000000
RedBoot config    0xBFFC0000  0xBFFC0000  0x00001000  0x00000000
FIS directory     0xBFFD0000  0xBFFD0000  0x00010000  0x00000000
RedBoot>

As the above log show, I could not create a new fis partition since the FIS directory was locked. But why was it locked?

Cheers,
ramcheck

Followup #1: I have since figured out that my memory chip does not support memory unlocking and thus I disabled locking and rebuild redboot. Now I can create partitions:

RedBoot> load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.lzma
Raw file loaded 0x80041000-0x80100fff, assumed entry at 0x80041000
RedBoot> fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.l7
... Erase from 0xbfc30000-0xbfcf0000: ............
... Program from 0x80041000-0x80101000 at 0xbfc30000: ............
... Erase from 0xbffd0000-0xbffe0000: .
... Program from 0x80fef000-0x80fff000 at 0xbffd0000: .
RedBoot> load -r -v -b 0x80041000 openwrt-atheros-2.6-root.squashfs
Raw file loaded 0x80041000-0x80160fff, assumed entry at 0x80041000
RedBoot> fis create -b 0x80041000 -l 0x11ffff -e 0 rootfs
... Erase from 0xbfcf0000-0xbfe0ffff: ..................
... Program from 0x80041000-0x80160fff at 0xbfcf0000: ..................
... Erase from 0xbffd0000-0xbffe0000: .
... Program from 0x80fef000-0x80fff000 at 0xbffd0000: .
RedBoot> fis list
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0xBFC00000  0xBFC00000  0x00030000  0x00000000
RedBoot config    0xBFFC0000  0xBFFC0000  0x00001000  0x00000000
FIS directory     0xBFFD0000  0xBFFD0000  0x00010000  0x00000000
vmlinux.bin.l7    0xBFC30000  0x80041000  0x000C0000  0x80041000
rootfs            0xBFCF0000  0x80041000  0x0011FFFF  0x00000000
RedBoot>

However, when I try to load and run vmlinux, redboot crashes and goes into gdb. Sic. No more clues at the moment, but I guess I'm making steady progress.  cool

Followup #2: Yeah, I know. redboot has no support for lzma compression and in order to use gz compression I must add the -d switch. Now everything is fine. I have successfully compiled, flashed and run both redboot and openwrt. smile Here is the result:

RedBoot startup
Ethernet eth0: MAC address 00:11:95:**:**:**
IP: 192.168.0.50/255.255.255.0, Gateway: 192.168.0.1
Default server: 192.168.0.1, DNS server IP: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 04:19:18, Jun 16 2007

Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x80000400-0x81000000, 0x80000400-0x80fe1000 available
FLASH: 0xbfc00000 - 0xbffe0000, 62 blocks of 0x00010000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot> fis load -d vmlinux.bin.gz
Image loaded from 0x80041000-0x80292085
RedBoot> exec
Now booting linux kernel:
 Base address 0x80080000 Entry 0x80041000
 Cmdline : 
Linux version 2.6.21.1 (waldeck@hal64) (gcc version 4.1.2) #1 Sat Jun 16 14:39:48 BRT 2007
CPU revision is: 0001800a
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 90.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: 13496k/16384k available (1963k kernel code, 2888k reserved, 292k data, 116k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Radio config found at offset 0x10000(0x100)
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 0xbc000003 (irq = 37) is a 16550A
eth0: Dropping NETIF_F_SG since no checksum feature.
eth0: Atheros AR231x: 00:11:95:**:**:**, irq 4
physmap platform flash device: 00400000 at 1e000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0041
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 0x3d0000
5 RedBoot partitions found on MTD device physmap-flash.0
Creating 5 MTD partitions on "physmap-flash.0":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x00130000 : "vmlinux.bin.gz"
0x00130000-0x002d0000 : "rootfs"
0x003c0000-0x003c1000 : "RedBoot config"
0x003d0000-0x003e0000 : "FIS directory"
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
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
VFS: Mounted root (jffs2 filesystem) readonly.
Freeing unused kernel memory: 116k freed
Warning: unable to open an initial console.
eth0: Configuring MAC for full duplex
Algorithmics/MIPS FPU Emulator v1.5
- preinit -
- init -
init started:  BusyBox v1.4.2 (2007-06-16 12:46:52 BRT) multi-call binary

Please press Enter to activate this console. eth0: Configuring MAC for full duplex
device eth0 entered promiscuous mode
PPP generic driver version 2.4.2
br-lan: port 1(eth0) entering learning state
br-lan: topology change detected, propagating
br-lan: port 1(eth0) entering forwarding state
wlan: 0.8.4.2 (svn r2377)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.30.13 (AR5212, AR5312, RF2316, TX_DESC_SWAP)
ath_rate_minstrel: 1.2 (svn r2377)

Minstrel automatic rate control algorithm.

Look around rate set to 10%
EWMA rolloff level set to 75%
Max Segment size in the mrr set to 6000 us

wlan: mac acl policy registered
ath_ahb: 0.9.4.5 (svn r2377)
wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)
psirq 0, desc: 80273040, depth: 1, count: 0, unhandled: 0
->handle_irq():  80087f54, ->chip(): 80267c80, ->action(): 00000000
  IRQ_DISABLED set
unexpected IRQ # 0



BusyBox v1.4.2 (2007-06-16 12:46:52 BRT) 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 (bleeding edge, r7424) -------------------
  * 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:/# psirq 0, desc: 80273040, depth: 1, count: 0, unhandled: 0
->handle_irq():  80087f54, ->chip(): 80267c80, ->action(): 00000000
  IRQ_DISABLED set
unexpected IRQ # 0

  PID  Uid     VmSize Stat Command
    1 root        392 S   init       
    2 root            SWN [ksoftirqd/0]
    3 root            SW< [events/0]
    4 root            SW< [khelper]
    5 root            SW< [kthread]
   17 root            SW< [kblockd/0]
   28 root            SW  [pdflush]
   29 root            SW  [pdflush]
   30 root            SW< [kswapd0]
   31 root            SW< [aio/0]
   41 root            SW  [mtdblockd]
  149 root            SWN [jffs2_gcd_mtd2]
  155 root        396 S   logger -s -p 6 -t  
  157 root        476 S   /bin/ash --login 
  361 root        336 S   syslogd -C16 
  364 root        276 S   klogd 
  372 root        228 S   /sbin/hotplug2 --persistent --max-children 1 
  918 root        324 S   crond -c /etc/crontabs 
  951 root        168 S   httpd -p 80 -h /www -r OpenWrt 
  957 root        200 S   telnetd -l /bin/login 
 1019 nobody      348 S   dnsmasq -F 192.168.1.100,192.168.1.250,255.255.255.0,
 1050 root        372 R   ps 
root@OpenWrt:/#

At last, my DWL-2100AP can run openwrt. Steady progress indeed! cool

(Last edited by ramcheck on 17 Jun 2007, 02:09)

I'm came back
Can you share your bootloader for my test?
Thank you

ramponis wrote:

I'm came back
Can you share your bootloader for my test?
Thank you

Of course! I'll put everything up on a page and then e-mail you the address. But first, please tell me what kind of ROM you have, for there is a chance my boot will not work well for you. It was compiled with support for the following ROM chips: Atmel AM49BV322A and Spansion S29GL032M. If your ROM doesn't match any of these, your board will boot but the flash system will not work.

ramcheck

(Last edited by ramcheck on 17 Jun 2007, 23:50)

Thank you wink

My ROM chips is Atmel AM49BV322A like yours

ramponis wrote:

My ROM chips is Atmel AM49BV322A like yours

Please let me know whether redboot worked for you. There's still something wrong with openwrt's wireless support. Everything seems to be  fine, except that when I type "ifconfig ath0 up" my board hangs and after some time it reboots. The only difference from your tests seem to be madwifi version. Mine is madwifi-ng-r2377-20070526.

Ramcheck

I'm testing your redboot.
If it work i will load my versione of openwrt.

ramcheck wrote:

There's still something wrong with openwrt's wireless support. Everything seems to be  fine, except that when I type "ifconfig ath0 up" my board hangs and after some time it reboots

I have already fixed this problem, if all work fine i will load my firmware and your bootloader in my web pages about the 2100AP. wink

Hi Ramcheck,

I have loaded your redboot and it work correctly.
I have also recompiled openwrt and loaded on the flash.
The wi-fi is loaded correctly but i have this error:

: /etc/rc.common: eval: 212: cannot create /etc/config/wireless: No space left o
n device

You can read the serial log:

+
RedBoot startup
Ethernet eth0: MAC address 00:**:**:**:**:**
IP: 192.168.0.50/255.255.255.0, Gateway: 192.168.0.1
Default server: 0.0.0.0, DNS server IP: 0.0.0.0

RedBoot(tm) bootstrap and debug environment [ROM]
Non-certified release, version v2_0 - built 17:10:24, Jun 17 2007

Copyright (C) 2000, 2001, 2002, Red Hat, Inc.

RAM: 0x80000400-0x81000000, 0x80000400-0x80fe1000 available
FLASH: 0xbfc00000 - 0xbffe0000, 62 blocks of 0x00010000 bytes each.
RedBoot> fis load -d vmlinux.bin.l7
Image loaded from 0x80041000-0x80292085
RedBoot> exec
Now booting linux kernel:
 Base address 0x80080000 Entry 0x80041000
 Cmdline :
Linux version 2.6.21.1 (ramponis@ramponis-desktop) (gcc version 4.1.2) #5 Tue Ju
n 19 15:16:29 CEST 2007
CPU revision is: 0001800a
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/prei
nit
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 90.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: 13496k/16384k available (1961k kernel code, 2888k reserved, 294k data, 1
16k init, 0k highmem)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
Radio config found at offset 0x10000(0x100)
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 0xbc000003 (irq = 37) is a 16550A
eth0: Dropping NETIF_F_SG since no checksum feature.
eth0: Atheros AR231x: 00:13:46:60:cb:7c, irq 4
physmap platform flash device: 00400000 at 1e000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0041
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 0x3d0000
5 RedBoot partitions found on MTD device physmap-flash.0
Creating 5 MTD partitions on "physmap-flash.0":
0x00000000-0x00030000 : "RedBoot"
0x00030000-0x00130000 : "vmlinux.bin.l7"
0x00130000-0x0024ffff : "rootfs"
mtd: partition "rootfs" doesn't end on an erase block -- force read-only
0x003c0000-0x003c1000 : "RedBoot config"
0x003d0000-0x003e0000 : "FIS directory"
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
Bridge firewalling registered
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
jffs2: Flash size not aligned to erasesize, reducing to 1088KiB
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
eth0: Configuring MAC for full duplex
init started:  BusyBox v1.4.2 (2007-05-25 13:19:27 CEST) multi-call binary

Please press Enter to activate this console. : killall: syslogd: no process kill
ed

wlan: 0.8.4.2 (svn r2377)
ath_hal: module license 'Proprietary' taints kernel.
ath_hal: 0.9.30.13 (AR5212, AR5312, RF5111, RF5112)
ath_rate_minstrel: 1.2 (svn r2377)

Minstrel automatic rate control algorithm.

Look around rate set to 10%
EWMA rolloff level set to 75%
Max Segment size in the mrr set to 6000 us

wlan: mac acl policy registered
ath_ahb: 0.9.4.5 (svn r2377)
ath_pci: switching rfkill capability off
wifi0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
wifi0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps 24Mbps 36
Mbps 48Mbps 54Mbps
wifi0: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 5.8 phy 4.4 radio 4.6
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 2313 WiSoC: mem=0xb8500000, irq=5
: /etc/rc.common: eval: 212: cannot create /etc/config/wireless: No space left o
n device

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: eval: 1: iptables: not found

: /etc/rc.common: /etc/firewall.user: 4: iptables: not found

: /etc/rc.common: /etc/firewall.user: 5: iptables: not found

: /etc/rc.common: /etc/firewall.user: 6: iptables: not found

: /etc/rc.common: /etc/firewall.user: 7: iptables: not found

: /etc/rc.common: /etc/firewall.user: 8: iptables: not found

: /etc/rc.common: /etc/firewall.user: 13: iptables: not found

: /etc/rc.common: /etc/firewall.user: 14: iptables: not found

: /etc/rc.common: /etc/firewall.user: 15: iptables: not found

: /etc/rc.common: eval: 13: crond: not found

: /etc/rc.common: eval: 1: httpd: not found

: /etc/rc.common: eval: 13: telnetd: not found

: udhcpc: SIOCGIFINDEX failed: No such device

: /etc/rc.common: eval: 1: dnsmasq: not found

: /etc/rc.common: .: 163: Can't open /usr/lib/webif/functions.sh




BusyBox v1.4.2 (2007-05-25 13:19:27 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 (bleeding edge, r7390) -------------------
  * 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:/#

If you want you can try my openwrt.
You can download in my 2100AP web-site

http://xoomer.alice.it/ramponis

Go in flash section and you can find it wink

(Last edited by ramponis on 19 Jun 2007, 18:06)

Hi ramponis,

Your log says "mtd: partition "rootfs" doesn't end on an erase block -- force read-only". You may have to initialize the flash again and then use fis to create your partitions. This should keep the erase block alignment. I recommend the following:

fis init -f
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.gz
fis create -r 0x80041000 -e 0x80041000 vmlinux.bin.gz
load -r -b 0x80041000 openwrt-atheros-2.6-root.squashfs
fis create -r 0x80041000 -e 0 rootfs

This is preventing your root partition from being mounted rw and may be the cause of your problem with the wifi.

I'll try your firmware later today. Thanks!

Ramcheck

PS: your kernel reads vmlinux.bin.l7. Is this the lzma-compressed kernel?

PS #2: Did you try my patch to jtag-brecis? flashmem works fine now, but eraseflash is still broken. I'm working on it. wink

PS #3: Please notice that the redboot I sent you will not work well for all hardware revisions. It was tested on A3 only. It should work on rev. A4 and most surely will not work well on rev. A2, for it has no support for the AM29LV320DB flash. I'm also working on it. wink Stay tuned for a new version.

PS #4: Your firmware is too big! It won't fit my AP. Can you make it smaller?

PS #5: I'm testing your firmware right now. Same problem here: the jffs partition is mounted read-only. Forcing it rw won't help either. It seems that you really have to try and make it smaller. BTW how did you fix the wifi thing?

PS#6: Here is what worked for me: create the rootfs partition with some extra fat:

fis init -f
load -r -b 0x80041000 openwrt-atheros-2.6-root.jffs2-64k
fis create -r 0x80041000 -l 0x320000 -e 0 rootfs
load -r -b 0x80041000 openwrt-atheros-2.6-vmlinux.bin (this is the uncompressed .lzma kernel)
exec
...
root@OpenWrt:/etc# df                                                           
Filesystem           1k-blocks      Used Available Use% Mounted on              
/dev/mtdblock1            3200      2840       360  89% /                       
none                      6804        28      6776   0% /tmp                    
tmpfs                      512         0       512   0% /dev                    
root@OpenWrt:/etc#

Now you can add things to your / partition. Too bad now there's no room on flash for the kernel sad

(Last edited by ramcheck on 20 Jun 2007, 04:44)

Hello,

I follow this topic with a lot of interest. My name is Edouard and I am amateur radio (pseudo is my callsign), I have a pair of these DWL-2100AP. I bought one some time ago knowing that it could be shifted in frequency by -100 MHz thus falling into the first portion of the amateur radio 2.4 GHz band that is not ISM and indeed I was successful trying it. I bought another one more recently with the idea of setting up a 21 km link between home and a mountain top that is in view from home and from which I can make interesting (i.e. distant) contacts on microwave bands. The interest besides testing that the link was possible was to have an Internet link to be able to connect to a specialized chat where fellow amateur radio schedule contacts. I have a pair of 20 dBi gain panels for the 2.4 GHz WiFi link.

The signal at the mountain top was largely good enough to make a connection (from 44 to 56%) with the standard power but the AP client would not connect whatsoever. I couldn't connect to other open networks that were also in reach either. I searched for information on the net and quickly found about this ack timeout problem and now I think this is the problem. The stock firmware of the DWL-2100AP does not allow to tweak this parameter so I looked for alternatives and I quickly found that OpenWrt could be a solution. I think the MadWiFi software that manages the WiFi link allows to specify the ack timeout.

So that would be great if I could use OpenWrt and MadWiFi on these boxes besides the fact that I don't like proprietary software very much in particular if it cripples the capabilities of the hardware that I bought with my good money!

For now I think I have managed to engage the XR mode on both boxes with the 0.25 Mb/s displayed bitrate by tweaking the configuration file and using the v2.01eu-r137 version of the firmware. I don't know if this alone will make the trick to allow the 21 km link. I can easily test the path only on 1 km and this worked before anyway. Going at the mountain top is not something I can do every day.

I don't know how I can be useful to this project. I have bought a S25 cable like Ramponis did and will make the serial connection mod. I also have a Parallel Cable III from Xilinx that I use to program a Xilinx FPGA board. I don't know if this can be used for the DWL-2100AP JTAG, the only way to know is probably to try it. I have some knowledge of Linux but mostly as a user although with Linux this implies some system knowledge as well and I am familiar with compilation and similar stuff although OpenWrt is not the simplest I think. There are a few more things beyond ./configure + make + make install ;-) I have already used JTAG on my Xilinx board and a few others also trying to TFTP boot some boards so this is not entirely unknown for me. I have tried to follow what you have done and I must say that it is not 100% clear for me but I will try to fiddle with the serial link once it is set up. I think you said it is possible to boot OpenWrt from the network just using the serial console (no JTAG) so that could be an interesting first exercise.

If not for anything else I can help validating your stuff on my board.

Thanks very much for your interesting work and I hope to read more news soon,
Edouard.

Hi Edouard,

Your project sounds pretty ambitious for consumer hardware, but I see no reason why it shouldn't work. At least in theory. I think I have came across other sites on the net where people were doing just this sort of thing, only over shorter distances. It's really amazing what these little boxes can do. I don't have any higher ambition in this business other than having fun. I've been a most exclusively a linux user for over 10 years now and I think it's just too cool to try and get it to run on such exotic grounds. If this can help people too, even better.

You could be very helpful just by trying the stuff we are doing here on your boxes, since I presume that they are already out of warranty. The jtag cable you mention seems fine and with jtag-tools you could replace the original boot loader with redboot to begin with. I'm also a newbie here, and honestly I don't know whether redboot is the best option, but it's free and it sure can do it.

Please tells us more details about your hardware. What is the revision number (typically A2, A3 or A4), what is the flash chip, the PHY, etc.

Cheers,
Ramcheck

Hello!

Thanks for your reply and confirming that the Xilinx cable could work, I may just need to adjust the exact pinout with an adapter but that's no problem. I am waiting for the serial cable to arrive and then I will open the beasts and start working on the serial link so I'll be able to tell you which version of the hardware it is. One was bought last month and the other more than one year ago so they may differ. I don't care so much about the warranty on the more recent one, the prospects of having a firmware that actually does the job and that is open source plus the fun of trying it largely compensates the inconvenience. I'll keep one untouched (just opening it to check the hardware revision) for reference and backup until I know that it works though.

The signal at the mountain top was around 50% for a 14dBm output power (25mW) so it seems to me that the link should be largely possible, I have already connected to open networks with the same hardware and signals of about 10 to 15%. I think the 'ack timeout' is definitely the problem for the long range link.

This is consumer hardware but the 20 dBi panel antennas are a little bit beyond average consumer specs although I could find them ready made and brand new on eBay.

I'll let you know soon about the hardware revisions.

#Edit: my JTAG cable is actually a cheap replacement of the original Xilinx parallel cable III made by Digilent and known as JTAG3. It is supposed to be a "clone" so hopefully it will work.

Cheers.
Edouard.

(Last edited by f4exb on 21 Jun 2007, 16:28)

Hi Edouard,

The poorman's wiggler cable worked just fine for me. But you must keep it as short as possible.

http://www.dm.ufscar.br/profs/waldeck/wiggler-cable.jpg

Ramcheck

Hello Ramcheck,

I could obtain the hardware revision numbers, I opened one box before figuring out that it was actually labeled on the outside ;-) So one is A3 and the other (most recent) is A4. For the detail of the components I think I need to scan the JTAG chain, unfortunately the Digilent JTAG3 cable isn't recognised by jtag tools. I use the Ubuntu/Feisty package that is a recent revision (5.0.1 I think). I tried to compile the latest sources but it gives me an ugly compilation error (booh!). I think I will have to build a Wiggler cable, either rich or poor but I need some length of parallel cable to run from the computer to the board.

I will pick-up the S25 cable at the post office tomorrow and start working on the serial interface.

Cheers,
Edouard.

Hello!

Here are some news:

I could build the serial link with the S25 cable, it works very well. I looked inside the boxes and I checked the various chips so here is what I found:

A3 version:
AT49BV322A (Flash)
AR2113A-00 (CPU)
AR2112A-00 (RF device)

A4 version:
S29GL032M90TFIR4 (Flash)
AR2313A-001 (CPU)
AR2112A-001 (RF device)

I tried to boot with Stefano's version of openwrt-atheros-2.6-vmlinux.elf using TFTP on the A3 box but it doesn't work since it cannot mount the root filesystem. That's normal because you use redboot to build it. The art ELF file works and boots VxWorks. The art file doesn't boot on the A4 version.

I am now trying to build an openwrt version with the root filesystem on ram to see if it can fully boot and how does it look like.

For JTAG, the JTAG3 cable doesn't work. I have bought the components to build a buffered interface, I'll try that later.

More news later, Cheers!
Edouard.

Waow it boots!

I still have the MadWiFi error: MadWifi: unable to attach hardware: 'Hardware revision not supported' (HAL status 13) but I think it has been dealt with already. I'll look at the earlier posts.

Cheers,
Edouard.

Hi Edouard,

Thank you for sharing the good news with us. Please tell us more about what you did. Are you using redboot?

I was expecting the difference between A3 and A4, but lately I confess I a bit confused. I have just opened an A2 version and it has the same flash as the A3. It seems there's no consistency across versions so I'll try and make a redboot version that will work throughout them all.

You're right about the problem with madwifi. The fix is simple and was reported earlier on this thread. Good luck with your tests.

Cheers,
Ramcheck

Hello Ramcheck,

I am not using redboot yet as I don't have a working JTAG cable yet but it is in the plans to build one. I am trying to boot from the network and as far as the boot is concerned this works.

I did the mods to MadWiFi as described at the beginning of page #3 in this topic, I did the mod only to Makefile.inc as there is no -EB in the COPTS (only in LDOPTS) of ap43.inc. Now I have a problem, I cannot force make to recompile MadWiFi, if I do make clean in MadWiFi directory I get a compilation error when doing make in the trunk directory and if I do make clean at the top to rebuild everything I loose the mods to MadWiFi's Makefile.inc as everything is rebuilt including Makefile.inc

Could you tell me how you have been proceeding?

#edit: I use Kamikaze/r7717

Thanks!
Edouard.

(Last edited by f4exb on 25 Jun 2007, 02:40)

Hi f4exb

You currently have to change the HAL that it uses. Edit package/madwifi/Makefile and replace the 'ap51' hal with 'ap30', then rebuild...

(Last edited by ramponis on 25 Jun 2007, 11:49)

Hi ramcheck

I have compiled openwrt kamikaze r7252 with working wi-fi section.
If you want you can try it wink

Download it from my website (go in flash section)

http://xoomer.alice.it/ramponis

Hi Ramponis,

I changed trunk/package/madwifi/Makefile as you suggested replacing ap51 by ap30. Now I have a wifi0 that appears. However it says it is disabled. Consequently when I issue a iwconfig it says it has no wireless extensions .

#Edit: These are the messages for wifi0 at boot time:

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: turboG rates: 6Mbps 12Mbps 18Mbps 24Mbps 36Mbps 48Mbps 54Mbps
wifi0: H/W encryption support: WEP AES AES_CCM TKIP
wifi0: mac 5.8 phy 4.4 radio 4.6
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 2313 WiSoC: mem=0xb8500000, irq=5
: 'wifi0' is disabled

Do you know how to fix this?

#Edit2: OK, I flipped back a few posts (this gets complicated we'll need to summarize, perhaps in your document) and got an ath0 that seems to be working using these commands

wlanconfig ath0 create wlandev wifi0 wlanmode ap
ifconfig ath0 up

Now when I do iwconfig:

root@OpenWrt:/# iwconfig
eth0      no wireless extensions.

lo        no wireless extensions.

br-lan    no wireless extensions.

wifi0     no wireless extensions.

ath0      IEEE 802.11g  ESSID:""  Nickname:""
          Mode:Master  Frequency:2.417 GHz  Access Point: 00:13:46:96:A5:8B   
          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/127  Signal level=-95 dBm  Noise level=-95 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Good... now I need to look at MadWiFi documentation to parameter the interface to do something useful but that's already a great achievement.

Thanks!
Edouard.

(Last edited by f4exb on 26 Jun 2007, 02:28)

Sorry, posts 101 to 100 are missing from our archive.